Posted 10 December 2012 - 07:33 AM
Okay, so I made a turtle program that strip mines but it keeps running out of fuel and i want to have it mine automatically. I am not familiar with any of the APIs, can someone help me with this?
function checkFuel()
if turtle.getFuelLevel() <= 5 --or any number, depending on how frequently you check, and how much the turtle moves.
turtle.select(16) --fuel goes in this slot
turtle.refuel(1)
turtle.select(1) --use any slot here, I default to 1, depending on the program.
end
end
Or you have to have it return to a chest and retrieve fuel, which can get involved. A stack should move a turtle 1,000+ blocks, so that's usually unnecessary.