Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. function writeRF(mon, value)
  2. mon.clear()
  3. local x,y = mon.getSize()
  4. x = math.floor(x / 2)
  5. mon.setCursorPos(x, 0)
  6. mon.write(value)
  7. end
  8.  
  9. local mon = perpherial.wrap("top")
  10. local reactor = perpherial.wrap("right")
  11.  
  12. local buffer = 10000000
  13. local cutOff = 7500000
  14.  
  15. if reactor.getActive() == true then
  16. reactor.setActive(false)
  17. end
  18.  
  19. while true do
  20. local currBuffer = reactor.getEnergyStored()
  21. writeRF(currBuffer .. " RF.")
  22. if currBuffer < cutOff and reactor.getActive() == true then
  23. reactor.setActive(false)
  24. end
  25.  
  26. if currbuffer > cutOff and reactor.getActive() == false then
  27. reactor.setActive(true)
  28. end
  29.  
  30. sleep(5)
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement