Advertisement
demongts1998

варп

May 6th, 2021
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. local component = require("component")
  2. local computer = require("computer")
  3. local debug = computer.addUser
  4. local gpu = component.gpu
  5. gpu.setResolution(80,25)
  6. xresolution,yresolution=gpu.getResolution()
  7. gpu.setBackground(0x000000)
  8. gpu.setForeground(0xFFDD00)
  9. gpu.fill(1,1,xresolution,75," ")
  10. colors={0x000000,0x2D2D2D,0xCC0000,0x0000FF,0x00B600,0x00FF00,0xF90000,0xFFFFFF, 0x43A3A3}
  11.  
  12. gpu.setForeground(colors[2])
  13. gpu.fill(1,1,xresolution,1,'=' )
  14. gpu.fill(1,yresolution,xresolution,1, '=')
  15.  
  16. status1=" [Online] "
  17. status2=" [Offline] "
  18. gm={{nick='feod0r', gn=1}}
  19. ctm={{nick='OB1CHAM', gn=1}}
  20. modn={{nick='xLinkoln_88x', gn=1},{nick='Keks_kompotiki', gn=1},{nick='bes_zensuri', gn=1},{nick='ReiVanSTR', gn=1},{nick='Taranax', gn=1}}
  21. helper1={{nick='Jackson', gn=1}}
  22. helper2={{nick='karum96', gn=1},{nick='KpoBaTb', gn=1}}
  23.  
  24. local function SET(staj,col,name,bool,status,gender)
  25. local X=math.floor(xresolution/5)
  26. local gen=""
  27. gpu.setForeground(colors[2]) gpu.set(X,d,"[") X=X+1
  28. gpu.setForeground(col) gpu.set(X,d,staj) X=X+math.floor((string.len(staj)+1)/2)
  29. gpu.setForeground(colors[2]) gpu.set(X,d,"] - ") X=X+4
  30. gpu.setForeground(colors[8]) gpu.set(X,d,name) X=math.floor(xresolution/1.5)
  31. if gender==1 then gpu.setForeground(0x006DFF) gn="Male" else gpu.setForeground(0x00C0C0) gn="Female" end
  32. gpu.set(X,d,gn) X=math.floor(xresolution/1.3)
  33. if bool==true then gpu.setForeground(0x00FF00) else gpu.setForeground(0xFF0000) end
  34. gpu.set(X,d,status)
  35. end
  36. while true do
  37. d=4
  38.  
  39. for j = 1, #gm do
  40. d=d+2
  41. name=gm[j].nick
  42. gn=gm[j].gn
  43. prov=debug(name)
  44. if prov ~= nil then SET("Гл.Модератор",colors[4],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Гл.Модератор",colors[4],name,false,status2,gn) end
  45. computer.removeUser(name)
  46. end
  47.  
  48. for j = 1, #ctm do
  49. d=d+2
  50. name=ctm[j].nick
  51. gn=ctm[j].gn
  52. prov=debug(name)
  53. if prov ~= nil then SET("Ст.Модератор",colors[9],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Ст.Модератор",colors[9],name,false,status2,gn) end
  54. computer.removeUser(name)
  55. end
  56.  
  57. for j = 1, #modn do
  58. d=d+2
  59. name=modn[j].nick
  60. gn=modn[j].gn
  61. prov=debug(name)
  62. if prov ~= nil then SET("Модератор",colors[7],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Модератор",colors[7],name,false,status2,gn) end
  63. computer.removeUser(name)
  64. end
  65.  
  66. for j = 1, #helper1 do
  67. d=d+2
  68. name=helper1[j].nick
  69. gn=helper1[j].gn
  70. prov=debug(name)
  71. if prov ~= nil then SET("Помощник",colors[5],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Помощник",colors[5],name,false,status2,gn) end
  72. computer.removeUser(name)
  73. end
  74.  
  75. for j = 1, #helper2 do
  76. d=d+2
  77. name=helper2[j].nick
  78. gn=helper2[j].gn
  79. prov=debug(name)
  80. if prov ~= nil then SET("Стажёр",colors[6],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Стажёр",colors[6],name,false,status2,gn) end
  81. computer.removeUser(name)
  82. end
  83.  
  84. os.sleep(1.5)
  85.  
  86. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement