Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slots = {}
- local total = 0
- for i=2,16 do
- local n = turtle.getItemCount(i)
- if n > 0 then
- total = total + n
- table.insert(slots, {i=i, n=n})
- end
- end
- print("Found "..total.." items.")
- for _,s in pairs(slots) do
- turtle.select(s.i)
- for j=1,s.n do
- if turtle.getFuelLevel() < 100 then
- turtle.refuel(1)
- end
- turtle.place()
- turtle.dig()
- end
- end
- print("Finished processing items!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement