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