teser1

ReturnRight

Jul 8th, 2013
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. rednet.open("right")
  2. rednet.broadcast("ReturnRight")
  3. i=0
  4. function forward()
  5. if turtle.detect() == true then
  6. repeat
  7. sleep(1)
  8. until turtle.detect() == false
  9. end
  10. if turtle.detect() == false then
  11. turtle.forward()
  12. i=i+1
  13. end
  14. end
  15. while true do
  16. turtle.turnRight()
  17. repeat
  18. forward()
  19. until i==16
  20. turtle.turnRight()
  21. error()
  22. end
Advertisement
Add Comment
Please, Sign In to add comment