Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- reactor = peripheral.wrap("top")
- cube = peripheral.wrap("bottom")
- actif = reactor.getActive()
- maxCube = cube.getMaxEnergy()
- while true do
- print("- Current Energy:")
- print(energystore)
- energystore = cube.getStored()
- level = (energystore*100)/maxCube
- if actif then
- if level >= 90 then reactor.setActive(false) end
- else
- if level <= 20 then reactor.setActive(true) end
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement