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

27 lines
860 B
Plaintext

include library.create;
include library.locations;
include library.quests;
include library.utils;
trigger OnQuestActivated(int questRow)
{
LOG("newquests", "encounter - OnQuestActivated(+ " + questRow + ")");
// determine if the trigger is related to this particular script
// more than one task script may be attached to the player
if(quests.isMyQuest(questRow, "quest.task.encounter"))
{
boolean success = quests.doEncounterSpawn(self, questRow);
// get the name of the qust from the quests data table
String questName = quests.getDataEntry(questRow, "NAME");
// complete the task. It is normal for log output to indicate
// that the encounter failed to activate, because this call
// will deactivate it while in the process of activating it.
quests.complete(questName, self, success);
}
return SCRIPT_CONTINUE;
}