EventSpellCastAt

EventSpellCastAt is a NWScript function that creates an OnSpellCastAt event to be sent to a creature, door, or placeable, indicating that the specified spell has been cast by the specified creature. This function only creates the event; to actually trigger the event, this function's return value must be passed to SignalEvent.

This function does not cause a spell to be cast. Rather, it is intended to be used to notify the target of a spell about the spell as it is cast, usually from within the spell's script.

Definition

 * : Specifies the creature casting the spell.
 * : Specifies the spell that was cast.
 * : If, this indicates that the spell is not harmful/hostile.

The script handling the OnSpellCastAt event can retrieve  with GetLastSpellCaster,   with GetLastSpell, and   with GetLastSpellHarmful.