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