[SCRIPT HELP] Item Event Script - SOLVED

I need help with the following Item Event script

#include "x2_inc_switches"

void main()
{
    object oPC, oItem;
    int nEvent = GetUserDefinedItemEventNumber();

    if (nEvent == X2_ITEM_EVENT_EQUIP)
    {
        oPC          = GetPCItemLastEquippedBy();
        oItem        = GetPCItemLastEquipped();

        effect eAOE  = EffectAreaOfEffect(35);
        eAOE         = SupernaturalEffect(eAOE);
        eAOE         = TagEffect(eAOE, "MB_Revealing");
        effect eDur1 = EffectVisualEffect(VFX_DUR_AURA_DRAGON_FEAR);
        effect eDur2 = EffectVisualEffect(VFX_DUR_CESSATE_POSITIVE);
        effect eLink = EffectLinkEffects(eDur1, eDur2);
        eLink        = SupernaturalEffect(eLink);
        eLink        = TagEffect(eLink, "MB_Revealing");

        //Create an instance of the AOE Object using the Apply Effect function
        ApplyEffectToObject(DURATION_TYPE_PERMANENT, eAOE, oPC);
        ApplyEffectToObject(DURATION_TYPE_PERMANENT, eLink, oPC);

    }
}

For some reason nothing is being applied when the PC equips the item. Not sure what I’m doing wrong.

EDIT - Needed to link all the effects together

Some effects don’t work on objects. Some tagged effects don’t work in NWN2.

OOPs, how’d this get in the NWN2 section? :wink: My bad - category fixed.

1 Like