Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local term = require("term")
- local component = require("component")
- local powerone
- local powertwo
- local ishigh=0
- local islow=0
- local giga = component.list("br_reactor")
- local reactoroneaddress = ("18f86960-f961-48f3-b540-1b3edcfc9464")
- local reactortwoaddress = ("123f338c-2e47-4994-9729-35a4f9d545c3")
- local reactorone = component.proxy(reactoroneaddress)
- local reactortwo = component.proxy(reactortwoaddress)
- term.clear()
- while 1
- --reactor one
- do
- powerone = reactorone.getEnergyStored()
- print("reactor one")
- print(powerone)
- if powerone>=7500000
- then
- reactorone.setAllControlRodLevels(90)
- end
- if powerone<=2000000
- then
- reactorone.setActive(true)
- reactorone.setAllControlRodLevels(0)
- end
- if powerone>=9500000
- then
- reactorone.setActive(false)
- end
- --reactor two
- powertwo = reactorone.getEnergyStored()
- print("reactor two")
- print(powertwo)
- if powertwo>=7500000
- then
- reactortwo.setAllControlRodLevels(90)
- end
- if powertwo<=2000000
- then
- reactortwo.setActive(true)
- reactortwo.setAllControlRodLevels(0)
- end
- if powertwo>=9500000
- then
- reactortwo.setActive(false)
- end
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement