Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 1 --enter number of turbines here
- y = 1024 -- enter the stable steam level
- br = peripheral.wrap("back")
- s = br.getHotFluidProducedLastTick()
- v = 100
- if x>0 then
- br.setActive (true)
- print("booting up")
- br.setAllControlRodLevels (v)
- sleep(2)
- else
- br.setActive (false)
- print("please enter the number of turbines")
- end
- while x>0 do
- if s<y*x then --if not producing enough steam
- br.setAllControlRodLevels(v)
- v = v-1
- sleep(5)
- elseif s>y*x then -- to much steam
- br.setAllControlRodLevels(v)
- v = v+1
- sleep(5)
- else
- sleep(5)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment