Script: acquireditem_tag

#include "nw_i0_plotwizard"
#include "bdm_include"
void main()
{
    // PLOT WIZARD MANAGED CODE BEGINS
    // PLOT WIZARD MANAGED CODE ENDS
    object oItem = GetModuleItemAcquired();

    if (GetIsPC(GetItemPossessor(oItem)))
    {
        SetLocalInt(oItem, "PCItem", 1);
    }
    BDM_ModuleItemAcquired();

    // Paths of the Dead: acquiring the Flame of the West (Tag "narsil") by
    // looting it -- rather than receiving it honourably from Aragorn -- records
    // the "took it by force" path. The honourable grant (q_potd_reward) sets a
    // transient flag we consume here so it is not double-counted.
    if (GetTag(oItem) == "narsil")
    {
        object oPC = GetModuleItemAcquiredBy();
        if (GetIsPC(oPC))
        {
            if (GetLocalInt(oPC, "potd_honourable"))
            {
                DeleteLocalInt(oPC, "potd_honourable");
            }
            else if (GetCampaignInt("potd", "granted", oPC) == 0)
            {
                SetCampaignInt("potd", "granted", 1, oPC);
                AddJournalQuestEntry("paths_of_the_dead", 30, oPC, FALSE, FALSE);
            }
        }
    }
}