Author Sticky: Post Working Scripts Here
Jaga Posted: Sunday, 30 June 01:50AM
Script that will parse an entire player's inventory, including worn items, and set all pieces to Identified. Items that were unidentified and worn, are identified and unworn.

This can protect your server against people using Local Characters with unidentified items from circumventing cost/level restrictions you've set. Cost on an unidentified item is way lower than when it is identified.


Code:
///////////////////////////////////////////////////

// Forces all player inventory to become Identified

// Created by: Jaga Te'lesin

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

int IdPlayerInv(object oPlayer)

{

    int nIndex = 0;

    object oItem = GetFirstItemInInventory(oPlayer);

    while(oItem != OBJECT_INVALID)

    {

        SetIdentified(oItem,1);

        oItem = GetNextItemInInventory(oPlayer);

    }

    oItem = GetItemInSlot(nIndex,oPlayer);

    while(oItem != OBJECT_INVALID)

    {

        SetIdentified(oItem,1);

        ++nIndex;

        oItem = GetItemInSlot(nIndex,oPlayer);

    }

    return 1;

}



_________________
-= Jaga