No categories assigned

LUA:GiveQuestItem

LUA Functions: GiveQuestItem()

Makes the quest reward window pop up for the player and give them an item, not for actual quest rewards.


Syntax

GiveQuestItem(param1, param2, param3, param4)


Parameters

Required - param1 (Quest), param2 (Spawn), param3 (String), param4 (int32)
param1 is the quest giving the item
param2 is the player receiving the item
param3 is the description in the window
param4 is the item id


Returns

bool
true if the item was added to the players inventory


Usage

function Step2Complete(Quest, QuestGiver, Player)
    -- When this function is called the quest reward window will pop up giving an item to the player
    GiveQuestItem(Quest, Player, "Here is your quest item", 3)
end

Player will receive a quest reward window with the item with an id of 3 when this step complete function is called


Notes

If the item is required to advance the quest make sure to check the return value to make sure the item was added to the players inventory

This is not for the quest rewards