uepyon

digline

Jun 23rd, 2023 (edited)
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | Gaming | 0 0
  1. if turtle.getFuelLevel() == 0 then
  2. turtle.select(1)
  3. turtle.refuel(4)
  4. end
  5.  
  6. local function DigLine(wl)
  7. local moved = 0
  8. for i=1, tonumber(wl) do
  9. if turtle.detectDown() then
  10. print("detect block")
  11. turtle.digDown()
  12. else
  13. print("no block")
  14. end
  15. turtle.forward()
  16. moved = moved + 1
  17. print("moved:"..tostring(moved))
  18. end
  19. for i=1, moved do
  20. turtle.back()
  21. end
  22. end
Advertisement
Add Comment
Please, Sign In to add comment