Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- p = peripheral.wrap("back")
- m = peripheral.wrap("top")
- p.condenseItems()
- maxS = p.getInventorySize()
- print(maxS)
- qty2 = 0
- for i=1,maxS do
- chest = p.getStackInSlot(i)
- if chest then
- itemqty = chest.qty
- print(itemqty)
- qty2 = qty2 + itemqty
- print(qty2)
- end
- end
- m.clear()
- m.setCursorPos(1,3)
- m.write(qty2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement