EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Help with Set Proximity (https://www.eqemulator.org/forums/showthread.php?t=31771)

blindaviator 08-03-2010 01:10 AM

Help with Set Proximity
 
I am trying to set an area effect with the quest::set_proximity and using an invisible man...

Can anyone give me a quick rundown on how this function works?? Have been trying to setup proximities in certain areas to prevent un-flagged players from getting past a certain point... Would like to have it move them back a short distance when they enter the area... Not sure how I would write such a script... Not 100% sure how the function works...

I tried a few test setups but so far haven't had any luck with it working...

Anyone give me a few pointers??

Thx

joligario 08-03-2010 07:05 AM

Code:

sub EVENT_SPAWN {
  quest::set_proximity($x - 5, $x + 5, $y - 5, $y + 5);
}

sub EVENT_ENTER {
  quest::say("Hey, $name just entered my 10 x 10 box.");
}

sub EVENT_EXIT {
  quest::say("Goodbye, $name.");
}


blindaviator 08-03-2010 09:27 AM

Hey I appreciate it... I will work with it and see what I get...

It makes more sense now...

blindaviator 08-03-2010 10:43 AM

Well it seems to work but if you don't specify the Z coordinates then it is z+- infinite it seems... Bad for an area that has different levels...

If you set the Z then it seems to be a +- set amount?? I can't seem to get the +- on the Z to go more than about 20... Is there a trick to it?

I have the Y and X +- 65 and Z +- 50 but the Z seems to kick in around 20 or so.. Is there some latency for the proximity check and that is what I am seeing?

Derision 08-03-2010 11:07 AM

The proximities are checked once per second (this is set in features.h and requires a recompile to change).

trevius 08-04-2010 08:35 AM

Yeah, proximities are not really the best for completely restricting an area of a zone unless the proximity range is bigger than someone could possibly pass within 1 second, or else if timed correctly, people can get through.

steve 08-04-2010 09:43 AM

Not to mention that a ton of people seem to use MQ, which they could bypass any proximity checks easily by warping past them.


All times are GMT -4. The time now is 02:03 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.