Wikia

NWN2Wiki

GetHasSpell

Talk0
3,772pages on
this wiki
// Determines the number of times that oCreature has nSpell memorised.
// - nSpell: SPELL_*
// - oCreature
int GetHasSpell(int nSpell, object oCreature=OBJECT_SELF);


NOTE: When using this function on a wizard or cleric and checking for summon creature spells, 1-9 it works very wonky. 1) It will only look at level 1 spell slots. 2) It will only look at spell slots occupied. 3) The output result is calculated by the following strange formula:

   Sum of the squares of similar spells.  To clarify:

Let's say I have 5 level 1 spell slots. If each spell in the 5 slots is unique, output is 5. If I have 5 magic missiles prepared, output is 25. If I have 3 magic missiles and 2 Charm Peron spells, output is 3^2 + 2^2 = 13 This strange formula is used ONLY when checking whether the cleric or wizard has summon creature spells 1-9

Advertisement | Your ad here

Videos

Remove video
Are you sure you want to remove this video from the Videos list?
Please wait wile we are removing the video
Error occurred while loading data. Please recheck your connection and refesh the page.
3 Videos on this wiki
Add a video
1 of 1

Photos

Add a Photo
1,439photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki