Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Code by mikebald
- Modify / Take / Use how you like
- --]]
- function DropAll()
- for i=1,16 do
- turtle.select(i)
- turtle.dropDown()
- end
- end
- function MoveAll(from, to)
- turtle.select(from)
- return turtle.transferTo(to)
- end
- -- moves = ((fuel / 100) * 6)
- function FuelNeeded( moves )
- return math.ceil((moves * 100) / 6)
- end
- function Refuel( slot )
- turtle.select(slot)
- return turtle.refuel(64)
- end
- function RefuelAll()
- for i=1,16 do
- turtle.select(i)
- turtle.refuel(64)
- end
- end
- function NonEmptySlot()
- for i=1,16 do
- if turtle.getItemCount(i) > 1 then
- turtle.select(i)
- return true
- end
- end
- end
- function PlaceNext()
- while not turtle.placeDown() do
- NonEmptySlot()
- if turtle.detectDown() then
- turtle.digDown()
- else
- turtle.attackDown()
- end
- end
- end
- function ConfirmFull()
- for i=1,16 do
- if turtle.getItemSpace(i) > 0 then
- return false
- end
- end
- return true
- end
- function ConfirmAmount( amount )
- local total = 0
- for i=1,16 do
- total = total + turtle.getItemCount(i)
- if total >= amount then return true end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment