Author Sticky: Post Working Scripts Here
ForgottenSoul Posted: Monday, 08 July 05:41PM
Maybe this has been done, but in another area of the boards it was requested. It loops through all the character items and destroys anything marked as a plot item. Useful for keeping those pesky super characters from having super plot items.

Just attach it to the "onEnter" of an area, or to the On Client Enter.

NWScript:
//::///////////////////////////////////////////////

//:: Name RemovePlotItems

//:: Copyright (c) 2002 ForgottenSoul

//:://////////////////////////////////////////////

/*

*/

//:://////////////////////////////////////////////

//:: Created By: Forgottensoul

//:: Created On: July 8, 2002

//:://////////////////////////////////////////////

void main()

{

    object oPC = GetEnteringObject();

    object currentItemInInv;

    object firstItemInInv;



    firstItemInInv = GetNextItemInInventory(oPC);

    currentItemInInv = firstItemInInv;

    // Insure they have at least one object

    if(currentItemInInv != OBJECT_INVALID)

    {

        do{

            // Check to see if it is a plot item.

            if(GetPlotFlag(currentItemInInv) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(currentItemInInv));

                SendMessageToPC(oPC,"has been removed because plot items have been known to " +

                    "be super/cheat weapons.");

                // it is a plot item. Destroy it.

                DestroyObject(currentItemInInv);

            }

            // get next item

            currentItemInInv = GetNextItemInInventory(oPC);

        // loop while we have a new item to check

        }while(currentItemInInv != OBJECT_INVALID &&

               currentItemInInv != firstItemInInv);

    }

}



_________________
Forgotten Soul
“You stand on the shoulders of giants and claim you are tall.”

[ Edited By ForgottenSoul: Monday, 08 July 05:42PM (GMT) ]