Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- term.setCursorPos(1,1)
- print ("Fuel: "..turtle.getFuelLevel())
- while turtle.getFuelLevel() < 10000 do
- for i = 1, 16 do -- loop through the slots
- turtle.select(i) -- change to the slot
- if turtle.refuel(0) then -- if it's valid fuel
- local halfStack = math.ceil(turtle.getItemCount(i)/2) -- work out half of the amount of fuel in the slot
- turtle.refuel(halfStack) -- consume half the stack as fuel
- term.clear()
- term.setCursorPos(1,1)
- print ("Fuel: "..turtle.getFuelLevel())
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement