Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local computer = require("computer")
- local debug = computer.addUser
- local gpu = component.gpu
- gpu.setResolution(80,25)
- xresolution,yresolution=gpu.getResolution()
- gpu.setBackground(0x000000)
- gpu.setForeground(0xFFDD00)
- gpu.fill(1,1,xresolution,75," ")
- colors={0x000000,0x2D2D2D,0xCC0000,0x0000FF,0x00B600,0x00FF00,0xF90000,0xFFFFFF, 0x43A3A3}
- gpu.setForeground(colors[2])
- gpu.fill(1,1,xresolution,1,'=' )
- gpu.fill(1,yresolution,xresolution,1, '=')
- status1=" [Online] "
- status2=" [Offline] "
- gm={{nick='feod0r', gn=1}}
- ctm={{nick='OB1CHAM', gn=1}}
- modn={{nick='xLinkoln_88x', gn=1},{nick='Keks_kompotiki', gn=1},{nick='bes_zensuri', gn=1},{nick='ReiVanSTR', gn=1},{nick='Taranax', gn=1}}
- helper1={{nick='Jackson', gn=1}}
- helper2={{nick='karum96', gn=1},{nick='KpoBaTb', gn=1}}
- local function SET(staj,col,name,bool,status,gender)
- local X=math.floor(xresolution/5)
- local gen=""
- gpu.setForeground(colors[2]) gpu.set(X,d,"[") X=X+1
- gpu.setForeground(col) gpu.set(X,d,staj) X=X+math.floor((string.len(staj)+1)/2)
- gpu.setForeground(colors[2]) gpu.set(X,d,"] - ") X=X+4
- gpu.setForeground(colors[8]) gpu.set(X,d,name) X=math.floor(xresolution/1.5)
- if gender==1 then gpu.setForeground(0x006DFF) gn="Male" else gpu.setForeground(0x00C0C0) gn="Female" end
- gpu.set(X,d,gn) X=math.floor(xresolution/1.3)
- if bool==true then gpu.setForeground(0x00FF00) else gpu.setForeground(0xFF0000) end
- gpu.set(X,d,status)
- end
- while true do
- d=4
- for j = 1, #gm do
- d=d+2
- name=gm[j].nick
- gn=gm[j].gn
- prov=debug(name)
- if prov ~= nil then SET("Гл.Модератор",colors[4],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Гл.Модератор",colors[4],name,false,status2,gn) end
- computer.removeUser(name)
- end
- for j = 1, #ctm do
- d=d+2
- name=ctm[j].nick
- gn=ctm[j].gn
- prov=debug(name)
- if prov ~= nil then SET("Ст.Модератор",colors[9],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Ст.Модератор",colors[9],name,false,status2,gn) end
- computer.removeUser(name)
- end
- for j = 1, #modn do
- d=d+2
- name=modn[j].nick
- gn=modn[j].gn
- prov=debug(name)
- if prov ~= nil then SET("Модератор",colors[7],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Модератор",colors[7],name,false,status2,gn) end
- computer.removeUser(name)
- end
- for j = 1, #helper1 do
- d=d+2
- name=helper1[j].nick
- gn=helper1[j].gn
- prov=debug(name)
- if prov ~= nil then SET("Помощник",colors[5],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Помощник",colors[5],name,false,status2,gn) end
- computer.removeUser(name)
- end
- for j = 1, #helper2 do
- d=d+2
- name=helper2[j].nick
- gn=helper2[j].gn
- prov=debug(name)
- if prov ~= nil then SET("Стажёр",colors[6],name,true,status1,gn) else gpu.setForeground(0xFF0000) SET("Стажёр",colors[6],name,false,status2,gn) end
- computer.removeUser(name)
- end
- os.sleep(1.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement