Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script made by Oysi
- local args = {...}
- local height = args[1]
- local depth = args[2]
- local function mineForward()
- if turtle.detect() then
- turtle.dig()
- end
- if not turtle.forward() then
- sleep(0.1)
- mineForward()
- end
- end
- local function mineUp()
- if turtle.detectUp() then
- turtle.digUp()
- end
- if not turtle.up() then
- sleep(0.1)
- mineUp()
- end
- end
- local function mineDown()
- if turtle.detectDown() then
- turtle.digDown()
- end
- if not turtle.down() then
- sleep(0.1)
- mineDown()
- end
- end
- local function turnLeft() repeat until turtle.turnLeft() end
- local function turnRight() repeat until turtle.turnRight() end
- for z = 1, depth do
- mineForward()
- turnLeft()
- for y = 1, height - 1 do
- if turtle.detect() then
- turtle.dig()
- end
- mineUp()
- end
- if turtle.detect() then
- turtle.dig()
- end
- turnRight()
- mineForward()
- turnLeft()
- if turtle.detect() then
- turtle.dig()
- end
- for y = 1, height - 1 do
- mineDown()
- if turtle.detect() then
- turtle.dig()
- end
- end
- turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement