Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local oReactor = peripheral.wrap("back")
- local oCell = peripheral.wrap("bottom")
- local iEnergy
- local lPurcent
- while 1 do
- iEnergy = oCell.getEnergyStored()
- lPurcent = iEnergy*100/80000000
- print(lPurcent)
- if lPurcent > 90 then
- oReactor.setActive(false)
- end
- if lPurcent < 10 then
- oReactor.setActive(true)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement