Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function drop()
- while turtle.getItemCount(1) > 0 do
- turtle.dropUp()
- if turtle.getItemCount(1) > 0 then
- sleep(1)
- else
- return true
- end
- end
- return false
- end
- function main()
- drop()
- while true do
- local chest = peripheral.wrap("bottom")
- local dropped = false
- for i=23,26 do
- local itemInfo = chest.getStackInSlot(i)
- if itemInfo ~= nil and (itemInfo['qty'] * 1) > 0 then
- chest.pushIntoSlot('up', i, 64, 0)
- dropped = drop() or dropped
- end
- end
- if dropped then
- sleep(1)
- end
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment