The GetSpellTargetLocation()
NWScript command returns the location at which the caller's last spell was cast. This command is valid only when used in a spell's impact script.
Definition[]
location GetSpellTargetLocation (
)
If the last spell targeted an object, the location of that object is returned.