Author Sticky: Post Working Scripts Here
Invizible420 Posted: Tuesday, 09 July 11:49PM
-- DESTROY EQUIPED AND INVENTORY PLOT ITEMS ONLY / RID US OF THE LAMENESS OF SUPER CHARACTERS

I can't believe no one posted this script yet.
Mad props to Forgotten Soul for the code to destroy inventory plot items.

I'm not much of a 'scripter' so if you want to edit or make it more efficient; feel free. Just give credit where it is due. If you do make it better POST IT here, please!

What it does: You may or may not know that PLOT items can be used to make hacked/toolset/twinkted/cheat/level 61/uber (whatever u call it) weapons, armor, and items. This greatly compromises the gameplay of your module, allowing twinkies (uber) characters to come in and pummel everone else. Well no longer, this script will go through a player's equiped items and inventory and look for any plot items; send a message to the player, then destroy the items. If they have no plot items, it does nothing. Oh yeah, this also means NO INFINITE TIMESTOPPING/SPELLCASTING!! YEA!

At last we can play mods with our own local characters and not have to deal with any super cheated players. Anyways, heres the script. Put it in the MODULE'S ON CLIENT ENTER:

If they don't cheat then they have nothing to worry about.

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

// ANTI-TWINK SCRIPT //

///////////////////////

void main()

{

    object oPC = GetEnteringObject();

    object oSlot1 = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC);

    object oSlot2 = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC);

    object oSlot3 = GetItemInSlot(INVENTORY_SLOT_BELT,oPC);

    object oSlot4= GetItemInSlot(INVENTORY_SLOT_BOLTS,oPC);

    object oSlot5= GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC);

    object oSlot6= GetItemInSlot(INVENTORY_SLOT_BULLETS,oPC);

    object oSlot7= GetItemInSlot(INVENTORY_SLOT_CARMOUR,oPC);

    object oSlot8= GetItemInSlot(INVENTORY_SLOT_CHEST,oPC);

    object oSlot9= GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC);

    object oSlot10 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_B,oPC);

    object oSlot11 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_L,oPC);

    object oSlot12 = GetItemInSlot(INVENTORY_SLOT_CWEAPON_R,oPC);

    object oSlot13 = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC);

    object oSlot14 = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC);

    object oSlot15 = GetItemInSlot(INVENTORY_SLOT_LEFTRING,oPC);

    object oSlot16 = GetItemInSlot(INVENTORY_SLOT_NECK,oPC);

    object oSlot17 = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC);

    object oSlot18 = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC);

    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);

    }

else

    // Check Slots for Plot Items

    if(GetPlotFlag(oSlot1) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot1));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot1);

            }

    if(GetPlotFlag(oSlot2) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot2));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot2);

             }

    if(GetPlotFlag(oSlot3) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot3));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot3);

             }

    if(GetPlotFlag(oSlot4) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot4));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot4);

             }

    if(GetPlotFlag(oSlot5) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot5));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot5);

             }

    if(GetPlotFlag(oSlot6) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot6));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot6);

             }

    if(GetPlotFlag(oSlot7) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot7));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot7);

             }

    if(GetPlotFlag(oSlot8) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot8));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot8);

             }

    if(GetPlotFlag(oSlot9) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot9));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot9);

             }

    if(GetPlotFlag(oSlot10) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot10));

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

                    "be illegal/cheat items..");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot10);

             }

    if(GetPlotFlag(oSlot11) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot11));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot11);

             }

    if(GetPlotFlag(oSlot12) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot12));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot12);

             }

    if(GetPlotFlag(oSlot13) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot13));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot13);

             }

    if(GetPlotFlag(oSlot14) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot14));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot14);

             }

    if(GetPlotFlag(oSlot15) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot15));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot15);

             }

    if(GetPlotFlag(oSlot16) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot16));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot16);

             }

    if(GetPlotFlag(oSlot17) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot17));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot17);

             }

    if(GetPlotFlag(oSlot18) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot18));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot18);

             }

    if(GetPlotFlag(oSlot1) == TRUE)

            {

                // Be nice an inform player why items is gone

                SendMessageToPC(oPC,"Plot Object:");

                SendMessageToPC(oPC,GetName(oSlot1));

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

                    "be illegal/cheat items.");

                // it is a plot item. Destroy it.

                DestroyObject(oSlot1);

//Lots of Ramble

            }

}



Unfortunetly, if a plot item is required for specific module; it also will be destroyed when the player re-enters. Stick with vaulted chars