Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local chest = peripheral.wrap("right")
- local modemSide = "back"
- local targetID = 71
- while true do
- local totalItems = 0
- for _, item in pairs(chest.list()) do
- totalItems = totalItems + (item.count or 0)
- end
- rednet.open(modemSide)
- rednet.send(targetID, totalItems)
- rednet.close(modemSide)
- sleep(3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement