Scriptname zzzTeleportSpellPCScript extends activemagiceffect  

Location Property zzzTeleportSpellPCLocation  Auto  

ObjectReference Property zzzTeleportSpellPCXMH  Auto  

ObjectReference Property zzzTeleportSpellPCXM  Auto  

Event OnEffectStart(Actor Target, Actor Caster)
	If (Caster.GetCurrentLocation() != zzzTeleportSpellPCLocation)
		zzzTeleportSpellPCXM.MoveTo(Caster)
		Caster.MoveTo(zzzTeleportSpellPCXMH)
	Else
		Caster.MoveTo(zzzTeleportSpellPCXM)
	EndIf
EndEvent