void main()
{
    object oItem = GetEventParamObject(0);
    object oPC = OBJECT_SELF;
    object oArea = GetArea(oPC);
    string sAreaTag = GetTag(oArea);
    string sPCName = GetName(oPC);

    // Initialize the array of allowed area tags
    array aAllowedAreas = StringToArray("A_CAS_SHATEMPLE,A_CAS_SHA_CITYINTE,A_CAS_OOZEISLAND3,A_CAS_OOZEISLAND1", ",");

    // Check if the current area's tag is in the allowed areas list
    int iAllowed = FALSE;
    int i;
    for(i = 0; i < GetArraySize(aAllowedAreas); i++)
    {
        if(sAreaTag == GetArrayString(aAllowedAreas, i))
        {
            iAllowed = TRUE;
            break;
        }
    }

    if(!iAllowed)
    {
        SendMessageToPC(oPC, "There is no resonance for this relic within the area...");
        return;
    }

    // Apply effects if in allowed area
    effect eImmunityAcid = EffectDamageImmunityIncrease(DAMAGE_TYPE_ACID, 50);
    effect eImmunitySlash = EffectDamageImmunityIncrease(DAMAGE_TYPE_SLASHING, 10);
    effect eImmunityPierce = EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING, 10);
    effect eVulnerabilityBludgeon = EffectDamageImmunityDecrease(DAMAGE_TYPE_BLUDGEONING, 10);
    
    // Visual effects
    effect eVFX1 = EffectVisualEffect(1540);
    effect eVFX2 = EffectVisualEffect(558);
    effect eVFX3 = EffectVisualEffect(786);

    // Apply effects for 30 minutes
    float fDuration = 1800.0;
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmunityAcid, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmunitySlash, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eImmunityPierce, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVulnerabilityBludgeon, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX1, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX2, oPC, fDuration);
    ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eVFX3, oPC, fDuration);
    AssignCommand(oPC, ActionSpeakString("<c s >[A crude, oozing substance begins to wrap itself around the surface of </c>" + sPCName + "<c s > drenching them in slime...</c>"));
}
