Jump to content

lil Toady

Retired Staff
  • Posts

    2,318
  • Joined

  • Last visited

Posts posted by lil Toady

  1. since we can't trace people using dnsstuff (/slap Tommis) we had no new trace scripts..

    Well, here's one new i wrote today ;)

    EDIT: The script now works both with SA and 0.5

    on *:SIGNAL:mta.command:{
     var %a = $iif($4,$iif($mta.getid($1,$4),$v1,-1),$2)
     if ($3 == !trace) {
       if (%a == -1) mta.msg $1 $2 Error - Absent ID
       else my.trace $1 %a
     }
    }
    alias my.trace {
     set %my.trace $1 $2
     if (!$sock(my.trace $+ $mta.ip($1,$2))) sockopen my.trace $+ $mta.ip($1,$2) www.completewhois.com 80
    }
    on *:SOCKOPEN:my.trace*:{
     tokenize 32 %my.trace
     if ($sockerr > 0) {
       sockclose $sockname
       mta.say $1 Trace: An error has occured. (socket error)
     }
     else {
       sockwrite -n $sockname GET /cgi2/rbl_lookup.cgi?query= $+ $mta.ip($1,$2) $+ &display=whois HTTP/1.1
       sockwrite -n $sockname User-Agent: MSIE 6.0
       sockwrite -n $sockname Host: www.completewhois.com
       sockwrite $sockname $crlf 
     }
    }
    on *:SOCKCLOSE:my.trace*:{
     unset %my.trace
    }
    on *:SOCKREAD:my.trace*:{
     var %t
     sockread %t
     if (country-rirdata isin %t) {
       tokenize 32 %my.trace
       if ($right($gettok($dialog(mta).title,6,32),-1) < 4) mta.say $1 $+($mta.name($1,$2),$chr(40),$mta.ip($1,$2),$chr(41)) - Location: $gettok(%t,2-,58)
       else mta.text $1 $+($mta.nick($1,$2),$chr(40),$mta.ip($1,$2),$chr(41)) - Location: $gettok(%t,2-,58)
       sockclose $sockname
     }
    }

    have fun

  2. on *:SIGNAL:mta.command:{
     var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$mta.getnick($1,$4)),$2)
     if ($3 == !addban) {
       if ($readini($mta.dir $+ admin.ini,admin,$mta.nick($1,$2)) >=  {
         if (%a == -1) mta.msg $1 $2 Error - Absent ID
         elseif (%a == $2) mta.msg $1 $2 Error - Can't ban yourself
         elseif (($4) && (*.*.*.* iswm $4)) {
           var %b = 1
           while (%b <=  {
             if ($exists($mta.dir $+ %b.ini)) mta.addban %b $mta.ip($1,%a)
             !inc %b
           }
           mta.text $1 The nick $mta.nick($1,%a) is banned! Reason: $5-
         }
       }
       else mta.pm $1 $2 You need be admin level 8 or more for use this command!
     }
    }

  3. on *:SIGNAL:mta.command:{
    var %a = $iif($4,$iif($mta.nick($1,$4) != $null,$4,$gus.getid($1,$4)),$2)
     if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
       if (%a == -1) mta.pm $1 $2 Error - Absent ID
       else gus.giveawarning $1 %a $right($3,-1)
     }
    }
    alias gus.giveawarning {
     !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
     if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
       mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
       mta.kick $1 $2
       !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
     }
     else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
    }

  4. got a bit of a problem is this right???
    on *:SIGNAL:mta.command: {
     if ($3 == !gender) { 
       if ($5) mta.msg $1 $2 Error - Please enter a Gender i.e M/F.
       elseif $5 == F mta.msg $1 $2 you are a female say !race to choose your race
       elseif $5 == M mta.msg $1 $2 you are a male say !race to choose your race
     }
    }

    on *:SIGNAL:mta.command: {
     if ($3 == !gender) { 
       if (!$4) mta.msg $1 $2 Error - Please enter a Gender i.e M/F.
       elseif ($4 == F) mta.msg $1 $2 you are a female say !race to choose your race
       elseif ($4 == M) mta.msg $1 $2 you are a male say !race to choose your race
     }
    }

  5. on *:SIGNAL:mta.join: {
     mta.nickcheck $1 $2
    }
    on *:SIGNAL:mta.nick: {
     mta.nickcheck $1 $2
    }
    alias mta.nickcheck {
     var %a = dick lol f*cker
     if ($findtok(%a,$mta.nick($1,$2),1,32)) {
       mta.text $1 $+(',$mta.nick($1,$2),') - forbidden nick
       mta.kick $1 $2
     }
    }

    see the 'var %a' line? you can add as much forbidden nicks as you want there, separate by space

  6. if you want to keep those /'s i'd advise you to use $chr(47) which afaik is the code for the '/' char. :P

    dont you read what i write? w/e mirc will change the $chr(47) to '/' when it sends text, but when mta client see's a / sign in front of text it thinks that it's a function and does not print it.

    You Just need to cut off all those / in front of text, you can leave it in the end tho

  7. .........

    of course it doesn't work, coz of those damn // :? mta thinks its a command like /slap or /msg etc. Just get rid of them

    and i suggest u changing

    if ($mta.area($1,$2) == Sunshine-Autos Viceport Vice-City-Mainland) {

    to

    if (Sunshine-Autos isin $mta.area($1,$2)) {

  8. here, works with gus (or without it, just add a var %a that finds a player id), commands:

    !afk - warnings for being away from kb

    !bl - bad language

    !camp - camping

    all the warnings are saved in diff places :P

    on *:SIGNAL:mta.command:{
     if ($3 == !afk) || ($3 == !camp) || ($3 == !bl) {
       if ($gus.level($1,$2) >= 5) {
         if (%a == -1) mta.pm $1 $2 Error - Absent ID
         else gus.giveawarning $1 %a $right($3,-1)
       }
     }
    }
    alias gus.giveawarning {
     !writeini -n " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2) $calc($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))+1)
     if ($readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2)) >= 2) {
       mta.text $1 $mta.nick($1,$2) has reached the warnings limit and will be kicked!
       mta.kick $1 $2
       !remini " $+ $scriptdir $+ warnings.ini" $3 $mta.nick($1,$2)
     }
     else mta.text $1 $mta.nick($1,$2) has got a warning for $iif($3 == afk,being away from keyboard,$iif($3 == camp,camping,bad language)) $+! $calc(2-$readini($scriptdir $+ warnings.ini,$3,$mta.nick($1,$2))) more warnings and he will be kicked.
    }

    you can add as much commands as you want there under mta.command signal :P

    P.S: haven't tested it, i don't have a mta:sa server to test scripts on

  9. if ($findtok(oops1,$3-,32)) mta.kick $1 $2

    if ($findtok($3-,oops1,32)) mta.kick $1 $2

    your one was checking only if i said 1 word oops1, if i said 'blasgfassf asf oops1' it wouldn't work :P i fixed tho

  10. Why doesn't work?

    elseif ($3 == !repair_1) {

    $mta.health($1,$2).vehicle added

    }

    elseif ($3 == !repair_2) {

    $mta.health($1,$2).vehicle 100

    }

    elseif ($3 == !repair_3) {

    $mta.health($1,$2).vehicle added 100

    }

    elseif ($3 == !repair_4) {

    $mta.health($1,$2).vehicle added 1

    }

    elseif ($3 == !repair_5) {

    $mta.text $1 Javitas $mta.nick($1, $2)

    $mta.health(100,$2)

    }

    hmm stuff with $ infront are supposed to return a value, you can't change the vehicle/player health with any of the mtama commands, you can only get them.

  11. or

    on *:SIGNAL:mta.text: {
     if ($findtok(david,$3-,32)) mta.text $1 David is nice!
    }

    your one will work even if i say 'saahfdhDavidfsddg', mine will work only if it sees the actual word 'david' ;)

×
×
  • Create New...