Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function canRefuel()
- return turtle.getItemCount(16) > 0
- end
- function fuelUp()
- local oldSlot = turtle.getSelectedSlot()
- if (canRefuel()) then
- turtle.select(16)
- turtle.refuel(1)
- turtle.select(oldSlot)
- else
- print('Error: no fuel')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment