Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slot = 1
- function checkstock()
- turtle.select(slot)
- return turtle.getItemCount(slot)
- end
- local stock = checkstock()
- function nextslot()
- if slot == 1 then
- slot = 2
- elseif slot == 2 then
- slot = 1
- end
- end
- if stock == 0 then
- while stock == 0 do
- nextslot()
- stock = checkstock()
- end
- end
- print(stock)
- turtle.forward()
- turtle.placeDown()
- shell.run("items")
Add Comment
Please, Sign In to add comment