Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. print("Tunnel has started.")
  2.  
  3. io.write("Please enter the width, in number of blocks, to dig: ")
  4. width = io.read()
  5.  
  6. io.write("Please enter the height, in number of blocks, to dig: ")
  7. height = io.read()
  8.  
  9. print("Tunnel will run with parameters width = " .. width " and height = " .. )
  10.  
  11. currentDug = 0
  12. for i = 0, height, 1 do
  13. while (currentDug < width) do
  14. turtle.dig()
  15. currentDug += 1
  16. turtle.forward()
  17. if (currentDug == width) then
  18. turtle.digUp()
  19. turtle.up()
  20. currentDug = 1
  21. turtle.turnRight()
  22. turtle.turnRight()
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement