Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap ("back")
- local MAX_RF = 10000000
- local MIN_LEVEL = 0.2
- local MAX_LEVEL = 0.8
- while true do
- local rf = reactor.getEnergyStored ()
- local percent = rf / MAX_RF
- if percent < MIN_LEVEL then
- reactor.setActive (true)
- elseif percent > MAX_LEVEL then
- reactor.setActive (false)
- end
- sleep (1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement