Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reactor = peripheral.wrap("left")
- m = peripheral.find("monitor")
- function mclear()
- m.clear()
- m.setCursorPos(1,1)
- end
- while true do
- energy = reactor.getEnergyStored()
- print("energy = "..energy)
- if energy < 8000000 then
- reactor.setActive(true)
- print("true")
- status = "true"
- else
- reactor.setActive(false)
- print("false")
- status = "false"
- end
- max = "10000000"
- pourcent1 = energy/max
- pourcent2 = pourcent1*cent
- mclear()
- m.write("energy = "..energy)
- m.setCursorPos(1,2)
- m.write(status)
- m.setCursorPos(1,3)
- m.write(pourcent2.."%")
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment