InvokeSpellOnTarget
At the time a spell is cast all of the spell's special abilities scripts by this name are called and their return values are ignored. These scripts probably will add or delete Special Abilities to/from the target. For example, the "Sleep" spell might have a script that adds the Special Ability named "Sleeping" to the target. An "Awaken" spell would remove the Special Ability named "Sleeping".
Parameters
Parameter [5] = target x
Parameter [6] = target y
Context
Attacker - character - the character casting the spell
Target - character - the target of the spell
Spell - the spell that was cast