Guest User

mine

a guest
May 19th, 2019
74
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local step = 0
  2. local rows = 0
  3. local turn = 1
  4.  
  5. function fwr()
  6. while not turtle.forward() do
  7. turtle.dig()
  8. end
  9. end
  10.  
  11. function turns()
  12. if rows > 20 then
  13. return
  14. elseif turn == 1 then
  15. turtle.turnLeft()
  16. fwr()
  17. turtle.turnLeft()
  18. turn = 2
  19. rows = rows + 1
  20. forwarddig()
  21. else
  22. turtle.turnRight()
  23. fwr()
  24. turtle.turnRight()
  25. turn = 1
  26. rows = rows + 1
  27. forwarddig()
  28. end
  29. end
  30.  
  31. function forwarddig()
  32.     step = 0
  33.         while step <= 20 do
  34.             turtle.dig()
  35.             turtle.digUp()
  36.             turtle.digDown()
  37.             fwr()
  38.             step = step + 1
  39.         end
  40.     turns()
  41. end
  42.  
  43. function Exit()
  44. return
  45. end
  46.  
  47. print("starting")
  48. forwarddig()
RAW Paste Data