HouseMD Posted December 26, 2007 Share Posted December 26, 2007 alias cplayers !return $numtok($readini(Alive.ini,alive,ids),32) alias players.server !return $did(mta,$1 $+ 02).lines alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } alias mta.end { if ($cplayers($1) == 1) && (players.server($1) >= 1) && (%mta.endwinner == $null) { var %a = $readini(Alive.ini,alive,ids) mta.text $1 $mta.nick($1,%a) is winner! !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) set %mta.endwinner 1 !halt } } on *:SIGNAL:mta.startrace: { var %a = 0,%b = ffs unset %mta.endwinner !remini -n Alive.ini Alive IDs while (%a <= $mta.server($1).cmax) { if ($mta.nick($1,%a) != $null) { if (%b == ffs) %b = %a else %b = %b %a } !inc %a } !writeini alive.ini alive ids %b } on *:SIGNAL:mta.part: { var %b = $readini(Alive.ini,alive,ids) if ($findtok(%b,$2,1,32) != $null) { !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } } on *:SIGNAL:mta.death: { var %b = $readini(Alive.ini,alive,ids) !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } This DM script hasn't failed yet and is faster than ever Link to comment
SanZoR Posted December 26, 2007 Share Posted December 26, 2007 Yeah, it is It will be in next release of GUSMS too. Link to comment
Ford Posted December 27, 2007 Share Posted December 27, 2007 Hi, first - nice script, but it;s missing few options like !alive !dead etc. And most important it doesn't care if it's dd or race map. So, here's the thing i've made an upgrade that makes it possible to mark which maps are dd and which are race but as always there is a problem, now it doesn't says who won the map... Well i'm out of options and i have to ask you for help alias cplayers !return $numtok($readini(Alive.ini,alive,ids),32) alias players.server !return $did(mta,$1 $+ 02).lines alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } alias mta.end { [b]if ($readini($scriptdir $+ ddraces.ini,MAP,$replace($mta.race($1),$chr(32),-)) == DD {[/b] if ($cplayers($1) == 1) && (players.server($1) >= 1) && (%mta.endwinner == $null) { var %a = $readini(Alive.ini,alive,ids) mta.text $1 $mta.nick($1,%a) is winner! !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) set %mta.endwinner 1 !halt } } } [b] on *:SIGNAL:mta.command: { if ($3 == !setmodedd) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) DD mta.text $1 Map $mta.race($1) set as dd } elseif ($3 == !setmoderace) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) RACE mta.text $1 Map $mta.race($1) set as race } } [/b] on *:SIGNAL:mta.startrace: { var %a = 0,%b = ffs unset %mta.endwinner !remini -n Alive.ini Alive IDs while (%a <= $mta.server($1).cmax) { if ($mta.nick($1,%a) != $null) { if (%b == ffs) %b = %a else %b = %b %a } !inc %a } !writeini alive.ini alive ids %b } on *:SIGNAL:mta.part: { var %b = $readini(Alive.ini,alive,ids) if ($findtok(%b,$2,1,32) != $null) { !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } } on *:SIGNAL:mta.death: { var %b = $readini(Alive.ini,alive,ids) !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } Well script isn't too big then you can see what i've changed... Any help ? THX Link to comment
HouseMD Posted December 28, 2007 Author Share Posted December 28, 2007 Hi, first - nice script, but it;s missing few options like !alive !dead etc. And most important it doesn't care if it's dd or race map.So, here's the thing i've made an upgrade that makes it possible to mark which maps are dd and which are race but as always there is a problem, now it doesn't says who won the map... Well i'm out of options and i have to ask you for help alias cplayers !return $numtok($readini(Alive.ini,alive,ids),32) alias players.server !return $did(mta,$1 $+ 02).lines alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } alias mta.end { [b]if ($readini($scriptdir $+ ddraces.ini,MAP,$replace($mta.race($1),$chr(32),-)) == DD {[/b] if ($cplayers($1) == 1) && (players.server($1) >= 1) && (%mta.endwinner == $null) { var %a = $readini(Alive.ini,alive,ids) mta.text $1 $mta.nick($1,%a) is winner! !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) set %mta.endwinner 1 !halt } } } [b] on *:SIGNAL:mta.command: { if ($3 == !setmodedd) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) DD mta.text $1 Map $mta.race($1) set as dd } elseif ($3 == !setmoderace) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) RACE mta.text $1 Map $mta.race($1) set as race } } [/b] on *:SIGNAL:mta.startrace: { var %a = 0,%b = ffs unset %mta.endwinner !remini -n Alive.ini Alive IDs while (%a <= $mta.server($1).cmax) { if ($mta.nick($1,%a) != $null) { if (%b == ffs) %b = %a else %b = %b %a } !inc %a } !writeini alive.ini alive ids %b } on *:SIGNAL:mta.part: { var %b = $readini(Alive.ini,alive,ids) if ($findtok(%b,$2,1,32) != $null) { !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } } on *:SIGNAL:mta.death: { var %b = $readini(Alive.ini,alive,ids) !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } Well script isn't too big then you can see what i've changed... Any help ? THX Change the "if ($readini($scriptdir $+ ddraces.ini,MAP,$replace($mta.race($1),$chr(32),-)) == DD" to "if ($readini($scriptdir $+ ddraces.ini,MAP,$replace($mta.race($1),$chr(32),-)) == DD)" Link to comment
SanZoR Posted December 29, 2007 Share Posted December 29, 2007 alias cplayers !return $numtok($readini(Alive.ini,alive,ids),32) alias players.server !return $did(mta,$1 $+ 02).lines alias gus.getid { var %a = 0 while (%a <= $mta.server($1).cmax) { if ($+(*,$2,*) iswm $mta.nick($1,%a)) !return %a !inc %a } !return -1 } alias mta.end { if ($cplayers($1) == 1) && (players.server($1) >= 1) && (%mta.endwinner == $null) { var %a = $readini(Alive.ini,alive,ids) mta.text $1 $mta.nick($1,%a) is winner! !writeini -n stats.ini WINS $mta.nick($1,%a) $calc($readini(stats.ini,WINS,$mta.nick($1,%a)) + 1) set %mta.endwinner 1 !halt } } on *:SIGNAL:mta.startrace: { var %a = 0,%b = ffs unset %mta.endwinner !remini -n Alive.ini Alive IDs while (%a <= $mta.server($1).cmax) { if ($mta.nick($1,%a) != $null) { if (%b == ffs) %b = %a else %b = %b %a } !inc %a } !writeini alive.ini alive ids %b } on *:SIGNAL:mta.part: { var %b = $readini(Alive.ini,alive,ids) if ($findtok(%b,$2,1,32) != $null) { !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } } on *:SIGNAL:mta.death: { var %b = $readini(Alive.ini,alive,ids) !writeini -n alive.ini alive ids $deltok(%b,$findtok(%b,$2,1,32),32) mta.end $1 } on *:SIGNAL:mta.respawn: { set %mta.endwinner 1 } Nah, this is better Link to comment
Ford Posted December 29, 2007 Share Posted December 29, 2007 Damn, always so simple solutions... Thanks. Link to comment
Ford Posted December 30, 2007 Share Posted December 30, 2007 Well I can't edit my previous post so.. Here the script i've made.. in fact i've found a script on forum and remade it a bit. So it's (if map is marked as dd) adding a dd wins to file, and it's displayed in !stats, script works with gus. Standalone file: alias gus.level !return $iif($readini($scriptdir $+ admin.ini,ADMIN,$mta.nick($1,$2)),$readini($scriptdir $+ admin.ini,ADMIN,$mta.nick($1,$2)),0) alias mta.end { if ($readini($scriptdir $+ ddraces.ini,MAP,$replace($mta.race($1),$chr(32),-)) == DD) { 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 !writeini -n " $+ $scriptdir $+ stats.ini" DDWINS $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 } on *:SIGNAL:mta.command: { if ($3 == !setmodedd) { if ($gus.level($1,$2) >= 7) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) DD mta.text $1 Map $mta.race($1) marked as DD } else mta.pm $1 $2 You need 7 lvl. } elseif ($3 == !setmoderace) { if ($gus.level($1,$2) >= 7) { !writeini -n " $+ $scriptdir $+ ddraces.ini" MAP $replace($mta.race($1),$chr(32),-) RACE mta.text $1 Map $mta.race($1) marked as Race } else mta.pm $1 $2 You need 7 lvl. } } To add in mtagus.mrc file alias gus.ddwins !return $iif($readini($scriptdir $+ stats.ini,DDWINS,$mta.nick($1,$2)),$readini($scriptdir $+ stats.ini,DDWINS,$mta.nick($1,$2)),0) Now: Find: elseif (!stat* iswm $3) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's Stats - Level: $gus.level($1,%a) - Deaths: $gus.deaths($1,%a) - Visits: $gus.visits($1,%a) - Wins: $gus.wins($1,%a) - Spawns: $gus.spawns($1,%a) - Races: $gus.races($1,%a) } Change to: elseif (!stat* iswm $3) { if (%a == -1) mta.pm $1 $2 Error - Absent ID else mta.text $1 $mta.nick($1,%a) $+ 's Stats - Level: $gus.level($1,%a) - Deaths: $gus.deaths($1,%a) - Visits: $gus.visits($1,%a) - Wins: $gus.wins($1,%a) - Spawns: $gus.spawns($1,%a) - Races: $gus.races($1,%a) - DD wins $gus.ddwins($1,%a) } !setmodedd - mark map as dd (7 lvl needed) !setmoderace - mark map as race (7 lvl needed) Enjoy Link to comment
CriticalXED Posted January 3, 2008 Share Posted January 3, 2008 Yeah, it is It will be in next release of GUSMS too. Yep, i think the same, edit of HouseMD-s DM script. Link to comment
Guest Posted February 11, 2008 Share Posted February 11, 2008 how do i instal this can anyone help plzz Link to comment
Recommended Posts