Its close to what you need here for that. (300 is only an example)
Code:
my $ProxDist = 300;
sub EVENT_SPAWN {
my $x = $npc->GetX();
my $y = $npc->GetY();
my $z = $npc->GetZ();
quest::set_proximity($x - $ProxDist, $x + $ProxDist, $y - $ProxDist, $y + $ProxDist, $z - $ProxDist, $z + $ProxDist);
}
sub EVENT_ENTER {
quest::movepc(zoneid, x, y, z);
}