alias db {
if ($2 == on) {
if ($mta.admin+($1)) {
mta.say $1 Dystruction derby activated!
mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
%derby = 1
!unset % [ $+ [ $1 ] ]
!.timerdb 1 60 db $1 start
}
else mta.say $1 No admin+ connection!
}
elseif ($2 == off) {
if (%derby) {
mta.say $1 Dystruction derby deactivated!
%derby = 0
!.timerdb off
!.timerdb2 off
}
}
elseif ($2 == start) {
if ($numtok(% [ $+ [ $1 ] ],32) < 3) {
mta.say $1 Not enough players to start: restart.
mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
!unset % [ $+ [ $1 ] ]
!.timerdb 1 60 db $1 start
}
else {
mta.say $1 Time up!
mta.say $1 The Round begins! (5 mins)
!.timerdb2 1 300 db $1 stop
}
}
elseif ($2 == stop) {
var %a = $numtok(% [ $+ [ $1 ] ],32),%b,%c,%d,%e
while %a > 0 {
%e = $gettok(% [ $+ [ $1 ] ],%a,32)
if ($mta.health($1,%e) > $mta.health($1,%b)) {
if ($mta.health($1,%e) > $mta.health($1,%c)) {
if ($mta.health($1,%e) > $mta.health($1,%d)) {
%b = %c
%c = %d
%d = %e
}
%b = %c
%c = %e
}
%c = %e
}
!dec %a
}
mta.say $1 Time over!
mta.say $1 1st: $mta.name($1,%d) ( $+ $mta.health($1,%d) $+ $chr(37) $+ ) 2st: $mta.name($1,%c) ( $+ $mta.health($1,%c) $+ $chr(37) $+ ) 3rd: $mta.name($1,%b) ( $+ $mta.health($1,%b) $+ $chr(37) $+ )
mta.say $1 Get a good car and type '!join' to be in the list! (60 secs remaining)
set % [ $+ [ $1 ] ]
!.timerdb 1 60 db $1 start
}
}
just replace the alias db in the script with the one above and it should work.
- XcR