Log in

View Full Version : Way to initiate an event when passing through rectangular cuboid area


superemu
04-15-2016, 01:11 AM
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:

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...