Jump to content

MTAMA Scripting


Si|ent

Recommended Posts

  • Replies 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Here's a nice (cpu hungry) script to whisper to people near you.

alias whisper.distance { 
 var %x,%y,%z 
 %x = $abs($calc($1 - $2)) 
 %y = $abs($calc($3 - $4)) 
 %z = $abs($calc($5 - $6)) 
 !return $round($sqrt($calc(%x * %x + %y * %y + %z * %z)),2) 
} 
on *:SIGNAL:mta.pm:{ 
 if ($3 == whisper) { 
if ($mta.admin+($1) == $true) {
   var %a = 0 
   unset %b 
   while %a < $mta.maxplayers($1) { 
     if (($whisper.distance($mta.location($1,$2,x),$mta.location($1,%a,x),$mta.location($1,$2,y),$mta.location($1,%a,y),$mta.location($1,$2,z),$mta.location($1,%a,z)) <= %whisper) && (%a != $2) && ($mta.name($1,%a) != Unknown)) { 
       mta.msg $1 %a Whisper from $mta.name($1,$2) $+ : $4- 
       %b = $iif($chr(44) !isin %b,$mta.name($1,%a),%b $+ $chr(44) $chr(32) $mta.name($1,%a)) 
     } 
     !inc %a 
   } 
   mta.msg $1 $2 Message delivered to $iif(%b,%b,no-one) 
   unset %a 
   unset %b 
 } 
}
} 

Use "/msg whisper "

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

    • No registered users viewing this page.

×
×
  • Create New...