Neverwinter Nights > NwN Building

Strange happenings without filter

(1/2) > >>

Razor Blade:
Oke when i enter my module where there is no filter! i loose my helmet and more importantly my keys that i made for some doors that can only be openend with the key.. how come the keys are being removed in the module without no filter??

CleTus:
What's on your onenter? onclient enter, or onarea enter.

Razor Blade:
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);
}

Tea-cup:
Before I start looking, what's on your helmet? That may already help a bit.

-Mel

Tea-cup:
It filters (destorys) items with darkvision and keen. A helm that has trueseeing on gs (ie. 6 darkvisions) gets destroyed by it. A weapon with keen will get destroyed too.

You can just delete these two lines to get rid of it:
--- Code: ---|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_DARKVISION) == TRUE
|| GetItemHasItemProperty(oItem, ITEM_PROPERTY_KEEN) == TRUE
--- End code ---

-Mel

Navigation

[0] Message Index

[#] Next page

Go to full version