Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require"component"
- local event = require"event"
- local serialization = require"serialization"
- local controller = component.me_controller
- local term = require"term"
- local component = require"component"
- local gpu = component.gpu
- local sections = {}
- function coinCount()
- cointable=controller.getItemsInNetwork()
- term.clear()
- penny=0
- nickel=0
- quarter=0
- dollar=0
- for i=1,#cointable do
- item=cointable[i]
- if item.name == "contenttweaker:omnicoin" then
- penny=item.size;
- end
- if item.name == "contenttweaker:omnicoin5" then
- nickel=item.size;
- end
- if item.name == "contenttweaker:omnicoin25" then
- quarter=item.size;
- end
- if item.name == "contenttweaker:omnicoin100" then
- dollar=item.size;
- end
- end
- print("Pennies " .. penny)
- print("Nickels " .. nickel)
- print("Quarters " .. quarter)
- print("Dollars " .. dollar)
- print("Total Value " .. (penny+nickel*5+quarter*25+dollar*100))
- end
- component.gpu.setResolution(25,6)
- --coinCount()
- event.timer(2, coinCount, math.huge)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement