#include "inc_levelset"

void main()
{
    object oTarget = GetPCSpeaker();
    int iFoundItemFlag = 0;
    //for testing
    //AssignCommand(oTarget, SpeakString("stripInventory fired"));

    //valid only for creatures
    //if ( GetObjectType(oTarget) != OBJECT_TYPE_CREATURE) return;

    // set the variables
    int i;
    object oItem = GetFirstItemInInventory(oTarget);

    // destroy unequipped items in inventory
    while ( GetIsObjectValid(oItem) )
        {
        if (GetIsDMFI(oItem))
            {
            DestroyObject(oItem);
            iFoundItemFlag = 1;
            }
        oItem = GetNextItemInInventory(oTarget);
        }
    if (iFoundItemFlag = 0) FloatingTextStringOnCreature("No DMFI items found.", oTarget, FALSE);
}
