Difference between revisions of "LUA:AddQuestStepChat"

Line 1: Line 1:
'''Syntax'''<br>
+
= LUA Functions: AddQuestStepChat() =
AddQuestStepChat(Quest, StepID, StepText, Quantity, TaskGroupText, Icon, NPC ID(s))<br>
+
Adds a chat objective to the given quest
  
'''Explanation'''<br>
 
This will add a step in your quest script that requires you to go talk to an NPC. '''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.'''
 
  
 +
==== Syntax ====
 +
AddQuestStepChat(param1, param2, param3, param4, param5, param6, param7, ...)
  
'''Example'''<br>
 
  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)
 
  
 +
==== 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 step number
 +
: ''param3'' is the step description
 +
: ''param4'' is the quantity
 +
: ''param5'' is the task group description
 +
: ''param6'' is the icon
 +
: ''param7+'' is the spawn DB ID's
  
 +
==== Usage ====
 +
<pre>
 +
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)
 +
</pre>
  
 
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.
 
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.
 
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 ==
 +
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...
 
Here is an example of how the TaskGroupText and StepText are laid out in your journal. Please excuse the crude drawing...
Line 18: Line 33:
 
       TaskGroupText - "I need to manipulate two Barbarians into hating each other."
 
       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."
 
               StepText - "I must speak with Tristan. He is standing near the Heated Stone Inn."
 
 
 
 
 
[http://www.eq2emulator.net/wiki/index.php/Developer:LUA_Functions Back to LUA Functions]
 

Revision as of 16:31, 12 September 2013

LUA Functions: AddQuestStepChat()

Adds a chat objective to the given quest


Syntax

AddQuestStepChat(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 step number
param3 is the step description
param4 is the quantity
param5 is the task group description
param6 is the icon
param7+ is the spawn DB ID's

Usage

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

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."