GiveQuestItem

From NWN Lexicon
Jump to: navigation, search



GiveQuestItem(object, int, object)

Create the quest item on the player.

void GiveQuestItem(
    object oPC,
    int nQuest = 1,
    object oNPC = OBJECT_SELF
);

Parameters

oPC

Player object to give the item to

nQuest

The quest number (Default: 1)

oNPC

The quest giver (Default: OBJECT_SELF)


Description

Give a PC the quest item



Remarks

Calls GetQuestItemTag and uses that to determine which item to create. Since it uses CreateObject to create the item, this means that the tag and the ResRef of the quest items have to be the same. If the string returned by GetQuestItemTag is longer than 16 characters (the maximum length for a ResRef), it sends a debug message to the PC, which you definitely only want to happen when debugging and playtesting your module. It only creates the item if oPC or oPC's party doesn't already have it.

This is part of BioWare's quest handling system. Unless you delve thoroughly into that system, and use it all the time, you probably won't need this function.


Requirements

#include " x0_i0_plotgiver "

Version

1.61

See Also



 author: Lilac Soul