Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = peripheral.wrap("BigReactors-Reactor_0")
- local mon = peripheral.wrap("left")
- while true do
- term.clear()
- term.setCursorPos(1,1)
- mon.clear()
- mon.setTextColor(colors.white)
- mon.setCursorPos(1,1)
- mon.write("Information:")
- energy = p.getEnergyStored()
- percent = math.floor(energy/100000)
- print("Remplissage: "..percent.."%")
- mon.setCursorPos(1,3)
- mon.write("Remplissage: ")
- mon.setTextColor(colors.red)
- mon.write(percent)
- mon.setTextColor(colors.white)
- mon.write(" %")
- if percent < 30 then
- p.setActive(true)
- end
- if percent > 60 then
- p.setActive(false)
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement