Advertisement
william200027

Untitled

May 21st, 2017
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.78 KB | None | 0 0
  1. Reactor = peripheral.wrap("bottom")
  2.  
  3. Turbine1 = peripheral.wrap("BigReactors-Turbine_0")
  4. Turbine2 = peripheral.wrap("BigReactors-Turbine_1")
  5. Turbine3 = peripheral.wrap("BigReactors-Turbine_2")
  6. Turbine4 = peripheral.wrap("BigReactors-Turbine_3")
  7.  
  8.  
  9. function GetReactor()
  10. ReactorActive = Reactor.getActive()
  11. ReactorRods = Reactor.getNumberOfControlRods()
  12. ReactorAmount = Reactor.getHotFluidAmount()
  13. ReactorFTemp = Reactor.getFuelTemperature()
  14. ReactorCTemp = Reactor.getCasingTemperature()
  15. ReactorConnected = Reactor.getConnected()
  16. ReactorType = Reactor.getHotFluidType()
  17. ReactorReactivity = Reactor.getFuelReactivity()
  18. end
  19.  
  20. function post(RActive1)
  21. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  22.  "RActive1="..textutils.urlEncode(tostring(RActive1))
  23.  )
  24. end
  25.  
  26. function post1(RRods1)
  27. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  28.  "RRods1="..textutils.urlEncode(tostring(RRods1))
  29.  )
  30. end
  31.  
  32. function post2(RAmount1)
  33. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  34.  "RAmount1="..textutils.urlEncode(tostring(RAmount1))
  35.  )
  36. end
  37.  
  38. function post3(RFTemp1)
  39. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  40.  "RFTemp1="..textutils.urlEncode(tostring(RFTemp1))
  41.  )
  42. end
  43.  
  44. function post4(RCTemp1)
  45. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  46.  "RCTemp1="..textutils.urlEncode(tostring(RCTemp1))
  47.  )
  48. end
  49.  
  50. function post5(RConnected1)
  51. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  52.  "RConnected1="..textutils.urlEncode(tostring(RConnected1))
  53.  )
  54. end
  55.  
  56. function post6(RType1)
  57. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  58.  "RType1="..textutils.urlEncode(tostring(RType1))
  59.  )
  60. end
  61.  
  62. function post7(RReactivite1)
  63. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  64.  "RReactivite1="..textutils.urlEncode(tostring(RReactivite1))
  65.  )
  66. end
  67.  
  68. function GetTurbine1()
  69. TurbineActive1 = Turbine1.getActive()
  70. TurbineSpeed1 = Turbine1.getRotorSpeed()
  71. TurbineType1 = Turbine1.getOutputType()
  72. TurbineStored1 = Turbine1.getEnergyStored()
  73. TurbineProduced1 = Turbine1.getEnergyProducedLastTick()
  74. TurbineConnected1 = Turbine1.getConnected()
  75. end
  76.  
  77. function post8(TActive1)
  78. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  79.  "TActive1="..textutils.urlEncode(tostring(TActive1))
  80.  )
  81. end
  82.  
  83. function post9(TSpeed1)
  84. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  85.  "TSpeed1="..textutils.urlEncode(tostring(TSpeed1))
  86.  )
  87. end
  88.  
  89. function post10(TType1)
  90. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  91.  "TType1="..textutils.urlEncode(tostring(TType1))
  92.  )
  93. end
  94.  
  95. function post11(TStored1)
  96. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  97.  "TStored1="..textutils.urlEncode(tostring(TStored1))
  98.  )
  99. end
  100.  
  101. function post12(TProduced1)
  102. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  103.  "TProduced1="..textutils.urlEncode(tostring(TProduced1))
  104.  )
  105. end
  106.  
  107. function post13(TConnected1)
  108. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  109.  "TConnected1="..textutils.urlEncode(tostring(TConnected1))
  110.  )
  111. end
  112.  
  113. function GetTurbine2()
  114. TurbineActive2 = Turbine2.getActive()
  115. TurbineSpeed2 = Turbine2.getRotorSpeed()
  116. TurbineType2 = Turbine2.getOutputType()
  117. TurbineStored2 = Turbine2.getEnergyStored()
  118. TurbineProduced2 = Turbine2.getEnergyProducedLastTick()
  119. TurbineConnected2 = Turbine2.getConnected()
  120. end
  121.  
  122. function post14(TActive2)
  123. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  124.  "TActive2="..textutils.urlEncode(tostring(TActive2))
  125.  )
  126. end
  127.  
  128. function post15(TSpeed2)
  129. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  130.  "TSpeed2="..textutils.urlEncode(tostring(TSpeed2))
  131.  )
  132. end
  133.  
  134. function post16(TType2)
  135. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  136.  "TType2="..textutils.urlEncode(tostring(TType2))
  137.  )
  138. end
  139.  
  140. function post17(TStored2)
  141. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  142.  "TStored2="..textutils.urlEncode(tostring(TStored2))
  143.  )
  144. end
  145.  
  146. function post18(TProduced2)
  147. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  148.  "TProduced2="..textutils.urlEncode(tostring(TProduced2))
  149.  )
  150. end
  151.  
  152. function post19(TConnected2)
  153. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  154.  "TConnected2="..textutils.urlEncode(tostring(TConnected2))
  155.  )
  156. end
  157.  
  158. function GetTurbine3()
  159. TurbineActive3 = Turbine3.getActive()
  160. TurbineSpeed3 = Turbine3.getRotorSpeed()
  161. TurbineType3 = Turbine3.getOutputType()
  162. TurbineStored3 = Turbine3.getEnergyStored()
  163. TurbineProduced3 = Turbine3.getEnergyProducedLastTick()
  164. TurbineConnected3 = Turbine3.getConnected()
  165. end
  166.  
  167. function post20(TActive3)
  168. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  169.  "TActive3="..textutils.urlEncode(tostring(TActive3))
  170.  )
  171. end
  172.  
  173. function post21(TSpeed3)
  174. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  175.  "TSpeed3="..textutils.urlEncode(tostring(TSpeed3))
  176.  )
  177. end
  178.  
  179. function post22(TType3)
  180. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  181.  "TType3="..textutils.urlEncode(tostring(TType3))
  182.  )
  183. end
  184.  
  185. function post23(TStored3)
  186. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  187.  "TStored3="..textutils.urlEncode(tostring(TStored3))
  188.  )
  189. end
  190.  
  191. function post24(TProduced3)
  192. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  193.  "TProduced3="..textutils.urlEncode(tostring(TProduced3))
  194.  )
  195. end
  196.  
  197. function post25(TConnected3)
  198. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  199.  "TConnected3="..textutils.urlEncode(tostring(TConnected3))
  200.  )
  201. end
  202.  
  203. function GetTurbine4()
  204. TurbineActive4 = Turbine4.getActive()
  205. TurbineSpeed4 = Turbine4.getRotorSpeed()
  206. TurbineType4 = Turbine4.getOutputType()
  207. TurbineStored4 = Turbine4.getEnergyStored()
  208. TurbineProduced4 = Turbine4.getEnergyProducedLastTick()
  209. TurbineConnected4 = Turbine4.getConnected()
  210. end
  211.  
  212. function post26(TActive4)
  213. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  214.  "TActive4="..textutils.urlEncode(tostring(TActive4))
  215.  )
  216. end
  217.  
  218. function post27(TSpeed4)
  219. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  220.  "TSpeed4="..textutils.urlEncode(tostring(TSpeed4))
  221.  )
  222. end
  223.  
  224. function post28(TType4)
  225. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  226.  "TType4="..textutils.urlEncode(tostring(TType4))
  227.  )
  228. end
  229.  
  230. function post29(TStored4)
  231. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  232.  "TStored4="..textutils.urlEncode(tostring(TStored4))
  233.  )
  234. end
  235.  
  236. function post30(TProduced4)
  237. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  238.  "TProduced4="..textutils.urlEncode(tostring(TProduced4))
  239.  )
  240. end
  241.  
  242. function post31(TConnected4)
  243. http.post("http://zaidal86.96.lt/ComputerCraft/ReactorTurbine.php",
  244.  "TConnected4="..textutils.urlEncode(tostring(TConnected4))
  245.  )
  246. end
  247.  
  248. while true do
  249.  
  250.     GetReactor()
  251.     post(ReactorActive)
  252.     post1(ReactorRods)
  253.     post2(ReactorAmount)
  254.     post3(ReactorFTemp)
  255.     post4(ReactorCTemp)
  256.     post5(ReactorConnected)
  257.     post6(ReactorType)
  258.     post7(ReactorReactivity)
  259.  
  260.     --Turbine--
  261.  
  262.     GetTurbine1()
  263.     post8(TurbineActive1)
  264.     post9(TurbineSpeed1)
  265.     post10(TurbineType1)
  266.     post11(TurbineStored1)
  267.     post12(TurbineProduced1)
  268.     post13(TurbineConnected1)
  269.  
  270.     GetTurbine2()
  271.     post14(TurbineActive2)
  272.     post15(TurbineSpeed2)
  273.     post16(TurbineType2)
  274.     post17(TurbineStored2)
  275.     post18(TurbineProduced2)
  276.     post19(TurbineConnected2)
  277.  
  278.     GetTurbine3()
  279.     post20(TurbineActive3)
  280.     post21(TurbineSpeed3)
  281.     post22(TurbineType3)
  282.     post23(TurbineStored3)
  283.     post24(TurbineProduced3)
  284.     post25(TurbineConnected3)
  285.  
  286.     GetTurbine4()
  287.     post26(TurbineActive4)
  288.     post27(TurbineSpeed4)
  289.     post28(TurbineType4)
  290.     post29(TurbineStored4)
  291.     post30(TurbineProduced4)
  292.     post31(TurbineConnected4)
  293.  
  294.     sleep(0.1)
  295. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement