Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 04-15-2016, 01:11 AM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default 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.
Reply With Quote
  #2  
Old 04-15-2016, 01:49 AM
nilbog
Hill Giant
 
Join Date: Nov 2007
Posts: 198
Default

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
   }
__________________
https://www.project1999.com
Reply With Quote
  #3  
Old 04-15-2016, 10:14 AM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

Ah! Thanks for the reply. I'll try it out.
Reply With Quote
  #4  
Old 04-15-2016, 01:02 PM
provocating's Avatar
provocating
Demi-God
 
Join Date: Nov 2007
Posts: 2,175
Default

You can also do it through the task system, if you were already thinking about doing it as a task.
Reply With Quote
  #5  
Old 04-17-2016, 12:26 PM
superemu
Sarnak
 
Join Date: May 2014
Posts: 79
Default

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


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:18 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3