Jump to content

[SA] How to see who is the last man standing in DM Map?


Ywa

Recommended Posts

  • 3 weeks later...

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

[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 by Guest
Link to comment

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

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
  • 2 weeks later...

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...