IPGetHasItemPropertyOnCharacter
From NWN Lexicon
Contents |
[edit] IPGetHasItemPropertyOnCharacter(object, int)
Returns whether a character has an item with a certain itemproperty type equipped.
int IPGetHasItemPropertyOnCharacter( object oPC, int nItemPropertyConst );
[edit] Parameters
oPC
Character to check for itemproperty.
nItemPropertyConst
[edit] Description
Returns TRUE if a character has any item equipped that has the itemproperty defined in nItemPropertyConst in it (ITEM_PROPERTY_* constant)
[edit] Remarks
This function performs a lot of loops, so you might want to be a little careful using it too often.
[edit] Known Bugs
Confirmed as of patch 1.61, this function does not check the left hand (offhand) item equipped by oPC.
[edit] Requirements
#include " x2_inc_itemprop "
[edit] Version
1.61
[edit] Example
<nowiki>#include "x2_inc_itemprop" </nowiki> //The NPC doesn't like people with vampiric regeneration on their items //put this on the line the NPC will speak if the PC does NOT have vampiric regen int StartingConditional() { object oPC=GetPCSpeaker(); return !IPGetHasItemPropertyOnCharacter(oPC, ITEM_PROPERTY_REGENERATION_VAMPIRIC); }
[edit] See Also
constants: |
author: Lilac Soul, additional contributor(s): Stefan Vitz