Files
dsrc/sku.0/sys.server/compiled/game/script/quest/task/destroy.script
T

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;
}