Advertisement
natie3

Send aspects

Sep 13th, 2014
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. m = peripheral.wrap("left")
  2. rs.setOutput("back",true)
  3. os.startTimer(30)
  4. jars = peripheral.getNames()
  5. while true do
  6.   Table = {}
  7.   for k, v in pairs(jars) do
  8.     if (v ~= "right" and v ~= "left" and v ~= "back") then
  9.       aspects = peripheral.call(v,"getAspects")
  10.       aspect = aspects[1]
  11.       table.insert(Table,aspect)
  12.     end
  13.   end
  14.   m.transmit(100,101,textutils.serialize(Table))
  15.   os.pullEvent("timer")
  16.   os.startTimer(30)
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement