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.

int X2PreSpellCastCode();

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

categories:  Spells Functions


author: ShaDoOoW, editor: Mistress