Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- local args = {...}
- if #args ~= 1 then
- print("USAGE: controller <target power percentage (between 0 and 100)>")
- return
- end
- reactor = peripheral.wrap("back")
- while true do
- currentRF = reactor.getEnergyStored()
- RFPer = (currentRF / 10000000) * 100
- currentPer = (RFPer / args[1]) * 100
- term.setCursorPos(1,1)
- print("Current control rod target: "..currentPer)
- if currentPer > 100 then
- currentPer = 100
- end
- math.floor(currentPer)
- reactor.setAllControlRodLevels(currentPer)
- sleep(.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement