Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function selectItem(name)
- local item
- for slot = 1, 16 do
- item = turtle.getItemDetail(slot)
- if item ~= nil and item["name"] == name then
- turtle.select(slot)
- return true
- end
- end
- end
- function FindEmptySlot()
- for slot = 1, 16 do
- if turtle.getItemCount(slot) == 0 then
- turtle.select(slot)
- return true
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement