Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- local mySensor = sensor.wrap("back")
- local verbraucht = 0;
- function getGuthaben()
- local geldChest = mySensor.getTargetDetails("0,-3,1");
- local content = geldChest["Slots"]
- local amount = 0;
- for k, v in pairs( content ) do
- for a, b in pairs(v) do
- if a == "RawName" and b == "ic2.industrial credit" then
- amount = amount + v["Size"]
- end
- end
- end
- return amount;
- end
- while true do
- local event = {os.pullEvent()}
- print("1Guthaben: " .. getGuthaben() )
- end
Advertisement
Add Comment
Please, Sign In to add comment