Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local length = 1
- local height = 6
- if (args[1] ~= nil) then
- length = args[1]
- if (args[2] ~= nil) then
- height = args[2]
- end
- end
- local function dig()
- while (not turtle.forward()) do
- turtle.dig()
- end
- end
- local function back()
- while (not turtle.back()) do
- turtle.turnRight()
- turtle.turnRight()
- turtle.dig()
- turtle.turnRight()
- turtle.turnRight()
- end
- end
- local function loop()
- for i=1, length do
- for j=1, height do
- dig()
- end
- for j=2, height do
- back()
- end
- turtle.digDown()
- turtle.down()
- end
- end
- loop()
Advertisement
Add Comment
Please, Sign In to add comment