Advertisement
Guest User

startup

a guest
Mar 24th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. rednet.open("right")
  2. names = peripheral.getNames()
  3. sides = {"right", "left", "top", "bottom", "front", "back"}
  4. for i = 1, #names do
  5.   c = peripheral.wrap(names[i])
  6.   print(names[i])
  7.   ifcomp = true
  8.   for a = 1, #sides do
  9.     if names[i] == sides[a] then
  10.       ifcomp = false
  11.     end
  12.     if ifcomp == true then
  13.       c.turnOn()
  14.     end
  15.   end
  16. end
  17. print("All should be on")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement