Difference between revisions of "LUA:AddQuestPrereqItem"
(Created page with "= LUA Functions: AddQuestPrereqItem() = Adds an item prerequisite to the given quest. ==== Syntax ==== AddQuestPrereqItem(param1, param2, [param3]) ==== Parameters ==== ; Requi...") |
|||
| Line 1: | Line 1: | ||
| − | = | + | {{LUAFunction |
| − | Adds an item prerequisite to the given quest. | + | |Name = AddQuestPrereqItem |
| − | + | |Description = Adds an item prerequisite to the given quest. | |
| − | + | |Param1 = Quest | |
| − | + | |Param1Desc = is the quest we are adding a prerequisite to | |
| − | + | |Param2 = int32 | |
| − | + | |Param2Desc = is the item id | |
| − | + | |OptionalParam1 = int8 | |
| − | + | |OptionalParam1Desc = is the amount of the item, defaults to 1 if left out. | |
| − | + | |Example = | |
| − | |||
| − | |||
| − | |||
| − | |||
<pre> | <pre> | ||
function Init(Quest) | function Init(Quest) | ||
| Line 19: | Line 15: | ||
end | end | ||
</pre> | </pre> | ||
| − | + | |ExampleDesc = Only a player with 2 of item 17 can do the quest. | |
| − | Only a player with 2 of item 17 can do the quest. | + | |Notes = None |
| − | + | }} | |
| − | |||
| − | |||
Latest revision as of 12:19, 30 January 2021
LUA:AllFunctions - AddQuestPrereqItem
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Adds an item prerequisite to the given quest.
Syntax
AddQuestPrereqItem(param1, param2, [opt param1])
Parameters
- Required - param1 (Quest), param2 (int32)
- param1 is the quest we are adding a prerequisite to
- param2 is the item id
- Optional - opt param1 (int8)
- opt param1 is the amount of the item, defaults to 1 if left out.
Example
function Init(Quest)
-- Only players with 2 of item 17 can do this quest
AddQuestPrereqItem(Quest, 17, 2)
end
Only a player with 2 of item 17 can do the quest.
Notes
None