Difference between revisions of "LUA:AddQuestStepObtainItem"

(Fix parameter numbers)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
= LUA Functions: AddQuestStepObtainItem() =
+
{{LUAFunction
Adds a step in your quest that requires you to obtain an item(s) to advance the quest.
+
|Name = AddQuestStepObtainItem
 +
|Description = Adds a step in your quest that requires you to obtain an item(s) to advance the quest.
 +
|Param1 = Quest
 +
|Param1Desc = is the quest we are adding a step to
 +
|Param2 = int32
 +
|Param2Desc = is the step id
 +
|Param3 = string
 +
|Param3Desc = is the step description
 +
|Param4 = int32
 +
|Param4Desc = is the quantity
 +
|Param5 = float
 +
|Param5Desc = is the percentage
 +
|Param6 = string
 +
|Param6Desc = is the taskgroup string
 +
|Param7 = int16
 +
|Param7Desc = is the icon for the step
 +
|Param8 = int32
 +
|Param8Desc = is the item id
 +
|Example =
 +
<pre>
 +
AddQuestStepObtainItem(Quest, 2, "I must collect five skulls of fallen Iksar.", 5, 100, "I Must gather several Iksar skulls scattered across the Scale Yard.", 91, 2797)
 +
</pre>
 +
|ExampleDesc = Sets a requirement to obtain an item in Quset on step 2. The ''param3'' sets the ''StepText''  you see in the journal. There is a quantity of 5 that must be obtained to complete this step, and will update 100 percent of the time the item is obtained. The ''param6'' is the ''TaskGroupText'' you see in the journal. The icon that appears in the journal is set to 91 and our item id required is set to 2797
 +
|Notes = You may add as many items as needed by inserting a comman after each item id. Eg. ''2797, 2798, 2799''
  
 +
Here is an example of how the TaskGroupText and StepText are laid out in your journal. Please excuse the crude drawing...
  
==== Syntax ====
+
<pre>
AddQuestStepObtainItem(Quest, StepID, StepText, Quantity, Percentage, TaskGroupText, Icon, Item ID(s))
+
TaskGroupText - "I Must gather several Iksar skulls scattered across the Scale Yard."
 
+
        StepText - "I must collect five skulls of fallen Iksar."
 
+
</pre>
==== Parameters ====
+
}}
; Required - ''param1'' (Quest), ''param2'' (int32), ''param3'' (string), ''param4'' (int32), ''param5'' (float), ''param6'' (string), ''param7'' (int32), ''param8'' (int32)
 
: ''param1'' is the quest we are adding a step to
 
: ''param2'' is the step id
 
: ''param3'' is the step description
 
: ''param4'' is the quantity
 
: ''param5'' is the percentage
 
: ''param6'' is the taskgroup string
 
; Optional - ''param7'' (int16)
 
: ''param7'' is the icon for the step
 
: ''param2'' is the Item id
 
 
 
 
 
==== Usage ====
 
  AddQuestStepObtainItem(Quest, 2, "I must collect five skulls of fallen Iksar.", 5, 100, "I Must gather several Iksar skulls scattered across the Scale Yard.", 91, 2797)
 
 
 
 
 
==== Old Layout ====
 
 
 
'''Syntax'''<br>
 
AddQuestStepObtainItem(Quest, StepID, StepText, Quantity, Percentage, TaskGroupText, Icon, Item ID(s))<br>
 
 
 
'''Explination'''<br>
 
This function will add a step in your quest that requires you to obtain an item(s) to advance the quest.<br>
 
 
 
'''Example'''<br>
 
  AddQuestStepObtainItem(Quest, 2, "I must collect five skulls of fallen Iksar.", 5, 100, "I Must gather several Iksar skulls scattered across the Scale Yard.", 91, 2797)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[http://www.eq2emulator.net/wiki/index.php/Developer:LUA_Functions Back to LUA Functions]
 

Latest revision as of 12:15, 30 January 2021


LUA:AllFunctions - AddQuestStepObtainItem

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


Adds a step in your quest that requires you to obtain an item(s) to advance the quest.

Syntax

AddQuestStepObtainItem(param1, param2, param3, param4, param5, param6, param7, param8)

Parameters

Required - param1 (Quest), param2 (int32), param3 (string), param4 (int32), param5 (float), param6 (string), param7 (int16), param8 (int32)
param1 is the quest we are adding a step to
param2 is the step id
param3 is the step description
param4 is the quantity
param5 is the percentage
param6 is the taskgroup string
param7 is the icon for the step
param8 is the item id


Example

AddQuestStepObtainItem(Quest, 2, "I must collect five skulls of fallen Iksar.", 5, 100, "I Must gather several Iksar skulls scattered across the Scale Yard.", 91, 2797)

Sets a requirement to obtain an item in Quset on step 2. The param3 sets the StepText you see in the journal. There is a quantity of 5 that must be obtained to complete this step, and will update 100 percent of the time the item is obtained. The param6 is the TaskGroupText you see in the journal. The icon that appears in the journal is set to 91 and our item id required is set to 2797

Notes

You may add as many items as needed by inserting a comman after each item id. Eg. 2797, 2798, 2799

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

TaskGroupText - "I Must gather several Iksar skulls scattered across the Scale Yard."
        StepText - "I must collect five skulls of fallen Iksar."