Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mon = peripheral.wrap("left")
- r = peripheral.wrap("BigReactors-Reactor_0")
- minimum_rf = 1000000
- maximum_rf = 9000000
- function Main()
- while true do
- buffer = r.getEnergyStored()
- is_on = r.getActive()
- if (buffer < minimum_rf) and (is_on == false) then
- r.setActive(true)
- elseif (buffer > maximum_rf) and (is_on == true) then
- r.setActive(false)
- end
- sleep(2)
- end
- end
- Main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement