You are viewing an old version of this page. Return to the latest version.
Difference between revisions of "LUA:AddQuestRewardFaction"
| Line 1: | Line 1: | ||
| − | + | = LUA Functions: AddQuestRewardFaction() = | |
| − | AddQuestRewardFaction( | + | Adds a faction reward for the given quest. |
| − | + | ==== Syntax ==== | |
| − | + | AddQuestRewardFaction(param1, param2, param3) | |
| + | ==== Parameters ==== | ||
| + | ; Required - ''param1'' (Quest), ''param2'' (int32), ''param3'' (sint32) | ||
| + | : ''param1'' is the quest we are adding a reward to | ||
| + | : ''param2'' is the faction id | ||
| + | : ''param3'' is the amount of faction | ||
| + | ==== Usage ==== | ||
| + | <pre> | ||
| + | function Init(Quest) | ||
| + | -- Give 100 faction to faction 5 and -20 faction to faction 6 | ||
| + | AddQuestRewardFaction(Quest, 5, 100) | ||
| + | AddQuestRewardFaction(Quest, 6, -20) | ||
| + | end | ||
| + | </pre> | ||
| + | Player will get +100 faction for faction 5 and -20 faction for faction 6 upon completing this quest. | ||
| − | + | == Notes == | |
| + | While this function should still work the prefered way to handle quest rewards is in the DB. | ||
Revision as of 15:29, 11 October 2012
LUA Functions: AddQuestRewardFaction()
Adds a faction reward for the given quest.
Syntax
AddQuestRewardFaction(param1, param2, param3)
Parameters
- Required - param1 (Quest), param2 (int32), param3 (sint32)
- param1 is the quest we are adding a reward to
- param2 is the faction id
- param3 is the amount of faction
Usage
function Init(Quest)
-- Give 100 faction to faction 5 and -20 faction to faction 6
AddQuestRewardFaction(Quest, 5, 100)
AddQuestRewardFaction(Quest, 6, -20)
end
Player will get +100 faction for faction 5 and -20 faction for faction 6 upon completing this quest.
Notes
While this function should still work the prefered way to handle quest rewards is in the DB.