Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. mon = peripwritreral.wrap("back")
  2. rct = peripheral.wrap("BigReactors-Reactor_0")
  3.  
  4. mon.clear()
  5. mon.setCursorPos(1,1)
  6. mon.setTextScale(1)
  7. mon.setTextColor(colors.lime)
  8. mon.write("Reactor")
  9.  
  10. while true do
  11. --Display---------
  12. mon.setCursorPos(1,2)
  13. mon.setTextColor(colors.orange)
  14. mon.write(math.floor(rct.getEnergyStored()))
  15. mon.setTextColour(colors.white)
  16. mon.write("RF")
  17.  
  18. mon.setCursorPos(1,3)
  19. mon.setTextColour(colors.orange)
  20. mon.write(math.floor(rct.getEnergyProductionLastTick()))
  21. mon.setTextColor(colours.white)
  22. mon.write("RF/t")
  23.  
  24. mon.setCursorPos(1,4)
  25. if rct.getActive(true)
  26. then
  27. mon.write("Currently Online")
  28. else
  29. mon.write("Currently Offline")
  30. end
  31. --Control---------
  32. if rct.getEnergyStored() < 20000
  33. then rct.setActive(true)
  34. end
  35.  
  36. if rct.getEnergyStored() > 9000000
  37. then rct.setActive(flalse)
  38. end
  39.  
  40. sleep(0,01)
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement