Scriptname VampireBottledBloodScript extends ActiveMagicEffect  

GlobalVariable Property VampireBottledBlood Auto
GlobalVariable Property VampireExtractBlood Auto
GlobalVariable Property VampireBloodPotionSatiation Auto
GlobalVariable Property EnableVampireBloodPoints Auto
GlobalVariable Property VampireBloodPoints Auto
GlobalVariable Property VampireDynamicStages Auto
GlobalVariable Property VampireRequiemInstalled Auto

PlayerVampireQuestScript Property PlayerVampireQuest  Auto  

EVENT onEffectStart(Actor akBottleTarget, Actor akCaster)

	If akBottleTarget == Game.GetPlayer()
	
		VampireBottledBlood.SetValue(10000)
		If VampireRequiemInstalled.GetValue() == 0
			Game.GetPlayer().RestoreActorValue("Stamina", 50)
			Game.GetPlayer().RestoreActorValue("Magicka", 50)
		EndIf	
		Utility.Wait(1.0)
		
		If VampireBloodPotionSatiation.GetValue() == 10000
		
			If EnableVampireBloodPoints.GetValue() == 10000
				VampireBloodPoints.SetValue(VampireBloodPoints.GetValue()+50)
				If VampireDynamicStages.GetValue() == 20000
					VampireBloodPoints.SetValue(100)
				ElseIf VampireDynamicStages.GetValue() < 20000
					If VampireBloodPoints.GetValue() > 300
						VampireBloodPoints.SetValue(300)
					EndIf
				EndIf
			EndIf		
		
			PlayerVampireQuest.VampireFeed(akBottleTarget as actor)
			
		Else	
		
			VampireBottledBlood.SetValue(0)
			
		EndIf
		
	EndIf	
		
EndEVENT 


EVENT onEffectFinish(Actor akTarget, Actor akCaster) 

	
EndEVENT

