Scriptname SuH_MCM extends SKI_ConfigBase

;ent/ Variables / Objects
Actor Property PlayerAlias auto
Actor Property PlayerRef Auto

GlobalVariable Property SuH_SETallowdrainkill auto
GlobalVariable Property SuH_PCScaphealth auto
GlobalVariable Property SuH_PCScapmagicka auto
GlobalVariable Property SuH_PCScapstamina auto
GlobalVariable Property SuH_PCSdesire auto
GlobalVariable Property SuH_PCSxp auto
GlobalVariable Property SuH_PCSxpgain auto
GlobalVariable Property SuH_PCSabsorbhealth auto
GlobalVariable Property SuH_PCSabsorbmagicka auto
GlobalVariable Property SuH_PCSabsorbstamina auto
GlobalVariable Property SuH_PCSspermhealth auto
GlobalVariable Property SuH_PCSspermmagicka auto
GlobalVariable Property SuH_PCSspermstamina auto
GlobalVariable Property SuH_PCSmilkhealth auto
GlobalVariable Property SuH_PCSmilkmagicka auto
GlobalVariable Property SuH_PCSmilkstamina auto
GlobalVariable Property SuH_PCSstackmaxsex auto
GlobalVariable Property SuH_PCSstackmaxsperm auto
GlobalVariable Property SuH_PCSstackmaxmilk auto
GlobalVariable Property SuH_PCSstacksex auto
GlobalVariable Property SuH_PCSstacksperm auto
GlobalVariable Property SuH_PCSstackmilk auto
GlobalVariable Property SuH_PCSsp auto
GlobalVariable Property SuH_PCSspearned auto
GlobalVariable Property SuH_PCSforce auto
GlobalVariable Property SuH_SETcombatseduction auto
GlobalVariable Property SuH_SETnpc2npchealth auto
GlobalVariable Property SuH_SETnpc2pchealth auto
GlobalVariable Property SuH_SETpc2npchealth auto
GlobalVariable Property SuH_SETallowmalehomo auto
GlobalVariable Property SuH_SETallowfemalehomo auto
GlobalVariable Property SuH_SETessentialacts auto
GlobalVariable Property SuH_MODversion auto
GlobalVariable Property SuH_MCMversion auto
GlobalVariable Property SuH_rank_perfectorgasm auto
GlobalVariable Property SuH_rank_lusciousliquids auto
GlobalVariable Property SuH_rank_masochist auto
GlobalVariable Property SuH_rank_selfstacker auto
GlobalVariable Property SuH_rank_valuestacker auto
GlobalVariable Property SuH_rank_savingessence auto

Spell Property SuH_spell_focusshot_base auto
Spell Property SuH_spell_focusshot_love auto
Spell Property SuH_spell_focusshot_drain auto
Spell Property SuH_spell_cursedblood_base auto
Spell Property SuH_spell_cursedblood_love auto
Spell Property SuH_spell_cursedblood_hate auto
Spell Property SuH_spell_vitaldrain_base auto
Spell Property SuH_spell_vitaldrain_love auto
Spell Property SuH_spell_vitaldrain_hate auto
Spell Property SuH_spell_spiritmend_base auto
Spell Property SuH_spell_spiritmend_love auto
Spell Property SuH_spell_spiritmend_hate auto
Spell Property SuH_spell_soulbend_base auto
Spell Property SuH_spell_soulbend_love auto
Spell Property SuH_spell_soulbend_hate auto
Spell Property SuH_spell_intimatetouch_base auto
Spell Property SuH_spell_intimatetouch_love auto
Spell Property SuH_spell_intimatetouch_hate auto

;status
int status_health
int status_magicka
int status_stamina
int status_desire
int status_xp
int status_xpgain
int status_stacksex
int status_stacksperm
int status_stackmilk
int status_SETdrainkill
int status_SETcombatseduction
int status_SETnpc2npchealth
int status_SETnpc2pchealth
int status_SETpc2npchealth
int status_SETallowmalehomo
int status_SETallowfemalehomo
int status_SETessentialacts

;skill
int skill_sp
int skill_spnext
int skill_xp
int skill_convert
int skill_alchemy
int skill_alteration
int skill_block
int skill_conjuration
int skill_destruction
int skill_enchanting
int skill_heavyarmor
int skill_illusion
int skill_lightarmor
int skill_lockpicking
int skill_marksman
int skill_onehanded
int skill_pickpocket
int skill_restoration
int skill_smithing
int skill_sneak
int skill_speechcraft
int skill_twohanded

;heart
int heart_caphealth
int heart_capmagicka
int heart_capstamina
int heart_absorbhealth
int heart_absorbmagicka
int heart_absorbstamina
int heart_spermhealth
int heart_spermmagicka
int heart_spermstamina
int heart_milkhealth
int heart_milkmagicka
int heart_milkstamina
int heart_stacksex
int heart_stacksperm
int heart_stackmilk
int heart_xp
int heart_xpgain

;apell
int spell_xp
int spell_focusshotbase
int spell_focusshotlove
int spell_focusshothate
int spell_cursedbloodbase
int spell_cursedbloodlove
int spell_cursedbloodhate
int spell_vitaldrainbase
int spell_vitaldrainlove
int spell_vitaldrainhate
int spell_spiritmendbase
int spell_spiritmendlove
int spell_spiritmendhate
int spell_soulbendbase
int spell_soulbendlove
int spell_soulbendhate
int spell_intimatetouchbase
int spell_intimatetouchlove
int spell_intimatetouchhate

int spell_perfectorgasm
int spell_perfectorgasmrank
int spell_lusciousliquids
int spell_lusciousliquidsrank
int spell_masochist
int spell_masochistrank
int spell_selfstacker
int spell_selfstackerrank
int spell_valuestacker
int spell_valuestackerrank
int spell_savingessence
int spell_savingessencerank

;help
int help1
int help2
int help3
int help4
int help5
int help6
int help7
int help8
int help9
int help10
int help11
int help12
int help13
int help14

;end/

;ent/ Init
Event OnConfigInit()
	ModName = "Succubus Heart"
	Pages = new string[7]
		Pages[0] = "Status / Settings"
		Pages[2] = "Skill Levels"
		Pages[1] = "Heart Levels"
		Pages[3] = "Spells / Passives"
		Pages[6] = "Help"
endEvent
;end/

;ent/ MCMupdate
Function MCMupdate()
	float MCMversion = SuH_MCMversion.GetValue()
	If MCMversion < 0.31
		Pages = new string[5]
			Pages[0] = "Status / Settings"
			Pages[2] = "Skill Levels"
			Pages[1] = "Heart Levels"
			Pages[3] = "Spells / Passives"
			Pages[4] = "Help"
		SuH_MCMversion.SetValue(0.31)
		Debug.Notification("Succubus Heart - MCM updated to 0.31")
	endIf
endFunction
;end/

;ent/ OnPageReset
Event OnPageReset(string page)
	;ent/ Initial Page
	if (page == "");
		return
	else
	endIf
	;end/
	;ent/ Status / Settings
	if (page == "Status / Settings")
		SetCursorFillMode(TOP_TO_BOTTOM)
		
		;ent/ Menu Layout
		; [ Status ]              [ Status ]
		; Player Health           Desire
		; Player Magicka          XP
		; Player Stamina          XP Gain
		; 
		; [ General Settings]     [ General Settings ]
		; Allow Drain to Kill     Combat Seduction
		;                         NPC to PC Health
		;                         PC to NPC Health
		;                         NPC to NPC Health
		;
		;
		;end/
		
		;ent/ Variables
		int playerHealth = PlayerRef.GetBaseActorValue("health") as int
		int playerMagicka = PlayerRef.GetBaseActorValue("magicka") as int
		int playerStamina = PlayerRef.GetBaseActorValue("stamina") as int
		int healthCap = SuH_PCScaphealth.GetValue() as int
		int magickaCap = SuH_PCScapmagicka.GetValue() as int
		int staminaCap = SuH_PCScapstamina.GetValue() as int
		int desireV = SuH_PCSdesire.GetValue() as int
		int XP = SuH_PCSxp.GetValue() as int
		float XPgain = SuH_PCSxpgain.GetValue()
		int XPgainV = Math.Floor(XPgain*100)
		int stacksex = SuH_PCSstacksex.GetValue() as int
		int stacksperm = SuH_PCSstacksperm.GetValue() as int
		int stackmilk = SuH_PCSstackmilk.GetValue() as int
		int stackmaxsex = SuH_PCSstackmaxsex.GetValue() as int
		int stackmaxsperm = SuH_PCSstackmaxsperm.GetValue() as int
		int stackmaxmilk = SuH_PCSstackmaxmilk.GetValue() as int
		bool SETdrainkill = SuH_SETallowdrainkill.GetValue() as bool
		bool SETcombatseduction = SuH_SETcombatseduction.GetValue() as bool
		int SETnpc2pchealth = Math.Floor(SuH_SETnpc2pchealth.GetValue()*100)
		int SETpc2npchealth = Math.Floor(SuH_SETpc2npchealth.GetValue()*100)
		int SETnpc2npchealth = Math.Floor(SuH_SETnpc2npchealth.GetValue()*100)
		int SETallowmalehomo = SuH_SETallowmalehomo.GetValue() as int
		int SETallowfemalehomo = SuH_SETallowfemalehomo.GetValue() as int
		bool SETessentialacts = SuH_SETessentialacts.GetValue() as bool
		;end/
		
		;ent/ Left Side
		SetCursorPosition(0)
		AddHeaderOption("Status ")
		status_health = AddTextOption("Health ", playerHealth+"/"+healthCap)
		status_magicka = AddTextOption("Magicka ", playerMagicka+"/"+magickaCap)
		status_stamina = AddTextOption("Stamina ", playerStamina+"/"+staminaCap)
		status_stacksex = AddTextOption("Sex Stacks", stacksex+"/"+stackmaxsex)
		status_stacksperm = AddTextOption("Sperm Stacks", stacksperm+"/"+stackmaxsperm)
		status_stackmilk = AddTextOption("Milk Stacks", stackmilk+"/"+stackmaxmilk)
		AddEmptyOption()
		AddHeaderOption("General Options")
		status_SETdrainkill = AddToggleOption("Allow Drain to Kill", SETdrainkill)
		status_SETallowmalehomo = AddToggleOption("Allow Male Homosexuals", SETallowmalehomo)
		status_SETallowfemalehomo = AddToggleOption("Allow Female Homosexuals", SETallowfemalehomo)
		status_SETessentialacts = AddToggleOption("NPCs Essential in Acts", SETessentialacts)
		AddEmptyOption()
		;end/
		
		;ent/ Right Side
		SetCursorPosition(1)
		AddHeaderOption("Status ")
		status_desire = AddTextOption("Desire ", desireV)
		status_xp = AddTextOption("XP ", XP)
		status_xpgain = AddTextOption("XP Gain ", XPgainV+"%")
		AddEmptyOption()
		AddEmptyOption()
		AddEmptyOption()
		AddEmptyOption()
		AddHeaderOption("General Options ")
		status_SETcombatseduction = AddToggleOption("Combat Seduction", SETcombatseduction)
		status_SETnpc2pchealth = AddSliderOption("NPC to PC", SETnpc2pchealth, "{0}% Health")
		status_SETpc2npchealth = AddSliderOption("PC to NPC", SETpc2npchealth, "{0}% Health")
		status_SETnpc2npchealth = AddSliderOption("NPC to NPC", SETnpc2npchealth, "{0}% Health")
		AddEmptyOption()
		;end/
	;end/
	;ent/ Skill Levels
	elseIf (page == "Skill Levels")
		;ent/ Variables
			int alchemylvl = playerRef.GetActorValue("alchemy") as int
			int alchemycost = Math.Ceiling(alchemylvl*0.1)
			int alterationlvl = playerRef.GetActorValue("alteration") as int
			int alterationcost = Math.Ceiling(alterationlvl*0.1)
			int blocklvl = playerRef.GetActorValue("block") as int
			int blockcost = Math.Ceiling(blocklvl*0.1)
			int conjurationlvl = playerRef.GetActorValue("conjuration") as int
			int conjurationcost = Math.Ceiling(conjurationlvl*0.1)
			int destructionlvl = playerRef.GetActorValue("destruction") as int
			int destructioncost = Math.Ceiling(destructionlvl*0.1)
			int enchantinglvl = playerRef.GetActorValue("enchanting") as int
			int enchantingcost = Math.Ceiling(enchantinglvl*0.1)
			int heavyarmorlvl = playerRef.GetActorValue("heavyarmor") as int
			int heavyarmorcost = Math.Ceiling(heavyarmorlvl*0.1)
			int illusionlvl = playerRef.GetActorValue("illusion") as int
			int illusioncost = Math.Ceiling(illusionlvl*0.1)
			int lightarmorlvl = playerRef.GetActorValue("lightarmor") as int
			int lightarmorcost = Math.Ceiling(lightarmorlvl*0.1)
			int lockpickinglvl = playerRef.GetActorValue("lockpicking") as int
			int lockpickingcost = Math.Ceiling(lockpickinglvl*0.1)
			int marksmanlvl = playerRef.GetActorValue("marksman") as int
			int marksmancost = Math.Ceiling(marksmanlvl*0.1)
			int onehandedlvl = playerRef.GetActorValue("onehanded") as int
			int onehandedcost = Math.Ceiling(onehandedlvl*0.1)
			int pickpocketlvl = playerRef.GetActorValue("pickpocket") as int
			int pickpocketcost = Math.Ceiling(pickpocketlvl*0.1)
			int restorationlvl = playerRef.GetActorValue("restoration") as int
			int restorationcost = Math.Ceiling(restorationlvl*0.1)
			int smithinglvl = playerRef.GetActorValue("smithing") as int
			int smithingcost = Math.Ceiling(smithinglvl*0.1)
			int sneaklvl = playerRef.GetActorValue("sneak") as int
			int sneakcost = Math.Ceiling(sneaklvl*0.1)
			int speechcraftlvl = playerRef.GetActorValue("speechcraft") as int
			int speechcraftcost = Math.Ceiling(speechcraftlvl*0.1)
			int twohandedlvl = playerRef.GetActorValue("twohanded") as int
			int twohandedcost = Math.Ceiling(twohandedlvl*0.1)
		;end/
		;ent/ SP calculation
			int xp = SuH_PCSxp.GetValue() as int
			int force = SuH_PCSforce.GetValue() as int
			int sp = SuH_PCSsp.GetValue() as int
			int spearned = SuH_PCSspearned.GetValue() as int
			int spcost = Math.Floor(spearned*0.2*120+20)
			if force >= spcost
				int x = 0
				int y = 0
				int z = 0
				int forceSpent = 0
				int spgained = 0
				int newcost = 0
				int i = 0
				while i != 1
					x = force - forceSpent
					y = spearned + spgained
					newcost = Math.Floor(y*0.2*120)
					if x >= newcost
						forceSpent += newcost
						spgained += 1
					else
						z = sp + spgained
						SuH_PCSforce.SetValue(x)
						SuH_PCSspearned.SetValue(y)
						SuH_PCSsp.SetValue(z)
						debug.MessageBox(spgained+" SP was earned")
						i = 1
					endIf
				endWhile
				xp = SuH_PCSxp.GetValue() as int
				force = SuH_PCSforce.GetValue() as int
				sp = SuH_PCSsp.GetValue() as int
				spearned = SuH_PCSspearned.GetValue() as int
				spcost = Math.Floor(spearned*0.2*120+20)
			endIf
			int spnext = Math.Floor(spcost-force)
		;end/
		SetCursorFillMode(TOP_TO_BOTTOM)
		
		;ent/ Menu Layout
		;
		;end/
		
		;ent/ Left Side
		SetCursorPosition(0)
		skill_sp = AddTextOption("Skill Points", sp)
		skill_spnext = AddTextOption("Till Next Skill Point", spnext+" Force")
		AddHeaderOption("Level Skills")
		skill_alchemy = AddTextOption("Alchemy ", alchemylvl+" ["+alchemycost+" SP]")
		skill_block = AddTextOption("Block ", blocklvl+" ["+blockcost+" SP]")
		skill_destruction = AddTextOption("Destruction ", destructionlvl+" ["+destructioncost+" SP]")
		skill_heavyarmor = AddTextOption("Heavy Armor ", heavyarmorlvl+" ["+heavyarmorcost+" SP]")
		skill_lightarmor = AddTextOption("Light Armor ", lightarmorlvl+" ["+lightarmorcost+" SP]")
		skill_marksman = AddTextOption("Marksman ", marksmanlvl+" ["+marksmancost+" SP]")
		skill_pickpocket = AddTextOption("Pickpocket ", pickpocketlvl+" ["+pickpocketcost+" SP]")
		skill_smithing = AddTextOption("Smithing ", smithinglvl+" ["+smithingcost+" SP]")
		skill_speechcraft = AddTextOption("Speechcraft ", speechcraftlvl+" ["+speechcraftcost+" SP]")
		;end/
		;ent/ Right Side
		SetCursorPosition(1)
		skill_xp = AddTextOption("XP available", xp)
		skill_convert = AddSliderOption("XP to Focus (10->1)",0,"{0}")
		AddHeaderOption("Level Skills")
		skill_alteration = AddTextOption("Alteration ", alterationlvl+" ["+alterationcost+" SP]")
		skill_conjuration = AddTextOption("Conjuration ", conjurationlvl+" ["+conjurationcost+" SP]")
		skill_enchanting = AddTextOption("Enchanting ", enchantinglvl+" ["+enchantingcost+" SP]")
		skill_illusion = AddTextOption("Illusion ", illusionlvl+" ["+illusioncost+" SP]")
		skill_lockpicking = AddTextOption("Lockpicking ", lockpickinglvl+" ["+lockpickingcost+" SP]")
		skill_onehanded = AddTextOption("One-Handed ", onehandedlvl+" ["+onehandedcost+" SP]")
		skill_restoration = AddTextOption("Restoration ", restorationlvl+" ["+restorationcost+" SP]")
		skill_sneak = AddTextOption("Sneak ", sneaklvl+" ["+sneakcost+" SP]")
		skill_twohanded = AddTextOption("Two-Handed ", twohandedlvl+" ["+twohandedcost+" SP]")
		;end/
	;end/
	;ent/ Heart Levels
	elseIf (page == "Heart Levels")
		
		;ent/ Menu Layout
		;
		;[ Heart Levels ]        [ Heart Levels ]
		;
		;
		;
		;
		;
		;
		;
		;
		;end/
		
		;ent/ Variables
		int caphealth = SuH_PCScaphealth.GetValue() as int
		int caphealthcost = Math.Floor((caphealth - 99)*1.2*80)
		int capmagicka = SuH_PCScapmagicka.GetValue() as int
		int capmagickacost = Math.Floor((capmagicka - 99)*1.2*80)
		int capstamina = SuH_PCScapstamina.GetValue() as int
		int capstaminacost = Math.Floor((capstamina - 99)*1.2*80)
		int absorbhealth = SuH_PCSabsorbhealth.GetValue() as int
		int absorbhealthcost = Math.Floor(absorbhealth*1.2*200)
		int absorbmagicka = SuH_PCSabsorbmagicka.GetValue() as int
		int absorbmagickacost = Math.Floor(absorbmagicka*1.2*200)
		int absorbstamina = SuH_PCSabsorbstamina.GetValue() as int
		int absorbstaminacost = Math.Floor(absorbstamina*1.2*200)
		int stacksex = SuH_PCSstackmaxsex.GetValue() as int
		int stacksexcost = Math.Floor(stacksex*2.2*240)
		int stacksperm = SuH_PCSstackmaxsperm.GetValue() as int
		int stackspermcost = Math.Floor(stacksperm*2.2*240)
		int stackmilk = SuH_PCSstackmaxmilk.GetValue() as int
		int stackmilkcost = Math.Floor(stackmilk*2.2*240)
		int spermhealth = SuH_PCSspermhealth.GetValue() as int
		int spermhealthcost = Math.Floor(spermhealth*1.4*200)
		int spermmagicka = SuH_PCSspermmagicka.GetValue() as int
		int spermmagickacost = Math.Floor(spermmagicka*1.4*200)
		int spermstamina = SuH_PCSspermstamina.GetValue() as int
		int spermstaminacost = Math.Floor(spermstamina*1.4*200)
		int milkhealth = SuH_PCSmilkhealth.GetValue() as int
		int milkhealthcost = Math.Floor(milkhealth*1.4*200)
		int milkmagicka = SuH_PCSmilkmagicka.GetValue() as int
		int milkmagickacost = Math.Floor(milkmagicka*1.4*200)
		int milkstamina = SuH_PCSmilkstamina.GetValue() as int
		int milkstaminacost = Math.Floor(milkstamina*1.4*200)
		int xp = SuH_PCSxp.GetValue() as int
		float xpgain = SuH_PCSxpgain.GetValue()
		int xpgaindisplay = Math.Floor(xpgain*100)
		int xpgaincost = Math.Floor(((xpgain*100) - 99)*1.5*250)
		;end/
	
		SetCursorFillMode(TOP_TO_BOTTOM)
		;ent/ Left Side
		SetCursorPosition(0)
		heart_xp = AddTextOption("XP available", xp)
		AddHeaderOption("Heart Levels")
		heart_caphealth = AddTextOption("Health Cap", caphealth+" ["+caphealthcost+" XP]")
		heart_capmagicka = AddTextOption("Magicka Cap", capmagicka+" ["+capmagickacost+" XP]")
		heart_capstamina = AddTextOption("Stamina Cap", capstamina+" ["+capstaminacost+" XP]")
		AddEmptyOption()
		heart_stacksex = AddTextOption("Max Sex Stacks", stacksex+" ["+stacksexcost+" XP]")
		heart_stacksperm = AddTextOption("Max Sperm Stacks", stacksperm+" ["+stackspermcost+" XP]")
		heart_stackmilk = AddTextOption("Max Milk Stacks", stackmilk+" ["+stackmilkcost+" XP]")
		AddEmptyOption()
		heart_xpgain = AddTextOption("XP Gain", xpgaindisplay+"% ["+xpgaincost+"XP]")
		AddEmptyOption()
		AddEmptyOption()
		;end/
		;ent/ Right Side
		SetCursorPosition(1)
		AddEmptyOption()
		AddHeaderOption("Heart Levels")
		heart_absorbhealth = AddTextOption("Health Absorption", absorbhealth+" ["+absorbhealthcost+" XP]")
		heart_absorbmagicka = AddTextOption("Magicka Absorption", absorbmagicka+" ["+absorbmagickacost+" XP]")
		heart_absorbstamina = AddTextOption("Stamina Absorption", absorbstamina+" ["+absorbstaminacost+" XP]")
		AddEmptyOption()
		heart_spermhealth = AddTextOption("Sperm Health Bonus", spermhealth+" ["+spermhealthcost+" XP]")
		heart_spermmagicka = AddTextOption("Sperm Magicka Bonus", spermmagicka+" ["+spermmagickacost+" XP]")
		heart_spermstamina = AddTextOption("Sperm Stamina Bonus", spermstamina+" ["+spermstaminacost+" XP]")
		AddEmptyOption()
		heart_milkhealth = AddTextOption("Milk Health Bonus", milkhealth+" ["+milkhealthcost+" XP]")
		heart_milkmagicka = AddTextOption("Milk Magicka Bonus", milkmagicka+" ["+milkmagickacost+" XP]")
		heart_milkstamina = AddTextOption("Milk Stamina Bonus", milkstamina+" ["+milkstaminacost+" XP]")
		;
		;end/
	;end/
	;ent/ Spells / Passives
	elseIf (page == "Spells / Passives")
		SetCursorFillMode(TOP_TO_BOTTOM)
		
		;ent/ Menu Layout
		; 
		; XP Available
		;
		; [ Focus Shot ]        [ Passives ]
		; Focus Shot Base
		; Focus Shot Drain
		;
		;
		;
		;
		;
		;end/
		;ent/ Variables
		int xp = SuH_PCSxp.GetValue() as int
		
		string Lfocusshotbase
		string Lfocusshotlove
		string Lfocusshothate
		if playerRef.HasSpell(SuH_spell_focusshot_base)
			Lfocusshotbase = "Learned"
			Lfocusshotlove = "5000 XP"
			Lfocusshothate = "5000 XP"
		elseif playerRef.HasSpell(SuH_spell_focusshot_drain)
			Lfocusshotbase = "500 XP"
			Lfocusshotlove = "5000 XP"
			Lfocusshothate = "Learned"
		elseif playerRef.HasSpell(SuH_spell_focusshot_love)
			Lfocusshotbase = "500 XP"
			Lfocusshotlove = "Learned"
			Lfocusshothate = "5000 XP"
		else
			Lfocusshotbase = "500 XP"
			Lfocusshotlove = "5000 XP"
			Lfocusshothate = "5000 XP"
		endIf
		
		string Lcursedbloodbase
		string Lcursedbloodlove
		string Lcursedbloodhate
		if playerRef.HasSpell(SuH_spell_cursedblood_base)
			Lcursedbloodbase = "Learned"
			Lcursedbloodlove = "8000 XP"
			Lcursedbloodhate = "8000 XP"
		elseIf playerRef.HasSpell(SuH_spell_cursedblood_love)
			Lcursedbloodbase = "800 XP"
			Lcursedbloodlove = "Learned"
			Lcursedbloodhate = "8000 XP"
		elseIf playerRef.HasSpell(SuH_spell_cursedblood_hate)
			Lcursedbloodbase = "800 XP"
			Lcursedbloodlove = "8000 XP"
			Lcursedbloodhate = "Learned"
		else
			Lcursedbloodbase = "800 XP"
			Lcursedbloodlove = "8000 XP"
			Lcursedbloodhate = "8000 XP"
		endIf
		
		string Lvitaldrainbase
		string Lvitaldrainlove
		string Lvitaldrainhate
		if playerRef.HasSpell(SuH_spell_vitaldrain_base)
			Lvitaldrainbase = "Learned"
			Lvitaldrainlove = "9500 XP"
			Lvitaldrainhate = "9500 XP"
		elseif playerRef.HasSpell(SuH_spell_vitaldrain_love)
			Lvitaldrainbase = "950 XP"
			Lvitaldrainlove = "Learned"
			Lvitaldrainhate = "9500 XP"
		elseif playerRef.HasSpell(SuH_spell_vitaldrain_hate)
			Lvitaldrainbase = "950 XP"
			Lvitaldrainlove = "9500 XP"
			Lvitaldrainhate = "Learned"
		else
			Lvitaldrainbase = "950 XP"
			Lvitaldrainlove = "9500 XP"
			Lvitaldrainhate = "9500 XP"
		endIf
		
		string Lspiritmendbase
		string Lspiritmendlove
		string Lspiritmendhate
		if PlayerRef.HasSpell(SuH_spell_spiritmend_base)
			Lspiritmendbase = "Learned"
			Lspiritmendlove = "5500 XP"
			Lspiritmendhate = "5500 XP"
		elseIf PlayerRef.HasSpell(SuH_spell_spiritmend_love)
			Lspiritmendbase = "550 XP"
			Lspiritmendlove = "Learned"
			Lspiritmendhate = "5500 XP"
		elseIf PlayerRef.HasSpell(SuH_spell_spiritmend_hate)
			Lspiritmendbase = "550 XP"
			Lspiritmendlove = "5500 XP"
			Lspiritmendhate = "Learned"
		else
			Lspiritmendbase = "550 XP"
			Lspiritmendlove = "5500 XP"
			Lspiritmendhate = "5500 XP"
		endIf
		
		string Lsoulbendbase
		string Lsoulbendlove
		string Lsoulbendhate
		if PlayerRef.HasSpell(SuH_spell_soulbend_base)
			Lsoulbendbase = "Learned"
			Lsoulbendlove = "7000 XP"
			Lsoulbendhate = "7000 XP"
		elseIf PlayerRef.HasSpell(SuH_spell_soulbend_love)
			Lsoulbendbase = "700 XP"
			Lsoulbendlove = "Learned"
			Lsoulbendhate = "7000 XP"
		elseIf PlayerRef.HasSpell(SuH_spell_soulbend_hate)
			Lsoulbendbase = "700 XP"
			Lsoulbendlove = "7000 XP"
			Lsoulbendhate = "Learned"
		else
			Lsoulbendbase = "700 XP"
			Lsoulbendlove = "7000 XP"
			Lsoulbendhate = "7000 XP"
		endIf
		
		string Lintimatetouchbase
		string Lintimatetouchlove
		string Lintimatetouchhate
		if PlayerRef.HasSpell(SuH_spell_intimatetouch_base)
			Lintimatetouchbase = "Learned"
			Lintimatetouchlove = "6000 XP"
			Lintimatetouchhate = "6000 XP"
		elseif PlayerRef.HasSpell(SuH_spell_intimatetouch_love)
			Lintimatetouchbase = "600 XP"
			Lintimatetouchlove = "Learned"
			Lintimatetouchhate = "6000 XP"
		elseif PlayerRef.HasSpell(SuH_spell_intimatetouch_hate)
			Lintimatetouchbase = "600 XP"
			Lintimatetouchlove = "6000 XP"
			Lintimatetouchhate = "Learned"
		else
			Lintimatetouchbase = "600 XP"
			Lintimatetouchlove = "6000 XP"
			Lintimatetouchhate = "6000 XP"
		endIf
		
		int perfectorgasmrank = SuH_rank_perfectorgasm.GetValue() as int
		int perfectorgasmcost = Math.Floor((1000*perfectorgasmrank)*1.8+3500)
		int lusciousliquidsrank = SuH_rank_lusciousliquids.GetValue() as int
		int lusciousliquidscost = Math.Floor((1000*lusciousliquidsrank)*1.4+2000)
		int masochistrank = SuH_rank_masochist.GetValue() as int
		int masochistcost = Math.Floor((1000*masochistrank)*1.35+1000)
		int selfstackerrank = SuH_rank_selfstacker.GetValue() as int
		int selfstackercost = Math.Floor((1000*selfstackerrank)*1.95+3000)
		int valuestackerrank = SuH_rank_valuestacker.GetValue() as int
		int valuestackercost = Math.Floor((1000*valuestackerrank)*1.95+6200)
		int savingessencerank = SuH_rank_savingessence.GetValue() as int
		int savingessencecost = Math.Floor((1000*savingessencerank)*1.2+4000)
		;end/
		;ent/ Left Side
		SetCursorPosition(0)
			spell_xp = AddTextOption("XP available", xp)
			AddEmptyOption()
			AddHeaderOption("Spells")
			spell_focusshotbase = AddTextOption("Focus Shot [Base]", Lfocusshotbase)
			spell_focusshotlove = AddTextOption("Focus Shot [Love]", Lfocusshotlove)
			spell_focusshothate = AddTextOption("Focus Shot [Hate]", Lfocusshothate)
			AddEmptyOption()
			spell_spiritmendbase = AddTextOption("Spirit Mend [Base]", Lspiritmendbase)
			spell_spiritmendlove = AddTextOption("Spirit Mend [Love]", Lspiritmendlove)
			spell_spiritmendhate = AddTextOption("Spirit Mend [Hate]", Lspiritmendhate)
			AddEmptyOption()
			spell_intimatetouchbase = AddTextOption("Intimate Touch [Base]", Lintimatetouchbase)
			spell_intimatetouchlove = AddTextOption("Intimate Touch [Love]", Lintimatetouchlove)
			spell_intimatetouchhate = AddTextOption("Intimate Touch [Hate]", Lintimatetouchhate)
			AddEmptyOption()
			spell_soulbendbase = AddTextOption("Soul Bend [Base]", Lsoulbendbase)
			spell_soulbendlove = AddTextOption("Soul Bend [Love]", Lsoulbendlove)
			spell_soulbendhate = AddTextOption("Soul Bend [Hate]", Lsoulbendhate)
			AddEmptyOption()
			spell_cursedbloodbase = AddTextOption("Cursed Blood [Base]", Lcursedbloodbase)
			spell_cursedbloodlove = AddTextOption("Cursed Blood [Love]", Lcursedbloodlove)
			spell_cursedbloodhate = AddTextOption("Cursed Blood [Hate]", Lcursedbloodhate)
			AddEmptyOption()
			spell_vitaldrainbase = AddTextOption("Vital Drain [Base]", Lvitaldrainbase)
			spell_vitaldrainlove = AddTextOption("Vital Drain [Love]", Lvitaldrainlove)
			spell_vitaldrainhate = AddTextOption("Vital Drain [Hate]", Lvitaldrainhate)
		;end/
		;ent Right Side
		SetCursorPosition(1)
			AddEmptyOption()
			AddEmptyOption()
			AddHeaderOption("Passives")
			spell_perfectorgasm = AddTextOption("Perfect Orgasm", "rank "+perfectorgasmrank)
			spell_perfectorgasmrank = AddTextOption(" - Increase Rank", perfectorgasmcost+" XP")
			AddEmptyOption()
			spell_lusciousliquids = AddTextOption("Luscious Liquids", "rank "+lusciousliquidsrank)
			spell_lusciousliquidsrank = AddTextOption(" - Increase Rank", lusciousliquidscost+" XP")
			AddEmptyOption()
			spell_masochist = AddTextOption("Masochist", "rank "+masochistrank)
			spell_masochistrank = AddTextOption(" - Increase Rank", masochistcost+" XP")
			AddEmptyOption()
			spell_selfstacker = AddTextOption("Self Stacker", "rank "+selfstackerrank)
			spell_selfstackerrank = AddTextOption(" - Increase Rank", selfstackercost+" XP")
			AddEmptyOption()
			spell_valuestacker = AddTextOption("Value Stacker", "rank "+valuestackerrank)
			spell_valuestackerrank = AddTextOption(" - Increase Rank", valuestackercost+" XP")
			AddEmptyOption()
			spell_savingessence = AddTextOption("Saving Essence", "rank "+savingessencerank)
			spell_savingessencerank = AddTextOption(" - Increase Rank", savingessencecost+" XP")
		;end/
	;ent/ Help
	elseIf (page == "Help")
		SetCursorFillMode(TOP_TO_BOTTOM)
		
		;ent/ Left Side
		SetCursorPosition(0)
		AddHeaderOption("Basic Mechanics")
		help1 = AddTextOption("Earning XP", " ")
		help2 = AddTextOption("Spending XP", " ")
		help4 = AddTextOption("Earning SP", " ")
		help5 = AddTextOption("Absorption", " ")
		help10 = AddTextOption("Status Caps", " ")
		help8 = AddTextOption("Sex Drops", " ")
		help9 = AddTextOption("Death Drops", " ")
		help12 = AddTextOption("Combat Seduction", " ")
		;end/
		;ent Right Side
		SetCursorPosition(1)
		AddHeaderOption("Advanced Mechanics")
		help3 = AddTextOption("Desire ", " ")
		help14 = AddTextOption("Desire Drain", " ")
		help6 = AddTextOption("Spells ", " ")
		help7 = AddTextOption("Passives ", " ")
		help11 = AddTextOption("Stacks ", " ")
		help13 = AddTextOption("Managing Drain", " ")
		;
		;end/
	endIf
