
void StripItems(string sTag)
{
    if(GetIsPC(GetEnteringObject()))
    {
        object oPC = GetEnteringObject();
        if (GetLocalInt(oPC, "RitualEntered") != TRUE) {
                // Exports the character & Saves
            DelayCommand(0.5, ExportSingleCharacter(oPC));
            DelayCommand(0.5, DoSinglePlayerAutoSave());
                // Removes all subquests from this module
            RemoveJournalQuestEntry("Subquest_000", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_001", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_002", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_003", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_004", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_005", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_006", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_007", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_008", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_009", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_010", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_011", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_012", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_013", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_014", oPC, TRUE, TRUE);
            RemoveJournalQuestEntry("Subquest_015", oPC, TRUE, TRUE);
                // Adds the final quest entry & gives xp
            AddJournalQuestEntry("MAIN_QUEST", 10, oPC, TRUE, TRUE);
            GiveGoldToCreature(oPC, 1500);
                // makes the PC level 15 if they're not already (thanks Jassper)
            int nCurrentL = GetHitDice(oPC);
            int nLevelMax = 15;
            if(nCurrentL < nLevelMax)
                {
                int nXP = ((nLevelMax*(nLevelMax - 1))/2)*1000;
                SetXP(oPC,nXP);
                }
                // and if they are, give them 3k xp instead
            else {
                GiveXPToCreature(oPC, 3000);
                }
                // destroys all plot items from the PC
            object oItem = GetItemPossessedBy(oPC,sTag);
            if (GetIsObjectValid(oItem))
                {
            DestroyObject(oItem);
            DelayCommand(0.03,StripItems(sTag));
                }
                // Sets the int so it won't happen again if they somehow get back inside
            SetLocalInt(oPC, "RitualEntered", TRUE);
            }
    }
}
void main()
{
    object oTarget = GetEnteringObject();
    if(GetIsPC(oTarget))
    {
        StripItems("Agear");
        StripItems("Asmallgoldenkey");
        StripItems("Aspring");
        StripItems("Atatterednote");
        StripItems("Awheel");
        StripItems("AntechamberKey");
        StripItems("BluePaint");
        StripItems("CelithrarsSummoningChamberKey");
        StripItems("CellarKey");
        StripItems("ChaliceofLathander");
        StripItems("Recall_Item");
        StripItems("NoteforCalor");
        StripItems("NotefromKaleth");
        StripItems("OnTravel");
        StripItems("RedPaint");
        StripItems("ScrawledNote");
        StripItems("ShadowEstateKey");
        StripItems("SlaveCellKey");
        StripItems("SlaveCollarKey");
        StripItems("SmugglersHead");
        StripItems("TatteredNote");
        StripItems("seal005");
        StripItems("seal004");
        StripItems("seal003");
        StripItems("seal002");
        StripItems("seal001");
        StripItems("seal006");
        StripItems("VeliasBedroomKey");
        StripItems("YellowPaint");
        StripItems("BottleofWater");
        StripItems("GnomishCookingContraptionKey");
        StripItems("FlawlessDiamond");
        StripItems("AnOldJournal");
        StripItems("OnProtection");
        StripItems("OnUndeadSummoning");
        StripItems("OnHeirarchy");
        StripItems("SharDarkMistress");
        StripItems("HistoryofShadow");
        StripItems("CityofShadow");

    }
}


