Scriptname SpawnVampireHunter extends activemagiceffect

ActorBase Property LvlVampireHunter Auto
ActorBase Property VampireVigilantTolan Auto
ActorBase Property VampireWEAssassinDarkElfM Auto
ActorBase Property VampireWEAssassinKhajiitF Auto
ActorBase Property VampireWEAssassinArgonianF Auto

Actor Property VampireHunter1 Auto
Actor Property VampireHunter2 Auto
Actor Property VampireHunter3 Auto
Actor Property VampireHunter4 Auto

Race Property DLC1VampireBeastRace Auto

Quest Property DLC1VQ02 Auto

Faction Property VampirePCHunters Auto

Spell Property DLC1RevertForm Auto
Spell Property DLC1SunFire Auto
Spell Property DLC1SunFire2 Auto

Static Property XMarker Auto

Perk Property VampireHunterIllusionImmune Auto

Int Property NecksBittenDiscovered Auto

GlobalVariable Property VampireHunters Auto
GlobalVariable Property VampireHuntersRevertVL Auto
GlobalVariable Property VampireCannotTurnVL Auto
GlobalVariable Property VampireTolanAttacks Auto
GlobalVariable Property VampireDawnguardInstalled Auto
GlobalVariable Property VampireHunterFactionRemoval Auto
GlobalVariable Property VampireNecksBittenDiscovered Auto

Float Property DayTime Auto

;==============================================================================================

Float Function GetCurrentTimeOfDay() 
 
	DayTime = Utility.GetCurrentGameTime()
	DayTime -= Math.Floor(DayTime) ; Remove "previous in-game days passed" bit
	DayTime *= 24 ; Convert from fraction of a day to number of hours
	Return DayTime
 
EndFunction

;==============================================================================================


