Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ChestB = peripheral.wrap("back")
- ChestL = peripheral.wrap("left")
- DisplayR = peripheral.wrap("right")
- while true do
- Items = {}
- CurrentLine = 0
- for slot, item in pairs(ChestL.list()) do
- if not Items[item.name] then
- Items[item.name] = 0
- end
- Items[item.name] = Items[item.name] + item.count
- end
- for slot, item in pairs(ChestB.list()) do
- if not Items[item.name] then
- Items[item.name] = 0
- end
- Items[item.name] = Items[item.name] + item.count
- end
- DisplayR.clear()
- for item, count in pairs(Items) do
- CurrentLine = CurrentLine + 1
- DisplayR.setCursorPos(1,CurrentLine)
- DisplayR.write(item.." - "..count)
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement