Advertisement
MigasRocha

CoalChest Counter / Computer ID:26

Dec 26th, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.41 KB | Gaming | 0 0
  1. mon = peripheral.find("monitor")
  2. chest = peripheral.wrap("top")
  3. items = chest.list()
  4. totalCount = 0
  5.  
  6. for slot, item in pairs(items) do
  7.     totalCount = totalCount + (item.count or 0)
  8. end
  9.  
  10. -- Contagem no Monitor
  11. mon.clear()
  12. mon.setCursorPos(2.5,1)
  13. mon.setTextColor(colors.lightGray)
  14. mon.write("Coal")
  15. mon.setCursorPos(1,3)
  16. mon.setTextColor(colors.white)
  17. mon.write(totalCount.."/576")
  18. sleep(0.3)
  19. end
  20.  
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement