Marech

pocket_server_command_turtle

Apr 8th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. peripheral.wrap( "back" )
  2. write("pocket")
  3. rednet.open("back")
  4.  
  5. continue = true
  6. monitor = nil
  7.  
  8. function attackInfinite()
  9. write("Attacking forever, ctrl+T to stop")
  10. if pocket then
  11. else
  12. monitor.clear()
  13. monitor.setCursorPos(1,1)
  14. monitor.write("Attacking forever,")
  15. monitor.setCursorPos(1,2)
  16. monitor.write("ctrl+T to stop")
  17. end
  18. while continue do
  19. rednet.broadcast("attack")
  20.  
  21. sleep(0)
  22. end
  23. end
  24.  
  25. while continue do
  26. write("send a command to the turtles : ")
  27. command = read()
  28. if command == "attack" then
  29. attackInfinite()
  30. end
  31. rednet.broadcast(command)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment