local Reactor = peripheral.find("BigReactors-Reactor") local Turbine1 = peripheral.find("BigReactors-Turbine") local RodsInsertion = 95 local RodInsertion = 95 function RodSetting() while Reactor.getHotFluidProducedLastTick() > 1999 do RodsInsertion = RodsInsertion +1 Reactor.setAllControlRodLevels(RodsInsertion) os.sleep(1) end os.sleep(3) while Reactor.getHotFluidProducedLastTick() < 1900 do RodsInsertion = RodsInsertion -1 Reactor.setAllControlRodLevels(RodsInsertion) os.sleep(1) end RodInsertion = RodsInsertion while Reactor.getHotFluidProducedLastTick() < 2000 and RodInsertion > 0 do RodInsertion = RodInsertion -1 Reactor.setControlRodLevel(0,RodInsertion) os.sleep(1) end RodInsertion = RodInsertion + 1 Reactor.setControlRodLevel(0,RodInsertion) end if Reactor.getConnected() and Turbine1.getConnected() then else error() end Reactor.setAllControlRodLevels(95) Reactor.setActive(true) Turbine1.setInductorEngaged(true) local flow os.sleep(10) flow = Reactor.getHotFluidProducedLastTick() RodsInsertion = 20000/flow Reactor.setAllControlRodLevels(RodsInsertion) os.sleep(5) flow = Reactor.getHotFluidProducedLastTick() RodSetting() while true do if Turbine1.getRotorSpeed() > 1825 then Reactor.setActive(false) elseif Turbine1.getRotorSpeed() < 1775 then Reactor.setActive(true) end if redstone.getAnalogInput("back") > 8 then Turbine1.setInductorEngaged(false) elseif redstone.getAnalogInput("back") < 5 then if Turbine1.getRotorSpeed() > 1700 then Turbine1.setInductorEngaged(true) end end os.sleep(3) end