IPGetTargetedOrEquippedMeleeWeapon

From NWN Lexicon


Contents

[edit] IPGetTargetedOrEquippedMeleeWeapon()

Returns the equipped melee weapon of a spell target.

[edit] Description

This function is to be used within a spell script.

If the spell target is an item, the function checks whether the item is a melee weapon and returns the weapon on a successful check. The weapon need not be equipped.

If the spell target is a creature, the function checks whether the creature has a melee weapon equipped and returns it.

If the targeted creature has no melee weapon equipped or the targeted item is not a melee weapon, OBJECT_INVALID is returned.



[edit] Remarks

This function only produces reliable results if called from a spell script. It calls #include index for more details.


[edit] Requirements

#include " x2_inc_itemprop "


[edit] Version

1.6?

[edit] See Also

functions: 

IPGetTargetedOrEquippedArmor

constants: 

BASE_ITEM_*



author: motu99, editor: Mistress

Personal tools
Categories