Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- P1 = peripheral.wrap("batbox_7")
- P2 = peripheral.wrap("batbox_8")
- mon = peripheral.wrap("top")
- bridge = peripheral.wrap("right")
- PW1 = P1.getStored()
- PW2 = P2.getStored()
- power = PW1 + PW2
- PC1 = P1.getCapacity()
- PC2 = p2.getCapacity()
- capacity = PC1 + PC2
- percent = power / capacity * 100
- local function monitor()
- mon.clear()
- mon.setCursorPos(1,3)
- mon.write("Energy is: "..power.."Out of: "..capacity.."("..percent.."%"..")")
- end
- local function bridgeD()
- bridge.clear()
- bridge.addText(1,12,"Energy is: "..power.."Out of: "..capacity.."("..percent.."%"..")",colors.magenta)
- end
- monitor()
- bridgeD()
Advertisement
Add Comment
Please, Sign In to add comment