Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tArgs = {...}
- local length = tonumber(tArgs[1]) or 100
- print("Length " .. length)
- -- Turtle Vars
- local dist = 0
- function Dig()
- while (turtle.detect()) do
- turtle.dig()
- sleep(0.5)
- end
- end
- function DigUp()
- while (turtle.detectUp()) do
- turtle.digUp()
- sleep(0.5)
- end
- end
- function DigStep()
- Dig()
- turtle.forward()
- DigUp()
- dist = dist + 1
- end
- function TurnAround()
- turtle.turnRight()
- turtle.turnRight()
- end
- -- Main
- for i = 1, length do
- DigStep()
- end
- TurnAround()
- for i = 1, dist do
- turtle.forward()
- end
Add Comment
Please, Sign In to add comment