Advertisement
Guest User

Untitled

a guest
Jul 16th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. local term = require("term")
  2. local component = require("component")
  3. local powerone
  4. local powertwo
  5. local ishigh=0
  6. local islow=0
  7. local giga = component.list("br_reactor")
  8.  
  9. local reactoroneaddress = ("18f86960-f961-48f3-b540-1b3edcfc9464")
  10. local reactortwoaddress = ("123f338c-2e47-4994-9729-35a4f9d545c3")
  11.  
  12. local reactorone = component.proxy(reactoroneaddress)
  13. local reactortwo = component.proxy(reactortwoaddress)
  14.  
  15. term.clear()
  16. while 1
  17. --reactor one
  18. do
  19. powerone = reactorone.getEnergyStored()
  20. print("reactor one")
  21. print(powerone)
  22. if powerone>=7500000
  23. then
  24. reactorone.setAllControlRodLevels(90)
  25. end
  26. if powerone<=2000000
  27. then
  28. reactorone.setActive(true)
  29. reactorone.setAllControlRodLevels(0)
  30. end
  31. if powerone>=9500000
  32. then
  33. reactorone.setActive(false)
  34. end
  35. --reactor two
  36. powertwo = reactorone.getEnergyStored()
  37. print("reactor two")
  38. print(powertwo)
  39. if powertwo>=7500000
  40. then
  41. reactortwo.setAllControlRodLevels(90)
  42. end
  43. if powertwo<=2000000
  44. then
  45. reactortwo.setActive(true)
  46. reactortwo.setAllControlRodLevels(0)
  47. end
  48. if powertwo>=9500000
  49. then
  50. reactortwo.setActive(false)
  51. end
  52. os.sleep(1)
  53. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement