Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function tunnel(depth)
- local function refuel()
- if turtle.getFuelLevel() < 100 then
- turtle.select(1)
- turtle.refuel(2)
- print("Refueled")
- end
- end
- local function checkFull()
- if turtle.getItemCount(16) > 0 then
- turtle.back()
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- for i = 3, 16 do
- turtle.select(i)
- turtle.dropDown()
- end
- turtle.select(3)
- turtle.forward()
- end
- end
- local function forcePlace()
- turtle.back()
- turtle.digDown()
- turtle.select(2)
- turtle.placeDown()
- turtle.forward()
- end
- local function mine()
- while turtle.detect() do
- turtle.dig()
- sleep(0.5)
- end
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- sleep(0.5)
- end
- end
- for depth_count = 1, depth do
- refuel()
- checkFull()
- mine()
- end
- forcePlace()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement