EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Way to initiate an event when passing through rectangular cuboid area (https://www.eqemulator.org/forums/showthread.php?t=40565)

superemu 04-15-2016 01:11 AM

Way to initiate an event when passing through rectangular cuboid area
 
Is there a way to do the following in the EQEmu server:

I want to define a rectangular cuboid region in a zone (define center point and x, y, and z radii or however). Then, when a player character passes through the region, something happens.

nilbog 04-15-2016 01:49 AM

If you're using perl, you can do something like..

With an invisible man at the center point:

Code:

sub EVENT_SPAWN
  {
  $x = $npc->GetX();
  $y = $npc->GetY();
  $z = $npc->GetZ();
  quest::set_proximity($x - 5, $x + 5, $y - 5, $y + 5, $z - 6, $z + 10);
  }

sub EVENT_ENTER
  {
  #something happens
  }


superemu 04-15-2016 10:14 AM

Ah! Thanks for the reply. I'll try it out.

provocating 04-15-2016 01:02 PM

You can also do it through the task system, if you were already thinking about doing it as a task.

superemu 04-17-2016 12:26 PM

I haven't even gotten to figuring out how the task system works yet! So much to learn...


All times are GMT -4. The time now is 09:16 AM.

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