Advertisement
SanyaRamzik

copy_OnlineSniffer

May 1st, 2020 (edited)
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.45 KB | None | 0 0
  1. -------------------------------------
  2. --      ПАРСЕР ОНЛАЙН СОСТАВА      --
  3. --      edited by SanyaRamzik      --
  4. -------------------------------------
  5. local component = require("component")
  6. local computer = require("computer")
  7. local debug = computer.addUser
  8. local gpu = component.gpu
  9. gpu.setResolution(80,25)
  10. xresolution,yresolution=gpu.getResolution()
  11. gpu.setBackground(0x000000)
  12. gpu.setForeground(0xFFDD00)
  13. gpu.fill(1,1,xresolution,75," ")
  14. colors={0x000000,0x2D2D2D,0xCC0000,0x0000FF,0x00B600,0x00FF00,0xFF0000,0xFFFFFF}
  15.  
  16. gpu.setForeground(colors[2])
  17. gpu.fill(1,1,xresolution,1,'=')
  18. gpu.fill(1,yresolution,xresolution,1,'=')
  19.  
  20. status1=" [Online] "
  21. status2=" [Offline] "
  22. tehadmin={{nick='SkyDrive',gn=1}}
  23. kurator={{nick='atomzerg',gn=1}}
  24. gm={{nick='Zarik1',gn=1}}
  25. modn={{nick='SanyaRamzik',gn=1},{nick='Unders',gn=1}}
  26. helper1={{nick='salex94',gn=1},{nick='Maurizio',gn=1}}
  27. helper2={{nick='FeyMen',gn=1},{nick='Graciya',gn=1}}
  28.  
  29. local function SET(staj,col,name,bool,status,gender)
  30.   local X=math.floor(xresolution/5)
  31.   local gen=""
  32.   gpu.setForeground(colors[2]) gpu.set(X,d,"[") X=X+1
  33.   gpu.setForeground(col) gpu.set(X,d,staj) X=X+math.floor((string.len(staj)+1)/2)
  34.   gpu.setForeground(colors[2]) gpu.set(X,d,"] - ") X=X+4
  35.   gpu.setForeground(colors[8]) gpu.set(X,d,name) X=math.floor(xresolution/1.5)
  36.    if gender==1 then gpu.setForeground(0x006DFF) gn="Male" else gpu.setForeground(0x00C0C0) gn="Female" end
  37.   gpu.set(X,d,gn) X=math.floor(xresolution/1.3)
  38.    if bool==true then gpu.setForeground(0x00FF00) else gpu.setForeground(0xFF0000) end
  39.   gpu.set(X,d,status)
  40. end
  41.  
  42. while true do
  43. d=4
  44.  
  45. for j = 1, #tehadmin do
  46. d=d+1
  47. name=tehadmin[j].nick
  48. gn=tehadmin[j].gn
  49. prov=debug(name)
  50. if prov ~= nil then SET("Тех.Админ",colors[3],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Тех.Админ",colors[3],name,false,status2,gn) end
  51. computer.removeUser(name)
  52. end
  53.  
  54. for j = 1, #kurator do
  55. d=d+2
  56. name=kurator[j].nick
  57. gn=kurator[j].gn
  58. prov=debug(name)
  59. if prov ~= nil then SET("Куратор",colors[3],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Куратор",colors[3],name,false,status2,gn) end
  60. computer.removeUser(name)
  61. end
  62.  
  63. for j=1,#gm do
  64. d=d+2
  65. name=gm[j].nick
  66. gn=gm[j].gn
  67. prov=debug(name)
  68. if prov~= nil then gpu.setForeground(0x00FF00) SET("Гл.Модератор",colors[4],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Гл.Модератор",colors[4],name,false,status2,gn) end
  69. computer.removeUser(name)
  70. end
  71.  
  72. for j = 1, #modn do
  73. d=d+2
  74. name=modn[j].nick
  75. gn=modn[j].gn
  76. prov=debug(name)
  77. if prov ~= nil then gpu.setForeground(0x00FF00) SET("Модератор",colors[7],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Модератор",colors[7],name,false,status2,gn) end
  78. computer.removeUser(name)
  79. end
  80.  
  81. for j = 1, #helper2 do
  82. d=d+2
  83. name=helper2[j].nick
  84. gn=helper2[j].gn
  85. prov=debug(name)
  86. if prov ~= nil then gpu.setForeground(0x00FF00) SET("Помощник",colors[5],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Помощник",colors[5],name,false,status2,gn) end
  87. computer.removeUser(name)
  88. end
  89.  
  90. for j = 1, #helper1 do
  91. d=d+2
  92. name=helper1[j].nick
  93. gn=helper1[j].gn
  94. prov=debug(name)
  95. if prov ~= nil then gpu.setForeground(0x00FF00) SET("Стажёр",colors[6],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Стажёр",colors[6],name,false,status2,gn) end
  96. computer.removeUser(name)
  97. end
  98.  
  99. os.sleep(1.5)
  100.  
  101. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement