Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local dist = tonumber(args[1])
- local movementCount = 0
- function dig()
- turtle.digUp()
- turtle.digDown()
- turtle.dig()
- end
- function moveForward()
- turtle.forward()
- movementCount = movementCount + 1
- end
- while movementCount < dist do
- if turtle.detect() then
- dig()
- else
- moveForward()
- end
- end
Add Comment
Please, Sign In to add comment