Difference between revisions of "LUA:AddQuestRewardFaction"

 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
'''Syntax'''<br>
+
{{LUAFunction
AddQuestRewardFaction(Quest, Faction ID, Amount)<br>
+
|Name = AddQuestRewardFaction
 
+
|Description = Adds a faction reward for the given quest.
'''Explanation'''<br>
+
|Param1 = quest
Factions have not properly been set to work yet, as of April 3rd. As you could assume though this function will reward the player with X amount of faction when the quest is completed.
+
|Param1Desc = is the quest we are adding a reward to
 
+
|Param2 = int32
 
+
|Param2Desc = is the faction id
 
+
|Param3 = sint32
 
+
|Param3Desc = is the amount of faction
 
+
|Example =
 
+
<pre>
[http://www.eq2emulator.net/wiki/index.php/Developer:LUA_Functions Back to LUA Functions]
+
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>
 +
|ExampleDesc = 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.
 +
}}

Latest revision as of 12:17, 30 January 2021


LUA:AllFunctions - AddQuestRewardFaction

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


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


Example

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.