Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

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

Link to comment
  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

if ($readini(shitlist.ini,clanban,clan) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 }

This is work with one clan. I ban more clans and he don't rember the old clan. Can somone fix this, or telll my what the error is ?

(Sorry for my bad english)

Link to comment

on *:SIGNAL:mta.join: {
if ($readini(shitlist.ini,clanban,clan) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan1) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan2) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan3) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan4) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
if ($readini(shitlist.ini,clanban,clan5) isin $mta.name($1,$2)) {
   mta.say $1 Your clan is clanbanned here.
   mta.ban $1 $2
 } 
}

:o It's a great script :o

Link to comment

Well if u really wanna do it like that at least be smart about it :P

on *:SIGNAL:mta.join: {
 var %a = 1
 while %a <= $ini(shitlist.ini,clanban,0) {
   if $readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2
   }
   !inc %a
 }
}

Link to comment
Well if u really wanna do it like that at least be smart about it :P

on *:SIGNAL:mta.join: {
 var %a = 1
 while %a <= $ini(shitlist.ini,clanban,0) {
   if $readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2
   }
   !inc %a
 }
}

mIRC Says this: * /if: insufficient parameters (line 845, script2.mrc)

Link to comment

on *:SIGNAL:mta.join: { 
 var %a = 1 
 while %a <= $ini(shitlist.ini,clanban,0) { 
   if ($readini(shitlist.ini,clanban,$ini(shitlist.ini,clanban,%a)) isin $mta.name($1,$2)) { 
     mta.say $1 Your clan is clanbanned here. 
     mta.ban $1 $2 
   } 
   !inc %a 
 } 
}

Bracket mismatch, tut tut Oli

Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...