Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local StarterDepth = 8
- local Length = 3
- local Width = 1
- local Depth = 2
- local DigUp = turtle.digUp
- local DigDown = turtle.digDown
- local Left = turtle.turnLeft
- local Right = turtle.turnRight
- local function InventoryCleanup(force)
- if turtle.getItemDetail(16) or force then
- turtle.select(1)
- turtle.placeUp()
- for i = 2, 16 do
- turtle.select(i)
- turtle.dropUp()
- end
- end
- turtle.select(1)
- DigUp()
- end
- local function Forward()
- DigUp()
- InventoryCleanup()
- DigDown()
- while not turtle.forward() do
- turtle.dig()
- end
- end
- local function Down()
- DigDown()
- if not turtle.down() then
- return false
- else
- Depth = Depth + 1
- return true
- end
- end
- local Laps = Width*8
- local ReturnWidth = Width*16-1
- local LapLength = Length*16-2
- for i = 1, StarterDepth do
- Down()
- end
- Forward()
- while true do
- for i = 1, Laps do
- for i = 1, LapLength do
- Forward()
- end
- Right()
- Forward()
- Right()
- for i = 1, LapLength do
- Forward()
- end
- if (i == Laps) then
- Forward()
- Right()
- for i = 1, ReturnWidth do
- Forward()
- end
- Right()
- DigDown()
- Down()
- DigDown()
- if not Down() then
- InventoryCleanup()
- for i = 1, Depth do
- turtle.up()
- end
- InventoryCleanup(true)
- exit()
- end
- DigDown()
- Down()
- Forward()
- else
- Left()
- Forward()
- Left()
- end
- end
- end
Add Comment
Please, Sign In to add comment