PoLoMoTo

Help

Sep 4th, 2012
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. function openTurtle(id)
  2. print("TurtleID: ".. os.computerID() .." Waiting for remote input")
  3. print("Press CTRL+T to stop")
  4. if not id == nil then
  5. while true do
  6. local sender, message = rednet.receive()
  7. if sender == id then
  8. local output = loadstring("turtle.".. message)()
  9. rednet.send(id,output)
  10. print(message)
  11. end
  12. end
  13. else
  14. while true do
  15. local sender, message = rednet.receive()
  16. local output = loadstring("turtle.".. message)()
  17. rednet.send(sender,output)
  18. end
  19. end
  20. end
Advertisement
Add Comment
Please, Sign In to add comment