Guest User

Untitled

a guest
Mar 29th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. reactor = peripheral.wrap("back")
  2. cellOne = peripheral.wrap("left")
  3.  
  4. actif = reactor.getActive()
  5. cellOneMaxEnergy = cellOne.getMaxEnergyStored()
  6.  
  7. while true do
  8.  
  9. level = cellOneEnergyStored/CellOneMaxEnergy*100
  10.  
  11. if actif then
  12. if level >= 95 then reactor.setActive(false) end
  13. else
  14. if level <= 5 then reactor.setActive(true) end
  15. end
  16.  
  17.  
  18. sleep(1)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment