Guest User

Untitled

a guest
Oct 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. rednet.open("left")
  2. while true do
  3. event, p1, p2 = os.pullEvent ("rednet_message")
  4. if p1 == 422 and p2 == "w" then
  5. turtle.forward()
  6. elseif p1 == 422 and p2 == "a" then
  7. turle.left()
  8. elseif p1 == 422 and p2 == "d" then
  9. turtle.right()
  10. elseif p1 == 422 and p2 == "z" then
  11. turtle.up()
  12. elseif p1 == 422 and p2 == "x" then
  13. turtle.down()
  14. elseif p1 == 422 and p2 == "s" then
  15. turtle.digDown()
  16. elseif p1 == 422 and p2 == "t" then
  17. turtle.suck()
  18. elseif p1 == 422 and p2 == "r" then
  19. rs.setOutput("front", true)
  20. rs.setOutput("right", true)
  21. rs.setOutput("back", true)
  22. rs.setOutput("left", true)
  23. rs.setOutput("top", true)
  24. rs.setOutput("bottom", true)
  25. end
  26. end
Add Comment
Please, Sign In to add comment