Difference between revisions of "LUA:AddQuestStepHarvest"

(Created page with "= LUA Functions: AddQuestStepHarvest = Adds a quest step to a quest that updates upon harvesting specified items. ==== Syntax ==== AddQuestStepHarvest(param1, param2, param3, p...")
 
 
Line 1: Line 1:
= LUA Functions: AddQuestStepHarvest =
+
{{LUAFunction
Adds a quest step to a quest that updates upon harvesting specified items.
+
|Name = AddQuestStepHarvest
 
+
|Description = Adds a quest step to a quest that updates upon harvesting specified items.
 
+
|Param1 = Quest
==== Syntax ====
+
|Param1Desc = is the quest to add the step to
AddQuestStepHarvest(param1, param2, param3, param4, param5, param6, param7, param8 ...)
+
|Param2 = int32
 
+
|Param2Desc = is the the step id
 
+
|Param3 = String
==== Parameters ====
+
|Param3Desc = is the quest step text
; Required - ''param1'' (Quest), ''param2'' (int32) ''param3'' ("string") ''param4'' (int32) ''param5'' (int8) ''param6'' ("string") ''param7'' (int32) ''param8'' (int32)
+
|Param4 = int32
: ''param1'' this is the quest to add the step to
+
|Param4Desc = is the amount of items required
: ''param2'' this is the step ID
+
|Param5 = int8
: ''param3'' this is the quest step text
+
|Param5Desc = is the percent chance of an update upon harvesting the item
: ''param4'' this is the amount of items required
+
|Param6 = String
: ''param5'' this is the percent chance of an update upon harvesting the item
+
|Param6Desc = is the taskgroup text
: ''param6'' this is the taskgroup text
+
|Param7 = int32
: ''param7'' this is the icon ID
+
|Param7Desc = is the icon id
: ''param8'' this is the item id of the harvested item, you may add as many IDs as needed seperated by commas
+
|Param8 = int32
 
+
|Param8Desc = is the item id of the harvested item
 
+
|Example =
==== Usage ====
 
 
<pre>
 
<pre>
 
function Init(Quest)
 
function Init(Quest)
Line 25: Line 24:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = This will add a quest step to a quest with a step id of one, to harvest items with the id 1337.
This will add a quest step to a quest with an id of one, to harvest items with the id 1337.
+
|Notes = You may add as many IDs as needed separating each one by a comma
 +
}}

Latest revision as of 12:15, 30 January 2021


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, param8)

Parameters

Required - param1 (Quest), param2 (int32), param3 (String), param4 (int32), param5 (int8), param6 (String), param7 (int32), param8 (int32)
param1 is the quest to add the step to
param2 is the the step id
param3 is the quest step text
param4 is the amount of items required
param5 is the percent chance of an update upon harvesting the item
param6 is the taskgroup text
param7 is the icon id
param8 is the item id of the harvested item


Example

function Init(Quest)
    AddQuestStepHarvest(Quest, 1, "Fetch some hot pockets from the freezer.", 54, 100, "Moar hot pockets!", 0, 1337)
end

This will add a quest step to a quest with a step id of one, to harvest items with the id 1337.

Notes

You may add as many IDs as needed separating each one by a comma