Scriptname aaUCRecall2SpellScript extends activemagiceffect  
{Script for the enhanced Recall spell.}

ObjectReference Property Marker1 Auto
{Marker 1}

ObjectReference Property Marker2 Auto
{Marker 2}

ObjectReference Property Marker3 Auto
{Marker 3}

ObjectReference Property Marker4 Auto
{Marker 4}

Message Property RecallMsg auto
{The Marker message}

EffectShader Property RecallEffect  Auto
{The effect shader}

EffectShader Property RecallEffect2  Auto
{The effect shader 2}

Actor caster
ObjectReference casterRef

Event OnEffectStart(Actor akTarget, Actor akCaster)

	Int iButton = RecallMsg.Show()

	If (iButton == 0)
		caster = akCaster
		casterRef = (caster as ObjectReference)
		RecallEffect.Play(akCaster, 1)
		utility.wait(2.5)
		akCaster.Moveto(Marker1)
		RecallEffect2.Play(akCaster, 1)

	ElseIf (iButton == 1)
		caster = akCaster
		casterRef = (caster as ObjectReference)
		RecallEffect.Play(akCaster, 1)
		utility.wait(2.5)
		akCaster.Moveto(Marker2)
		RecallEffect2.Play(akCaster, 1)

	ElseIf (iButton == 2)
		caster = akCaster
		casterRef = (caster as ObjectReference)
		RecallEffect.Play(akCaster, 1)
		utility.wait(2.5)
		akCaster.Moveto(Marker3)
		RecallEffect2.Play(akCaster, 1)

	ElseIf (iButton == 3)
		caster = akCaster
		casterRef = (caster as ObjectReference)
		RecallEffect.Play(akCaster, 1)
		utility.wait(2.5)
		akCaster.Moveto(Marker4)
		RecallEffect2.Play(akCaster, 1)

	ElseIf (iButton == 4)
		Return

	Endif

EndEvent