Advertisement
DustinRosebery

t.receive

Nov 15th, 2014
416
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.32 KB | None | 0 0
  1. t = turtle
  2. local function scanAirWaves()
  3.     rednet.open("right")
  4.     id, message = rednet.receive()
  5.     print(message)
  6.  
  7.     if message == "spawn 1 on" then
  8.         redstone.setAnalogOutput("bottom", 15)
  9.     end
  10.     if message == "spawn 1 off" then
  11.         redstone.setAnalogOutput("bottom", 0)
  12.     end
  13. end
  14.  
  15. while true do
  16. scanAirWaves()
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement