Advertisement
MarsP4ste

Mineshaft-strip

Jul 25th, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. print("How many rows?")
  2. write("->")
  3. rows = tonumber(read())
  4. max_rows = rows
  5.  
  6. function forward()
  7. while not turtle.forward() do
  8. turtle.dig()
  9. sleep(.7)
  10. end
  11. turtle.digDown()
  12. end
  13.  
  14. function way()
  15. for i=1, 3 do
  16. forward()
  17. end
  18. end
  19.  
  20.  
  21. function strip()
  22. for i=1, 8 do
  23. forward()
  24. end
  25. end
  26.  
  27. function stripSide()
  28. strip()
  29. turtle.turnLeft()
  30. turtle.turnLeft()
  31. strip()
  32. end
  33.  
  34. function stripRow()
  35. turtle.turnLeft()
  36. stripSide()
  37. stripSide()
  38. turtle.turnRight()
  39. forward()
  40. end
  41.  
  42. while rows > 0 do
  43. term.clear()
  44. term.setCursorPos(1,1)
  45. print("Strip "..(max_rows-rows).." of "..max_rows.." done.")
  46. way()
  47. stripRow()
  48. rows = rows - 1
  49. end
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement