Scriptname SuH_spellES_petself extends activemagiceffect  

SuH_Fun property _Fun auto
DialogueFollowerScript Property DialogueFollower Auto
Quest Property pDialogueFollower  Auto
GlobalVariable property SuH_PETactive auto
GlobalVariable property SuH_PETactivedog auto
GlobalVariable property SuH_PETactivewolf auto
GlobalVariable property SuH_PETactivehorse auto
GlobalVariable property SuH_PETactiveskeever auto
GlobalVariable property SuH_PETactivefamiliar auto
GlobalVariable property SuH_PETactivebear auto
GlobalVariable property SuH_PETactivesabrecat auto
GlobalVariable property SuH_PETactivedraugr auto
GlobalVariable property SuH_PETactivetroll auto
GlobalVariable property SuH_PETactivespriggan auto
GlobalVariable property SuH_PETactivehorker auto
GlobalVariable property SuH_PETactivefalmer auto
GlobalVariable property SuH_PETdogunlock auto
GlobalVariable property SuH_PETwolfunlock auto
GlobalVariable property SuH_PEThorseunlock auto
GlobalVariable property SuH_PETskeeverunlock auto
GlobalVariable property SuH_PETfamiliarunlock auto
GlobalVariable property SuH_PETbearunlock auto
GlobalVariable property SuH_PETsabrecatunlock auto
GlobalVariable property SuH_PETdraugrunlock auto
GlobalVariable property SuH_PETtrollunlock auto
GlobalVariable property SuH_PETsprigganunlock auto
GlobalVariable property SuH_PEThorkerunlock auto
GlobalVariable property SuH_PETfalmerunlock auto
GlobalVariable property SuH_PETactivehusky auto
GlobalVariable property SuH_PEThuskyunlock auto
GlobalVariable property SuH_PETactivebristle auto
GlobalVariable property SuH_PETbristleunlock auto
GlobalVariable property SuH_PETactiveseeker auto
GlobalVariable property SuH_PETseekerunlock auto
GlobalVariable property SuH_PETactivegargoyle auto
GlobalVariable property SuH_PETgargoyleunlock auto
GlobalVariable property SuH_PETactivenetch auto
GlobalVariable property SuH_PETnetchunlock auto
GlobalVariable property SuH_PETactiveriekling auto
GlobalVariable property SuH_PETrieklingunlock auto
GlobalVariable property SuH_PETactivespider auto
GlobalVariable property SuH_PETspiderunlock auto

ObjectReference Property SuH_realm_petreturnbear Auto 
ObjectReference Property SuH_realm_petreturnbristle Auto 
ObjectReference Property SuH_realm_petreturndog Auto 
ObjectReference Property SuH_realm_petreturndraugr Auto 
ObjectReference Property SuH_realm_petreturnfalmer Auto 
ObjectReference Property SuH_realm_petreturnfamiliar Auto 
ObjectReference Property SuH_realm_petreturngargoyle Auto 
ObjectReference Property SuH_realm_petreturnhorker Auto 
ObjectReference Property SuH_realm_petreturnhorse Auto 
ObjectReference Property SuH_realm_petreturnhusky Auto 
ObjectReference Property SuH_realm_petreturnwolf Auto 
ObjectReference Property SuH_realm_petreturnskeever Auto 
ObjectReference Property SuH_realm_petreturnnetch Auto 
ObjectReference Property SuH_realm_petreturnriekling Auto 
ObjectReference Property SuH_realm_petreturnsabrecat Auto 
ObjectReference Property SuH_realm_petreturnseeker Auto 
ObjectReference Property SuH_realm_petreturnspriggan Auto 
ObjectReference Property SuH_realm_petreturntroll Auto 
ObjectReference Property SuH_realm_petreturnspider Auto 

Actor property PlayerRef auto
Actor property SuH_actor_dog auto
Actor property SuH_actor_wolf auto
Actor property SuH_actor_horse auto
Actor property SuH_actor_skeever auto
actor property SuH_actor_familiar auto
actor property SuH_actor_bear auto
actor property SuH_actor_sabrecat auto
actor property SuH_actor_draugr auto
actor property SuH_actor_troll auto
actor property SuH_actor_spriggan auto
actor property SuH_actor_horker auto
actor property SuH_actor_falmer auto
actor property SuH_actor_husky auto
actor property SuH_actor_bristle auto
actor property SuH_actor_seeker auto
actor property SuH_actor_gargoyle auto
actor property SuH_actor_netch auto
actor property SuH_actor_riekling auto
actor property SuH_actor_spider auto
Message property SuH_menu_petself auto

; Pets Menu
; 0 Train Pet
; 1 Summon Random Pet
; 2 Summon Horse Pet
; 3 Return Pet
; 4 Cancel

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if akCaster == PlayerRef
		String activepet = "none"
		string sumpet = "none"
		int desumpet = 0
		;ent/ Find Active Pet
		if SuH_PETactivedog.GetValue()
			activepet = "dog"
		elseif SuH_PETactivewolf.GetValue()
			activepet = "wolf"
		elseif SuH_PETactivehorse.GetValue()
			activepet = "horse"
		elseif SuH_PETactiveskeever.GetValue()
			activepet = "skeever"
		elseif SuH_PETactivefamiliar.GetValue()
			activepet = "familiar"
		elseif SuH_PETactivebear.GetValue()
			activepet = "bear"
		elseif SuH_PETactivesabrecat.GetValue()
			activepet = "sabrecat"
		elseif SuH_PETactivedraugr.GetValue()
			activepet = "draugr"
		elseif SuH_PETactivetroll.GetValue()
			activepet = "troll"
		elseif SuH_PETactivespriggan.GetValue()
			activepet = "spriggan"
		elseif SuH_PETactivehorker.GetValue()
			activepet = "horker"
		elseif SuH_PETactivefalmer.GetValue()
			activepet = "falmer"
		elseif SuH_PETactivehusky.GetValue()
			activepet = "husky"
		elseif SuH_PETactivebristle.GetValue()
			activepet = "bristle"
		elseif SuH_PETactiveseeker.GetValue()
			activepet = "seeker"
		elseif SuH_PETactivegargoyle.GetValue()
			activepet = "gargoyle"
		elseif SuH_PETactivenetch.GetValue()
			activepet = "netch"
		elseif SuH_PETactiveriekling.GetValue()
			activepet = "riekling"
		elseif SuH_PETactivespider.GetValue()
			activepet = "spider"
		endIf
		;end/
		Int i = SuH_menu_petself.Show()
		;ent/ Train Pet
		if i == 0
			if activepet == "none"
				Debug.Notification("Train Pet - No active pets found!")
			elseif activepet == "dog"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_dog
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "wolf"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_wolf
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "horse"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_horse
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "skeever"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_skeever
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "familiar"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_familiar
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "bear"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_bear
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "sabrecat"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_sabrecat
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "draugr"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_draugr
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "troll"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_troll
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "spriggan"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_spriggan
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "horker"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_horker
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "falmer"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_falmer
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "husky"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_husky
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "bristle"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_bristle
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "seeker"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_seeker
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "gargoyle"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_gargoyle
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "netch"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_netch
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "riekling"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_riekling
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			elseif activepet == "spider"
				actor[] animActor = new actor[2]
				animActor[0] = SuH_actor_spider
				animActor[1] = PlayerRef
				_Fun.ANIMcalc(animActor)
			else
				Debug.Notification("Train Pet - No active pets found!")
			endIf
		;end/
		;ent/ Summon Random Pet
		elseif i == 1
			int chkdog = 0 ;0 Pet Values (unchecked/rolled/invalid)
			int chkwolf = 0 ;1
			int chkhorse = 0 ;2
			int chkskeever = 0 ;3
			int chkfamiliar = 0 ;4
			int chkbear = 0 ;5
			int chksabrecat = 0 ;6
			int chkdraugr = 0 ;7
			int chktroll = 0 ;8
			int chkspriggan = 0 ;9
			int chkhorker = 0 ;10
			int chkfalmer = 0 ;11
			int chkhusky = 0 ;12
			int chkbristle = 0 ;13
			int chkseeker = 0 ;14
			int chkgargoyle = 0 ;15
			int chknetch = 0 ;16
			int chkriekling = 0 ;17
			int chkspider = 0 ;18
			int chkcount = 0 ; Times we've 'checked' for a valid pet
			int chkavail = 0 ; Valid Pet checks we have available
			int chkfail = 0 ; Invalid Pet checks
			int chkrand = 0 ; Have we checked the rolled pet?
			int petFound = 0 ; Have we found a pet to summon?
			int reroll = 1 ; Should we reroll for a pet?
			int x = 0 ; Common Variable
			; NOTES : chkpet has 3 values [0=unchecked][1=checked but rolled out][2=unavailable]
			while reroll != 0
				chkavail = 19 - chkfail ; # of pets (0 counts as 1)
				chkcount = 0
				chkrand = 0
				int rand = Utility.RandomInt(0,chkavail) ; Select Random Pet
				
				if chkrand == 0 && chkdog != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETdogunlock.GetValue()
							if SuH_PETactivedog.GetValue()
								chkdog = 2
								chkfail += 1
							else
								sumpet = "dog"
								petFound = 1
							endIf
						else
							chkdog = 2
							chkfail += 1
						endIf
					else
						chkdog = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkwolf != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETwolfunlock.GetValue()
							if SuH_PETactivewolf.GetValue()
								chkwolf = 2
								chkfail += 1
							else
								sumpet = "wolf"
								petFound = 1
							endIf
						else
							chkwolf = 2
							chkfail += 1
						endIf
					else
						chkwolf = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkhorse != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PEThorseunlock.GetValue()
							if SuH_PETactivehorse.GetValue()
								chkhorse = 2
								chkfail += 1
							else
								sumpet = "horse"
								petFound = 1
							endIf
						else
							chkhorse = 2
							chkfail += 1
						endIf
					else
						chkhorse = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkskeever != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETskeeverunlock.GetValue()
							if SuH_PETactiveskeever.GetValue()
								chkskeever = 2
								chkfail += 1
							else
									sumpet = "skeever"
									petFound = 1
							endIf
						else
							chkskeever = 2
							chkfail += 1
						endIf
					else
						chkskeever = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkfamiliar != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETfamiliarunlock.GetValue()
							if SuH_PETactivefamiliar.GetValue()
								chkfamiliar = 2
								chkfail += 1
							else
									sumpet = "familiar"
									petFound = 1
							endIf
						else
							chkfamiliar = 2
							chkfail += 1
						endIf
					else
						chkfamiliar = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkbear != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETbearunlock.GetValue()
							if SuH_PETactivebear.GetValue()
								chkbear = 2
								chkfail += 1
							else
									sumpet = "bear"
									petFound = 1
							endIf
						else
							chkbear = 2
							chkfail += 1
						endIf
					else
						chkbear = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chksabrecat != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETsabrecatunlock.GetValue()
							if SuH_PETactivesabrecat.GetValue()
								chksabrecat = 2
								chkfail += 1
							else
									sumpet = "sabrecat"
									petFound = 1
							endIf
						else
							chksabrecat = 2
							chkfail += 1
						endIf
					else
						chksabrecat = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkdraugr != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETdraugrunlock.GetValue()
							if SuH_PETactivedraugr.GetValue()
								chkdraugr = 2
								chkfail += 1
							else
									sumpet = "draugr"
									petFound = 1
							endIf
						else
							chkdraugr = 2
							chkfail += 1
						endIf
					else
						chkdraugr = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chktroll != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETtrollunlock.GetValue()
							if SuH_PETactivetroll.GetValue()
								chktroll = 2
								chkfail += 1
							else
									sumpet = "troll"
									petFound = 1
							endIf
						else
							chktroll = 2
							chkfail += 1
						endIf
					else
						chktroll = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkspriggan != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETsprigganunlock.GetValue()
							if SuH_PETactivespriggan.GetValue()
								chkspriggan = 2
								chkfail += 1
							else
									sumpet = "spriggan"
									petFound = 1
							endIf
						else
							chkspriggan = 2
							chkfail += 1
						endIf
					else
						chkspriggan = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkhorker != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PEThorkerunlock.GetValue()
							if SuH_PETactivehorker.GetValue()
								chkhorker = 2
								chkfail += 1
							else
									sumpet = "horker"
									petFound = 1
							endIf
						else
							chkhorker = 2
							chkfail += 1
						endIf
					else
						chkhorker = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkfalmer != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETfalmerunlock.GetValue()
							if SuH_PETactivefalmer.GetValue()
								chkfalmer = 2
								chkfail += 1
							else
									sumpet = "falmer"
									petFound = 1
							endIf
						else
							chkfalmer = 2
							chkfail += 1
						endIf
					else
						chkfalmer = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkhusky != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PEThuskyunlock.GetValue()
							if SuH_PETactivehusky.GetValue()
								chkhusky = 2
								chkfail += 1
							else
									sumpet = "husky"
									petFound = 1
							endIf
						else
							chkhusky = 2
							chkfail += 1
						endIf
					else
						chkhusky = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkbristle != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETbristleunlock.GetValue()
							if SuH_PETactivebristle.GetValue()
								chkbristle = 2
								chkfail += 1
							else
									sumpet = "bristle"
									petFound = 1
							endIf
						else
							chkbristle = 2
							chkfail += 1
						endIf
					else
						chkbristle = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkseeker != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETseekerunlock.GetValue()
							if SuH_PETactiveseeker.GetValue()
								chkseeker = 2
								chkfail += 1
							else
									sumpet = "seeker"
									petFound = 1
							endIf
						else
							chkseeker = 2
							chkfail += 1
						endIf
					else
						chkseeker = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkgargoyle != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETgargoyleunlock.GetValue()
							if SuH_PETactivegargoyle.GetValue()
								chkgargoyle = 2
								chkfail += 1
							else
									sumpet = "gargoyle"
									petFound = 1
							endIf
						else
							chkgargoyle = 2
							chkfail += 1
						endIf
					else
						chkgargoyle = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chknetch != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETnetchunlock.GetValue()
							if SuH_PETactivenetch.GetValue()
								chknetch = 2
								chkfail += 1
							else
									sumpet = "netch"
									petFound = 1
							endIf
						else
							chknetch = 2
							chkfail += 1
						endIf
					else
						chknetch = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkriekling != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETrieklingunlock.GetValue()
							if SuH_PETactiveriekling.GetValue()
								chkriekling = 2
								chkfail += 1
							else
									sumpet = "riekling"
									petFound = 1
							endIf
						else
							chkriekling = 2
							chkfail += 1
						endIf
					else
						chkriekling = 1
						chkcount += 1
					endIf
				endIf
				if chkrand == 0 && chkspider != 2
					if chkcount == rand
						chkrand = 1
						if SuH_PETspiderunlock.GetValue()
							if SuH_PETactivespider.GetValue()
								chkspider = 2
								chkfail += 1
							else
									sumpet = "spider"
									petFound = 1
							endIf
						else
							chkspider = 2
							chkfail += 1
						endIf
					else
						chkspider = 1
						chkcount += 1
					endIf
				endIf
				
				if petFound == 1
					reroll = 0
				elseif chkfail >= 18
					reroll = 0
					debug.Notification("Succubus Heart - No valid pets found!")
				endIf
			endWhile
			
			if sumpet != "none"
			endIf
		;end/
		;ent/ Summon Horse Pet
		elseif i == 2
			sumpet = "none"
			int x = 0
			if SuH_PETactivehorse.GetValue()
			else
				if SuH_PEThorseunlock.GetValue()
					sumpet = "horse"
				else
					debug.Notification("Succubus Heart - No valid pets found!")
				endIf
			endIf
		;end/
		;ent/ Return Pet
		elseif i == 3
			desumpet = 1
		;end/
		;ent/ Cancel
		else
		;end/
		endIf
		
		if sumpet != "none"
			;desummon
			if activepet != "none"
				If activepet == "dog"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_dog.MoveTo(SuH_realm_petreturndog)
					SuH_PETactivedog.SetValue(0)
				elseif activepet == "wolf"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_wolf.MoveTo(SuH_realm_petreturnwolf)
					SuH_PETactivewolf.SetValue(0)
				elseif activepet == "horse"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_horse.MoveTo(SuH_realm_petreturnhorse)
					SuH_PETactivehorse.SetValue(0) 
				elseif activepet == "skeever"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_skeever.MoveTo(SuH_realm_petreturnskeever)
					SuH_PETactiveskeever.SetValue(0) 
				elseif activepet == "familiar"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_familiar.MoveTo(SuH_realm_petreturnfamiliar)
					SuH_PETactivefamiliar.SetValue(0) 
				elseif activepet == "bear"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_bear.MoveTo(SuH_realm_petreturnbear)
					SuH_PETactivebear.SetValue(0) 
				elseif activepet == "sabrecat"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_sabrecat.MoveTo(SuH_realm_petreturnsabrecat)
					SuH_PETactivesabrecat.SetValue(0) 
				elseif activepet == "draugr"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_draugr.MoveTo(SuH_realm_petreturndraugr)
					SuH_PETactivedraugr.SetValue(0) 
				elseif activepet == "troll"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_troll.MoveTo(SuH_realm_petreturntroll)
					SuH_PETactivetroll.SetValue(0) 
				elseif activepet == "spriggan"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_spriggan.MoveTo(SuH_realm_petreturnspriggan)
					SuH_PETactivespriggan.SetValue(0) 
				elseif activepet == "horker"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_horker.MoveTo(SuH_realm_petreturnhorker)
					SuH_PETactivehorker.SetValue(0) 
				elseif activepet == "falmer"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_falmer.MoveTo(SuH_realm_petreturnfalmer)
					SuH_PETactivefalmer.SetValue(0) 
				elseif activepet == "husky"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_husky.MoveTo(SuH_realm_petreturnhusky)
					SuH_PETactivehusky.SetValue(0) 
				elseif activepet == "bristle"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_bristle.MoveTo(SuH_realm_petreturnbristle)
					SuH_PETactivebristle.SetValue(0) 
				elseif activepet == "seeker"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_seeker.MoveTo(SuH_realm_petreturnseeker)
					SuH_PETactiveseeker.SetValue(0) 
				elseif activepet == "gargoyle"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_gargoyle.MoveTo(SuH_realm_petreturngargoyle)
					SuH_PETactivegargoyle.SetValue(0) 
				elseif activepet == "netch"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_netch.MoveTo(SuH_realm_petreturnnetch)
					SuH_PETactivenetch.SetValue(0) 
				elseif activepet == "riekling"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_riekling.MoveTo(SuH_realm_petreturnriekling)
					SuH_PETactiveriekling.SetValue(0) 
				elseif activepet == "spider"
					(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
					SuH_actor_spider.MoveTo(SuH_realm_petreturnspider)
					SuH_PETactivespider.SetValue(0) 
				endIf
			endIf
			;summon
			if sumpet == "dog"
				SuH_actor_dog.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_dog)
				SuH_PETactivedog.SetValue(1)
				debug.Notification("Dog [Incubus] has been summoned!")
				activepet = "dog"
				_Fun.statPet("dog")
			elseif sumpet == "wolf"
				SuH_actor_wolf.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_wolf)
				SuH_PETactivewolf.SetValue(1)
				debug.Notification("Wolf [Incubus] has been summoned!")
				activepet = "wolf"
				_Fun.statPet("wolf")
			elseif sumpet == "horse"
				SuH_actor_horse.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_horse)
				SuH_PETactivehorse.SetValue(1)
				debug.Notification("Horse [Incubus] has been summoned!")
				activepet = "horse"
				_Fun.statPet("horse")
			elseif sumpet == "skeever"
				SuH_actor_skeever.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_skeever)
				SuH_PETactiveskeever.SetValue(1)
				debug.Notification("Skeever [Incubus] has been summoned!")
				activepet = "skeever"
				_Fun.statPet("skeever")
			elseif sumpet == "familiar"
				SuH_actor_familiar.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_familiar)
				SuH_PETactivefamiliar.SetValue(1)
				debug.Notification("Familiar [Incubus] has been summoned!")
				activepet = "familiar"
				_Fun.statPet("familiar")
			elseif sumpet == "bear"
				SuH_actor_bear.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_bear)
				SuH_PETactivebear.SetValue(1)
				debug.Notification("Bear [Incubus] has been summoned!")
				activepet = "bear"
				_Fun.statPet("bear")
			elseif sumpet == "sabrecat"
				SuH_actor_sabrecat.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_sabrecat)
				SuH_PETactivesabrecat.SetValue(1)
				debug.Notification("Sabre Cat [Incubus] has been summoned!")
				activepet = "sabrecat"
				_Fun.statPet("sabrecat")
			elseif sumpet == "draugr"
				SuH_actor_draugr.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_draugr)
				SuH_PETactivedraugr.SetValue(1)
				debug.Notification("Draugr [Incubus] has been summoned!")
				activepet = "draugr"
				_Fun.statPet("draugr")
			elseif sumpet == "spriggan"
				SuH_actor_spriggan.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_spriggan)
				SuH_PETactivespriggan.SetValue(1)
				debug.Notification("Spriggan [Succubus] has been summoned!")
				activepet = "spriggan"
				_Fun.statPet("spriggan")
			elseif sumpet == "horker"
				SuH_actor_horker.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_horker)
				SuH_PETactivehorker.SetValue(1)
				debug.Notification("Horker [Incubus] has been summoned!")
				activepet = "horker"
				_Fun.statPet("horker")
			elseif sumpet == "falmer"
				SuH_actor_falmer.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_falmer)
				SuH_PETactivefalmer.SetValue(1)
				debug.Notification("Falmer [Incubus] has been summoned!")
				activepet = "falmer"
				_Fun.statPet("falmer")
			elseif sumpet == "husky"
				SuH_actor_husky.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_husky)
				SuH_PETactivehusky.SetValue(1)
				debug.Notification("Husky [Incubus] has been summoned!")
				activepet = "husky"
				_Fun.statPet("husky")
			elseif sumpet == "bristle"
				SuH_actor_bristle.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_bristle)
				SuH_PETactivebristle.SetValue(1)
				debug.Notification("Bristle [Incubus] has been summoned!")
				activepet = "bristle"
				_Fun.statPet("bristle")
			elseif sumpet == "seeker"
				SuH_actor_seeker.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_seeker)
				SuH_PETactiveseeker.SetValue(1)
				debug.Notification("Seeker [Incubus] has been summoned!")
				activepet = "seeker"
				_Fun.statPet("seeker")
			elseif sumpet == "gargoyle"
				SuH_actor_gargoyle.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_gargoyle)
				SuH_PETactivegargoyle.SetValue(1)
				debug.Notification("Gargoyle [Incubus] has been summoned!")
				activepet = "gargoyle"
				_Fun.statPet("gargoyle")
			elseif sumpet == "netch"
				SuH_actor_netch.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_netch)
				SuH_PETactivenetch.SetValue(1)
				debug.Notification("Netch [Incubus] has been summoned!")
				activepet = "netch"
				_Fun.statPet("netch")
			elseif sumpet == "riekling"
				SuH_actor_riekling.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_riekling)
				SuH_PETactiveriekling.SetValue(1)
				debug.Notification("Riekling [Incubus] has been summoned!")
				activepet = "riekling"
				_Fun.statPet("riekling")
			elseif sumpet == "spider"
				SuH_actor_spider.MoveTo(PlayerRef)
				(DialogueFollower as DialogueFollowerScript).SetAnimal(SuH_actor_spider)
				SuH_PETactivespider.SetValue(1)
				debug.Notification("Spider [Incubus] has been summoned!")
				activepet = "spider"
				_Fun.statPet("spider")
			endIf
		elseif desumpet == 1
			If activepet == "dog"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_dog.MoveTo(SuH_realm_petreturndog)
				SuH_PETactivedog.SetValue(0)
			elseif activepet == "wolf"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_wolf.MoveTo(SuH_realm_petreturnwolf)
				SuH_PETactivewolf.SetValue(0)
			elseif activepet == "horse"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_horse.MoveTo(SuH_realm_petreturnhorse)
				SuH_PETactivehorse.SetValue(0) 
			elseif activepet == "skeever"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_skeever.MoveTo(SuH_realm_petreturnskeever)
				SuH_PETactiveskeever.SetValue(0) 
			elseif activepet == "familiar"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_familiar.MoveTo(SuH_realm_petreturnfamiliar)
				SuH_PETactivefamiliar.SetValue(0) 
			elseif activepet == "bear"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_bear.MoveTo(SuH_realm_petreturnbear)
				SuH_PETactivebear.SetValue(0) 
			elseif activepet == "sabrecat"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_sabrecat.MoveTo(SuH_realm_petreturnsabrecat)
				SuH_PETactivesabrecat.SetValue(0) 
			elseif activepet == "draugr"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_draugr.MoveTo(SuH_realm_petreturndraugr)
				SuH_PETactivedraugr.SetValue(0) 
			elseif activepet == "troll"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_troll.MoveTo(SuH_realm_petreturntroll)
				SuH_PETactivetroll.SetValue(0) 
			elseif activepet == "spriggan"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_spriggan.MoveTo(SuH_realm_petreturnspriggan)
				SuH_PETactivespriggan.SetValue(0) 
			elseif activepet == "horker"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_horker.MoveTo(SuH_realm_petreturnhorker)
				SuH_PETactivehorker.SetValue(0) 
			elseif activepet == "falmer"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_falmer.MoveTo(SuH_realm_petreturnfalmer)
				SuH_PETactivefalmer.SetValue(0) 
			elseif activepet == "husky"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_husky.MoveTo(SuH_realm_petreturnhusky)
				SuH_PETactivehusky.SetValue(0) 
			elseif activepet == "bristle"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_bristle.MoveTo(SuH_realm_petreturnbristle)
				SuH_PETactivebristle.SetValue(0) 
			elseif activepet == "seeker"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_seeker.MoveTo(SuH_realm_petreturnseeker)
				SuH_PETactiveseeker.SetValue(0) 
			elseif activepet == "gargoyle"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_gargoyle.MoveTo(SuH_realm_petreturngargoyle)
				SuH_PETactivegargoyle.SetValue(0) 
			elseif activepet == "netch"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_netch.MoveTo(SuH_realm_petreturnnetch)
				SuH_PETactivenetch.SetValue(0) 
			elseif activepet == "riekling"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_riekling.MoveTo(SuH_realm_petreturnriekling)
				SuH_PETactiveriekling.SetValue(0) 
			elseif activepet == "spider"
				(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
				SuH_actor_spider.MoveTo(SuH_realm_petreturnspider)
				SuH_PETactivespider.SetValue(0) 
			endIf
		endIf
	endIf
endEvent