Melodicolt

Untitled

Aug 2nd, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. function checkInventory()
  2. local emptyInvSlots = 0
  3. for i = 1, 16 do
  4. if turtle.getItemCount(i) == 0 then
  5. emptyInvSlots = emptyInvSlots + 1
  6. end
  7. end
  8. if emptyInvSlots == 0 then
  9. print("My inventory is full, master...")
  10. else
  11. print("Still ", emptyInvSlots, " empty inventory slots remaining...")
  12. end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment