mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-07-28 22:15:54 -04:00
21 lines
650 B
Plaintext
21 lines
650 B
Plaintext
include library.quests;
|
|
include library.utils;
|
|
|
|
trigger OnIncapacitateTarget(obj_id target)
|
|
{
|
|
// the player has killed a creature or NPC
|
|
// determine if the creature is related to an
|
|
// active quest owned by the player
|
|
LOG("newquests", "destroy - OnIncapacitateTarget()");
|
|
int questId = quests.getQuestIdForTarget(self, target);
|
|
if(questId > -1)
|
|
{
|
|
// it is in fact for this player, complete the
|
|
// target destroy quest
|
|
LOG("newquests", "destroy - Destroyed target is for a player's current active task");
|
|
String questName = quests.getDataEntry(questId, "NAME");
|
|
quests.complete(questName, self, true);
|
|
}
|
|
return SCRIPT_CONTINUE;
|
|
}
|