UW2_PRC8/_module/nss/remove_ips_oc.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

39 lines
976 B
Plaintext

/*--------------------------------------------------------
Script Name: remove_ips_oc
----------------------------------------------------------
Created By: Genisys(Guile)
Created On: 5/1/09
----------------------------------------------------------
This goes in the OnClose event of a placeable object with
an inventory, it will remove all item properties from all
items left within!
----------------------------------------------------------*/
void RemoveAllIPs(object oItem)
{
itemproperty i = GetFirstItemProperty(oItem);
while(GetIsItemPropertyValid(i))
{
RemoveItemProperty(oItem, i);
i = GetNextItemProperty(oItem);
}
}
void main()
{
object o = OBJECT_SELF;
location l = GetLocation(o);
object oItem = GetFirstItemInInventory(o);
while(GetIsObjectValid(oItem))
{
RemoveAllIPs(oItem);
oItem = GetNextItemInInventory(o);
}
effect eVis = EffectVisualEffect(VFX_IMP_UNSUMMON, FALSE);
ApplyEffectAtLocation(DURATION_TYPE_INSTANT, eVis, l, 0.0f);
}