PoA_PRC8/_module/_removed files/vat_stripdmfi.nss
Jaysyn904 151d074880 Added "Removed Files" folder
Added "Removed Files" folder in case we needed to review any of them.
2022-10-10 10:39:34 -04:00

29 lines
755 B
Plaintext

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