endEvent
;end/
;ent/ OnOptionSelect
Event OnOptionSelect(int option)
	;ent/ Status / Settings
	if(CurrentPage == "Status / Settings")
		if(option == status_SETdrainkill)
			if SuH_SETallowdrainkill.GetValue()
				SuH_SETallowdrainkill.SetValue(0)
				SetToggleOptionValue(status_SETdrainkill, FALSE)
			else
				SuH_SETallowdrainkill.SetValue(1)
				SetToggleOptionValue(status_SETdrainkill, TRUE)
			endIf
		elseif(option == status_SETcombatseduction)
			if SuH_SETcombatseduction.GetValue()
				SuH_SETcombatseduction.SetValue(0)
				SetToggleOptionValue(status_SETcombatseduction, FALSE)
			else
				SuH_SETcombatseduction.SetValue(1)
				SetToggleOptionValue(status_SETcombatseduction, TRUE)
			endIf
		elseif(option == status_SETallowmalehomo)
			if SuH_SETallowmalehomo.GetValue()
				SuH_SETallowmalehomo.SetValue(0)
				SetToggleOptionValue(status_SETallowmalehomo, FALSE)
			else
				SuH_SETallowmalehomo.SetValue(1)
				SetToggleOptionValue(status_SETallowmalehomo, TRUE)
			endIf
		elseif(option == status_SETallowfemalehomo)
			if SuH_SETallowfemalehomo.GetValue()
				SuH_SETallowfemalehomo.SetValue(0)
				SetToggleOptionValue(status_SETallowfemalehomo, FALSE)
			else
				SuH_SETallowfemalehomo.SetValue(1)
				SetToggleOptionValue(status_SETallowfemalehomo, TRUE)
			endIf
		elseif(option == status_SETessentialacts)
			if SuH_SETessentialacts.GetValue()
				SuH_SETessentialacts.SetValue(0)
				SetToggleOptionValue(status_SETessentialacts, FALSE)
			else
				SuH_SETessentialacts.SetValue(1)
				SetToggleOptionValue(status_SETessentialacts, TRUE)
			endIf
		endIf
	;end/
	;ent/ Skill Levels
	elseIf(CurrentPage == "Skill Levels")
		if(option == skill_alchemy)
			int sp = SuH_PCSsp.GetValue() as int
			int alchemylvl = playerRef.GetActorValue("alchemy") as int
			int alchemycost = Math.Ceiling(alchemylvl*0.1)
			if sp >= alchemycost
				sp -= alchemycost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("Alchemy")
				alchemylvl = playerRef.GetActorValue("alchemy") as int
				alchemycost = Math.Ceiling(alchemylvl*0.1)
				SetTextOptionValue(skill_alchemy, alchemylvl+" ["+alchemycost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_alteration)
			int sp = SuH_PCSsp.GetValue() as int
			int alterationlvl = playerRef.GetActorValue("alteration") as int
			int alterationcost = Math.Ceiling(alterationlvl*0.1)
			if sp >= alterationcost
				sp -= alterationcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("alteration")
				alterationlvl = playerRef.GetActorValue("alteration") as int
				alterationcost = Math.Ceiling(alterationlvl*0.1)
				SetTextOptionValue(skill_alteration, alterationlvl+" ["+alterationcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_block)
			int sp = SuH_PCSsp.GetValue() as int
			int blocklvl = playerRef.GetActorValue("block") as int
			int blockcost = Math.Ceiling(blocklvl*0.1)
			if sp >= blockcost
				sp -= blockcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("block")
				blocklvl = playerRef.GetActorValue("block") as int
				blockcost = Math.Ceiling(blocklvl*0.1)
				SetTextOptionValue(skill_block, blocklvl+" ["+blockcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_conjuration)
			int sp = SuH_PCSsp.GetValue() as int
			int conjurationlvl = playerRef.GetActorValue("conjuration") as int
			int conjurationcost = Math.Ceiling(conjurationlvl*0.1)
			if sp >= conjurationcost
				sp -= conjurationcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("conjuration")
				conjurationlvl = playerRef.GetActorValue("conjuration") as int
				conjurationcost = Math.Ceiling(conjurationlvl*0.1)
				SetTextOptionValue(skill_conjuration, conjurationlvl+" ["+conjurationcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_destruction)
			int sp = SuH_PCSsp.GetValue() as int
			int destructionlvl = playerRef.GetActorValue("destruction") as int
			int destructioncost = Math.Ceiling(destructionlvl*0.1)
			if sp >= destructioncost
				sp -= destructioncost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("destruction")
				destructionlvl = playerRef.GetActorValue("destruction") as int
				destructioncost = Math.Ceiling(destructionlvl*0.1)
				SetTextOptionValue(skill_destruction, destructionlvl+" ["+destructioncost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_enchanting)
			int sp = SuH_PCSsp.GetValue() as int
			int enchantinglvl = playerRef.GetActorValue("enchanting") as int
			int enchantingcost = Math.Ceiling(enchantinglvl*0.1)
			if sp >= enchantingcost
				sp -= enchantingcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("enchanting")
				enchantinglvl = playerRef.GetActorValue("enchanting") as int
				enchantingcost = Math.Ceiling(enchantinglvl*0.1)
				SetTextOptionValue(skill_enchanting, enchantinglvl+" ["+enchantingcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_heavyarmor)
			int sp = SuH_PCSsp.GetValue() as int
			int heavyarmorlvl = playerRef.GetActorValue("heavyarmor") as int
			int heavyarmorcost = Math.Ceiling(heavyarmorlvl*0.1)
			if sp >= heavyarmorcost
				sp -= heavyarmorcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("heavyarmor")
				heavyarmorlvl = playerRef.GetActorValue("heavyarmor") as int
				heavyarmorcost = Math.Ceiling(heavyarmorlvl*0.1)
				SetTextOptionValue(skill_heavyarmor, heavyarmorlvl+" ["+heavyarmorcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_illusion)
			int sp = SuH_PCSsp.GetValue() as int
			int illusionlvl = playerRef.GetActorValue("illusion") as int
			int illusioncost = Math.Ceiling(illusionlvl*0.1)
			if sp >= illusioncost
				sp -= illusioncost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("illusion")
				illusionlvl = playerRef.GetActorValue("illusion") as int
				illusioncost = Math.Ceiling(illusionlvl*0.1)
				SetTextOptionValue(skill_illusion, illusionlvl+" ["+illusioncost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_lightarmor)
			int sp = SuH_PCSsp.GetValue() as int
			int lightarmorlvl = playerRef.GetActorValue("lightarmor") as int
			int lightarmorcost = Math.Ceiling(lightarmorlvl*0.1)
			if sp >= lightarmorcost
				sp -= lightarmorcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("lightarmor")
				lightarmorlvl = playerRef.GetActorValue("lightarmor") as int
				lightarmorcost = Math.Ceiling(lightarmorlvl*0.1)
				SetTextOptionValue(skill_lightarmor, lightarmorlvl+" ["+lightarmorcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_lockpicking)
			int sp = SuH_PCSsp.GetValue() as int
			int lockpickinglvl = playerRef.GetActorValue("lockpicking") as int
			int lockpickingcost = Math.Ceiling(lockpickinglvl*0.1)
			if sp >= lockpickingcost
				sp -= lockpickingcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("lockpicking")
				lockpickinglvl = playerRef.GetActorValue("lockpicking") as int
				lockpickingcost = Math.Ceiling(lockpickinglvl*0.1)
				SetTextOptionValue(skill_lockpicking, lockpickinglvl+" ["+lockpickingcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_marksman)
			int sp = SuH_PCSsp.GetValue() as int
			int marksmanlvl = playerRef.GetActorValue("marksman") as int
			int marksmancost = Math.Ceiling(marksmanlvl*0.1)
			if sp >= marksmancost
				sp -= marksmancost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("marksman")
				marksmanlvl = playerRef.GetActorValue("marksman") as int
				marksmancost = Math.Ceiling(marksmanlvl*0.1)
				SetTextOptionValue(skill_marksman, marksmanlvl+" ["+marksmancost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_onehanded)
			int sp = SuH_PCSsp.GetValue() as int
			int onehandedlvl = playerRef.GetActorValue("onehanded") as int
			int onehandedcost = Math.Ceiling(onehandedlvl*0.1)
			if sp >= onehandedcost
				sp -= onehandedcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("onehanded")
				onehandedlvl = playerRef.GetActorValue("onehanded") as int
				onehandedcost = Math.Ceiling(onehandedlvl*0.1)
				SetTextOptionValue(skill_onehanded, onehandedlvl+" ["+onehandedcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_pickpocket)
			int sp = SuH_PCSsp.GetValue() as int
			int pickpocketlvl = playerRef.GetActorValue("pickpocket") as int
			int pickpocketcost = Math.Ceiling(pickpocketlvl*0.1)
			if sp >= pickpocketcost
				sp -= pickpocketcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("pickpocket")
				pickpocketlvl = playerRef.GetActorValue("pickpocket") as int
				pickpocketcost = Math.Ceiling(pickpocketlvl*0.1)
				SetTextOptionValue(skill_pickpocket, pickpocketlvl+" ["+pickpocketcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_restoration)
			int sp = SuH_PCSsp.GetValue() as int
			int restorationlvl = playerRef.GetActorValue("restoration") as int
			int restorationcost = Math.Ceiling(restorationlvl*0.1)
			if sp >= restorationcost
				sp -= restorationcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("restoration")
				restorationlvl = playerRef.GetActorValue("restoration") as int
				restorationcost = Math.Ceiling(restorationlvl*0.1)
				SetTextOptionValue(skill_restoration, restorationlvl+" ["+restorationcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_smithing)
			int sp = SuH_PCSsp.GetValue() as int
			int smithinglvl = playerRef.GetActorValue("smithing") as int
			int smithingcost = Math.Ceiling(smithinglvl*0.1)
			if sp >= smithingcost
				sp -= smithingcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("smithing")
				smithinglvl = playerRef.GetActorValue("smithing") as int
				smithingcost = Math.Ceiling(smithinglvl*0.1)
				SetTextOptionValue(skill_smithing, smithinglvl+" ["+smithingcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_sneak)
			int sp = SuH_PCSsp.GetValue() as int
			int sneaklvl = playerRef.GetActorValue("sneak") as int
			int sneakcost = Math.Ceiling(sneaklvl*0.1)
			if sp >= sneakcost
				sp -= sneakcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("sneak")
				sneaklvl = playerRef.GetActorValue("sneak") as int
				sneakcost = Math.Ceiling(sneaklvl*0.1)
				SetTextOptionValue(skill_sneak, sneaklvl+" ["+sneakcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_speechcraft)
			int sp = SuH_PCSsp.GetValue() as int
			int speechcraftlvl = playerRef.GetActorValue("speechcraft") as int
			int speechcraftcost = Math.Ceiling(speechcraftlvl*0.1)
			if sp >= speechcraftcost
				sp -= speechcraftcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("speechcraft")
				speechcraftlvl = playerRef.GetActorValue("speechcraft") as int
				speechcraftcost = Math.Ceiling(speechcraftlvl*0.1)
				SetTextOptionValue(skill_speechcraft, speechcraftlvl+" ["+speechcraftcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		elseif(option == skill_twohanded)
			int sp = SuH_PCSsp.GetValue() as int
			int twohandedlvl = playerRef.GetActorValue("twohanded") as int
			int twohandedcost = Math.Ceiling(twohandedlvl*0.1)
			if sp >= twohandedcost
				sp -= twohandedcost
				SuH_PCSsp.SetValue(sp)
				Game.IncrementSkill("twohanded")
				twohandedlvl = playerRef.GetActorValue("twohanded") as int
				twohandedcost = Math.Ceiling(twohandedlvl*0.1)
				SetTextOptionValue(skill_twohanded, twohandedlvl+" ["+twohandedcost+" SP]")
				SetTextOptionValue(skill_sp, SuH_PCSsp.GetValue() as int)
			endIf
		endIf
	;end/
	;ent/ Heart Levels
	elseIf(CurrentPage == "Heart Levels")
		if(option == heart_caphealth)
			int xp = SuH_PCSxp.GetValue() as int
			int caphealth = SuH_PCScaphealth.GetValue() as int
			int caphealthcost = Math.Floor((caphealth - 99)*1.2*80)
			if xp >= caphealthcost
				xp -= caphealthcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCScaphealth.SetValue(caphealth+1)
				caphealth = SuH_PCScaphealth.GetValue() as int
				caphealthcost = Math.Floor((caphealth - 99)*1.2*80)
				SetTextOptionValue(heart_caphealth, caphealth+" ["+caphealthcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_capmagicka)
			int xp = SuH_PCSxp.GetValue() as int
			int capmagicka = SuH_PCScapmagicka.GetValue() as int
			int capmagickacost = Math.Floor((capmagicka - 99)*1.2*80)
			if xp >= capmagickacost
				xp -= capmagickacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCScapmagicka.SetValue(capmagicka+1)
				capmagicka = SuH_PCScapmagicka.GetValue() as int
				capmagickacost = Math.Floor((capmagicka - 99)*1.2*80)
				SetTextOptionValue(heart_capmagicka, capmagicka+" ["+capmagickacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_capstamina)
			int xp = SuH_PCSxp.GetValue() as int
			int capstamina = SuH_PCScapstamina.GetValue() as int
			int capstaminacost = Math.Floor((capstamina - 99)*1.2*80)
			if xp >= capstaminacost
				xp -= capstaminacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCScapstamina.SetValue(capstamina+1)
				capstamina = SuH_PCScapstamina.GetValue() as int
				capstaminacost = Math.Floor((capstamina - 99)*1.2*80)
				SetTextOptionValue(heart_capstamina, capstamina+" ["+capstaminacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_stacksex)
			int xp = SuH_PCSxp.GetValue() as int
			int stacksex = SuH_PCSstackmaxsex.GetValue() as int
			int stacksexcost = Math.Floor(stacksex*2.2*240)
			if xp >= stacksexcost
				xp -= stacksexcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSstackmaxsex.SetValue(stacksex+1)
				stacksex = SuH_PCSstackmaxsex.GetValue() as int
				stacksexcost = Math.Floor(stacksex*2.2*240)
				SetTextOptionValue(heart_stacksex, stacksex+" ["+stacksexcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_stacksperm)
			int xp = SuH_PCSxp.GetValue() as int
			int stacksperm = SuH_PCSstackmaxsperm.GetValue() as int
			int stackspermcost = Math.Floor(stacksperm*2.2*240)
			if xp >= stackspermcost
				xp -= stackspermcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSstackmaxsperm.SetValue(stacksperm+1)
				stacksperm = SuH_PCSstackmaxsperm.GetValue() as int
				stackspermcost = Math.Floor(stacksperm*2.2*240)
				SetTextOptionValue(heart_stacksperm, stacksperm+" ["+stackspermcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_stackmilk)
			int xp = SuH_PCSxp.GetValue() as int
			int stackmilk = SuH_PCSstackmaxmilk.GetValue() as int
			int stackmilkcost = Math.Floor(stackmilk*2.2*240)
			if xp >= stackmilkcost
				xp -= stackmilkcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSstackmaxmilk.SetValue(stackmilk+1)
				stackmilk = SuH_PCSstackmaxmilk.GetValue() as int
				stackmilkcost = Math.Floor(stackmilk*2.2*240)
				SetTextOptionValue(heart_stackmilk, stackmilk+" ["+stackmilkcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_absorbhealth)
			int xp = SuH_PCSxp.GetValue() as int
			int absorbhealth = SuH_PCSabsorbhealth.GetValue() as int
			int absorbhealthcost = Math.Floor(absorbhealth*1.2*200)
			if xp >= absorbhealthcost
				xp -= absorbhealthcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSabsorbhealth.SetValue(absorbhealth+1)
				absorbhealth = SuH_PCSabsorbhealth.GetValue() as int
				absorbhealthcost = Math.Floor(absorbhealth*1.2*200)
				SetTextOptionValue(heart_absorbhealth, absorbhealth+" ["+absorbhealthcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_absorbmagicka)
			int xp = SuH_PCSxp.GetValue() as int
			int absorbmagicka = SuH_PCSabsorbmagicka.GetValue() as int
			int absorbmagickacost = Math.Floor(absorbmagicka*1.2*200)
			if xp >= absorbmagickacost
				xp -= absorbmagickacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSabsorbmagicka.SetValue(absorbmagicka+1)
				absorbmagicka = SuH_PCSabsorbmagicka.GetValue() as int
				absorbmagickacost = Math.Floor(absorbmagicka*1.2*200)
				SetTextOptionValue(heart_absorbmagicka, absorbmagicka+" ["+absorbmagickacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_absorbstamina)
			int xp = SuH_PCSxp.GetValue() as int
			int absorbstamina = SuH_PCSabsorbstamina.GetValue() as int
			int absorbstaminacost = Math.Floor(absorbstamina*1.2*200)
			if xp >= absorbstaminacost
				xp -= absorbstaminacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSabsorbstamina.SetValue(absorbstamina+1)
				absorbstamina = SuH_PCSabsorbstamina.GetValue() as int
				absorbstaminacost = Math.Floor(absorbstamina*1.2*200)
				SetTextOptionValue(heart_absorbstamina, absorbstamina+" ["+absorbstaminacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_spermhealth)
			int xp = SuH_PCSxp.GetValue() as int
			int spermhealth = SuH_PCSspermhealth.GetValue() as int
			int spermhealthcost = Math.Floor(spermhealth*1.4*200)
			if xp >= spermhealthcost
				xp -= spermhealthcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSspermhealth.SetValue(spermhealth+1)
				spermhealth = SuH_PCSspermhealth.GetValue() as int
				spermhealthcost = Math.Floor(spermhealth*1.4*200)
				SetTextOptionValue(heart_spermhealth, spermhealth+" ["+spermhealthcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_spermmagicka)
			int xp = SuH_PCSxp.GetValue() as int
			int spermmagicka = SuH_PCSspermmagicka.GetValue() as int
			int spermmagickacost = Math.Floor(spermmagicka*1.4*200)
			if xp >= spermmagickacost
				xp -= spermmagickacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSspermmagicka.SetValue(spermmagicka+1)
				spermmagicka = SuH_PCSspermmagicka.GetValue() as int
				spermmagickacost = Math.Floor(spermmagicka*1.4*200)
				SetTextOptionValue(heart_spermmagicka, spermmagicka+" ["+spermmagickacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_spermstamina)
			int xp = SuH_PCSxp.GetValue() as int
			int spermstamina = SuH_PCSspermstamina.GetValue() as int
			int spermstaminacost = Math.Floor(spermstamina*1.4*200)
			if xp >= spermstaminacost
				xp -= spermstaminacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSspermstamina.SetValue(spermstamina+1)
				spermstamina = SuH_PCSspermstamina.GetValue() as int
				spermstaminacost = Math.Floor(spermstamina*1.4*200)
				SetTextOptionValue(heart_spermstamina, spermstamina+" ["+spermstaminacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_milkhealth)
			int xp = SuH_PCSxp.GetValue() as int
			int milkhealth = SuH_PCSmilkhealth.GetValue() as int
			int milkhealthcost = Math.Floor(milkhealth*1.4*200)
			if xp >= milkhealthcost
				xp -= milkhealthcost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSmilkhealth.SetValue(milkhealth+1)
				milkhealth = SuH_PCSmilkhealth.GetValue() as int
				milkhealthcost = Math.Floor(milkhealth*1.4*200)
				SetTextOptionValue(heart_milkhealth, milkhealth+" ["+milkhealthcost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_milkmagicka)
			int xp = SuH_PCSxp.GetValue() as int
			int milkmagicka = SuH_PCSmilkmagicka.GetValue() as int
			int milkmagickacost = Math.Floor(milkmagicka*1.4*200)
			if xp >= milkmagickacost
				xp -= milkmagickacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSmilkmagicka.SetValue(milkmagicka+1)
				milkmagicka = SuH_PCSmilkmagicka.GetValue() as int
				milkmagickacost = Math.Floor(milkmagicka*1.4*200)
				SetTextOptionValue(heart_milkmagicka, milkmagicka+" ["+milkmagickacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_milkstamina)
			int xp = SuH_PCSxp.GetValue() as int
			int milkstamina = SuH_PCSmilkstamina.GetValue() as int
			int milkstaminacost = Math.Floor(milkstamina*1.4*200)
			if xp >= milkstaminacost
				xp -= milkstaminacost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSmilkstamina.SetValue(milkstamina+1)
				milkstamina = SuH_PCSmilkstamina.GetValue() as int
				milkstaminacost = Math.Floor(milkstamina*1.4*200)
				SetTextOptionValue(heart_milkstamina, milkstamina+" ["+milkstaminacost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		elseif(option == heart_xpgain)
			int xp = SuH_PCSxp.GetValue() as int
			float xpgain = SuH_PCSxpgain.GetValue()
			int xpgaincost = Math.Floor(((xpgain*100) - 99)*1.5*250)
			if xp >= xpgaincost
				xp -= xpgaincost
				SuH_PCSxp.SetValue(xp)
				SuH_PCSxpgain.SetValue(xpgain+0.01)
				xpgain = SuH_PCSxpgain.GetValue()
				int xpgaindisplay = Math.Floor(xpgain*100)
				xpgaincost = Math.Floor(((xpgain*100) - 99)*1.5*250)
				SetTextOptionValue(heart_xpgain, xpgaindisplay+"% ["+xpgaincost+" XP]")
				SetTextOptionValue(heart_xp, xp)
			endIf
		endIf
	;end/
	;ent/ Spells
	elseIf(CurrentPage == "Spells / Passives")
		if(option == spell_focusshotbase)
			if PlayerRef.HasSpell(SuH_spell_focusshot_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 500
					xp -= 500
					SuH_PCSxp.SetValue(xp)
					PlayerRef.AddSpell(SuH_spell_focusshot_base)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_love)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_drain)
					SetTextOptionValue(spell_focusshotbase, "Learned")
					SetTextOptionValue(spell_focusshotlove, "5000 XP")
					SetTextOptionValue(spell_focusshothate, "5000 XP")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_focusshotlove)
			if PlayerRef.HasSpell(SuH_spell_focusshot_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 5000
					xp -= 5000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_base)
					PlayerRef.AddSpell(SuH_spell_focusshot_love)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_drain)
					SetTextOptionValue(spell_focusshotbase, "500 XP")
					SetTextOptionValue(spell_focusshotlove, "Learned")
					SetTextOptionValue(spell_focusshothate, "5000 XP")
				endIf
			endIf
		elseif(option == spell_focusshothate)
			if PlayerRef.HasSpell(SuH_spell_focusshot_drain)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 5000
					xp -= 5000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_base)
					PlayerRef.RemoveSpell(SuH_spell_focusshot_love)
					PlayerRef.AddSpell(SuH_spell_focusshot_drain)
					SetTextOptionValue(spell_focusshotbase, "500 XP")
					SetTextOptionValue(spell_focusshotlove, "5000 XP")
					SetTextOptionValue(spell_focusshothate, "Learned")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_spiritmendbase)
			if PlayerRef.HasSpell(SuH_spell_spiritmend_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 550
					xp -= 550
					SuH_PCSxp.SetValue(xp)
					PlayerRef.AddSpell(SuH_spell_spiritmend_base)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_love)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_hate)
					SetTextOptionValue(spell_spiritmendbase, "Learned")
					SetTextOptionValue(spell_spiritmendlove, "5500 XP")
					SetTextOptionValue(spell_spiritmendhate, "5500 XP")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_spiritmendlove)
			if PlayerRef.HasSpell(SuH_spell_spiritmend_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 5500
					xp -= 5500
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_base)
					PlayerRef.AddSpell(SuH_spell_spiritmend_love)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_hate)
					SetTextOptionValue(spell_spiritmendbase, "550 XP")
					SetTextOptionValue(spell_spiritmendlove, "Learned")
					SetTextOptionValue(spell_spiritmendhate, "5500 XP")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_spiritmendhate)
			if PlayerRef.HasSpell(SuH_spell_spiritmend_hate)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 5500
					xp -= 5500
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_base)
					PlayerRef.RemoveSpell(SuH_spell_spiritmend_love)
					PlayerRef.AddSpell(SuH_spell_spiritmend_hate)
					SetTextOptionValue(spell_spiritmendbase, "550 XP")
					SetTextOptionValue(spell_spiritmendlove, "5500 XP")
					SetTextOptionValue(spell_spiritmendhate, "Learned")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_soulbendbase)
			if PlayerRef.HasSpell(SuH_spell_soulbend_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 700
					xp -= 700
					SuH_PCSxp.SetValue(xp)
					PlayerRef.AddSpell(SuH_spell_soulbend_base)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_love)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_hate)
					SetTextOptionValue(spell_soulbendbase, "Learned")
					SetTextOptionValue(spell_soulbendlove, "7000 XP")
					SetTextOptionValue(spell_soulbendhate, "7000 XP")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_soulbendlove)
			if PlayerRef.HasSpell(SuH_spell_soulbend_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 7000
					xp -= 7000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_base)
					PlayerRef.AddSpell(SuH_spell_soulbend_love)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_hate)
					SetTextOptionValue(spell_soulbendbase, "700 XP")
					SetTextOptionValue(spell_soulbendlove, "Learned")
					SetTextOptionValue(spell_soulbendhate, "7000 XP")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_soulbendhate)
			if PlayerRef.HasSpell(SuH_spell_soulbend_hate)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 7000
					xp -= 7000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_base)
					PlayerRef.RemoveSpell(SuH_spell_soulbend_love)
					PlayerRef.AddSpell(SuH_spell_soulbend_hate)
					SetTextOptionValue(spell_soulbendbase, "700 XP")
					SetTextOptionValue(spell_soulbendlove, "7000 XP")
					SetTextOptionValue(spell_soulbendhate, "Learned")
					SetTextOptionValue(spell_xp, xp)
				endIf
			endIf
		elseif(option == spell_cursedbloodbase)
			if playerRef.HasSpell(SuH_spell_cursedblood_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 800
					xp -= 800
					SuH_PCSxp.SetValue(xp)
					PlayerRef.AddSpell(SuH_spell_cursedblood_base)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_love)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_hate)
					SetTextOptionValue(spell_cursedbloodbase, "Learned")
					SetTextOptionValue(spell_cursedbloodlove, "8000 XP")
					SetTextOptionValue(spell_cursedbloodhate, "8000 XP")
				endIf
			endIf
		elseif(option == spell_cursedbloodlove)
			if playerRef.HasSpell(SuH_spell_cursedblood_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 8000
					xp -= 8000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_base)
					PlayerRef.AddSpell(SuH_spell_cursedblood_love)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_hate)
					SetTextOptionValue(spell_cursedbloodbase, "800 XP")
					SetTextOptionValue(spell_cursedbloodlove, "Learned")
					SetTextOptionValue(spell_cursedbloodhate, "8000 XP")
				endIf
			endIf
		elseif(option == spell_cursedbloodhate)
			if playerRef.HasSpell(SuH_spell_cursedblood_hate)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 8000
					xp -= 8000
					SuH_PCSxp.SetValue(xp)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_base)
					PlayerRef.RemoveSpell(SuH_spell_cursedblood_love)
					PlayerRef.AddSpell(SuH_spell_cursedblood_hate)
					SetTextOptionValue(spell_cursedbloodbase, "800 XP")
					SetTextOptionValue(spell_cursedbloodlove, "8000 XP")
					SetTextOptionValue(spell_cursedbloodhate, "Learned")
				endIf
			endIf
		elseIf(option == spell_vitaldrainbase)
			if playerRef.HasSpell(SuH_spell_vitaldrain_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 950
					xp -= 950
					PlayerRef.AddSpell(SuH_spell_vitaldrain_base)
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_love)
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_hate)
					SetTextOptionValue(spell_vitaldrainbase, "Learned")
					SetTextOptionValue(spell_vitaldrainlove, "9500 XP")
					SetTextOptionValue(spell_vitaldrainhate, "9500 XP")
				endIf
			endIf
		elseIf(option == spell_vitaldrainlove)
			if playerRef.HasSpell(SuH_spell_vitaldrain_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 9500
					xp -= 9500
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_base)
					PlayerRef.AddSpell(SuH_spell_vitaldrain_love)
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_hate)
					SetTextOptionValue(spell_vitaldrainbase, "950 XP")
					SetTextOptionValue(spell_vitaldrainlove, "Learned")
					SetTextOptionValue(spell_vitaldrainhate, "9500 XP")
				endIf
			endIf
		elseIf(option == spell_vitaldrainhate)
			if playerRef.HasSpell(SuH_spell_vitaldrain_hate)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 9500
					xp -= 9500
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_base)
					PlayerRef.RemoveSpell(SuH_spell_vitaldrain_love)
					PlayerRef.AddSpell(SuH_spell_vitaldrain_hate)
					SetTextOptionValue(spell_vitaldrainbase, "950 XP")
					SetTextOptionValue(spell_vitaldrainlove, "9500 XP")
					SetTextOptionValue(spell_vitaldrainhate, "Learned")
				endIf
			endIf
		elseIf(option == spell_intimatetouchbase)
			if playerRef.HasSpell(SuH_spell_intimatetouch_base)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 600
					xp -= 600
					playerRef.AddSpell(SuH_spell_intimatetouch_base)
					playerRef.RemoveSpell(SuH_spell_intimatetouch_love)
					playerRef.RemoveSpell(SuH_spell_intimatetouch_hate)
					SetTextOptionValue(spell_intimatetouchbase, "Learned")
					SetTextOptionValue(spell_intimatetouchlove, "6000 XP")
					SetTextOptionValue(spell_intimatetouchhate, "6000 XP")
				endIf
			endIf
		elseIf(option == spell_intimatetouchlove)
			if playerRef.HasSpell(SuH_spell_intimatetouch_love)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 6000
					xp -= 6000
					playerRef.RemoveSpell(SuH_spell_intimatetouch_base)
					playerRef.AddSpell(SuH_spell_intimatetouch_love)
					playerRef.RemoveSpell(SuH_spell_intimatetouch_hate)
					SetTextOptionValue(spell_intimatetouchbase, "600 XP")
					SetTextOptionValue(spell_intimatetouchlove, "Learned")
					SetTextOptionValue(spell_intimatetouchhate, "6000 XP")
				endIf
			endIf
		elseIf(option == spell_intimatetouchhate)
			if playerRef.HasSpell(SuH_spell_intimatetouch_hate)
				;do nothing
			else
				int xp = SuH_PCSxp.GetValue() as int
				if xp >= 6000
					xp -= 6000
					playerRef.RemoveSpell(SuH_spell_intimatetouch_base)
					playerRef.RemoveSpell(SuH_spell_intimatetouch_love)
					playerRef.AddSpell(SuH_spell_intimatetouch_hate)
					SetTextOptionValue(spell_intimatetouchbase, "600 XP")
					SetTextOptionValue(spell_intimatetouchlove, "6000 XP")
					SetTextOptionValue(spell_intimatetouchhate, "Learned")
				endIf
			endIf
			
		elseif(option == spell_perfectorgasmrank)
				int xp = SuH_PCSxp.GetValue() as int
				int perfectorgasmrank = SuH_rank_perfectorgasm.GetValue() as int
				int perfectorgasmcost = Math.Floor((1000*perfectorgasmrank)*1.8+3500)
			if	perfectorgasmrank >= 99
				debug.MessageBox("Perfect Orgasm has reached its max rank!")
			elseif xp >= perfectorgasmcost
				xp -= perfectorgasmcost
				SuH_PCSxp.SetValue(xp)
				int x = perfectorgasmrank + 1
				int y = Math.Floor((1500*x)*1.8+3500)
				SuH_rank_perfectorgasm.SetValue(x)
				SetTextOptionValue(spell_perfectorgasm, "rank "+ x)
				SetTextOptionValue(spell_perfectorgasmrank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endIf
		elseif(option == spell_lusciousliquidsrank)
				int xp = SuH_PCSxp.GetValue() as int
				int lusciousliquidsrank = SuH_rank_lusciousliquids.GetValue() as int
				int lusciousliquidscost = Math.Floor((1000*lusciousliquidsrank)*1.4+2000)
			if xp >= lusciousliquidscost
				xp -= lusciousliquidscost
				SuH_PCSxp.SetValue(xp)
				int x = lusciousliquidsrank + 1
				int y = Math.Floor((1000*x)*1.4+2000)
				SuH_rank_lusciousliquids.SetValue(x)
				SetTextOptionValue(spell_lusciousliquids, "rank "+ x)
				SetTextOptionValue(spell_lusciousliquidsrank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endIf
		elseif(option == spell_masochistrank)
				int xp = SuH_PCSxp.GetValue() as int
				int masochistrank = SuH_rank_masochist.GetValue() as int
				int masochistcost = Math.Floor((1000*masochistrank)*1.35+1000)
			if xp >= masochistcost
				xp -= masochistcost
				SuH_PCSxp.SetValue(xp)
				int x = masochistrank +1
				int y = Math.Floor((1000*x)*1.35+1000)
				SuH_rank_masochist.SetValue(x)
				SetTextOptionValue(spell_masochist, "rank "+x)
				SetTextOptionValue(spell_masochistrank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endif
		elseif(option == spell_selfstackerrank)
				int xp = SuH_PCSxp.GetValue() as int
				int selfstackerrank = SuH_rank_selfstacker.GetValue() as int
				int selfstackercost = Math.Floor((1000*selfstackerrank)*1.95+3000)
			if xp >= selfstackercost
				xp -= selfstackercost
				SuH_PCSxp.SetValue(xp)
				int x = selfstackerrank +1
				int y = Math.Floor((1000*x)*1.95+3000)
				SuH_rank_masochist.SetValue(x)
				SetTextOptionValue(spell_selfstacker, "rank "+x)
				SetTextOptionValue(spell_selfstackerrank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endif
		elseif(option == spell_valuestackerrank)
				int xp = SuH_PCSxp.GetValue() as int
				int valuestackerrank = SuH_rank_valuestacker.GetValue() as int
				int valuestackercost = Math.Floor((1000*valuestackerrank)*1.95+6200)
			if xp >= valuestackercost
				xp -= valuestackercost
				SuH_PCSxp.SetValue(xp)
				int x = valuestackerrank +1
				int y = Math.Floor((1000*x)*1.95+6200)
				SuH_rank_masochist.SetValue(x)
				SetTextOptionValue(spell_valuestacker, "rank "+x)
				SetTextOptionValue(spell_valuestackerrank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endif
		elseif(option == spell_savingessencerank)
				int xp = SuH_PCSxp.GetValue() as int
				int savingessencerank = SuH_rank_savingessence.GetValue() as int
				int savingessencecost = Math.Floor((1000*savingessencerank)*1.2+4000)
			if xp >= savingessencecost
				xp -= savingessencecost
				SuH_PCSxp.SetValue(xp)
				int x = savingessencerank +1
				int y = Math.Floor((1000*x)*1.2+4000)
				SuH_rank_masochist.SetValue(x)
				SetTextOptionValue(spell_savingessence, "rank "+x)
				SetTextOptionValue(spell_savingessencerank, y+" XP")
				SetTextOptionValue(spell_xp, xp)
			endif
		endIf
	;end/
	endIf
endEvent
;end/
;ent/ OnOptionSliderOpen
Event OnOptionSliderOpen(int option)
	if(CurrentPage == "Status / Settings")
		if(option == status_SETnpc2pchealth)
			SetSliderDialogStartValue(SuH_SETnpc2pchealth.GetValue()*100)
			SetSliderDialogDefaultValue(20)
			SetSliderDialogRange(0,100)
			SetSliderDialogInterval(5)
		elseIf(option == status_SETpc2npchealth)
			SetSliderDialogStartValue(SuH_SETpc2npchealth.GetValue()*100)
			SetSliderDialogDefaultValue(20)
			SetSliderDialogRange(0,100)
			SetSliderDialogInterval(5)
		elseIf(option == status_SETnpc2npchealth)
			SetSliderDialogStartValue(SuH_SETnpc2npchealth.GetValue()*100)
			SetSliderDialogDefaultValue(20)
			SetSliderDialogRange(0,100)
			SetSliderDialogInterval(5)
		endIf
	elseIf(CurrentPage == "Skill Levels")
		if(option == skill_convert)
			int x = SuH_PCSxp.GetValue() as int
			int y = Math.Floor(x/10)
			int z = y*10
			SetSliderDialogStartValue(0)
			SetSliderDialogDefaultValue(0)
			SetSliderDialogRange(0,z)
			SetSliderDialogInterval(10)
		endIf
	endIf
endEvent
;end/
;ent/ OnOptionSliderAccept
Event OnOptionSliderAccept(int option, float value)
	if(CurrentPage == "Status / Settings")
		if(option == status_SETnpc2pchealth)
			SuH_SETnpc2pchealth.SetValue(value/100)
			SetSliderOptionValue(status_SETnpc2pchealth, value, "{0}% Health")
		elseif(option == status_SETpc2npchealth)
			SuH_SETpc2npchealth.SetValue(value/100)
			SetSliderOptionValue(status_SETpc2npchealth, value, "{0}% Health")
		elseif(option == status_SETnpc2npchealth)
			SuH_SETnpc2npchealth.SetValue(value/100)
			SetSliderOptionValue(status_SETnpc2npchealth, value, "{0}% Health")
		endIf
	elseIf(CurrentPage == "Skill Levels")
		if(option == skill_convert)
			int x = Math.Floor(value/10)
			int y = SuH_PCSforce.GetValue() as int
			int z = SuH_PCSxp.GetValue() as int
			SuH_PCSxp.SetValue(z-value)
			SuH_PCSforce.SetValue(y+x)
			ForcePageReset()
		endIf
	endIf
endEvent
;end/
;ent/ OnOptionDefault
Event OnOptionDefault(int option)
	if(CurrentPage == "Status / Settings")
		if(option == status_SETdrainkill)
			SuH_SETallowdrainkill.SetValue(1)
			SetToggleOptionValue(status_SETdrainkill, TRUE)
		endIf
	endIf
endEvent
;end/
;ent/ OnOptionHighlight
Event OnOptionHighlight(int option)
	;ent/ Status
	if(CurrentPage == "Status / Settings")
		if(option == status_health)
			SetInfoText("Current Base Health / Cap")
		elseif(option == status_magicka)
			SetInfoText("Current Base Magicka / Cap")
		elseif(option == status_stamina)
			SetInfoText("Current Base Stamina / Cap")
		elseif(option == status_desire)
			SetInfoText("Current Desire Value")
		elseif(option == status_xp)
			SetInfoText("Current XP Value")
		elseif(option == status_xpgain)
			SetInfoText("Current XP gain percentage")
		elseif(option == status_SETdrainkill)
			SetInfoText("When enabled characters can be killed by sex drain. [Default : Enabled]")
		endIf
	;end/
	;ent/ Spells
	elseif(CurrentPage == "Spells / Passives")
		if(option == spell_focusshotbase)
			SetInfoText("Consume 5 Max Stamina and deal 5 damage to the target")
		elseIf(option == spell_focusshotlove)
			SetInfoText("Consume 12 Max Stamina and deal 14 damage to the target")
		elseIf(option == spell_focusshothate)
			SetInfoText("Consume 12 Max Stamina and deal 6 damage to the target while absorbing 3 health")
		elseIf(option == spell_spiritmendbase)
			SetInfoText("Consume 15 Magicka and restore 50% missing Health")
		elseIf(option == spell_spiritmendlove)
			SetInfoText("Consume 20 Magicka and restore 75% Health")
		elseIf(option == spell_spiritmendhate)
			SetInfoText("Consume all Desire, distributing it into all status")
		elseIf(option == spell_cursedbloodbase)
			SetInfoText("Consume 10 Magicka and 5 Stamina and curse the target to take 3 extra damage when hit for 1 minute")
		elseIf(option == spell_cursedbloodlove)
			SetInfoText("Consume 15 Magicka and 15 Stamina and curse the target to take 8 extra damage when hit for 2 minutes")
		elseIf(option == spell_cursedbloodhate)
			SetInfoText("Consume 5 sex stacks and curse the target to die after their next sex act within 10 minutes")
		elseIf(option == spell_vitaldrainbase)
			SetInfoText("Consume lowest stack value from all stacks, draining 1% of the targets status per stack (Doesn't kill targets)")
		elseIf(option == spell_vitaldrainlove)
			SetInfoText("Consume lowest stack value from all stacks, draining 2.5% of the targets status per stack (Doesn't kill targets)")
		elseIf(option == spell_vitaldrainhate)
			SetInfoText("Take 25% of current status and convert 80% as damage to the target")
		elseIf(option == spell_soulbendbase)
			SetInfoText("Consume 10 Health and 20 Magicka to damage the target for 50 Health and reduce their Max Health by 5%")
		elseIf(option == spell_soulbendlove)
			SetInfoText("Consume 20 Health and 25 Magicka and damage the target for 80 Health and reduce their Max Health by 10%")
		elseIf(option == spell_soulbendhate)
			SetInfoText("Consume 80 Health and damage the target for 50% of their current status")
		elseIf(option == spell_intimatetouchbase)
			SetInfoText("Touch the target without aggression consuming up to 15 sex stacks, damaging them for 5% status per stack")
		elseIf(option == spell_intimatetouchlove)
			SetInfoText("Touch the target without aggression consuming up to 9 sex stacks, damaging them for 10% status per stack")
		elseIf(option == spell_intimatetouchhate)
			SetInfoText("Touch the target consume 20 Stamina and 20 Magicka to dropping the target's Stamina and Magicka to 0")
			
		elseIf(option == spell_perfectorgasm)
			SetInfoText("Increases the chance of a special drop upon orgasms by 1% per rank")
		elseIf(option == spell_lusciousliquids)
			SetInfoText("Sperm and Milk recovers 5 points of missing status per rank when consumed")
		elseIf(option == spell_masochist)
			SetInfoText("Grants 5 Desire per rank when hit")
		elseIf(option == spell_selfstacker)
			SetInfoText("Grants 1 stack per rank based on gender (m/sperm f/milk)")
		elseIf(option == spell_valuestacker)
			SetInfoText("Increases number of stacks earned by 1 per rank")
		elseIf(option == spell_savingessence)
			SetInfoText("When hit below 30% Health consume up to 10 sperm/milk stacks, recovering 2 Health per rank and stack (Uses both stacks evenly)")
		endIf
	;end/
	;ent/ Help
	elseif(CurrentPage == "Help")
		if(option == help1)
			SetInfoText("XP can be earned through Sex acts, consuming certain items (such as sperm and milk), and through some passives.")
		elseif(option == help2)
			SetInfoText("To spend XP just explore the MCM! XP can be spend to improve passive succubus abilities, learn new spells, or improve skill levels!")
		elseif(option == help3)
			SetInfoText("Desire generate natually over time or through special items/passives/spells. When reaching certain points of Desire seduction spells will be granted to the player which will force sex acts on targets. Upon orgasm 80% of desire is converted to XP.")
		elseif(option == help4)
			SetInfoText("When reaching your max status you can hold overflow will be converted to Force. Once enough Force is obtained it will convert to SP which can be spent on leveling Skills. When earning SP through Force the required amount for your next SP increases however when gained through items this isn't the case. XP can also be converted to Force.")
		elseif(option == help5)
			SetInfoText("When in sex acts your character will absorb status, taking Max Health/Magicka/Stamina and claiming it for their own.")
		elseif(option == help6)
			SetInfoText("Spells will be defined by a standard name and a modifier. Only one version of each spell can be learned at a time but they may be switched. Different versions will have different effects, for example Love versions will be a stronger but more expensive version of the Base spell, while Hate will have a completely different effect with a similar approach.")
		elseif(option == help7)
			SetInfoText("Passives will give 'always on' bonuses with different effects. While some passives will start fairly weak or ineffective they can be ranked up to improve their effectiveness.")
		elseif(option == help8)
			SetInfoText("Upon orgasm characters will give their partner Sperm/Milk based on their gender. This sperm and milk can be consumed for bonuses and have similar effects to absorption. Rare Drops can also be found which have special effects and powerful alchemy traits.")
		elseif(option == help9)
			SetInfoText("Upon death characters will have a soul placed upon them. These souls can be collected and either consumed for special effects.")
		elseif(option == help10)
			SetInfoText("While absorption is always on Health/Magicka/Stamina can always go so high. After reaching your determined cap extra is converted into Forcce and SP. Status Caps can be increase with either XP or special items.")
		elseif(option == help11)
			SetInfoText("Sex, consuming Sperm, and Consuming Milk will provide their own stacks. These stacks can only be stored to a cap which is increased with XP or special items. Stacks are used by spells and passives for powerful effects.")
		elseif(option == help12)
			SetInfoText("Combat Seduction is a built in 'combat submit' mod which starts sex acts when characters fall below the Health Thresholds, which can be configured. Combat Seduction is built to be super light weight in comparison to other submit mods however it lacks any advanced features. If you already use a submit mod I recommend Disabling Combat Seduction.")
		elseif(option == help13)
			SetInfoText("When using a large amount of spells status can burn out quick. In order to keep your status high make sure to use a balance of drain spells and use a combat submit mod to keep acts going to absorb more status. Keeping plentiful Sperm/Milk can also help as they hold 'on-demand' status through their absorption properties!")
		elseif(option == help14)
			SetInfoText("When Desire reaches too high Health/Magicka/Stamina will begin slowly converting to Force. Lowering Desire below through either orgasms, spells, or items will stop the effect.")
		endIf
	;end/
	endIf
endEvent
;end/