No categories assigned

LUA:AddQuestStepChat


LUA:AllFunctions - AddQuestStepHarvest

Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker


Adds a quest step to a quest that updates upon harvesting specified items.

Syntax

AddQuestStepHarvest(param1, param2, param3, param4, param5, param6, param7)

Parameters

Required - param1 (Quest), param2 (int32), param3 (String), param4 (int32), param5 (String), param6 (int16), param7 (int32)
param1 is the quest to add the step to
param2 is the the step id
param3 is the step description
param4 is the quantity
param5 is the taskgroup description
param6 is the icon
param7 is the spawn DB ID's


Example

AddQuestStepChat(Quest, 1, "I must speak with Tristan. He is standing near the Heated Stone Inn.", 1, "I need to manipulate two Barbarians into hating each other.", 0, 1390036)

As you can see this is Step 1 of the quest. The TASKGROUP text is what will be displayed as the main step of the quest, the STEPTEXT is what will be displayed under the main step text. The icon I have set to "0" to display no icon. and the NPC ID is set to the NPC that you want to talk to in order to advance the quest.

Notes

You may add as many spawn ID's for param7 as needed separating each one by a comma.


It is very important to note that this function will not operate by itself. Because most quests do not hand in on Hail on live this function does not automatically trigger when you hail the NPC IDs. You must edit the spawnscript of the NPC and use SetStepComplete to ensure that the quest step gets completed. This is because most quests are completed after reading several npc messages rather than right at the beginning.


Here is an example of how the TaskGroupText and StepText are laid out in your journal. Please excuse the crude drawing...

TaskGroupText - "I need to manipulate two Barbarians into hating each other."
        StepText - "I must speak with Tristan. He is standing near the Heated Stone Inn."