geremy44

reactor beta2

Aug 12th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. local reactors = {peripheral.find("BigReactors-Reactor")}
  2. local reactor = reactors[1]
  3. local mon = peripheral.wrap("right")
  4. while true do
  5.  
  6. local level = reactor.getEnergyStored()
  7. mon.clear()
  8. mon.setCursorPos(1,1)
  9. mon.write(level)
  10.     if level < 500 then
  11.         reactor.setActive(true)
  12.         mon.setCursorPos(1,2)
  13.   mon.write("online")
  14.     end
  15.    
  16.     if level > 5000 then
  17.         reactor.setActive(false)
  18. mon.setCursorPos(1,2)  
  19. mon.write(" offline")
  20.     end
  21.    
  22.     sleep(1)
  23. end
Add Comment
Please, Sign In to add comment