Advertisement
NekoTiki

fdqfqdsfqsfqsdf

Oct 19th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. rednet.open("back")
  2. m = peripheral.wrap("right")
  3.  
  4. local l,h = m.getSize()
  5. term.clear()
  6. term.setCursorPos(1,1)
  7. shell.run("id")
  8.  
  9. function clrr()
  10.   if i >=0 then
  11.     m.setBackgroundColor(colors.blue)
  12.   elseif i >= 6 then
  13.     m.setBackgroundColor(colors.cyan)
  14.   elseif i >= 10 then
  15.     m.setBackgroundColor(colors.green)
  16.   elseif i >= 14 then
  17.     m.setBackgroundColor(colors.cyan)
  18.   elseif i >= 22 then
  19.     m.setBackgroundColor(colors.red)
  20.   elseif i >= 24 then
  21.     m.setBackgroundColor(colors.yellow)
  22.   end
  23. end
  24.  
  25. function prt()
  26.   term.clear()
  27.   term.setCursorPos(1,1)
  28.   print("H:"..h.." L:"..l)
  29. end
  30.  
  31. while true do
  32.  
  33.   -----  Recevoir les information   -----
  34.   local id1,e25,pe25 = rednet.receive("EnPt25")
  35.   local id2,r25,pr25 = rednet.receive("RoSp25")
  36.   print("e25:"..e25.." r25:"..r25)
  37.  
  38.   local id3,e34,pe34 = rednet.receive("EnPt34")
  39.   local id4,r34,pr34 = rednet.receive("RoSp34")
  40.   print("e34:"..e34.." r34:"..r34)
  41.  
  42.   local id5,e29,pe29 = rednet.receive("EnPt29")
  43.   local id6,r29,pr29 = rednet.receive("RoSp29")
  44.   print("e29:"..e29.." r29:"..r29)
  45.  
  46.   sleep(0.1)
  47.   ----- Fin d'attente d'information -----
  48.  
  49.  
  50.   ----- Reboot Screen -----
  51.   m.setBackgroundColor(colors.black)
  52.   m.clear()
  53.   ----- End Reboot Sc -----
  54.  
  55.   ----- Affichage (Bars) -----
  56.    -- 1er (Rotors CoP N27) --
  57.   m.setBackgroundColor(colors.cyan)
  58.   m.setCursorPos(2,3)
  59.  
  60.   --local l1 = 0
  61.   l1 = r25 * (l-2) / 2000
  62.   print(l1)
  63.  
  64.   for i=1,l1 do
  65.     if i >=0 then
  66.     m.setBackgroundColor(colors.blue)
  67.   elseif i >= 6 then
  68.     m.setBackgroundColor(colors.cyan)
  69.   elseif i >= 10 then
  70.     m.setBackgroundColor(colors.green)
  71.   elseif i >= 14 then
  72.     m.setBackgroundColor(colors.cyan)
  73.   elseif i >= 22 then
  74.     m.setBackgroundColor(colors.red)
  75.   elseif i >= 24 then
  76.     m.setBackgroundColor(colors.yellow)
  77.   end
  78.     m.write(" ")
  79.   end
  80.    -- 2eme (RotorsCP N34) --
  81.   m.setBackgroundColor(colors.cyan)
  82.   m.setCursorPos(2,6)
  83.  
  84.   --local l2 = 0
  85.   l2 = r34 * (l-2) / 2000
  86.   print(l2)
  87.  
  88.   for i=1,l2 do
  89.     if i >=0 then
  90.     m.setBackgroundColor(colors.blue)
  91.   elseif i >= 6 then
  92.     m.setBackgroundColor(colors.cyan)
  93.   elseif i >= 10 then
  94.     m.setBackgroundColor(colors.green)
  95.   elseif i >= 14 then
  96.     m.setBackgroundColor(colors.cyan)
  97.   elseif i >= 22 then
  98.     m.setBackgroundColor(colors.red)
  99.   elseif i >= 24 then
  100.     m.setBackgroundColor(colors.yellow)
  101.   end
  102.     m.write(" ")
  103.   end
  104.  
  105.    -- 3eme (RotorsCP N34) --
  106.   m.setBackgroundColor(colors.cyan)
  107.   m.setCursorPos(2,9)
  108.  
  109.   --local l2 = 0
  110.   l3 = r29 * (l-2) / 2000
  111.   print(l3)
  112.  
  113.   for i=1,l2 do
  114.     if i >=0 then
  115.     m.setBackgroundColor(colors.blue)
  116.   elseif i >= 6 then
  117.     m.setBackgroundColor(colors.cyan)
  118.   elseif i >= 10 then
  119.     m.setBackgroundColor(colors.green)
  120.   elseif i >= 14 then
  121.     m.setBackgroundColor(colors.cyan)
  122.   elseif i >= 22 then
  123.     m.setBackgroundColor(colors.red)
  124.   elseif i >= 24 then
  125.     m.setBackgroundColor(colors.yellow)
  126.   end
  127.     m.write(" ")
  128.   end
  129.  
  130.   sleep(1)
  131. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement