Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.select(1)
- function check_inventory()
- local all_empty = false
- while turtle.getItemCount(turtle.getSelectedSlot()) <= 0 do
- print('Moving slot')
- if turtle.getSelectedSlot() >= 16 then
- turtle.select(1)
- if all_empty then
- print('All inventory slots empty, shutting down')
- exit()
- end
- all_empty = true
- end
- turtle.select(turtle.getSelectedSlot()+1)
- end
- end
- bigSleep = false
- while true do
- while turtle.detectDown() do
- sleep(0.5)
- bigSleep = true
- end
- if bigSleep then
- sleep(5.0)
- bigSleep = false
- end
- check_inventory()
- turtle.placeUp()
- turtle.forward()
- end
Add Comment
Please, Sign In to add comment