This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
[Alpha] Auto Miner With Gps Tracker
Started by theeboris, 24 July 2013 - 12:03 PMPosted 25 July 2013 - 02:16 AM
Too buggy - crashes when checks for fuel.
Posted 25 July 2013 - 08:29 AM
I know it's buggy, it's still in alpha. On which rule crashes it?
Too buggy - crashes when checks for fuel.
Posted 20 October 2013 - 11:21 PM
My checkFuel() function, for reference:
function checkFuel()
if turtle.getFuelLevel() <= 50 then
turtle.select(16) --# you can change the fuel slot to whatever you want, I always use slot 16
turtle.refuel(1)
end
end
Posted 21 October 2013 - 02:44 AM
Fairly lacking, could have more checks against turtle.getFuelLevel and a much more dynamic nature.My checkFuel() function, for reference:function checkFuel() if turtle.getFuelLevel() <= 50 then turtle.select(16) --# you can change the fuel slot to whatever you want, I always use slot 16 turtle.refuel(1) end end
Posted 26 October 2013 - 12:25 PM
I generally don't need it to be fancy, right after I move I call checkFuel() and it does the job. You could return true or false:
function checkFuel(a, s)
if turtle.getFuelLevel() <= 50 then
turtle.select(s)
turtle.refuel(a)
return true
else
return false
end
end