Advertisement
raphael76280

Untitled

Aug 5th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local monitor
  2. local reactor
  3. monitor = peripheral.wrap("back")
  4. reactor = peripheral.wrap("left")
  5. local Heat1
  6. local Heat2
  7. local Fuel1
  8. local Fuel2
  9. local Rf1
  10. local Rf2
  11. local Active1
  12. local Active2
  13.  
  14. reactor.open(15)
  15. reactor.open(16)
  16. reactor.open(17)
  17. reactor.open(18)
  18.  
  19. reactor.open(25)
  20. reactor.open(26)
  21. reactor.open(27)
  22. reactor.open(28)
  23.  
  24. while true do
  25. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
  26. print(message)
  27.  
  28. if (senderChannel == 15) then
  29. Heat1 = message
  30. end
  31.  
  32. if (senderChannel == 16) then
  33. Fuel1 = message
  34. end
  35.  
  36. if (senderChannel == 17) then
  37. Rf1 = message
  38. end
  39.  
  40. if (senderChannel == 18) then
  41. Active1 = message
  42. end
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. if (senderChannel == 25) then
  50. Heat2 = message
  51. end
  52.  
  53. if (senderChannel == 26) then
  54. Fuel2 = message
  55. end
  56.  
  57. if (senderChannel == 27) then
  58. Rf2 = message
  59. end
  60.  
  61. if (senderChannel == 28) then
  62. Active2 = message
  63. end
  64.  
  65. monitor.clear()
  66. monitor.write("Bloc de fusion nucleaire")
  67. monitor.setCursorPos(1,2)
  68.  
  69. monitor.write(Heat1)
  70. monitor.write(" ")
  71. monitor.write(Fuel1)
  72. monitor.write(" ")
  73. monitor.write(Rf1)
  74. monitor.write(" ")
  75. monitor.write(Active1)
  76. monitor.write(" ")
  77.  
  78.  
  79.  
  80. monitor.setCursorPos(1,3)
  81. monitor.write(Heat2)
  82. monitor.write(" ")
  83. monitor.write(Fuel2)
  84. monitor.write(" ")
  85. monitor.write(Rf2)
  86. monitor.write(" ")
  87. monitor.write(Active2)
  88. monitor.write(" ")
  89.  
  90. print("frame")
  91. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement