lil Toady Posted January 20, 2007 Share Posted January 20, 2007 i can write something that'd work for maps with respawn and without it, but i'm lazy atm maybe a bit later Link to comment
Keslertje2005 Posted January 20, 2007 Share Posted January 20, 2007 I really hope you'll do it some day Link to comment
BetaDevil Posted January 20, 2007 Share Posted January 20, 2007 i can write something that'd work for maps with respawn and without it, but i'm lazy atm maybe a bit later * is waiting for the day Link to comment
SanZoR.Sr Posted February 9, 2007 Share Posted February 9, 2007 i get this working =)))) Add them both, then this works 100% =)))) I tested 10 maps, and everytime someone gets one win more! Link to comment
Scooby Posted February 9, 2007 Share Posted February 9, 2007 u all seemed to miss out mta.part so it will never work fully with what ur trying. if some1 leaves the server half way thru ur DM then the counter will never reach 1 the only real way to check the winner is to check how many are stll alive on each death and on some1 leaving the server. a simple while loop counting the alive players on both will do the trick. my script has individual stats for both races and dm's and works fine for both. Link to comment
BetaDevil Posted February 9, 2007 Share Posted February 9, 2007 (edited) [syntax=mIRC]alias mta.end { if (%cplayers == 1) { var %a = 0 while (%a < $mta.server($1).cmax) { if (!$mta.dead($1,%a)) { mta.text $1 $mta.nick($1,%a) won! mta.freeze $1 %a !halt } !inc %a } } } on *:SIGNAL:mta.startrace: { set %cplayers $mta.server($1).players } on *:SIGNAL:mta.part: { if (!$mta.dead($1,$2)) set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.death: { set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.connect: { set %cplayers 0 }[/lua]Something like this? EDIT Added something ot the part signal Edited February 10, 2007 by Guest Link to comment
SanZoR.Sr Posted February 10, 2007 Share Posted February 10, 2007 Ehrm, it seems this one doesnt add one more win in wins list... I think this one works fine, but u must add this text somewhere: !writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1) Link to comment
SanZoR.Sr Posted February 10, 2007 Share Posted February 10, 2007 alias mta.end { if (%cplayers == 1) { var %a = 0 while (%a < $mta.server($1).cmax) { if (!$mta.dead($1,%a)) { mta.text $1 $mta.nick($1,%a) is winner! mta.freeze $1 %a !writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1) !halt } !inc %a } } } on *:SIGNAL:mta.startrace: { set %cplayers $mta.server($1).players } on *:SIGNAL:mta.part: { if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.death: { set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.connect: { set %cplayers 0 } I tested it. Link to comment
BetaDevil Posted February 10, 2007 Share Posted February 10, 2007 lol, I typed it wrong (again, I hate it ) in mta.part signal.[syntax=mIRC]on *:SIGNAL:mta.part: { if (!$mta.dead($1,$2)) set %cplayers $calc(%cplayers - 1) mta.end $1 $2 }[/lua] Link to comment
SanZoR.Sr Posted February 10, 2007 Share Posted February 10, 2007 Well, i fix there some stuff, and get it working, and it gives 1 more wins when u win DD (DM) Map. Have fun =) Works 80% =PPP alias mta.end { if (%cplayers == 1) { var %a = 0 while (%a < $mta.server($1).cmax) { if (!$mta.dead($1,%a)) { mta.text $1 $mta.nick($1,%a) is winner! mta.freeze $1 %a !writeini -n " $+ $scriptdir $+ stats.ini" WINS $mta.nick($1,%a) $gus.add($gus.wins($1,%a),1) !halt } !inc %a } } } on *:SIGNAL:mta.startrace: { set %cplayers $mta.server($1).players } on *:SIGNAL:mta.part: { if (!$mta.dead($1,$2) set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.death: { set %cplayers $calc(%cplayers - 1) mta.end $1 $2 } on *:SIGNAL:mta.connect: { set %cplayers 0 } Link to comment
KWKSND Posted February 20, 2007 Share Posted February 20, 2007 for wave style dd maps a way to award the winner is to keep track of how long each player has been in the map for and total deaths each at the time out total up deaths and times and award the player who's deaths per minute or second ratio was lowest that way it eliminates the chances of anyone who joined before round end from screwing it up map end counts as a death so that would make a person who just joined have a high death per min as opposed to a player who was there for a while and never died the chances of ties are there if every one starts at map start and a few dies the same amount of times the ratios would be the same so we might have to have some tie breaking factor added in i need to learn this scripting cause this has been buggin me lol some one please combine this idea with the above mentioned single spawn method i'd be so happy lol Link to comment
Scooby Posted February 20, 2007 Share Posted February 20, 2007 Sounds a lot of work, just to have wave style dm maps, its almost the same as a dm map with respawns, what ur asking would work for both i think. but i think it would be better to stick with no respawns on dm maps personally. i know u get constant play for all players, but being the last man standing is always nice. If u do decide u wanna go ahead, ul have to post what u have so far, what script u run etc. EDIT: just read ur pm and replied to it in the PRS section. Link to comment
Recommended Posts