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)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-20-2009, 02:31 PM
Derision
Developer
 
Join Date: Feb 2004
Location: UK
Posts: 1,540
Default Event_proximity_say

Following discussion in another thread, I added a new EVENT_PROXIMITY_SAY.

Example quest:
Code:
sub EVENT_SPAWN {
   $x = $npc->GetX();
   $y = $npc->GetY();
   quest::set_proximity($x - 500, $x + 500, $y - 500, $y + 500);
}

sub EVENT_PROXIMITY_SAY {

        if($text=~/hate bixby/i) {
                quest::shout("So $name hates me huh ? I'll show you!");
                quest::attack($name);
        }
}
The way it works is this. When you call quest::set_proximity, the code checks to see if the NPC also has an EVENT_PROXIMITY_SAY. If it does, it sets a flag in the proximity entry, and also sets a global flag to indicate that EVENT_PROXIMITY_SAY is in use for this instance of this zone.

When a client says something and has nothing targetted, if the global flag is set, the proximities are run through, looking for one that is associated with an NPC that has an EVENT_PROXIMITY_SAY and for which the client is within the proximity.

I'm unsure as to whether the EVENT_PROXIMITY_SAY should be called even if the player has something targetted. You quest writers let me know and I can change it if required.
Reply With Quote
 


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 05:28 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3