EVENT OnEffectStart(Actor akTarget, Actor akCaster)

	utility.Wait(2.0)

	Debug.Notification("Spawn Point Set Here")
		
	;----------------------------------------------------
	; CONTROLS VAMPIRE HUNTERS - IF YOU HAVE THEM ENABLED

	Int NecksBittenThreshold = Utility.RandomInt(6, 9)
	
	;----------------------------------------------------
	; HUNTERS ONLY ATTACK IF OUTSIDE AND IN CERTAIN AREAS - THEY ATTACK AFTER A CERTAIN NUMBER OF VICTIMS HAVE BEEN DISCOVERED
	
	If Game.IsMovementControlsEnabled() && Game.IsFightingControlsEnabled() ;;&& Game.GetPlayer().IsInInterior() == 0 && VampireNecksBittenDiscovered.GetValue() >= NecksBittenThreshold && VampireHunters.GetValue() > 0 && Game.GetPlayer().GetWorldSpace() != Sovngarde && Game.GetPlayer().GetWorldSpace() != DLC01SoulCairn && Game.GetPlayer().GetWorldSpace() != BluePalaceWingWorld
	
		utility.WaitMenuMode(2.0)
		Int AttackOrNotDay = Utility.RandomInt(1, 100)
		Int AttackOrNotNight = Utility.RandomInt(1, 100)		
		Int RandomHunters = Utility.RandomInt(1, 4)
		Int RandomTolanAppearance = Utility.RandomInt(4, 6)
		GetCurrentTimeOfDay()
		
		;----------------------------------------------------
		; 25% CHANCE OF ATTACK DURING THE NIGHT AND 50% CHANCE OF ATTACK DURING THE DAY
		
		;If (DayTime >= 6 && DayTime < 19 && AttackOrNotDay <= 50) || (DayTime >= 19 && AttackOrNotNight <= 25) || (DayTime < 6 && AttackOrNotNight <= 25)
		
			ObjectReference VampireHunterXmarker = Game.GetPlayer().PlaceAtMe(Xmarker)
			
			Int VampireHunterAttacks = ((Game.GetPlayer().GetAV("Variable01") as Int)+1)
			Game.GetPlayer().SetAV("Variable01", VampireHunterAttacks)
			
			While Game.GetPlayer().GetDistance(VampireHunterXMarker) <= 5000 && VampireHunters.GetValue() > 0
			EndWhile
			
			Debug.Notification("Distance from Spawn Point = 5000")
			
			;Int RandomAttackWaitTime = Utility.RandomInt(5,15)
			;Utility.Wait(RandomAttackWaitTime)
			
			While Game.GetPlayer().HasLOS(VampireHunterXMarker) == True && VampireHunters.GetValue() > 0
			EndWhile
			
			If VampireDawnguardInstalled.GetValue() == 10000

				If (Game.GetPlayer().GetAV("Variable01") < RandomTolanAppearance) || VampireTolanAttacks.GetValue() >= 10000 || (Game.GetPlayer().GetAV("Variable01")) >= 10000
				
					VampireHunter1 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)				
					ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter4 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					EndIf				
			
				ElseIf (Game.GetPlayer().GetAV("Variable01") >= RandomTolanAppearance) && VampireTolanAttacks.GetValue() < 10000 && (Game.GetPlayer().GetAV("Variable01")) < 10000
				
					VampireHunter1 = VampireHunterXmarker.PlaceActorAtMe(VampireVigilantTolan, 4)
					If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
					ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinKhajiitF, 4)
					ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinKhajiitF, 4)
						VampireHunter4 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinArgonianF, 4)
					EndIf	
					
				EndIf
			
			ElseIf VampireDawnguardInstalled.GetValue() == 0
			
				If (Game.GetPlayer().GetAV("Variable01") < RandomTolanAppearance) || VampireTolanAttacks.GetValue() >= 10000 || (Game.GetPlayer().GetAV("Variable01")) >= 10000
				
					VampireHunter1 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
					ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)
						VampireHunter4 = VampireHunterXmarker.PlaceActorAtMe(LvlVampireHunter, 4)						
					EndIf				
			
				ElseIf (Game.GetPlayer().GetAV("Variable01") >= RandomTolanAppearance) && VampireTolanAttacks.GetValue() < 10000 && (Game.GetPlayer().GetAV("Variable01")) < 10000
				
					VampireHunter1 = VampireHunterXmarker.PlaceActorAtMe(VampireVigilantTolan, 4)
					If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
					ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinKhajiitF, 4)
					ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
						VampireHunter2 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinDarkElfM, 4)
						VampireHunter3 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinKhajiitF, 4)
						VampireHunter4 = VampireHunterXmarker.PlaceActorAtMe(VampireWEAssassinArgonianF, 4)						
					EndIf	
					
				EndIf			
			
			EndIf	
					
			Utility.WaitMenuMode(1.0)
			
			;----------------------------------------------------
			; HUNTER STATISTICS - THEY ARE BASED OFF YOUR STATISTICS
			
			Float PlayerHealth = Game.GetPlayer().GetBaseActorValue("Health")
			Float VampireHunter1Health = PlayerHealth*1.5
			VampireHunter1.SetActorValue("Health", VampireHunter1Health)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("Health", VampireHunter1Health)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("Health", VampireHunter1Health)
				VampireHunter3.SetActorValue("Health", VampireHunter1Health)
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("Health", VampireHunter1Health)
				VampireHunter3.SetActorValue("Health", VampireHunter1Health)
				VampireHunter4.SetActorValue("Health", VampireHunter1Health)				
			EndIf			
			
			Float PlayerMagicka = (Game.GetPlayer().GetBaseActorValue("Magicka")*1.2)
			VampireHunter1.SetActorValue("Magicka", PlayerMagicka)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("Magicka", PlayerMagicka)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("Magicka", PlayerMagicka)
				VampireHunter3.SetActorValue("Magicka", PlayerMagicka)
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("Magicka", PlayerMagicka)
				VampireHunter3.SetActorValue("Magicka", PlayerMagicka)		
				VampireHunter4.SetActorValue("Magicka", PlayerMagicka)				
			EndIf			
			
			VampireHunter1.SetActorValue("Sneak", 100)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("Sneak", 100)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("Sneak", 100)
				VampireHunter3.SetActorValue("Sneak", 100)		
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("Sneak", 100)
				VampireHunter3.SetActorValue("Sneak", 100)
				VampireHunter4.SetActorValue("Sneak", 100)					
			EndIf			
			
			Float Player1Hand = (Game.GetPlayer().GetActorValue("OneHanded")*1.2)
			VampireHunter1.SetActorValue("OneHanded", Player1Hand)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("OneHanded", Player1Hand)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("OneHanded", Player1Hand)
				VampireHunter3.SetActorValue("OneHanded", Player1Hand)	
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("OneHanded", Player1Hand)
				VampireHunter3.SetActorValue("OneHanded", Player1Hand)		
				VampireHunter4.SetActorValue("OneHanded", Player1Hand)				
			EndIf			
			
			Float Player2Hand= (Game.GetPlayer().GetActorValue("TwoHanded")*1.2)
			VampireHunter1.SetActorValue("TwoHanded", Player2Hand)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("TwoHanded", Player2Hand)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("TwoHanded", Player2Hand)
				VampireHunter3.SetActorValue("TwoHanded", Player2Hand)
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("TwoHanded", Player2Hand)
				VampireHunter3.SetActorValue("TwoHanded", Player2Hand)	
				VampireHunter4.SetActorValue("TwoHanded", Player2Hand)				
			EndIf				

			Float PlayerMarksman = (Game.GetPlayer().GetActorValue("Marksman")*1.2)
			VampireHunter1.SetActorValue("Marksman", PlayerMarksman)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("Marksman", PlayerMarksman)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("Marksman", PlayerMarksman)
				VampireHunter3.SetActorValue("Marksman", PlayerMarksman)	
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("Marksman", PlayerMarksman)
				VampireHunter3.SetActorValue("Marksman", PlayerMarksman)
				VampireHunter4.SetActorValue("Marksman", PlayerMarksman)				
			EndIf			
			
			Float PlayerBlock = (Game.GetPlayer().GetActorValue("Block")*1.2)
			VampireHunter1.SetActorValue("Block", PlayerBlock)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("Block", PlayerBlock)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("Block", PlayerBlock)
				VampireHunter3.SetActorValue("Block", PlayerBlock)	
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("Block", PlayerBlock)
				VampireHunter3.SetActorValue("Block", PlayerBlock)		
				VampireHunter4.SetActorValue("Block", PlayerBlock)				
			EndIf			
			
			Float PlayerDamageResist = (Game.GetPlayer().GetActorValue("DamageResist")*1.2)
			VampireHunter1.ForceActorValue("DamageResist", PlayerDamageResist)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.SetActorValue("DamageResist", PlayerDamageResist)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.SetActorValue("DamageResist", PlayerDamageResist)
				VampireHunter3.SetActorValue("DamageResist", PlayerDamageResist)
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.SetActorValue("DamageResist", PlayerDamageResist)
				VampireHunter3.SetActorValue("DamageResist", PlayerDamageResist)
				VampireHunter4.SetActorValue("DamageResist", PlayerDamageResist)				
			EndIf			

			VampireHunter1.AddPerk(VampireHunterIllusionImmune)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.AddPerk(VampireHunterIllusionImmune)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.AddPerk(VampireHunterIllusionImmune)
				VampireHunter3.AddPerk(VampireHunterIllusionImmune)
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.AddPerk(VampireHunterIllusionImmune)
				VampireHunter3.AddPerk(VampireHunterIllusionImmune)	
				VampireHunter4.AddPerk(VampireHunterIllusionImmune)					
			EndIf
			
			VampireHunterXmarker.Disable()
			VampireHunterXmarker.Delete()
			
			VampireNecksBittenDiscovered.SetValue(0)				
			
			;----------------------------------------------------
			; IF YOU ENABLE IT, HUNTERS WHO WOULD NORMALLY BE ALLIED TO OTHER VIGILANTS OR DAWNGUARD 
			; WILL DEFINITELY HATE YOU, BUT WON'T BE ALLIED TO ANY OTHER VANILLA DAWNGUARD NPCs
			
			If VampireHunterFactionRemoval.GetValue() == 10000
				VampireHunter1.RemoveFromAllFactions()
				VampireHunter1.AddToFaction(VampirePCHunters)
				If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
					VampireHunter2.RemoveFromAllFactions()
					VampireHunter2.AddToFaction(VampirePCHunters)
				ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
					VampireHunter2.RemoveFromAllFactions()
					VampireHunter2.AddToFaction(VampirePCHunters)				
					VampireHunter3.RemoveFromAllFactions()
					VampireHunter3.AddToFaction(VampirePCHunters)
				ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
					VampireHunter2.RemoveFromAllFactions()
					VampireHunter2.AddToFaction(VampirePCHunters)				
					VampireHunter3.RemoveFromAllFactions()
					VampireHunter3.AddToFaction(VampirePCHunters)				
					VampireHunter4.RemoveFromAllFactions()
					VampireHunter4.AddToFaction(VampirePCHunters)					
				EndIf
			EndIf	
			
			Utility.Wait(0.5)
			
			;----------------------------------------------------
			; HUNTERS FOLLOW YOU
			Debug.Notification("Hunters Incoming!")	
				
			VampireHunter1.PathToReference(Game.GetPlayer(), 1)
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.PathToReference(Game.GetPlayer(), 1)
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.PathToReference(Game.GetPlayer(), 1)
				VampireHunter3.PathToReference(Game.GetPlayer(), 1)	
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.PathToReference(Game.GetPlayer(), 1)
				VampireHunter3.PathToReference(Game.GetPlayer(), 1)	
				VampireHunter4.PathToReference(Game.GetPlayer(), 1)				
			EndIf			
			
			Utility.Wait(0.5)
			
			;----------------------------------------------------
			; HUNTERS ATTACK YOU
			
			VampireHunter1.StartCombat(Game.GetPlayer())
			If VampireHunters.GetValue() == 20000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 2)
				VampireHunter2.StartCombat(Game.GetPlayer())
			ElseIf VampireHunters.GetValue() == 30000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 3)
				VampireHunter2.StartCombat(Game.GetPlayer())
				VampireHunter3.StartCombat(Game.GetPlayer())
			ElseIf VampireHunters.GetValue() == 40000 || (VampireHunters.GetValue() == 100000 && RandomHunters == 4)
				VampireHunter2.StartCombat(Game.GetPlayer())
				VampireHunter3.StartCombat(Game.GetPlayer())	
				VampireHunter4.StartCombat(Game.GetPlayer())				
			EndIf			
			
			;----------------------------------------------------
			; VAMPIRE HUNTER TRACKING IS RESET
			
			VampireNecksBittenDiscovered.SetValue(0)			
			
			;----------------------------------------------------
			; REVERTED FROM VAMPIRE LORD FORM (IF ENABLED)		
			; Silver Poison now does this ...

			;While (Game.GetPlayer().GetDistance(VampireHunter1) >= 1000 && Game.GetPlayer().GetDistance(VampireHunter2) >= 1000 && Game.GetPlayer().GetDistance(VampireHunter3) >= 1000 && Game.GetPlayer().GetDistance(VampireHunter4) >= 1000 && VampireHunters.GetValue() > 0)
			;EndWhile
			
			;If VampireDawnguardInstalled.GetValue() == 10000 && VampireHuntersRevertVL.GetValue() == 10000 && Game.GetPlayer().HasSpell(DLC1RevertForm)
			;	If Game.GetPlayer().GetDistance(VampireHunter1) <= 1200
			;		VampireHunter1.SetLookAt(Game.GetPlayer(), true)
			;		Utility.Wait(0.5)
			;		DLC1SunFire.Cast(VampireHunter1, Game.GetPlayer())
			;		Utility.Wait(0.5)
			;		;DLC1SunFire2.Cast(Game.GetPlayer(), Game.GetPlayer())
			;		VampireHunter1.ClearLookAt()
			;	ElseIf Game.GetPlayer().GetDistance(VampireHunter2) <= 1200
			;		VampireHunter2.SetLookAt(Game.GetPlayer(), true)
			;		Utility.Wait(0.5)
			;		DLC1SunFire.Cast(VampireHunter2, Game.GetPlayer())
			;		Utility.Wait(0.5)
			;		;DLC1SunFire2.Cast(Game.GetPlayer(), Game.GetPlayer())
			;		VampireHunter2.ClearLookAt()
			;	ElseIf Game.GetPlayer().GetDistance(VampireHunter3) < 1200
			;		VampireHunter3.SetLookAt(Game.GetPlayer(), true)
			;		Utility.Wait(0.5)
			;		DLC1SunFire.Cast(VampireHunter3, Game.GetPlayer())
			;		Utility.Wait(0.5)
			;		;DLC1SunFire2.Cast(Game.GetPlayer(), Game.GetPlayer())
			;		VampireHunter3.ClearLookAt()
			;	ElseIf Game.GetPlayer().GetDistance(VampireHunter4) < 1200
			;		VampireHunter4.SetLookAt(Game.GetPlayer(), true)
			;		Utility.Wait(0.5)
			;		DLC1SunFire.Cast(VampireHunter4, Game.GetPlayer())
			;		Utility.Wait(0.5)
			;		;DLC1SunFire2.Cast(Game.GetPlayer(), Game.GetPlayer())
			;		VampireHunter4.ClearLookAt()					
			;	EndIf
			;	Debug.Notification("You've Been Reverted!")
			;	VampireCannotTurnVL.SetValue(10000)
			;	DLC1RevertForm.Cast(Game.GetPlayer(), Game.GetPlayer())
			;EndIf						
			
		;EndIf
		
	EndIf	

EndEvent

;==============================================================================================

Event OnEffectFinish(Actor akTarget, Actor akCaster)
	
			
EndEvent
