It might look like this, yet there are some elements I don't possess, so you'll probably have to adjust the code to your exact needs.
void main()
{
object oKiller = GetLastKiller();
while(GetMaster(oKiller) != OBJECT_INVALID) oKiller = GetMaster(oKiller);
if(GetIsDM(oKiller) || GetIsDMPossessed(oKiller)) return;
SpeakString("npc says something when dying...", TALKVOLUME_TALK);
string sTagSelf = GetTag(OBJECT_SELF);
object oMember = GetFirstFactionMember(oKiller);
while(oMember != OBJECT_INVALID)
{
if(sTagSelf == GetLocalString(oMember, "KILL_TASK_TARGET") && GetLocalInt(oMember, "KILL_TASK_FLAG") == 1)
{
SetLocalInt(oMember, "KILL_TASK_FLAG", 2);
AddJournalQuestEntry("kt_journal_01", 99, oMember);
}
if(GetLocalInt(oMember, "NW_JOURNAL_ENTRY"+"journalID") == 1) AddJournalQuestEntry("journalID", 2, oMember);
SetLocalInt(oMember, "nKilledQuestTarget", 1); // should probably go in one of the "if" conditions...
oMember = GetNextFactionMember(oKiller);
}
}
Kato