Advertisement
Chaos_Cash

testPaste

Oct 5th, 2024 (edited)
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. local modemSide = "back"
  2. local modem = peripheral.wrap(modemSide)
  3.  
  4.  
  5. local function displayChestContents()
  6. local contents = modem.list()
  7. local monitor = peripheral.find("monitor")
  8.  
  9. monitor.clear()
  10. monitor.setCursorPos(1, 1)
  11. monitor.setTextScale(0.5)
  12. for i = 1,table.maxn(contents) do
  13. monitor.setCursorPos(1,i)
  14. monitor.write(contents[i]["count"].. "x " .. contents[i]["name"])
  15. end
  16. end
  17.  
  18.  
  19. while true do
  20. displayChestContents()
  21. os.sleep(5)
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement