X2PreSpellCastCode
From NWN Lexicon
Jump to navigationJump to search
X2PreSpellCastCode()
This function hooks all default spell scripts and is used for procedures related to all spells or for block the spell code to be executed.
Description
If this function return FALSE, then the spell script which called this function end immediately.
By default, this function performs:
- run custom spell hook script
- use magic device (UMD) skill check when casted from scrolls
- horse system check to block polymorph spells while mounted
- run script with tag of item if any
- check, if item is valid target, eg. blank scroll
Remarks
To set up custom spell hook script, you have to define string variable X2_S_UD_SPELLSCRIPT on module either manually or with script.
Requirements
#include " x2_inc_spellhook "
Version
1.69
See Also
author: ShaDoOoW, editor: Mistress