Scriptname SuH_SuQuest extends Quest

SuH_Fun property _Fun auto

GlobalVariable Property SuH_PCSdesire auto
Actor Property PlayerRef auto
Spell Property SuH_dyna_ability auto
Spell Property SuH_dyna_player auto
Spell Property SuH_spell_sexualenrage auto

Event OnInit()
	PlayerRef.AddSpell(SuH_dyna_player, FALSE) ; Add dynamic player script
	RegisterForSingleUpdate(5.0) ; Tick in 5 seconds
endEvent

Event OnUpdate()
	If PlayerRef.HasSpell(SuH_dyna_ability) ; If dynamic script is applying
		PlayerRef.RemoveSpell(SuH_dyna_ability) ; Remove dynamic run script
	else ; if dynamic script is not applying
		PlayerRef.AddSpell(SuH_dyna_ability, FALSE) ; AddSpell dynamic run script
	endIf
	int desireV = Math.Floor(2 + SuH_PCSdesire.GetValue())
	SuH_PCSdesire.SetValue(desireV)
	if desireV >= 250
		PlayerRef.AddSpell(SuH_spell_sexualenrage)
	else
		PlayerRef.RemoveSpell(SuH_spell_sexualenrage)
	endIf
	RegisterForSingleUpdate(5.0) ; Tick in 5 seconds
endEvent