Advertisement
Melodicolt

Turtle Dig

Jul 28th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. local distance = ...
  2. if distance ~= nil then
  3. distance = tonumber(distance)
  4. for i = 1, distance do
  5. if turtle.forward() then
  6. turtle.digUp()
  7. print("Turtle moved forward.")
  8. else
  9. turtle.dig()
  10. turtle.forward()
  11. turtle.digUp()
  12. print("Turtle destroyed blocks.")
  13. end
  14. end
  15. else
  16. print("Did not speficy distance.")
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement