Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function FuelCheck()
- --get fuel level
- --if fuel < 5
- --select slot 1, refuel
- --if refuel false
- --break
- end
- local function Tunneling(distance)
- for i = 1, distance do
- FuelCheck()
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- end
- end
- local length = 0
- term.write("Tunnel length: ")
- length = tonumber(read())
- --select slot 1, turtle.refuel()
- if length>0 then
- Tunneling(length)
- end
- --Things to do:
- -- if inventory is full return to chest to dump (can trying doing turtle.collect() and if it fails slots can't take new/different items)
- -- if fuel is getting low check to make sure we have enough to go back
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement