Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drac = peripheral.wrap("draconic_rf_storage_3")
- drmon = peripheral.wrap("monitor_22")
- function clear()
- term.clear()
- drmon.clear()
- term.setCursorPos(1,1)
- drmon.setCursorPos(1,1)
- end
- while true do
- clear()
- totalPercent = drac.getEnergyStored() / drac.getMaxEnergyStored() * 100
- term.setCursorPos(14,1)
- drmon.setCursorPos(5,3)
- print("Draconic Energy Core")
- drmon.write("Draconic Energy Core")
- term.setCursorPos(19,3)
- drmon.setCursorPos(9,5)
- print("Power: "..math.floor(totalPercent + .5).."%")
- drmon.write("Power: "..math.floor(totalPercent + .5).."%")
- drmon.setCursorPos(9,6)
- if totalPercent <= 9 then
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 19 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 29 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 39 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 49 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 59 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 69 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 79 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent <= 89 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- elseif totalPercent >= 90 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- elseif totalPercent >= 90 then
- drmon.setBackgroundColor(colors.red)
- drmon.write(" ")
- drmon.setBackgroundColor(colors.white)
- drmon.write(" ")
- end
- drmon.setBackgroundColor(colors.black)
- term.setCursorPos(1,6)
- drmon.setCursorPos(1,8)
- print("Current RF: "..drac.getEnergyStored())
- drmon.write("Current RF: "..drac.getEnergyStored())
- term.setCursorPos(1,7)
- drmon.setCursorPos(1,9)
- print(" Max RF: "..drac.getMaxEnergyStored())
- drmon.write(" Max RF: "..drac.getMaxEnergyStored())
- sleep(1)
- end
Add Comment
Please, Sign In to add comment