Advertisement
Guest User

processing

a guest
Oct 25th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.43 KB | None | 0 0
  1. arg = {...}
  2. if arg[1] == nil then
  3.   arg[1] = "potato"
  4. end
  5.  
  6. function check()
  7.   g, m, p = rednet.receive("pbp", 5)
  8.   print(m)
  9.  
  10. end
  11. rednet.open("left")
  12.  
  13. if arg[1] == "potato" then
  14.   rednet.send(2, "run", "pbp")
  15.   check()
  16. elseif arg[1] == "on" then
  17.   rednet.send(2, "run", "pbp")
  18.   check()
  19. elseif arg[1] == "off" then
  20.   rednet.send(2, "stop", "pbp")
  21.   check()
  22. else
  23.   print("Unknown argument")
  24. end
  25. rednet.close("left")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement