Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local minFuel = 600
- function checkFuel()
- if turtle.getFuelLevel() < minFuel then
- turtle.select(16)
- if turtle.compareDown() then
- while turtle.getFuelLevel() < minFuel then
- turtle.select(15)
- turtle.suckDown()
- turtle.refuel()
- if turtle.getFuelLevel() < minFuel then
- sleep(60)
- end
- end
- end
- end
- end
- function tryDump()
- turtle.select(16)
- if turtle.compareUp() then
- for i = 1,15 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- while not turtle.dropUp() do
- sleep(30)
- end
- end
- end
- end
- end
- while true do
- tryDump()
- checkFuel()
- if turtle.detect() then
- turtle.turnRight()
- sleep(5)
- end
- turtle.select(1)
- turtle.dig()
- turtle.forwards()
- end
Advertisement
Add Comment
Please, Sign In to add comment