Difference between revisions of "LUA:AddQuestSelectableRewardItem"

 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
----
+
{{LUAFunction
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
+
|Name = AddQuestSelectableRewardItem
----
+
|Description = Adds a selectable reward item to the given quest.
=[http://otyxemydu.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
+
|Param1 = Quest
----
+
|Param1Desc = is the quest we are adding a reward to
=[http://otyxemydu.co.cc CLICK HERE]=
+
|Param2 = int32
----
+
|Param2Desc = is the item id
</div>
+
|OptionalParam1 = int8
==Reward item(s) that a player receives after make their selection of choices upon quest completion==
+
|OptionalParam1Desc = is the amount of the given item, will default to 1 if left out.
 +
|Example =
 +
<pre>
 +
function Init(Quest)
 +
    -- Add items 5 and 6 as selectable rewards
 +
    AddQuestSelectableRewardItem(Quest, 5)
 +
    AddQuestSelectableRewardItem(Quest, 6)
 +
end
 +
</pre>
 +
|ExampleDesc = Players will have a choice between items 5 and 6 upon completing this quest.
 +
|Notes = Only 1 item can be selected to recieve upon completion of the quest.
  
 
+
While this function should still work the prefered way to handle quest rewards is in the DB.
===Syntax===
+
}}
AddQuestSelectableRewardItem(Quest, item_id, quantity)
 
 
 
====Example====
 
AddQuestSelectableRewardItem(Quest, 35249, 1)&lt;br>
 
AddQuestSelectableRewardItem(Quest, 38926, 1)&lt;br>
 
AddQuestSelectableRewardItem(Quest, 21046, 1)&lt;br>
 
 
 
 
 
 
 
NOTE: The player only receives one item out of the selection
 

Latest revision as of 12:17, 30 January 2021


LUA:AllFunctions - AddQuestSelectableRewardItem

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


Adds a selectable reward item to the given quest.

Syntax

AddQuestSelectableRewardItem(param1, param2, [opt param1])

Parameters

Required - param1 (Quest), param2 (int32)
param1 is the quest we are adding a reward to
param2 is the item id
Optional - opt param1 (int8)
opt param1 is the amount of the given item, will default to 1 if left out.

Example

function Init(Quest)
    -- Add items 5 and 6 as selectable rewards
    AddQuestSelectableRewardItem(Quest, 5)
    AddQuestSelectableRewardItem(Quest, 6)
end

Players will have a choice between items 5 and 6 upon completing this quest.

Notes

Only 1 item can be selected to recieve upon completion of the quest.

While this function should still work the prefered way to handle quest rewards is in the DB.