Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("monitor_3")
- enp = peripheral.wrap("tile_enderio_blockcapacitorbank_name_2")
- mep = peripheral.wrap("appeng_me_tilecontroller_2")
- mon.clear()
- redstone.setOutput("right", true)
- while true do
- rdtn = mep.countOfItemType(331, 0)
- en = enp.getEnergyStored("right")
- enmx = enp.getMaxEnergyStored("right")
- percent = en/enmx
- percent = percent*100
- potentrd = rdtn * 1600000
- local percentc
- if percent >= 80 then
- percentc = colors.lime
- elseif percent >=50 then
- percentc = colors.yellow
- elseif percent < 50 then
- percentc = colors.red
- end
- mon.setTextColor(colors.white)
- mon.setCursorPos(1,1)
- mon.clearLine()
- mon.write("Power:")
- mon.setTextColor(percentc)
- mon.setCursorPos(8, 1)
- mon.write(percent.."%")
- mon.setTextColor(colors.white)
- mon.setCursorPos(1,3)
- mon.write("Total Power:")
- mon.setCursorPos(1,4)
- mon.clearLine()
- mon.write(en.."/"..enmx)
- mon.setCursorPos(1,6)
- mon.write("Potential Power in Redstone:")
- mon.setCursorPos(1,7)
- mon.clearLine()
- mon.write(potentrd.."RF")
- mon.setCursorPos(1,9)
- mon.write("Power Income:")
- mon.setCursorPos(1,10)
- mon.clearLine()
- if redstone.getInput("left") == true then
- redstone.setOutput("back", false)
- redstone.setOutput("right", false)
- mon.write("No Input")
- elseif redstone.getInput("top") == true then
- mon.write("Redstone Generators & Reactor")
- redstone.setOutput("back", true)
- redstone.setOutput("right", true)
- elseif percent < 25 then
- mon.write("Redstone Generators & Reactor")
- redstone.setOutpu("right", true)
- redstone.setOutput("back", true)
- elseif percent > 25 then
- mon.write("Reactor")
- redstone.setOutput("right", true)
- redstone.setOutput("back", false)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement