Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- component = require("component")
- inv = component.inventory_controller
- gpu = component.gpu
- sides = require("sides")
- inv2 = inv.getAllStacks(sides.front)
- term = require("term")
- colors = require("colors")
- local width, height = gpu.getResolution()
- while true do
- inv = component.inventory_controller
- chests = {}
- for i = 0, 5 do
- s = inv.getAllStacks(i)
- if s ~= nil then
- chests[#chests + 1] = s
- end
- end
- os.sleep(5)
- count = 0
- for val, chest in pairs(chests) do
- for i, v in pairs(chest.getAll()) do
- if v["label"] == "Omnidollar [100]" then
- count = count + 100 * v["size"]
- elseif v["label"] == "Omniquarter [25]" then
- count = count + 25 * v["size"]
- elseif v["label"] == "Omninickel [5]" then
- count = count + 5 * v["size"]
- elseif v["label"] == "Omnipenny [1]" then
- count = count + 1 * v["size"]
- end
- end
- end
- term.clear()
- gpu.setResolution(10, 8)
- local width, height = gpu.getResolution()
- print("\n\n\n"..tostring(math.floor(count)))
- print("OmniCoins")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement