Advertisement
Guest User

startup

a guest
Oct 20th, 2014
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. function RCClient()
  2. rednet.open("right")
  3. re = "refuel"
  4. w = "forward"
  5. s = "backward"
  6. a = "left"
  7. d = "right"
  8. while true do
  9. local id,message,distance = rednet.receive()
  10. print(message)
  11. if message == re then
  12. turtle.refuel()
  13. print("Fuel loaded")
  14. elseif message == w then
  15. turtle.forward()
  16. elseif message == s then
  17. turtle.back()
  18. elseif message == a then
  19. turtle.turnLeft()
  20. elseif message == d then
  21. turtle.turnRight()
  22. end
  23. end
  24. end
  25. RCClient()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement