![]() | ![]()
Date d'inscription : 17/09/2010 Communauté : ![]() Messages : 8 Prestige : 0 Niveau : 1 ![]() Genre : ![]() Date de naissance : 23/09/1998 |
= bindKeyboard(p,17,true) or bindKeyboard(p,17,false) or w
or 0; = t and p or nil, t and w +1 or w ; end)
end
eventNewGame= function()
g, tb, cn, tM= false, removeTextArea(1) or {}, setGameTime(180) or false, setMapName(char(35,100,111,100,103,101)) or 0;
end
eventKeyboard= function(p,id,dw)
({t= function() addTextArea(2, eventRanking(), p, 50, 70) end; f= function() removeTextArea(2,p) end})[tostring(dw):sub(0,1)]()
end
eventRanking= function()
local l, txt, r= {}, '<n>%02d. <v>%s<n><j>%s', '<font face="Lucida Console"><r>##. Player Victories\n';
a= foreach(tfm.get.room.playerList, function(i,v) l[#l +1]= {s=w, n=i}; end) or sort(l, function(a,b) return a.s > b.s; end);
return foreach(l, function(i,v) r= i < 11 and r..'\n'..txt:format(i, v.n..(' '):rep(14 -#v.n), v.s) or r; end) or r;
end
eventPlayerDied= function(p)
v= 0; foreach(tfm.get.room.playerList, function(i,p) v= p.isDead == false and v +1 or v; end)
v= v == 1 and eventMessage(v) or v == 0 and eventLoop(0,0);
end
eventLoop= function(a,b)
tM= not tM and 1/2 or tM +1/2;
tM= tM == 175 and eventMessage(tM) or (tM == 180 or b <= 0) and newGame(mapa) or tM;
cn= tM == 5 and true or cn and addShamanObject(17, 801, random(100,375), random(-135,-30)) or cn;
end
eventWinners= function()
str, cn, g= setGameTime(4) or '<j><p align="center"><font face="Lucida Console" size="20">%s: <v>%s', false, true;
foreach(tfm.get.room.playerList, function(p,c) t= not c.isDead; tb[#tb +1], w
return str:format(char(86,105,99,116,111,114)..(#tb > 1 and char(101,115) or ''), concat(tb, '<j>, <v>')..'<j>!');
end
main= eventLoop(0,0) or foreach(tfm.get.room.playerList, eventNewPlayer);