Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. while true do
  2. if turtle.compare(2) then
  3. turtle.select(1)
  4. turtle.place()
  5.  
  6. turtle.dig()
  7. turtle.forward();
  8. -- Dig up and count tree height to get back to ground
  9. local height = 0
  10. while turtle.inspectUp() do
  11. turtle.digUp()
  12. turtle.up()
  13. height = height + 1
  14. end
  15.  
  16. -- Get back to ground
  17. for i = 0, height, 1 do
  18. turtle.down()
  19. end
  20.  
  21. -- Move back
  22. turtle.back()
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement