You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddQuestRewardItem"
| Line 1: | Line 1: | ||
| − | == | + | = LUA Functions: AddQuestRewardItem() = |
| + | Add an item reward to the given quest. | ||
| − | ===Syntax=== | + | ==== Syntax ==== |
| − | AddQuestRewardItem( | + | AddQuestRewardItem(param1, param2, [param3]) |
| − | |||
| − | |||
| + | ==== Parameters ==== | ||
| + | ; Required - ''param1'' (Quest), ''param2'' (int32) | ||
| + | : ''param1'' is the quest we are adding a reward to | ||
| + | : ''param2'' is the item id | ||
| + | ; Optional - ''param3'' (int8) | ||
| + | : ''param3'' is the amount of the given item | ||
| − | + | ||
| + | ==== Usage ==== | ||
| + | <pre> | ||
| + | function Init(Quest) | ||
| + | -- Ad item 12000 to the quest reward | ||
| + | AddQuestRewardItem(Quest, 12000) | ||
| + | end | ||
| + | </pre> | ||
| + | |||
| + | Players will recieve item 12000 upon completing this quest. | ||
| + | |||
| + | |||
| + | == Notes == | ||
| + | This item will always be given to the player upon completion of the quest. | ||
| + | |||
| + | ''param3'' will default to 1 if left out. | ||
| + | |||
| + | Also while this function should still work the prefered way to handle quest rewards is in the DB. | ||
Revision as of 15:38, 11 October 2012
LUA Functions: AddQuestRewardItem()
Add an item reward to the given quest.
Syntax
AddQuestRewardItem(param1, param2, [param3])
Parameters
- Required - param1 (Quest), param2 (int32)
- param1 is the quest we are adding a reward to
- param2 is the item id
- Optional - param3 (int8)
- param3 is the amount of the given item
Usage
function Init(Quest)
-- Ad item 12000 to the quest reward
AddQuestRewardItem(Quest, 12000)
end
Players will recieve item 12000 upon completing this quest.
Notes
This item will always be given to the player upon completion of the quest.
param3 will default to 1 if left out.
Also while this function should still work the prefered way to handle quest rewards is in the DB.