Difference between revisions of "LUA:AddQuestRewardCoin"

 
Line 1: Line 1:
= LUA Functions: AddQuestRewardCoin() =
+
{{LUAFunction
Adds coin to the reward from the given quest.
+
|Name = AddQuestRewardCoin
 
+
|Description = Adds coin to the reward from the given quest.
 
+
|Param1 = Quest
==== Syntax ====
+
|Param1Desc = is the quest we are adding the reward to
AddQuestRewardCoin(param1, param2, param3, param4, param5)
+
|Param2 = int32
 
+
|Param2Desc = is the amount of coppee
 
+
|Param3 = int32
==== Parameters ====
+
|Param3Desc = is the amount of silver
; Required - ''param1'' (Quest), ''param2'' (int32), ''param3'' (int32), ''param4'' (int32), ''param5'' (int32)
+
|Param4 = int32
: ''param1'' is the quest we are adding a coin reward to
+
|Param4Desc = is the amount of gold
: ''param2'' is the amount of copper
+
|Param5 = int32
: ''param3'' is the amount of silver
+
|Param5Desc = is the amount of platinum
: ''param4'' is the amount of gold
+
|Example =
: ''param5'' is the amount of plat
 
 
 
==== Usage ====
 
 
<pre>
 
<pre>
 
function Init(Quest)
 
function Init(Quest)
Line 22: Line 19:
 
end
 
end
 
</pre>
 
</pre>
 
+
|ExampleDesc = Add a reward of 2 plat 15 gold 72 silver and 1 copper to the quest.
Add a reward of 2 plat 15 gold 72 silver and 1 copper to the quest.
+
|Notes = While this function should still work it is now prefered to add quest reward data into the DB.
 
+
}}
 
 
== Notes ==
 
While this function should still work it is now prefered to add quest reward data into the DB.
 

Latest revision as of 12:17, 30 January 2021


LUA:AllFunctions - AddQuestRewardCoin

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


Adds coin to the reward from the given quest.

Syntax

AddQuestRewardCoin(param1, param2, param3, param4, param5)

Parameters

Required - param1 (Quest), param2 (int32), param3 (int32), param4 (int32), param5 (int32)
param1 is the quest we are adding the reward to
param2 is the amount of coppee
param3 is the amount of silver
param4 is the amount of gold
param5 is the amount of platinum


Example

function Init(Quest)
    -- Add a coin reward to the quest
    AddQuestRewardCoin(Quest, 1, 72, 15, 2)
end

Add a reward of 2 plat 15 gold 72 silver and 1 copper to the quest.

Notes

While this function should still work it is now prefered to add quest reward data into the DB.