View Full Version : text events when NPC in combat
kayen85
09-21-2008, 02:17 PM
It appears when an NPC is in combat they don't respond to sub_EVENT_SAY, ect hails anything you put in that event.
Is there a way around this to enable npc you are fighting to respond to a text message?
Shunkthefunkunk
09-22-2008, 11:23 AM
If you tried using "sub_EVENT_SAY" then that would be one problem, you have to remove the underscore between sub and EVENT. So, "sub EVENT_SAY" is what it should look like, and without the quotations obviously. If I remember correctly, NPCs are not supposed to respond while in combat with you. Sorry this post probably isn't as much help as you would like but I'm not sure how you would go about making him respond. I don't think it has anything to do with the quest as much as it does the game.
kayen85
09-22-2008, 03:47 PM
I was using correct format in my quest just typed the question fast didn't really check the syntax heh.
Ok well maybe there just isn't a way to do it. Sometimes there is an obvious answer that I am just missing. Maybe not this time.
Derision
09-22-2008, 04:01 PM
The relevant part of the source that stops EVENT_SAY working for engaged mobs seems to be:
zone/client.cpp around line 720:
if (target != 0 && target->IsNPC() && !target->CastToNPC()->IsEngaged()) {
#ifdef EMBPERL
if(((PerlembParser *)parse)->HasQuestSub(target->GetNPCTypeID(),"EVENT_SAY")){
#endif
If you have the ability to edit/compile the source, you could remove the part I have highlighted in red, or a Rule could be added so that you can control whether EVENT_SAY is called for engaged mobs.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.