Advertisement
Guest User

startup

a guest
Aug 26th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.10 KB | None | 0 0
  1. m = peripheral.wrap("monitor_0")
  2. a = peripheral.wrap("Matrice d'induction_0")--13roro
  3. b = peripheral.wrap("Matrice d'induction_1")--alexxpro
  4. c = peripheral.wrap("Matrice d'induction_2")--louino
  5. d = peripheral.wrap("Matrice d'induction_3")--total
  6. local e
  7.  
  8. while true do
  9. m.clear()
  10. m.setBackgroundColor(colors.black)
  11.  
  12. --conso joueur
  13. m.setTextColor(colors.white)
  14. m.setCursorPos(1,1)
  15. m.write("CONSO JOUEUR")
  16. m.setTextColor(colors.yellow)
  17. m.setCursorPos(1,2)
  18. m.write("13roro ")
  19. m.setTextColor(colors.green)
  20. e = a.getOutput()/25
  21. if e < 1000 then
  22.  m.setCursorPos(12,2)
  23.  m.write(a.getOutput()/25*10)
  24.  m.setCursorPos(17,2)
  25.  m.write(" RF/t                  ")
  26. end
  27. if e > 1000 then
  28.  m.setCursorPos(12,2)
  29.  m.write(a.getOutput()/25/100)
  30.  m.setCursorPos(17,2)
  31.  m.write("kRF/t                  ")
  32. end
  33. if e > 100000 then
  34.  m.setCursorPos(12,2)
  35.  m.write(a.getOutput()/25/100000)
  36.  m.setCursorPos(17,2)
  37.  m.write("mRF/t                  ")
  38. end
  39. m.setTextColor(colors.yellow)
  40. m.setCursorPos(1,3)
  41. m.write("alexxpro")
  42. m.setTextColor(colors.green)
  43. e = b.getOutput()/25
  44. if e < 1000 then
  45.  m.setCursorPos(12,3)
  46.  m.write(b.getOutput()/25*10)
  47.  m.setCursorPos(17,3)
  48.  m.write(" RF/t                  ")
  49. end
  50. if e > 1000 then
  51.  m.setCursorPos(12,3)
  52.  m.write(b.getOutput()/25/100)
  53.  m.setCursorPos(17,3)
  54.  m.write("kRF/t                  ")
  55. end
  56. if e > 100000 then
  57.  m.setCursorPos(12,3)
  58.  m.write(b.getOutput()/25/100000)
  59.  m.setCursorPos(17,3)
  60.  m.write("mRF/t                  ")
  61. end
  62. m.setTextColor(colors.yellow)
  63. m.setCursorPos(1,4)
  64. m.write("louino")
  65. m.setTextColor(colors.green)
  66. e = c.getOutput()/25
  67. if e < 1000 then
  68.  m.setCursorPos(12,4)
  69.  m.write(c.getOutput()/25*10)
  70.  m.setCursorPos(17,4)
  71.  m.write(" RF/t                  ")
  72. end
  73. if e > 1000 then
  74.  m.setCursorPos(12,4)
  75.  m.write(c.getOutput()/25/100)
  76.  m.setCursorPos(17,4)
  77.  m.write("kRF/t                  ")
  78. end
  79. if e > 100000 then
  80.  m.setCursorPos(12,4)
  81.  m.write(c.getOutput()/25/100000)
  82.  m.setCursorPos(17,4)
  83.  m.write("mRF/t                  ")
  84. end
  85.  
  86. --conso totale
  87. m.setTextColor(colors.white)
  88. m.setCursorPos(1,6)
  89. m.write("CONSO TOTAL")
  90. m.setTextColor(colors.green)
  91. e = d.getOutput()/25
  92. if e < 1000 then
  93.  m.setCursorPos(14,6)
  94.  m.write(d.getOutput()/25*10)
  95.  m.setCursorPos(19,6)
  96.  m.write(" RF/t                  ")
  97. end
  98. if e > 1000 then
  99.  m.setCursorPos(14,6)
  100.  m.write(d.getOutput()/25/100)
  101.  m.setCursorPos(19,6)
  102.  m.write("kRF/t                  ")
  103. end
  104. if e > 100000 then
  105.  m.setCursorPos(14,6)
  106.  m.write(d.getOutput()/25/100000)
  107.  m.setCursorPos(19,6)
  108.  m.write("mRF/t                  ")
  109. end
  110.  
  111. --stockage
  112. m.setTextColor(colors.white)
  113. m.setCursorPos(1,7)
  114. m.write("STOCKAGE")
  115. m.setTextColor(colors.green)
  116. e = d.getEnergy()/25
  117. if e < 1000 then
  118.  m.setCursorPos(14,7)
  119.  m.write(d.getEnergy()/25*10)
  120.  m.setCursorPos(19,7)
  121.  m.write(" RF                  ")
  122. end
  123. if e > 1000 then
  124.  m.setCursorPos(14,7)
  125.  m.write(d.getEnergy()/25/100)
  126.  m.setCursorPos(19,7)
  127.  m.write("kRF                  ")
  128. end
  129. if e > 100000 then
  130.  m.setCursorPos(14,7)
  131.  m.write(d.getEnergy()/25/100000)
  132.  m.setCursorPos(19,7)
  133.  m.write("mRF                  ")
  134. end
  135. if e > 100000000 then
  136.  m.setCursorPos(14,7)
  137.  m.write(d.getEnergy()/25/100000000)
  138.  m.setCursorPos(19,7)
  139.  m.write("gRF                  ")
  140. end
  141. if e > 100000000000 then
  142.  m.setCursorPos(14,7)
  143.  m.write(d.getEnergy()/25/100000000000)
  144.  m.setCursorPos(19,7)
  145.  m.write("tRF                  ")
  146. end
  147.  
  148. --charge
  149. m.setTextColor(colors.white)
  150. m.setCursorPos(1,8)
  151. m.write("CHARGE")
  152. m.setTextColor(colors.green)
  153. e = d.getInput()/25
  154. if e < 1000 then
  155.  m.setCursorPos(14,8)
  156.  m.write(d.getInput()/25*10)
  157.  m.setCursorPos(19,8)
  158.  m.write(" RF/t                  ")
  159. end
  160. if e > 1000 then
  161.  m.setCursorPos(14,8)
  162.  m.write(d.getInput()/25/100)
  163.  m.setCursorPos(19,8)
  164.  m.write("kRF/t                  ")
  165. end
  166. if e > 100000 then
  167.  m.setCursorPos(14,8)
  168.  m.write(d.getInput()/25/100000)
  169.  m.setCursorPos(19,8)
  170.  m.write("mRF/t                  ")
  171. end
  172.  
  173. -- % stockage
  174. e = d.getEnergy()*100/d.getMaxEnergy()
  175. m.setTextColor(colors.purple)
  176. m.setCursorPos(23,7)
  177. m.write(e)
  178. m.setCursorPos(28,7)
  179. m.write("%              ")
  180.  
  181.  
  182.  
  183. sleep(0.2)
  184. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement