Jump to content

lil Toady

Retired Staff
  • Posts

    2,318
  • Joined

  • Last visited

Posts posted by lil Toady

  1. Public beta

    We will, as usual, be holding a public beta once we (think we) have fixed everything. Again, we cannot say when this will be, but it will likely happen during a weekend or holiday and be announced a few days before starting. It will be organised via IRC, so it may be a good idea to drop by and get yourself acquainted with it.

    umm wait...so the beta wont be on this site...rather on IRC? i dont use IRC...so am i not going to be in the beta? bs!

    Umm.. that is not mta's news post.

  2. oh damn.. If you can not script don't try to do stuff like that. I believe you don't understand anything in the script, you just changed the url.

    Well it is not gonna work with DNS Stuff anyway. mIRC trace scripts are banned there. (will i have some ideas how to get over the ban but it'd be mean to post that)

    Why dont the default host i put there? It takes just a little bandwidth either. Umm, it was the first suitable host i found but if you have anything better post.

  3. on *:SIGNAL:mta.spawn:{ 
     if ($mta.level($1,$2) < 1) {
       while ($mta.health($1,$2) > 0) {
         mta.slap $1 $2
       }
     }
    }
    

    hah, that's a script from hell scoob :P if he just pauses when spawning say bye to your server

  4. .timer 5 0 mta.slap $1 $2

    that won't work sometimes coz of packet loss scoob ;) I'd suggest to check his hp after he got slapped and slap again if he wasn't dead

  5. i've made an 1337 function for stuff like that, mta.longsay :) it will protect you from broken messages in mta

    on *:SIGNAL:mta.command:{
     if ($3 == !food) showfood $1-
    }
    alias showfood {
     var %a = 0,%b,%c
     if (!$ini(rpg.ini,$mta.name($1,$2),1)) mta.say $1 $mta.name($1,$2) has no food.
     else {
       while (%a <= $ini(rpg.ini,$mta.name($1,$2),0)) {
         %b = $ini(rpg.ini,$mta.name($1,$2),%a)
         if ($readini(rpg.ini,$mta.name($1,$2),%b) > 0) {
           if ($readini(things.ini,food,%b) == 1) {
             %c = $iif(%c,%c $+ $chr(44),$+(%b,$chr(40),$readini(rpg.ini,$mta.name($1,$2),%b),$chr(41)),$+(%b,$chr(40),$readini(rpg.ini,$mta.name($1,$2),%b),$chr(41)))
           }
         }
         !inc %a
       }
       mta.longsay $1 $mta.name($1,$2) $+ 's food: $iif(%c,$v1,None)
     }
    } 
    alias mta.longsay {
     var %a = 1,%b
     while (%a <= $numtok($3-,32)) {
       if ($calc($len(%b) + $len($gettok($3-,%a,32))) <= 115) %b = $iif(%b,%b $gettok($3-,%a,32),$gettok($3-,%a,32))
       else {
         mta.say $1 %b
         %b = $null
       }
       !inc %a
     }
     mta.say $1 %b
    }

  6. well ok scoob, if you want it to be perfect, here you go ;)

    on *:SIGNAL:mta.command:{
     var %a = $iif($iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2),$v1,-1)
     if ($3 == !votekick) {
       if (%vote.nick. [ $+ [ $1 ] ] != $null) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
       elseif ($mta.server($1).players < 3) mta.pm $1 $2 Error - There should be at least 3 players in the server to start a votekick.
       elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name
       elseif (%a == $2) mta.pm $1 $2 Error - Can't votekick yourself
       else {
         set %vote.nick. [ $+ [ $1 ] ] %a
         unset %vote.voters. [ $+ [ $1 ] ]
         mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) should be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed] [1 minute]
         .timervote [ $+ [ $1 ] ] 1 60 mta.cancel.votekick $1
       }
     }
     elseif ($3 == !vote) {
       if ((%vote.nick. [ $+ [ $1 ] ] == $null) || (%vote.nick. [ $+ [ $1 ] ] !isnum)) mta.pm $1 $2 No votekick is currently running.
       elseif ($findtok(%vote.voters. [ $+ [ $1 ] ],$2,1,32)) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted.
       else {
         set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2
         if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) {
           mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) Vote limit reached, $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) is out!
           mta.kick $1 %vote.nick. [ $+ [ $1 ] ]
           unset %vote.nick. [ $+ [ $1 ] ]
           unset %vote.voters. [ $+ [ $1 ] ]
           .timervote [ $+ [ $1 ] ] off
         }
         else mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) [ $+ $calc($round($calc($mta.server($1).players / 2),0) - $numtok(%vote.voters. [ $+ [ $1 ] ],32)) more votes needed] [ $+ $timer(vote [ $+ [ $1 ] ]).secs seconds left]
       }
     }
    }
    on *:SIGNAL:mta.part:{
     if ($2 = %vote.nick. [ $+ [ $1 ] ]) mta.cancel.votekick $1
    }
    alias mta.cancel.votekick {
     mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
     unset %vote.nick. [ $+ [ $1 ] ]
     unset %vote.voters. [ $+ [ $1 ] ]
    }

  7. GRR

    on *:SIGNAL:mta.command:{
     var %a = $iif($iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2),$v1,-1)
     if ($3 == !votekick) {
       if (%vote.nick. [ $+ [ $1 ] ] != $null) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
       elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name
       elseif (%a == $2) mta.pm $1 $2 Error - Can't votekick yourself
       else {
         set %vote.nick. [ $+ [ $1 ] ] %a
         unset %vote.voters. [ $+ [ $1 ] ]
         mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec]
         .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1
       }
     }
     elseif ($3 == !vote) {
       if ((%vote.nick. [ $+ [ $1 ] ] == $null) || (%vote.nick. [ $+ [ $1 ] ] !isnum)) mta.pm $1 $2 No votekick is currently running.
       elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted.
       else {
         set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2
         mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
         if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) {
           mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out!
           mta.kick $1 %vote.nick. [ $+ [ $1 ] ]
           unset %vote.nick. [ $+ [ $1 ] ]
           unset %vote.voters. [ $+ [ $1 ] ]
           .timervote [ $+ [ $1 ] ] off
         }
       }
     }
    }
    alias mta.vote {
     mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
     unset %vote.nick. [ $+ [ $1 ] ]
     unset %vote.voters. [ $+ [ $1 ] ]
    }

  8. Well, im not scripting much for SA, only to help ppl on this forum with scripting. :roll: It differs a bit from 0.5. But i still blame Aeron for all my mistakes

    on *:SIGNAL:mta.command:{
     var %a = $iif($iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2),$v1,-1)
     if ($3 == !votekick) {
       if (%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
       elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name
       elseif (%a == $2) mta.pm $1 $2 Error - Can't votekick yourself
       else {
         set %vote.nick. [ $+ [ $1 ] ] %a
         unset %vote.voters. [ $+ [ $1 ] ]
         mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec]
         .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1
       }
     }
     elseif ($3 == !vote) {
       if ((%vote.nick. [ $+ [ $1 ] ] != $null) || (%vote.nick. [ $+ [ $1 ] ] !isnum)) mta.pm $1 $2 No votekick is currently running.
       elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted.
       else {
         set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2
         mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
         if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) {
           mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out!
           mta.kick $1 %vote.nick. [ $+ [ $1 ] ]
           unset %vote.nick. [ $+ [ $1 ] ]
           unset %vote.voters. [ $+ [ $1 ] ]
           .timervote [ $+ [ $1 ] ] off
         }
       }
     }
    }

  9. on *:SIGNAL:mta.command:{
     var %a = $iif($4,$iif($mta.nick($1,$4),$4,$mta.getid($1,$4)),$2)
     if ($3 == !votekick) {
       if (%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
       elseif (%a == -1) mta.pm $1 $2 Error - Absent ID/Name
       else {
         set %vote.nick. [ $+ [ $1 ] ] %a
         unset %vote.voters. [ $+ [ $1 ] ]
         mta.text $1 Votekick "!vote" if u want that $mta.nick($1,%a) shall be kicked. [ $round($calc($mta.server($1).players / 2),0) votes needed][30 sec]
         .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1
       }
     }
     elseif ($3 == !vote) {
       if (!%vote.nick. [ $+ [ $1 ] ]) mta.pm $1 $2 No votekick is currently running.
       elseif ($2 isin %vote.voters. [ $+ [ $1 ] ]) mta.pm $1 $2 $mta.nick($1,$2) $+ , You have already voted.
       else {
         set %vote.voters. [ $+ [ $1 ] ] %vote.voters. [ $+ [ $1 ] ] $2
         mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
         if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $round($calc($mta.server($1).players / 2),0)) {
           mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes, you're out!
           mta.kick $1 %vote.nick. [ $+ [ $1 ] ]
           unset %vote.nick. [ $+ [ $1 ] ]
           unset %vote.voters. [ $+ [ $1 ] ]
           .timervote [ $+ [ $1 ] ] off
         }
       }
     }
    }
    alias mta.vote {
     mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
     unset %vote.nick. [ $+ [ $1 ] ]
     unset %vote.voters. [ $+ [ $1 ] ]
    }

  10. eheh that code must be really old

    on *:SIGNAL:mta.command:{
     if ($3 == !votekick) {
       if (%vote.nick. [ $+ [ $1 ] ] == $null) {
         if ($ini($mta.dir $+ $1.ini,ID $+ $4)) {
           set %vote.nick. [ $+ [ $1 ] ] $4
           set %vote.voters. [ $+ [ $1 ] ] $null
           mta.text $1 Votekick "!vote" if u want that $mta.nick($1,$4) shall be kicked. [ $calc($left($did(mta,$1 $+ 21),2) / 2) votes needed][30 sec]
           .timervote [ $+ [ $1 ] ] 1 30 mta.vote $1
         }
         else mta.text $1 Give up an existing ID-number: "!votekick <#ID">
       }
       else mta.text $1 Another votekick is running: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
     }
     elseif (($3 == !vote) && (%vote.nick. [ $+ [ $1 ] ] != $null)) {
       if ($2 !isin %vote.voters. [ $+ [ $1 ] ]) {
         %vote.voters. [ $+ [ $1 ] ] = %vote.voters. [ $+ [ $1 ] ] $2
         mta.text $1 $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes for $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
         if ($numtok(%vote.voters. [ $+ [ $1 ] ],32) >= $calc($left($did(mta,$1 $+ 21),2) / 2)) {
           mta.text $1 $mta.nick($1,%vote.nick. [ $+ [ $1 ] ]) $numtok(%vote.voters. [ $+ [ $1 ] ],32) votes ur out!
           mta.kick $1 %vote.nick. [ $+ [ $1 ] ]
           unset %vote.nick. [ $+ [ $1 ] ]
           unset %vote.voters. [ $+ [ $1 ] ]
           .timervote [ $+ [ $1 ] ] off
         }
       }
       else mta.text $1 $mta.nick($1,$2) You have already voted
     }
    }
    alias mta.vote {
     mta.text $1 Vote kick cancelled: $mta.nick($1,%vote.nick. [ $+ [ $1 ] ])
     unset %vote.nick. [ $+ [ $1 ] ]
     unset %vote.voters. [ $+ [ $1 ] ]
    }

  11. Scripts in these tutorials will work only with mta:sa dm, which is not released yet. You have to use mta:ma scripts for mta:race yet. Visit the Add-Ons section for some info/manual

×
×
  • Create New...