View Single Post
  #3  
Old 01-18-2015, 06:30 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

If you are going to use proximities for that and want them to work for a moving guard, you probably need to use a timer to update the proximity on a regular basis. Here is an example from a script I use:

Code:
$ProxRangeXY = 100;
$ProxRangeZ = 25;

sub EVENT_SPAWN {
	quest::set_proximity($x - $ProxRangeXY, $x + $ProxRangeXY, $y - $ProxRangeXY, $y + $ProxRangeXY, $z - $ProxRangeZ, $z + $ProxRangeZ);
	quest::settimer("setprox", 2);
}


sub EVENT_TIMER {

	if ($timer eq "setprox") {
		quest::clear_proximity();
		quest::set_proximity($x - $ProxRangeXY, $x + $ProxRangeXY, $y - $ProxRangeXY, $y + $ProxRangeXY, $z - $ProxRangeZ, $z + $ProxRangeZ);
	}

}
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote