Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = turtle
- local function reSupply()
- t.select(15)
- t.turnLeft()
- t.dig()
- t.place()
- for i = 9, 14, 1 do
- t.select(i)
- t.suck()
- end
- t.select(15)
- t.dig()
- t.turnRight()
- end
- local function clearInventory()
- t.select(16)
- t.turnRight()
- t.dig()
- t.place()
- for i = 1, 15, 1 do -- selects all slots and places in chest
- t.select(i)
- t.drop()
- end
- t.select(16)
- t.dig()
- t.turnLeft()
- end
- local function matCheck()
- for i = 9, 14, 1 do
- itemCount = t.getItemCount(i)
- t.select(i)
- if itemCount > 0 then
- break end
- if t.getItemCount(14) == 0 then
- reSupply()
- end
- end
- end
- local function goingUp()
- blockAbove = false
- repeat
- itemCount = t.getItemCount(8)
- if itemCount > 0 then
- clearInventory()
- end
- matCheck()
- t.dig()
- t.place()
- t.up()
- if t.detectUp() then
- blockAbove = true
- end
- until blockAbove == true
- end
- local function topDown()
- itemCount = t.getItemCount(16)
- if itemCount > 0 then
- clearInventory()
- end
- matCheck()
- t.dig()
- t.place()
- t.turnRight()
- t.forward()
- t.turnLeft()
- end
- local function goingDown()
- blockBelow = false
- repeat
- itemCount = t.getItemCount(8)
- if itemCount > 0 then
- clearInventory()
- end
- matCheck()
- t.dig()
- t.place()
- t.down()
- if t.detectDown() then
- blockBelow = true
- end
- until blockBelow == true
- end
- local function bottomUp()
- itemCount = t.getItemCount(8)
- if itemCount > 0 then
- clearInventory()
- end
- matCheck()
- t.dig()
- t.place()
- t.turnRight()
- t.forward()
- t.turnLeft()
- end
- local function keepGoing()
- t.turnRight()
- flag = false
- if t.detect() then
- flag = true
- end
- t.turnLeft()
- return flag
- end
- local function wallDown()
- for i = 0, 63, 1 do
- t.dig()
- t.forward()
- for j = 0, 64, 1
- t.digDown()
- t.down()
- end
- clearInventory()
- t.dig()
- t.forward()
- for j = 0, 64, 1 do
- t.digUp()
- t.up()
- end
- clearInventory()
- end
- end
- wallDown()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement