EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Is EVENT_NPC_SLAY working correctly ? (https://www.eqemulator.org/forums/showthread.php?t=24347)

Theeper 02-08-2008 09:23 PM

Is EVENT_NPC_SLAY working correctly ?
 
It fires for the NPC that dies, not the NPC that does the killing, but it uses the killer NPC in the message.

By changing line 1761 of attack.cpp from

Code:

parse->Event(EVENT_NPC_SLAY, this->GetNPCTypeID(), 0, oos->CastToNPC(), this);
to ..
Code:

parse->Event(EVENT_NPC_SLAY, other->GetNPCTypeID(), 0, other->CastToNPC(), this);
.. it will make the event happen on the slayer, not the slayee. I'm just not sure of what the original intent was, maybe I am misunderstanding it.

So_1337 02-09-2008 06:19 AM

Hrm. I've never seen it occur between two NPCs, so I don't know if it works correctly there. I stuck some of the flavor text onto XTC and Vyzh`Dra the Cursed, though.

Code:

sub EVENT_SLAY {
  quest::say("Odd, we normally have to drag sacrifices kicking and screaming, but this one all but throws himself at us.");
}

Code:

sub EVENT_SLAY {
  quest::shout("Tell your gods that I will be coming for them next!");
}

I can confirm that both of those fire off correctly.

So_1337 02-09-2008 06:31 AM

Er, shoot, you said NPC_SLAY.

Disregard :)

Theeper 02-09-2008 07:04 AM

What currently happens (1090 build) is that NPC_SLAY runs on the NPC that is killed.

So if you have two NPC's, npc_killer and npc_killed .. and you have a npc_killed.pl script that looks like this ..

Code:

sub EVENT_NPC_SLAY {
quest::say("I was killed.");
}

You will see ..

npc_killer says "I was killed".

It should be npc_killed saying that if it were meant to function that way.


All times are GMT -4. The time now is 01:03 AM.

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