Guest User

remote

a guest
Nov 4th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. term.clear()
  2. term.setCursorPos(1,1)
  3. term.write(os.getComputerID())
  4. rednet.open("right")
  5. while true do
  6. local sender, message, protocol = rednet.receive()
  7. if protocol == tostring(os.getComputerID()) then
  8. if message == "forward" then
  9. turtle.forward()
  10. end
  11. if message == "close" then
  12.  rednet.close("right")
  13.  break
  14. end
  15. if message == "left" then
  16. turtle.turnLeft()
  17. end
  18. if message == "right" then
  19. turtle.turnRight()
  20. end
  21. if message == "back" then
  22. turtle.back()
  23. end
  24. if message == "up" then
  25. turtle.up()
  26. end
  27. if message == "down" then
  28. turtle.down()
  29. end
  30. if message == "dig" then
  31. turtle.dig()
  32. end
  33. if message == "mine" then
  34. turtle.dig()
  35. end
  36. if message == "place" then
  37. turtle.place()
  38. end
  39. if message == "placeu" then
  40. turtle.placeUp()
  41. end
  42. if message == "placed" then
  43. turtle.placeDown()
  44. end
  45. if message == "mineu" then
  46. turtle.digUp()
  47. end
  48. if message == "mined" then
  49. turtle.digDown()
  50.  end
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment