Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ReFuel(Silent)
- if not Silent then
- print('Refueling...')
- end
- local SavedSlot = turtle.getSelectedSlot()
- turtle.select(1)
- local ItemCount = turtle.getItemCount()
- turtle.refuel(ItemCount-1)
- if not Silent then
- local FuelCount = turtle.getFuelLevel()
- local NewItemCount = turtle.getItemCount()
- print('New FuelCount: ', tostring(FuelCount))
- print('Items consumed: ', tostring(ItemCount - NewItemCount))
- end
- turtle.select(SavedSlot)
- end
- function EmptyForward(SkipSlotCount)
- print('Emptying inventory besides: ', tostring(SkipSlotCount))
- local SavedSlot = turtle.getSelectedSlot()
- local i = SkipSlotCount+1
- while i < 17 do
- turtle.select(i)
- turtle.drop()
- i = i+1
- end
- turtle.select(SavedSlot)
- end
- function EmptyUp(SkipSlotCount)
- print('Emptying inventory besides: ', tostring(SkipSlotCount))
- local SavedSlot = turtle.getSelectedSlot()
- local i = SkipSlotCount+1
- while i < 17 do
- turtle.select(i)
- turtle.dropUp()
- i = i+1
- end
- turtle.select(SavedSlot)
- end
- function EmptySlot(Slot)
- --print('Emptying slot: ', tostring(Slot))
- local SavedSlot = turtle.GetSelectedSlot()
- turtle.select(Slot)
- turtle.drop()
- turtle.select(SavedSlot)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement