Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --A QUICK NOTE: You have to set the max power the reactor can store, and the minimum!!! There is NO way to set them automatically!
- --ALSO: This was made for OCDiary, but anyone can use it!
- --AS WELL: in a computer do "pastebin get c4ZSKtaE startup" without the quotes to download this. Keeping the computer and reactor chunkloaded is a good idea.
- --Variables and Peripherals
- r= peripheral.wrap("back") --Change this to the side that the Reactor Peripheral Port is on.
- --Maximum Power you want IN THE REACTOR at a time.
- powermax=
- --Minimum Power you want IN THE REACTOR at a time.
- powermin=
- --Funcions
- function main()
- while true do
- --A loop that runs every ten seconds.
- power= r.getEnergyStored()
- if power < powermin then
- if r.getActive() == false then
- r.setActive(true)
- end
- end
- if power > powermax then
- if r.getActive() == true then
- r.setActive(false)
- end
- end
- sleep(10)
- end
- end
- --Main Program
- main()
Advertisement
Add Comment
Please, Sign In to add comment