Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modemSide = "back"
- local modem = peripheral.wrap(modemSide)
- local function displayChestContents()
- local contents = modem.list()
- local monitor = peripheral.find("monitor")
- monitor.clear()
- monitor.setCursorPos(1, 1)
- monitor.setTextScale(0.5)
- for i = 1,table.maxn(contents) do
- monitor.setCursorPos(1,i)
- monitor.write(contents[i]["count"].. "x " .. contents[i]["name"])
- end
- end
- while true do
- displayChestContents()
- os.sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement