Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script made by Oysi
- local args = {...}
- local width = tonumber(args[1])
- local depth = tonumber(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
- local function digForward() if turtle.detect() then turtle.dig() end end
- local function digUp() if turtle.detectUp() then turtle.digUp() end end
- local function digDown() if turtle.detectDown() then turtle.digDown() end end
- local function block()
- mineForward()
- digUp()
- digDown()
- turnLeft()
- mineForward()
- digUp()
- digDown()
- turnRight()
- mineForward()
- digUp()
- digDown()
- turnRight()
- mineForward()
- digUp()
- digDown()
- end
- local function strip()
- for x = 1, width do
- mineForward()
- digUp()
- digDown()
- end
- end
- local function side()
- strip()
- mineForward()
- turnRight()
- mineForward()
- turnRight()
- strip()
- end
- for z = 1, depth do
- block()
- turnLeft()
- block()
- side()
- mineForward()
- mineForward()
- side()
- mineForward()
- mineForward()
- turnLeft()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement