Nevermind i had a filter on my mod lol hehe forgot about it but i can't find in it why it distroys my helmet?? can someone find in it what's wrong?
void main()
{
{
object oPC = GetEnteringObject();
string sEnteringPC = GetPCPlayerName(oPC);
{
object oItem;
int nCount;
oItem = GetFirstItemInInventory(oPC);
while ( GetIsObjectValid(oItem) == TRUE)
{
/*Items in inventory with the following properties will be destroyed
(to allow a property listed toggle the corresponding flag [i.e. TRUE to FALSE])*/
if ((GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) == TRUE)
|| GetPlotFlag(oItem) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_FEAT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPELL_RESISTANCE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC)== TRUE )
{
DestroyObject(oItem);
}
oItem = GetNextItemInInventory(oPC);
}
for ( nCount = 0; nCount < NUM_INVENTORY_SLOTS; nCount++ )
{
oItem = GetItemInSlot(nCount,oPC);
/*Equipped items with the following properties will be destroyed
(to allow a property listed toggle the corresponding flag [i.e. TRUE to FALSE])*/
if ((GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_ALIGNMENT_GROUP) == TRUE)
|| GetPlotFlag(oItem) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_AC_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_BONUS_FEAT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_REDUCTION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_RESISTANCE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_VULNERABILITY) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_ABILITY_SCORE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_AC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SAVING_THROWS_SPECIFIC) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DECREASED_SKILL_MODIFIER) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELL_SCHOOL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMMUNITY_SPELLS_BY_LEVEL) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_IMPROVED_EVASION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_SPELL_RESISTANCE) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ATTACK_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DAMAGE_BONUS_VS_SPECIFIC_ALIGNMENT) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_ALIGNMENT_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_ENHANCEMENT_BONUS_VS_RACIAL_GROUP) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_REGENERATION_VAMPIRIC)== TRUE )
{
DestroyObject(oItem);
}
if(GetPlotFlag(oPC) == TRUE)
{
SetPlotFlag(oPC,FALSE);
}