GetSpellUsesLeft(object, int, int, int, int)

From NWN Lexicon
Jump to navigationJump to search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.

Gets the amount of uses a spell has left.

void GetSpellUsesLeft(
    object oCreature,
    int nClassType,
    int nSpellId,
    int nMetaMagic = METAMAGIC_NONE,
    int nDomainLevel = 0
);

Parameters

oCreature
The creature for whom to adjust the spell book.
nClassType
A CLASS_TYPE_* constant. Must be a MemorizesSpells class.
nSpellId
A SPELL_* constant.
nMetaMagic
A METAMAGIC_* constant.
nDomainLevel
The domain level, if a domain spell. Use 0 if not a domain spell.


Description

Gets the amount of uses a spell has left.

Returns: the amount of spell uses left (0 on error).


Remarks

As noted domain spells cannot be cantrips (level 0).


Version

This function was added in 1.87.8193.35 of NWN:EE.


Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.


See Also

functions:

GetSpellLevelByClass()

constants:

CLASS_TYPE_* METAMAGIC_* SPELL_*


 author: Shadguy