Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local arg = {...}
- local max_x = tonumber(arg[1])
- local max_y = tonumber(arg[2])
- local cur_x = 0
- local cur_y = 0
- for cur_x = 0, max_x, 2 do
- -- move up on y axis
- for cur_y = 0, max_y, 1 do
- if (turtle.detect()) then
- turtle.dig()
- end
- turtle.forward()
- end
- -- move over, turn backward
- turtle.turnRight()
- if (turtle.detect()) then
- turtle.dig()
- end
- turtle.forward()
- turtle.turnRight()
- for cur_y = cur_y, 0, 1 do
- if (turtle.detect()) then
- turtle.dig()
- end
- turtle.forward()
- end
- -- move over, turn backward
- turtle.turnLeft()
- if (turtle.detect()) then
- turtle.dig()
- end
- turtle.forward()
- turtle.turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement