#include "inc_item_tools"
#include "prc_x2_itemprop"
void main()
    {
    object oItem = GetItemActivated();
    string sTag = GetTag (oItem);
    object oPC = GetItemActivator();
    object oTarget = GetItemActivatedTarget();
    location lLoc = GetItemActivatedTargetLocation();
    int iTemp;
    itemproperty ipProp;
    effect eEffect,eDam,eVis;
    if (sTag == "misca042")
        {
        ClearAllActions();
        if (GetDistanceBetween(oTarget,oPC) >= 1.0)
            {
            ActionMoveToObject(oTarget);
            ActionDoCommand(ThiefTools(oPC,oTarget,2));
            }
        else
            ThiefTools(oPC,oTarget,2);
        }
    else if (sTag == "misca088")
        {
        if (GetHasFeat(FEAT_WILD_SHAPE ,oPC))
            ActionCastSpellAtObject(SPELLABILITY_WILD_SHAPE ,oPC,METAMAGIC_ANY,TRUE,0,PROJECTILE_PATH_TYPE_DEFAULT,TRUE);
        }
    else if (sTag == "misca094")
        {
        if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) iTemp = d8(3);
        else if (GetRacialType(oTarget) == RACIAL_TYPE_CONSTRUCT) iTemp = d6();
        else iTemp = d8();
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(iTemp,DAMAGE_TYPE_DIVINE),oTarget);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_BEAM_HOLY),oTarget,3.0);
        }
    else if (sTag == "miscb079")
        {
        if (GetRacialType(oTarget) == RACIAL_TYPE_UNDEAD) iTemp = 40;
        else if (GetRacialType(oTarget) == RACIAL_TYPE_CONSTRUCT) iTemp = 18;
        else iTemp = 24;
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_BEAM_HOLY),oTarget,3.0);
        ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(iTemp,DAMAGE_TYPE_DIVINE),oTarget);
        }
    else if (sTag == "miscb085")
        {
        MaskOfTheSkull(oTarget);
        }
    else if (sTag == "miscb091")
        {
        ExecuteScript("miscb091",oItem);
        }
    else if (sTag == "miscc033")
        {
        JumpToLocation(lLoc);
        }
    else if (sTag == "lshield603")
        {
        eDam = EffectDamageShield(0,DAMAGE_BONUS_1d6,DAMAGE_TYPE_PIERCING);
        eVis = EffectVisualEffect(VFX_DUR_ENTANGLE);
        eEffect = EffectLinkEffects(eVis,eDam);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eEffect,oPC,60.0);
        }
    else if (sTag == "lshield604")
        {
        eEffect = EffectModifyAttacks(1);
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eEffect,oPC,60.0);
        }
    else if (sTag == "lshield606")
        {
        ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectVisualEffect(VFX_IMP_EVIL_HELP),oPC,6.0);
        DelayCommand(6.0,ShieldOfAbsorption(oPC));
        }
    else if (sTag == "miscc097")
        {
        oTarget = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);
        IPSafeAddItemProperty(oTarget,ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_FIRE,IP_CONST_DAMAGEBONUS_1d6),60.0);
        }
    }
