Jump to content

would be nice...


Recommended Posts

would be nice if (by selecting it in the admin options) in the next version of mta there will be th possibility to chat only if u're near to another player....i mean....instead of the chat box would be funny if when someone speaks appears a bubble like in the comics...if it was so i could make a plan of attack and my enemies couldn't "hear" it

Link to comment

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) {
   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
 }
}

There ya go ;)

P.S: Thanks to Oli for the distance calculations :)

Link to comment

And /msg clan can also be used for wildcard names. E.g: /msg clan tali Yo Talidan :P

Edit: I also have another script specially for quick messages :D

on *:SIGNAL:mta.pm:{ 
 if ($3 == quick) { 
   mta.msg $1 $2 PM sent to $mta.name($1,$mta.getid($1,$4)) 
   mta.msg $1 $mta.getid($1,$4) PM from $mta.name($1,$2) $+ : $5- 
 } 
}

/msg quick

Link to comment
And /msg clan can also be used for wildcard names. E.g: /msg clan tali Yo Talidan :P

Edit: I also have another script specially for quick messages :D

on *:SIGNAL:mta.pm:{ 
 if ($3 == quick) { 
   mta.msg $1 $2 PM sent to $mta.name($1,$mta.getid($1,$4)) 
   mta.msg $1 $mta.getid($1,$4) PM from $mta.name($1,$2) $+ : $5- 
 } 
}

/msg quick

Typing quick is just adding more to it! Let's say their name was Bob, all you would have to do is /msg bob! :P

Link to comment
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...