Advertisement
Guest User

stairdown

a guest
Oct 20th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. print("Welcome to the Stair Maker")
  2. write("How many blocks down: ")
  3. local blocksdown
  4. blocksdown = tonumber(read())
  5. counter = 0
  6.  
  7. function dig()
  8. while turtle.detect() do
  9. turtle.dig()
  10. end
  11. end
  12.  
  13. while counter < blocksdown do
  14. if turtle.getFuelLevel() < 4 then
  15. turtle.refuel()
  16. end
  17. dig()
  18. turtle.forward()
  19. turtle.turnRight()
  20. dig()
  21. for i=1,3 do
  22. turtle.digDown()
  23. turtle.down()
  24. dig()
  25. end
  26. turtle.up()
  27. turtle.up()
  28. turtle.turnLeft()
  29. counter = counter + 1
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement