Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Ekw,A,o,t={},"",0,0
- Pole={}
- for i=1,200 do
- Pole[i]=""
- end
- Klaw={{73,75,74,76,"I\nJ K L"},{71,66,86,78,"G\nV B N"},{50,90,65,69,"2\nQ W E"},{219,222,186,220,"\[\n; \' \\"},{104,101,100,102,"<CH>8\n4 5 6"}}
- TEXT={
- pomoc=' <J>• Piksus •\n\n<BV>Cel: <N>Zamaluj swoim pionkiem jak najwięcej pól.\n\n<BV>Jak grać:\n <N>Zamiast sterowć <VP>WSAD<N>em należy używać <VP>IKJL<N>.\n\n<BV>Komendy:\n<BL>!pomoc\t\t<N>- wyświetla to co teraz czytasz...\n<BL>!info\t\t<N>- wyświetla informacje na temat minigry\n<BL>!dodaj\t\t<N>- otwiera okno dołączanie do gry\n<BL>!odejdź\t\t<N>- odłącza Cię z gry\n\nWięcej o minigrze w temacie:\n[ <V><U>Topic-?</U> <N>]-/-',
- info =' <J>Informacje o Piksus\n\n<BV>Autor: <V>Ouake\n<BV>Twórca: <V>Ouake\n\n<BV>Ilość kolorów: <N>215 (co do koloru zapisu)\n<BV>Ilość trybów: <N>1\n<BV>Trybów gracza: <N>3'
- }
- ui.addTextArea(301,"<B><font color='#333333'>» Piksus</font>",n,4,-17,0,0,n,n,0,true)
- ui.addTextArea(302,"<B><V>» Piksus",n,5,-18,0,0,n,n,0,true)
- has=""..math.random(100,999)
- print("<T>Hasło : <VP>"..has)
- system.disableChatCommandDisplay(has,true)
- function eventNewPlayer(nick)
- tfm.exec.setNameColor(nick,0x777777)
- Ekw[nick]={}
- Ekw[nick][1]={tr="online",t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- end
- for nick in pairs(tfm.get.room.playerList) do
- eventNewPlayer(nick)
- end
- function Lista()
- TXT="Gracze:\n"
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.k1~="?" then
- if stat.tr=="online" then
- TXT=TXT.."\n<N>("..stat.k1:sub(3,8)..") <font color='#"..stat.k1:sub(3).."'>"..gracz
- elseif stat.tr=="mixline" then
- TXT=TXT.."\n<N>("..stat.k1:sub(3,8)..") <font color='#"..stat.k1:sub(3).."'>"..gracz.." "..id
- end
- end
- end
- end
- ui.addTextArea(9,TXT,A,50,50,n,n,n,n,1,true)
- end
- function GR(nick)
- TX2=""
- for i in pairs(Ekw[nick]) do
- if i==1 then
- TX1="<G>- <J>"
- else
- TX1="<J><a href='event:-'>-</a> "
- end
- TX2=TX2.."<a href='event:"..i.."'>"..i.."</a> "
- ii=i
- end
- if ii==5 then
- TXT=TX1..TX2.." <G>+"
- else
- TXT=TX1..TX2.." <a href='event:+'>+</a>"
- end
- ui.addTextArea(7,TXT,nick,300,70,200,n,n,n,1,true)
- end
- function Wybr(nick)
- ui.addTextArea(0," Wybierz swój kolor:<textformat tabstops='[20,50,80]'>\n\n\n\t<R><B>R</B>\t<VP><B>G</B>\t<BL><B>B</B>\n\n\t<J><a href='event:R0'>[00]</a>\t<a href='event:G0'>[00]</a>\t<a href='event:B0'>[00]</a>\n\t<a href='event:R1'>[33]</a>\t<a href='event:G1'>[33]</a>\t<a href='event:B1'>[33]</a>\n\t<a href='event:R2'>[66]</a>\t<a href='event:G2'>[66]</a>\t<a href='event:B2'>[66]</a>\n\t<a href='event:R3'>[99]</a>\t<a href='event:G3'>[99]</a>\t<a href='event:B3'>[99]</a>\n\t<a href='event:R4'>[cc]</a>\t<a href='event:G4'>[cc]</a>\t<a href='event:B4'>[cc]</a>\n\t<a href='event:R5'>[FF]</a>\t<a href='event:G5'>[FF]</a>\t<a href='event:B5'>[FF]</a>\n ",nick,300,100,200,180,n,n,1,true)
- ui.addTextArea(1,"",nick,420,130,60,60,0xe242d,0xe242d,1,true)
- eventTextAreaCallback(0,nick,"N9")
- ui.addTextArea(5,"<p align='center'><J><a href='event:ANL'>Anuluj",nick,410,255,80,n,n,n,1,true)
- ui.addTextArea(6,"<a href='event:ZAM'><R><B>X",nick,490,100,n,n,n,n,0,true)
- end
- function eventChatCommand(nick,komd)
- if komd==has and A=="" then
- A=nick
- S=tfm.get.room.playerList[A]
- for i=1,7 do
- tfm.exec.displayParticle(13,S.x,S.y-50,math.random(-30,30)/10,math.random(-10,10)/10,0,0,nil)
- end
- tfm.exec.setNameColor(A,0xeb1d51)
- Lista()
- elseif komd=="pomoc" or komd=="info" then
- ui.addTextArea(303,TEXT[komd],nick,230,110,340,200,0x1c3c41,0x1c3c41,1,true)
- ui.addTextArea(304,'<B><R><a href="event:ZMP">X</a>',nick,550,110,14,18,n,n,0,true)
- elseif komd=="online" and Ekw[nick][1].o==0 then
- Ekw[nick]={}
- Ekw[nick][1]={tr=komd,t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- if A~=nick then
- tfm.exec.setNameColor(nick,0x777777)
- end
- Lista()
- elseif komd=="offline" and Ekw[nick][1].o==0 then
- Ekw[nick]={}
- Ekw[nick][1]={tr=komd,t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- if A~=nick then
- tfm.exec.setNameColor(nick,0x77aaaa)
- end
- elseif komd=="mixline" and Ekw[nick][1].o==0 then
- Ekw[nick]={}
- Ekw[nick][1]={tr=komd,t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- if A~=nick then
- tfm.exec.setNameColor(nick,0xaaaa77)
- end
- Lista()
- elseif komd=="dodaj" and o==0 and Ekw[nick][1].tr=="online" then
- Wybr(nick)
- Ekw[nick][1].o=1
- if A~=nick then
- tfm.exec.setNameColor(nick,0x77aa77)
- end
- elseif komd=="dodaj" and Ekw[nick][1].tr=="offline" then
- Wybr(nick)
- GR(nick)
- ui.addTextArea(8,"<p align='center'>Sterowanie:\n\n<J>"..Klaw[Ekw[nick][1].w][5],nick,520,100,n,n,n,n,1,true)
- elseif komd=="dodaj" and o==0 and Ekw[nick][1].tr=="mixline" then
- Wybr(nick)
- GR(nick)
- ui.addTextArea(8,"<p align='center'>Sterowanie:\n\n<J>"..Klaw[Ekw[nick][1].w][5],nick,520,100,n,n,n,n,1,true)
- Ekw[nick][1].o=1
- if A~=nick then
- tfm.exec.setNameColor(nick,0xaaaa77)
- end
- elseif komd=="odejdź" and Ekw[nick][1].tr~="offline" then
- for i=1,Gr.il do
- for j=1,4 do
- tfm.exec.bindKeyboard(nick,Klaw[i][j],true,false)
- end
- end
- if o==1 then
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.tr~="offline" and stat.k1~="?" then
- ui.addTextArea(Ekw[nick][1].x+(Ekw[nick][1].y-1)*20,"",gracz,110+30*((Ekw[nick][1].x-1)%20),80+30*((Ekw[nick][1].y-1)%10),20,20,Ekw[nick][1].k2,Ekw[nick][1].k2,1,true)
- end
- end
- end
- end
- if A~=nick then
- tfm.exec.setNameColor(nick,0x777777)
- if Ekw[nick][1].tr=="mixline" then
- tfm.exec.setNameColor(nick,0xaaaa77)
- end
- end
- ST=Ekw[gracz][1].tr
- Ekw[nick]={}
- Ekw[nick][1]={tr=ST,t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- Lista()
- elseif komd=="start" and Ekw[nick][1].tr=="offline" and Ekw[nick][1].o==1 then
- for i=1,200 do
- Ekw[nick][1].Pole[i]=""
- end
- ui.addTextArea(201,"",nick,90,60,630,330,0x1c3c41,0x1c3c41,1,true)
- ui.addTextArea(202,"",nick,100,70,610,310,0xe242d,0xe242d,1,true)
- ui.addTextArea(203,"",nick,40,30,730,10,0x1c3c41,0x1c3c41,1,true)
- ui.addTextArea(204,"",nick,45,34,720,2,0xcc0000,0xcc0000,1,true)
- ui.addTextArea(205,"",nick,45,34,720,2,0xcc00,0xcc00,1,true)
- for i=1,200 do
- ui.addTextArea(i,"",nick,110+30*((i-1)%20),80+30*math.floor((i-1)/20),20,20,0x1c3c41,0x1c3c41,1,true)
- end
- for id,stat in pairs(Ekw[nick]) do
- ui.addTextArea(stat.x+(stat.y-1)*20,"<V>"..id,nick,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- end
- Ekw[nick][1].o=2
- elseif komd=="koniec" and Ekw[nick][1].tr=="offline" and Ekw[nick][1].o==2 then
- ST=Ekw[nick][1].tr
- Ekw[nick]={}
- Ekw[nick][1]={tr=ST,t=0,il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- for i=1,Gr.il do
- for j=1,4 do
- tfm.exec.bindKeyboard(nick,Klaw[i][j],true,false)
- end
- end
- for i=0,205 do
- ui.removeTextArea(i,nick)
- end
- elseif A==nick then
- if komd=="start" and Ekw[nick][1].tr~="offline" and o==0 then
- il=0
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.k1~="?" then
- il=il+1
- end
- end
- end
- if il~=0 then
- o=1
- for i=1,200 do
- Pole[i]=""
- end
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if id==1 and stat.tr~="offline" and stat.k1~="?" then
- ui.addTextArea(201,"",gracz,90,60,630,330,0x1c3c41,0x1c3c41,1,true)
- ui.addTextArea(202,"",gracz,100,70,610,310,0xe242d,0xe242d,1,true)
- ui.addTextArea(203,"",gracz,40,30,730,10,0x1c3c41,0x1c3c41,1,true)
- ui.addTextArea(204,"",gracz,45,34,720,2,0xcc0000,0xcc0000,1,true)
- ui.addTextArea(205,"",gracz,45,34,720,2,0xcc00,0xcc00,1,true)
- for i=1,200 do
- ui.addTextArea(i,"",gracz,110+30*((i-1)%20),80+30*math.floor((i-1)/20),20,20,0x1c3c41,0x1c3c41,1,true)
- end
- end
- end
- end
- for gracz in pairs(Ekw) do
- for id,st1 in pairs(Ekw[gracz]) do
- if st1.tr~="offline" and st1.k1~="?" then
- for wrog in pairs(Ekw) do
- for di,st2 in pairs(Ekw[wrog]) do
- if st2.tr~="offline" and st2.k1~="?" then
- ui.addTextArea(st2.x+(st2.y-1)*20,"",gracz,110+30*((st2.x-1)%20),80+30*((st2.y-1)%10),20,20,st2.k1,st2.k1,1,true)
- end
- end
- end
- end
- end
- end
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.k1~="?" then
- if stat.tr=="online" then
- ui.addTextArea(stat.x+(stat.y-1)*20,"<V>Ty",gracz,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- elseif stat.tr=="mixline" then
- ui.addTextArea(stat.x+(stat.y-1)*20,"<V>"..id,gracz,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- end
- end
- end
- end
- end
- elseif komd=="koniec" and o==1 then
- o,t=0,0
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.tr~="offline" then
- ST=Ekw[gracz][1].tr
- Ekw[gracz]={}
- Ekw[gracz][1]={tr=ST,t="x",il=1,w=1,o=0,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- for i=0,205 do
- ui.removeTextArea(i,gracz)
- end
- end
- for i=73,76 do
- tfm.exec.bindKeyboard(gracz,i,true,false)
- end
- end
- end
- Lista()
- end
- end
- end
- function eventTextAreaCallback(id,nick,odp)
- Gr=Ekw[nick][1]
- Gx=Ekw[nick][Ekw[nick][1].w]
- if odp=="ZMP" then
- ui.removeTextArea(303,nick)
- ui.removeTextArea(304,nick)
- elseif odp=="OK" then
- eventTextAreaCallback(0,nick,"ZAM")
- for i=1,Gr.il do
- Ekw[nick][i].k1="0x"..Ekw[nick][i].r1..Ekw[nick][i].g1..Ekw[nick][i].b1
- Ekw[nick][i].k2="0x"..Ekw[nick][i].r2..Ekw[nick][i].g2..Ekw[nick][i].b2
- Ekw[nick][i].pkt=0
- Ekw[nick][i].x,Ekw[nick][i].y=math.random(1,20),math.random(1,10)
- end
- if A~=nick and Gr.tr=="online" then
- tfm.exec.setNameColor(nick,0x77ff77)
- elseif A~=nick and Gr.tr=="offline" then
- tfm.exec.setNameColor(nick,0x77ffff)
- Gr.Pole={}
- Gr.t=0
- Gr.o=1
- elseif A~=nick and Gr.tr=="mixline" then
- tfm.exec.setNameColor(nick,0xffff77)
- end
- Lista()
- elseif odp=="ANL" then
- eventTextAreaCallback(0,nick,"ZAM")
- Ekw[nick][1].o=0
- if A~=nick then
- tfm.exec.setNameColor(nick,0x777777)
- end
- elseif odp=="ZAM" then
- for i=0,8 do
- ui.removeTextArea(i,nick)
- end
- elseif odp=="KON" then
- eventChatCommand(nick,"koniec")
- elseif odp=="+" then
- Gr.il=Gr.il+1
- Ekw[nick][Gr.il]={tr=Gr.tr,pkt=0,x=1,y=1,k1="?",k2="?",r1="00",r2="00",g1="00",g2="00",b1="00",b2="00"}
- GR(nick)
- eventTextAreaCallback(0,nick,"N9")
- elseif odp=="-" then
- Ekw[nick][Gr.il]=nil
- Gr.il=Gr.il-1
- Ekw[nick][1].w=1
- GR(nick)
- eventTextAreaCallback(0,nick,"N9")
- elseif type(tonumber(odp))=="number" then
- odp=tonumber(odp)
- Ekw[nick][1].w=odp
- ui.addTextArea(2,"",nick,440,150,20,20,"0x"..Ekw[nick][odp].r1..Ekw[nick][odp].g1..Ekw[nick][odp].b1,"0x"..Ekw[nick][odp].r1..Ekw[nick][odp].g1..Ekw[nick][odp].b1,1,true)
- ui.addTextArea(3,"<R>R<N> : "..Ekw[nick][odp].r1.."\n<VP>G<N> : "..Ekw[nick][odp].g1.."\n<BL>B<N> : "..Ekw[nick][odp].b1,nick,420,200,60,n,n,n,0,true)
- ui.addTextArea(8,"<p align='center'>Sterowanie:\n\n<J>"..Klaw[Ekw[nick][1].w][5],nick,520,100,n,n,n,n,1,true)
- eventTextAreaCallback(0,nick,"N9")
- elseif id==0 then
- for v,k in pairs({{"R","r"},{"G","g"},{"B","b"}}) do
- for v,l in pairs({{0,"00","00"},{1,33,22},{2,66,44},{3,99,66},{4,"cc",88},{5,"ff","aa"}}) do
- if odp==k[1]..l[1] then
- Gx[k[2]..1],Gx[k[2]..2]=l[2],l[3]
- end
- end
- end
- ui.addTextArea(2,"",nick,440,150,20,20,"0x"..Gx.r1..Gx.g1..Gx.b1,"0x"..Gx.r1..Gx.g1..Gx.b1,1,true)
- ui.addTextArea(3,"<R>R<N> : "..Gx.r1.."\n<VP>G<N> : "..Gx.g1.."\n<BL>B<N> : "..Gx.b1,nick,420,200,60,n,n,n,0,true)
- kk=0
- for id,stat in pairs(Ekw[nick]) do
- if stat.r1=="00" and stat.g1=="00" and stat.b1=="00" then
- kk=kk+1
- end
- end
- if kk==0 then
- ui.addTextArea(4,"<p align='center'><J><a href='event:OK'>Wybierz</a> ",nick,310,255,80,n,n,n,1,true)
- else
- ui.addTextArea(4,"<p align='center'><G>Wybierz",nick,310,255,80,n,n,n,1,true)
- end
- end
- end
- function eventKeyboard(nick,klaw)
- if Ekw[nick][1].tr~="offline" then
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.tr~="offline" and stat.k1~="?" then
- for i=1,Ekw[nick][1].il do
- ui.addTextArea(Ekw[nick][i].x+(Ekw[nick][i].y-1)*20,"",gracz,110+30*((Ekw[nick][i].x-1)%20),80+30*((Ekw[nick][i].y-1)%10),20,20,Ekw[nick][i].k2,Ekw[nick][i].k2,1,true)
- end
- end
- end
- end
- elseif Ekw[nick][1].tr=="offline" then
- for id,stat in pairs(Ekw[nick]) do
- ui.addTextArea(stat.x+(stat.y-1)*20,"",nick,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k2,stat.k2,1,true)
- end
- end
- for i,k in pairs(Klaw) do
- if klaw==k[1] and Ekw[nick][i].y>1 then
- Ekw[nick][i].y=Ekw[nick][i].y-1
- elseif klaw==k[3] and Ekw[nick][i].x>1 then
- Ekw[nick][i].x=Ekw[nick][i].x-1
- elseif klaw==k[2] and Ekw[nick][i].y<10 then
- Ekw[nick][i].y=Ekw[nick][i].y+1
- elseif klaw==k[4] and Ekw[nick][i].x<20 then
- Ekw[nick][i].x=Ekw[nick][i].x+1
- end
- end
- if Ekw[nick][1].tr~="offline" then
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.tr~="offline" and stat.k1~="?" then
- for i=1,Ekw[nick][1].il do
- ui.addTextArea(Ekw[nick][i].x+(Ekw[nick][i].y-1)*20,"",gracz,110+30*((Ekw[nick][i].x-1)%20),80+30*((Ekw[nick][i].y-1)%10),20,20,Ekw[nick][i].k1,Ekw[nick][i].k1,1,true)
- end
- end
- end
- end
- for id,stat in pairs(Ekw[nick]) do
- if stat.tr~="offline" and stat.k1~="?" then
- if stat.tr=="online" then
- ui.addTextArea(stat.x+(stat.y-1)*20,"<V>Ty",nick,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- else
- ui.addTextArea(stat.x+(stat.y-1)*20,"<V>"..id,nick,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- end
- Pole[stat.x+(stat.y-1)*20]={nick,id}
- end
- end
- elseif Ekw[nick][1].tr=="offline" then
- for id,stat in pairs(Ekw[nick]) do
- ui.addTextArea(stat.x+(stat.y-1)*20,"",nick,110+30*((stat.x-1)%20),80+30*((stat.y-1)%10),20,20,stat.k1,stat.k1,1,true)
- Ekw[nick][1].Pole[stat.x+(stat.y-1)*20]=id
- end
- end
- end
- function eventLoop()
- if o==1 then
- if t<151 then
- t=t+1
- end
- ST="<p align='center'><B>"
- if t>16 and t<136 then
- Okno(3)
- elseif t==150 then
- TXT="<textformat tabstops='[120]'>"
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.tr~="offline" and stat.pkt>0 then
- if stat.tr=="online" then
- TXT=TXT.."<font color='#"..stat.k1:sub(3).."'>███ <V>"..gracz.."\t<N>- <J>"..stat.pkt.."\n<V>"
- else
- TXT=TXT.."<font color='#"..stat.k1:sub(3).."'>███ <V>"..gracz.." <T>"..id.."\t<N>- <J>"..stat.pkt.."\n<V>"
- end
- tfm.exec.setPlayerScore(gracz,stat.pkt,true)
- if A~=gracz then
- tfm.exec.setNameColor(gracz,0x777777)
- if stat.tr=="mixline" then
- tfm.exec.setNameColor(gracz,0xaaaa77)
- end
- end
- end
- end
- end
- Okno(5,TXT,"<B><R><a href='event:KON'>X</a>")
- elseif t==148 then
- for i=1,200 do
- if Pole[i]~="" then
- Ekw[Pole[i][1]][Pole[i][2]].pkt=Ekw[Pole[i][1]][Pole[i][2]].pkt+1
- end
- end
- Okno(4)
- elseif t==146 then
- Okno(2)
- elseif t==144 then
- for i=1,200 do
- Okno(9,i)
- end
- elseif t==142 then
- Okno(9,203)
- Okno(9,204)
- Okno(9,206)
- elseif t==140 then
- Okno(1,"888800","KONIEC")
- elseif t==136 then
- Okno(1,"cccc00","KONIEC")
- Okno(9,205)
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if stat.k1~="?" then
- for i=1,Ekw[gracz][1].il do
- for j=1,4 do
- tfm.exec.bindKeyboard(gracz,Klaw[i][j],true,false)
- end
- end
- end
- end
- end
- elseif t==8 then
- Okno(1,"cccc00",3)
- elseif t==9 then
- Okno(1,"888800",3)
- elseif t==10 then
- Okno(1,"cccc00",2)
- elseif t==11 then
- Okno(1,"888800",2)
- elseif t==12 then
- Okno(1,"cccc00",1)
- elseif t==13 then
- Okno(1,"888800",1)
- elseif t==14 then
- Okno(1,"cccc00","START")
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if id==1 and stat.k1~="?" then
- for i=1,Ekw[gracz][1].il do
- for j=1,4 do
- tfm.exec.bindKeyboard(gracz,Klaw[i][j],true)
- end
- end
- Pole[Ekw[gracz][1].x+(Ekw[gracz][1].y-1)*20]={gracz,id}
- end
- end
- end
- elseif t==16 then
- Okno(9,206)
- end
- end
- for nick in pairs(tfm.get.room.playerList) do
- Gr=Ekw[nick][1]
- if Gr.o==2 then
- if Gr.t<151 then
- Gr.t=Gr.t+1
- end
- ST="<p align='center'><B>"
- if Gr.t>16 and Gr.t<136 then
- ui.addTextArea(205,"",nick,45,34,720-6*(Gr.t-16),2,0xcc00,0xcc00,1,true)
- elseif Gr.t==150 then
- TXT="<textformat tabstops='[120]'>"
- for id,stat in pairs(Ekw[nick]) do
- if stat.pkt>0 then
- TXT=TXT.."<font color='#"..stat.k1:sub(3).."'>███ <V>"..nick.." <T>"..id.."\t<N>- <J>"..stat.pkt.."\n<V>"
- end
- end
- if A~=gracz then
- tfm.exec.setNameColor(nick,0x7777aa)
- end
- ui.addTextArea(1,TXT,nick,340,120,n,n,n,n,0,true)
- ui.addTextArea(2,"<B><R><a href='event:KON'>X</a>",nick,680,90,n,n,n,n,0,true)
- elseif Gr.t==148 then
- for i=1,200 do
- if Gr.Pole[i]~="" then
- Ekw[nick][Gr.Pole[i]].pkt=Ekw[nick][Gr.Pole[i]].pkt+1
- end
- end
- ui.addTextArea(204,ST.."<font size='20'>Wynik:",nick,120,90,570,n,n,n,0,true)
- elseif Gr.t==146 then
- ui.addTextArea(203,"",nick,120,90,570,270,0x1c3c41,0x1c3c41,1,true)
- elseif Gr.t==144 then
- for i=1,200 do
- ui.removeTextArea(i,nick)
- end
- elseif Gr.t==142 then
- ui.removeTextArea(203,nick)
- ui.removeTextArea(204,nick)
- ui.removeTextArea(206,nick)
- elseif Gr.t==140 then
- ui.addTextArea(206,ST.."<font size='60' color='#888800'>KONIEC",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==136 then
- ui.addTextArea(206,ST.."<font size='60' color='#cccc00'>KONIEC",nick,0,150,800,n,n,n,0,true)
- ui.removeTextArea(205,nick)
- for i=1,Gr.il do
- for j=1,4 do
- tfm.exec.bindKeyboard(nick,Klaw[i][j],true,false)
- end
- end
- elseif Gr.t==8 then
- ui.addTextArea(206,ST.."<font size='60' color='#cccc00'>3",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==9 then
- ui.addTextArea(206,ST.."<font size='60' color='#888800'>3",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==10 then
- ui.addTextArea(206,ST.."<font size='60' color='#cccc00'>2",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==11 then
- ui.addTextArea(206,ST.."<font size='60' color='#888800'>2",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==12 then
- ui.addTextArea(206,ST.."<font size='60' color='#cccc00'>1",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==13 then
- ui.addTextArea(206,ST.."<font size='60' color='#888800'>1",nick,0,150,800,n,n,n,0,true)
- elseif Gr.t==14 then
- ui.addTextArea(206,ST.."<font size='60' color='#cccc00'>START",nick,0,150,800,n,n,n,0,true)
- for id,stat in pairs(Ekw[nick]) do
- Gr.Pole[stat.x+(stat.y-1)*20]=id
- end
- for i=1,Gr.il do
- for j=1,4 do
- tfm.exec.bindKeyboard(nick,Klaw[i][j],true)
- end
- end
- elseif Gr.t==16 then
- ui.removeTextArea(206,nick)
- end
- end
- end
- end
- function Okno(a,b,c)
- for gracz in pairs(Ekw) do
- for id,stat in pairs(Ekw[gracz]) do
- if id==1 and stat.tr~="offline" and stat.k1~="?" then
- if a==3 then
- ui.addTextArea(205,"",gracz,45,34,720-6*(t-16),2,0xcc00,0xcc00,1,true)
- elseif a==1 then
- ui.addTextArea(206,ST.."<font size='60' color='#"..b.."'>"..c,gracz,0,150,800,n,n,n,0,true)
- elseif a==2 then
- ui.addTextArea(203,"",gracz,120,90,570,270,0x1c3c41,0x1c3c41,1,true)
- elseif a==4 then
- ui.addTextArea(204,ST.."<font size='20'>Wynik:",gracz,120,90,570,n,n,n,0,true)
- elseif a==5 then
- ui.addTextArea(1,b,gracz,340,120,n,n,n,n,0,true)
- ui.addTextArea(2,c,gracz,680,90,n,n,n,n,0,true)
- elseif a==9 then
- ui.removeTextArea(b,gracz)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement