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