Jump to content

.HasPerk() not working?


Jun3d1

Recommended Posts

So, I'm trying to count the active perks my character has and return perk points. Below is the snippit of script that doesn't appear to be working. I compile just fine.

 

Perk Property Alchemist00 Auto

 

if (Game.GetPlayer().HasPerk(Alchemist00))

Debug.Messagebox("Has Perk!")

endIf

 

 

I even went into my script properties in creation kit and changed Alchemist00's default value to Alchemist00.

 

What am I doing wrong?

Link to comment
Share on other sites

Scriptname _buildtesterscript extends SKI_ConfigBase

 

import skse

import ActiveMagicEffect

import Debug

import ActorValueInfo

import Game

import Perk

 

;Version Check

 

int Function GetVersion()

Return 4 ; Last version

EndFunction

 

;Variables

 

Actor Property Player Auto

 

int PerkPoints

 

Perk Property Alchemist00 Auto

Perk Property Alchemist20 Auto

Perk Property Alchemist40 Auto

Perk Property Alchemist60 Auto

Perk Property Alchemist80 Auto

Perk Property Physician Auto

Perk Property Benefactor Auto

Perk Property Poisoner Auto

Perk Property Experimenter50 Auto

Perk Property Experimenter70 Auto

Perk Property Experimenter90 Auto

Perk Property ConcentratedPoison Auto

Perk Property GreenThumb Auto

Perk Property SnakeBlood Auto

Perk Property Purity Auto

Perk Property AlterationNovice00 Auto

Perk Property AlterationApprentice25 Auto

Perk Property AlterationAdept50 Auto

Perk Property AlterationExpert75 Auto

Perk Property AlterationMaster100 Auto

Perk Property AlterationDualCasting Auto

Perk Property MageArmor30 Auto

Perk Property MageArmor50 Auto

Perk Property MageArmor70 Auto

Perk Property MagicResistance30 Auto

Perk Property MagicResistance50 Auto

Perk Property MagicResistance70 Auto

Perk Property Stability Auto

Perk Property atronach Auto

Perk Property Overdraw00 Auto

Perk Property Overdraw20 Auto

Perk Property Overdraw40 Auto

Perk Property Overdraw60 Auto

Perk Property Overdraw80 Auto

Perk Property EagleEye30 Auto

Perk Property CriticalShot30 Auto

Perk Property CriticalShot60 Auto

Perk Property CriticalShot90 Auto

Perk Property SteadyHand40 Auto

Perk Property SteadyHand60 Auto

Perk Property PowerShot Auto

Perk Property HuntersDiscipline Auto

Perk Property Ranger Auto

Perk Property QuickShot Auto

Perk Property Bullseye Auto

Perk Property ShieldWall00 Auto

Perk Property ShieldWall20 Auto

Perk Property ShieldWall40 Auto

Perk Property ShieldWall60 Auto

Perk Property ShieldWall80 Auto

Perk Property QuickReflexes Auto

Perk Property DeflectArrows Auto

Perk Property PowerBashPerk Auto

Perk Property ElementalProtection Auto

Perk Property DeadlyBash Auto

Perk Property DisarmingBash Auto

Perk Property ShieldCharge Auto

Perk Property BlockRunner Auto

Perk Property ConjurationAdept50 Auto

Perk Property ConjurationApprentice25 Auto

Perk Property ConjurationExpert75 Auto

Perk Property ConjurationMaster100 Auto

Perk Property ConjurationNovice00 Auto

Perk Property ConjurationDualCasting Auto

Perk Property MysticBinding Auto

Perk Property Summoner30 Auto

Perk Property Summoner70 Auto

Perk Property SoulStealer Auto

Perk Property OblivionBinding Auto

Perk Property Necromancy Auto

Perk Property Atromancy Auto

Perk Property ElementalPotency Auto

Perk Property DarkSouls Auto

Perk Property TwinSouls Auto

Perk Property DestructionAdept50 Auto

Perk Property DestructionApprentice25 Auto

Perk Property DestructonDualCasting Auto

Perk Property DestructionExpert75 Auto

Perk Property DestructionMaster100 Auto

Perk Property DestructionNovice00 Auto

Perk Property Impact Auto

Perk Property RuneMaster Auto

Perk Property AugmentedFlames Auto

Perk Property AugmentedFlames60 Auto

Perk Property AugmentedFrost Auto

Perk Property AugmentedFrost60 Auto

Perk Property AugmentedShock Auto

Perk Property AugmentedShock60 Auto

Perk Property DeepFreeze Auto

Perk Property Disintegrate Auto

Perk Property IntenseFlames Auto

Perk Property Enchanter00 Auto

Perk Property Enchanter20 Auto

Perk Property Enchanter40 Auto

Perk Property Enchanter60 Auto

Perk Property Enchanter80 Auto

Perk Property SoulSqueezer Auto

Perk Property FireEnchanter Auto

Perk Property FrostEnchanter Auto

Perk Property SoulSiphon Auto

Perk Property InsightfulEnchanter Auto

Perk Property CorpusEnchanter Auto

Perk Property StormEnchanter Auto

Perk Property ExtraEffect Auto

Perk Property Juggernaut00 Auto

Perk Property Juggernaut20 Auto

Perk Property Juggernaut40 Auto

Perk Property Juggernaut60 Auto

Perk Property Juggernaut80 Auto

Perk Property WellFitted Auto

Perk Property TowerOfStrength Auto

Perk Property MatchingSetHeavy Auto

Perk Property ReflectBlows Auto

Perk Property FistsOfSteel Auto

Perk Property Cushioned Auto

Perk Property Conditioning Auto

Perk Property IllusionNovice00 Auto

Perk Property IllusionMaster100 Auto

Perk Property IllusionExpert75 Auto

Perk Property IllusionDualCasting Auto

Perk Property IllusionApprentice25 Auto

Perk Property IllusionAdept50 Auto

Perk Property Animage Auto

Perk Property KindredMage Auto

Perk Property HypnoticGaze Auto

Perk Property AspectOfTerror Auto

Perk Property QuietCasting Auto

Perk Property Rage Auto

Perk Property MasterOfTheMind Auto

Perk Property AgileDefender00 Auto

Perk Property AgileDefender20 Auto

Perk Property AgileDefender40 Auto

Perk Property AgileDefender60 Auto

Perk Property AgileDefender80 Auto

Perk Property CustomFit Auto

Perk Property Unhindered Auto

Perk Property WindWalker Auto

Perk Property MatchingSet Auto

Perk Property DeftMovement Auto

Perk Property NoviceLocks00 Auto

Perk Property MasterLocks100 Auto

Perk Property ExpertLocks75 Auto

Perk Property ApprenticeLocks25 Auto

Perk Property AdeptLocks50 Auto

Perk Property Locksmith Auto

Perk Property QuickHands Auto

Perk Property WaxKey Auto

Perk Property GoldenTouch Auto

Perk Property TreasureHunter Auto

Perk Property Unbreakable Auto

Perk Property Armsman00 Auto

Perk Property Armsman20 Auto

Perk Property Armsman40 Auto

Perk Property Armsman60 Auto

Perk Property Armsman80 Auto

Perk Property FightingStance Auto

Perk Property HackAndSlash30 Auto

Perk Property HackAndSlash60 Auto

Perk Property HackAndSlash90 Auto

Perk Property BoneBreaker30 Auto

Perk Property BoneBreaker60 Auto

Perk Property BoneBreaker90 Auto

Perk Property DualFlurry30 Auto

Perk Property DualFlurry50 Auto

Perk Property SavageStrike Auto

Perk Property CriticalCharge Auto

Perk Property DualSavagery Auto

Perk Property ParalyzingStrike Auto

Perk Property LightFingers00 Auto

Perk Property LightFingers20 Auto

Perk Property LightFingers40 Auto

Perk Property LightFingers60 Auto

Perk Property LightFingers80 Auto

Perk Property NightThief Auto

Perk Property Poisoned Auto

Perk Property Cutpurse Auto

Perk Property KeyMaster Auto

Perk Property ExtraPockets Auto

Perk Property Misdirection Auto

Perk Property PerfectTouch Auto

Perk Property RestorationAdept50 Auto

Perk Property RestorationApprentice25 Auto

Perk Property RestorationDualCasting Auto

Perk Property RestorationExpert75 Auto

Perk Property RestorationMaster100 Auto

Perk Property RestorationNovice00 Auto

Perk Property Regeneration Auto

Perk Property Respite Auto

Perk Property Recovery30 Auto

Perk Property Recovery50 Auto

Perk Property AvoidDeath Auto

Perk Property Necromage Auto

Perk Property wardAbsorb Auto

Perk Property DaedricSmithing Auto

Perk Property DwarvenSmithing Auto

Perk Property EbonySmithing Auto

Perk Property ElvenSmithing Auto

Perk Property GlassSmithing Auto

Perk Property OrcishSmithing Auto

Perk Property SteelSmithing Auto

Perk Property AdvancedArmors Auto

Perk Property ArcaneBlacksmith Auto

Perk Property Stealth00 Auto

Perk Property Stealth20 Auto

Perk Property Stealth40 Auto

Perk Property Stealth60 Auto

Perk Property Stealth80 Auto

Perk Property Backstab Auto

Perk Property DeadlyAim Auto

Perk Property AssassinsBlade Auto

Perk Property MuffledMovement Auto

Perk Property LightFoot Auto

Perk Property SilentRoll Auto

Perk Property Silence Auto

Perk Property ShadowWarrior Auto

Perk Property Haggling00 Auto

Perk Property Haggling20 Auto

Perk Property Haggling40 Auto

Perk Property Haggling60 Auto

Perk Property Haggling80 Auto

Perk Property Bribery Auto

Perk Property Allure Auto

Perk Property Persuasion Auto

Perk Property Merchant Auto

Perk Property Investor Auto

Perk Property Intimidation Auto

Perk Property fence Auto

Perk Property MasterTrader Auto

Perk Property Barbarian00 Auto

Perk Property Barbarian20 Auto

Perk Property Barbarian40 Auto

Perk Property Barbarian60 Auto

Perk Property Barbarian80 Auto

Perk Property ChampionsStance Auto

Perk Property Limbsplitter30 Auto

Perk Property Limbsplitter60 Auto

Perk Property Limbsplitter90 Auto

Perk Property DeepWounds30 Auto

Perk Property DeepWounds60 Auto

Perk Property DeepWounds90 Auto

Perk Property Skullcrusher30 Auto

Perk Property Skullcrusher60 Auto

Perk Property Skullcrusher90 Auto

Perk Property DevastatingBlow Auto

Perk Property GreatCriticalCharge Auto

Perk Property Sweep Auto

Perk Property Warmaster Auto

 

SPELL Property PowerHighElfMagickaRegen  Auto  

SPELL Property PowerArgonianHistskin  Auto  

SPELL Property PowerWoodElfCommandAnimal  Auto  

SPELL Property PowerBretonAbsorbSpell  Auto  

SPELL Property PowerDarkElfFlameCloak  Auto  

SPELL Property PowerImperialPacify  Auto  

SPELL Property PowerKhajiitNightEye  Auto  

SPELL Property PowerNordBattleCry  Auto  

SPELL Property RaceOrcBerserk  Auto

SPELL Property PowerRedguardStaminaRegen  Auto  

 

FormList Property PerkList Auto

 

Race GetRace

Race HighElfRace

Race ArgonianRace

Race WoodElfRace

Race BretonRace

Race DarkElfRace

Race ImperialRace

Race KhajiitRace

Race NordRace

Race OrcRace

Race RedguardRace

 

string msg

 

int alt

int con

int des

int ench

int ill

int res

int arch

int blk

int harm

int oneh

int smith

int twoh

int alch

int larm

int lock

int pick

int snk

int spk

 

int execute

bool executeState = False

 

int resetPerks

bool resetPerksState = False

 

int resetLevel

bool resetLevelState = False

 

int resetSouls

bool resetSoulsState = False

 

int HighElf

bool HighElfState = False

 

int Argonian 

bool ArgonianState = False

 

int WoodElf 

bool WoodElfState = False

 

int Breton 

bool BretonState = False

 

int DarkElf 

bool DarkElfState = False

 

int Imperial 

bool ImperialState = False

 

int Khajiit 

bool KhajiitState = False

 

int Nord 

bool NordState = False

 

int Orc 

bool OrcState = False

 

int Redguard 

bool RedguardState = False

 

int PowRemove

bool PowRemoveState = False

 

int Highborn 

bool HighbornState = False

 

int Histskin

bool HistskinState = False

 

int CmdAnimal

bool CmdAnimalState = False

 

int Dragonskin

bool DragonskinState = False

 

int AncWrath

bool AncWrathState = False

 

int Voice

bool VoiceState = False

 

int NightEye

bool NightEyeState = False

 

int BattleCry

bool BattleCryState = False

 

int BerserkerRage

bool BerserkerRageState = False

 

int AdrRush

bool AdrRushState = False

 

int AbiRemove

bool AbiRemoveState = False

 

int AltMag 

bool AltMagState = False

 

int ArgDis

bool ArgDisState = False

 

int ArgWat

bool ArgWatState = False

 

int ArgUn

bool ArgUnState = False

 

int BosPois

bool BosPoisState = False

 

int BreRMag

bool BreRMagState = False

 

int DunFire 

bool DunFireState = False

 

int ImpLuck

bool ImpLuckState = False

 

int KhaClaw

bool KhaClawState = False

 

int NordFrost

bool NordFrostState = False

 

int RedPois

bool RedPoisState = False

 

int returnPerks

bool returnPerksState = False

 

float alts

float cons

float dess

float enchs

float ills

float ress

float archs

float blks

float harms

float onehs

float smiths

float twohs

float alchs

float larms

float locks

float picks

float snks

float spks

 

;Initialize

 

event OnVersionUpdate(int new_version)

 

if new_version >= 4 && CurrentVersion < 4

 

OnConfigInit()

Pages = new string[3]

Pages[0] = "Reset Character"

Pages[1] = "Set Racials"

Pages[2] = "Set Skill Levels"

 

endIf

 

endEvent

 

;Page Load

 

event OnPageReset(string page)

 

if (page == "")

LoadCustomContent("SkyBuild.dds",0,50)

return

else

UnloadCustomContent()

endif

 

if (page == "Reset Character")

resetPerks = AddToggleOption("Reset Perks & Zero Points", resetPerksState)

resetLevel = AddToggleOption("Reset Level & Skills", resetLevelState)

resetSouls = AddToggleOption("Reset Dragon Souls", resetSoulsState)

returnPerks = AddToggleOption("Reset Perks & Return Points", returnPerksState)

endif

 

if (page == "Set Skill Levels")

alt = AddSliderOption("Alteration",alts)

con = AddSliderOption("Conjuration",cons)

des = AddSliderOption("Destruction",dess)

ench = AddSliderOption("Enchanting",enchs)

ill = AddSliderOption("Illusion",ills)

res = AddSliderOption("Restoration",ress)

arch = AddSliderOption("Archery",archs)

blk = AddSliderOption("Block",blks)

harm = AddSliderOption("Heavy Armor",harms)

oneh = AddSliderOption("One Handed",onehs)

smith = AddSliderOption("Smithing",smiths)

twoh = AddSliderOption("Two Handed",twohs)

alch = AddSliderOption("Alchemy",alchs)

larm = AddSliderOption("Light Armor",larms)

lock = AddSliderOption("Lockpicking",locks)

pick = AddSliderOption("Pickpocket",picks)

snk = AddSliderOption("Sneak",snks)

spk = AddSliderOption("Speech",spks) 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

execute = AddToggleOption("Execute Changes?", executeState)

endif

 

if (page == "Set Racials")

 

AddHeaderOption("Racial Stat Bonuses")

 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

 

HighElf = AddToggleOption("Altmer Stat Bonuses", HighElfState)

Argonian = AddToggleOption("Argonian Stat Bonuses", ArgonianState)

WoodElf = AddToggleOption ("Bosmer Stat Bonuses", WoodElfState)

Breton = AddToggleOption ("Breton Stat Bonuses", BretonState)

DarkElf = AddToggleOption ("Dunmer Stat Bonuses", DarkElfState)

Imperial = AddToggleOption ("Imperial Stat Bonuses", ImperialState)

Khajiit = AddToggleOption ("Khajiit Stat Bonuses", KhajiitState)

Nord = AddToggleOption ("Nord Stat Bonuses", NordState)

Orc = AddToggleOption ("Orc Stat Bonuses", OrcState)

Redguard = AddToggleOption ("Redguard Stat Bonuses", RedguardState)

 

AddEmptyOption()

AddEmptyOption()

 

AddHeaderOption("Racial Powers")

 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

 

PowRemove = AddToggleOption("Remove All Racial Powers?", PowRemoveState)

 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

 

Highborn = AddToggleOption("Highborn", HighbornState)

Histskin = AddToggleOption("Histskin", HistskinState)

CmdAnimal = AddToggleOption("Command Animal", CmdAnimalState)

Dragonskin = AddToggleOption ("Dragonskin", DragonskinState)

AncWrath = AddToggleOption("Ancestor's Wrath", AncWrathState)

Voice = AddToggleOption("Voice of the Emperor", VoiceState)

NightEye = AddToggleOption("Night Eye", NightEyeState)

BattleCry = AddToggleOption("Battle Cry", BattleCryState)

BerserkerRage = AddToggleOption("Berserker Rage", BerserkerRageState)

AdrRush = AddToggleOption("Adrenaline Rush", AdrRushState)

 

AddEmptyOption()

AddEmptyOption()

 

AddHeaderOption("Racial Abilities")

 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

 

AbiRemove = AddToggleOption("Remove All Racial Abilities?", AbiRemoveState)

 

AddEmptyOption()

AddEmptyOption()

AddEmptyOption()

 

AltMag = AddToggleOption("Altmer: +50 Magicka", AltMagState)

ArgDis = AddToggleOption("Argonian/Bosmer: 50% Disease Resistance", ArgDisState)

ArgWat = AddToggleOption("Argonian: Waterbreathing", ArgWatState)

;ArgUn = AddToggleOption("Argonian: Higher Unarmed Damage", ArgUnState)

BosPois = AddToggleOption("Bosmer: 50% Poison/Disease Resistance", BosPoisState)

BreRMag = AddToggleOption("Breton: 25% Magic Resistance", BreRMagState)

DunFire = AddToggleOption("Dunmer: 50% Fire Resistance", DunFireState)

ImpLuck = AddToggleOption("Imperial: Find More Gold", ImpLuckState)

KhaClaw = AddToggleOption("Khajiit: Claws (Unarmed Damage)", KhaClawState)

NordFrost = AddToggleOption("Nord: 50% Frost Resistance", NordFrostState)

RedPois = AddToggleOption("Redguard: 50% Poison Resistance", RedPoisState)

 

 

 

 

endIf

 

endEvent

 

Event OnOptionHighlight(int Info)

 

if (info == resetPerks)

SetInfoText("Check to reset all your perks. WARNING: Does not return Perk Points.")

endIf

 

if (info == resetLevel)

SetInfoText("Check to reset your level to 1 and your skills to 15. You must select a racial bonus in the 'Set Racials' section under the 'Racial Stat Bonuses' header.")

endIf

 

if (info == resetSouls)

SetInfoText("Effectively removes any Dragon Souls you've obtained.")

endIf

 

if (info == alt)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == con)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == des)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == ench)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == ill)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == res)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == arch)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == blk)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == harm)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == oneh)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == smith)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == twoh)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == alch)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == larm)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == lock)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == pick)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == snk)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == spk)

SetInfoText("Set the slider to your desired skill level then check the execute box.")

endIf

 

if (info == execute)

SetInfoText("Check this toggle to execute the changes you've made to the skill sliders. WARNING: DO NOT SAVE YOUR GAME WHILE THE SCRIPT IS RUNNING! WAIT FOR THE SCRIPT TO FINISH!")

endIf

 

if (info == HighElf)

SetInfoText("Select this toggle to apply Altmer Racial Stat Bonuses: +10 Illusion +5 Alteration +5 Conjuration +5 Destruction +5 Enchanting +5 Restoration. Note: +50 Magicka Bonus can be applied from the 'Racial Abilities' section.")

endIf

 

if (info == Argonian)

SetInfoText("Select this toggle to apply Argonian Racial Stat Bonuses: +10 Lockpicking +5 Light Armor +5 Pickpocket  +5 Restoration +5 Sneak")

endIf

 

if (info == WoodElf)

SetInfoText("Select this toggle to apply Bosmer Racial Stat Bonuses: +10 Archery +5 Alchemy +5 Light Armor +5 Lockpicking +5 Pickpocket +5 Sneak")

endIf

 

if (info == Breton)

SetInfoText("Select this toggle to apply Breton Racial Stat Bonuses: +10 Conjuration +5 Alchemy +5 Alteration +5 Illusion +5 Restoration +5 Speech")

endIf

 

if (info == DarkElf)

SetInfoText("Select this toggle to apply Dunmer Racial Stat Bonuses: +10 Destruction +5 Alchemy +5 Alteration +5 Illusion +5 Light Armor +5 Sneak")

endIf

if (info == Imperial)

SetInfoText("Select this toggle to apply Imperial Racial Stat Bonuses: +10 Restoration +5 Block +5 Destruction +5 Enchanting +5 Heavy Armor +5 One-Handed")

endIf

 

if (info == Khajiit)

SetInfoText("Select this toggle to apply Khajiit Racial Stat Bonuses: +10 Sneak +5 Alchemy +5 Archery +5 Lockpicking +5 One-Handed +5 Pickpocket")

endIf

 

if (info == Nord)

SetInfoText("Select this toggle to apply Nord Racial Stat Bonuses: +10 Two-Handed +5 Block +5 Light Armor +5 One-Handed +5 Smithing +5 Speech")

endIf

 

if (info == Orc)

SetInfoText("Select this toggle to apply Orsimer Racial Stat Bonuses: +10 Heavy Armor +5 Block +5 Enchanting +5 One-Handed +5 Smithing +5 Two-Handed")

endIf

 

if (info == Redguard)

SetInfoText("Select this toggle to apply Redguard Racial Stat Bonuses: +10 One-Handed +5 Alteration +5 Archery +5 Block +5 Destruction +5 Smithing")

endIf

 

if (info == PowRemove)

SetInfoText("Select this toggle to remove all Racial Powers.")

endIf

 

if (info == Highborn)

SetInfoText("Select this toggle to apply the Highborn Racial Power: Regenerate magicka 25x faster for 60 seconds, once per day.")

endIf

 

if (info == Histskin)

SetInfoText("Select this toggle to apply the Histskin Racial Power: Recover health 10x faster for 60 seconds, once per day.")

endIf

 

if (info == CmdAnimal)

SetInfoText("Select this toggle to apply the Command Animal Racial Power: Make an animal an ally for 60 seconds, once per day.")

endIf

 

if (info == Dragonskin)

SetInfoText("Select this toggle to apply the Dragonskin Racial Power: Absorb 50% of the magicka from hostile spells for 60 seconds, once per day.")

endIf

 

if (info == AncWrath)

SetInfoText("Select this toggle to apply the Ancestor's Wrath Racial Power: Opponents getting too close take 8 points of fire damage per second for 60 seconds, once per day.")

endIf

 

if (info == Voice)

SetInfoText("Select this toggle to apply the Voice of the Emperor Racial Power: Calms nearby people for 60 seconds, once per day.")

endIf

 

if (info == NightEye)

SetInfoText("Select this toggle to apply the Night Eye Racial Power: Improved night vision for 60 seconds, can be used multiple times per day.")

endIf

 

if (info == Battlecry)

SetInfoText("Select this toggle to apply the Battle Cry Racial Power: Targets flee for 30 seconds, once per day.")

endIf

 

if (info == BerserkerRage)

SetInfoText("Select this toggle to apply the Berserker Rage Racial Power: You take half damage and do double damage for 60 seconds, once per day.")

endIf

 

if (info == AdrRush)

SetInfoText("Select this toggle to apply the Adrenaline Rush Racial Power: Stamina regenerates 10x faster for 60 seconds, once per day.")

endIf

 

if (info == AbiRemove)

SetInfoText("Select this toggle to remove all racial abilities.")

endIf

 

if (info == AltMag)

SetInfoText("Select this toggle to apply the Altmer Racial Ability: +50 Magicka. Select again to remove.")

endIf

 

if (info == ArgDis)

SetInfoText("Select this toggle to apply the Argonian/Bosmer Racial Ability: +50% Disease Resistance. Select again to remove.")

endIf

 

if (info == ArgWat)

SetInfoText("Select this toggle to apply the Argonian Racial Ability: Waterbreathing. Select again to remove.")

endIf

 

if (info == ArgUn)

SetInfoText("Select this toggle to apply the Argonian Racial Ability: Higher Unarmed Damage. Select again to remove.")

endIf

 

if (info == BosPois)

SetInfoText("Select this toggle to apply the Bosmer/Redguard Racial Ability: +50% Poison Resistance. Select again to remove.")

endIf

 

if (info == BreRMag)

SetInfoText("Select this toggle to apply the Breton Racial Ability: +25% Magic Resistance. Select again to remove.")

endIf

 

if (info == DunFire)

SetInfoText("Select this toggle to apply the Dunmer Racial Ability: +50% Fire Resistance. Select again to remove.")

endIf

 

if (info == ImpLuck)

SetInfoText("Select this toggle to apply the Imperial Racial Ability: Find More Gold In Containers. Select again to remove.")

endIf

 

if (info == KhaClaw)

SetInfoText("Select this toggle to apply the Khajiit Racial Ability: Claws (Increased Unarmed Damage). Select again to remove.")

endIf

 

if (info == NordFrost)

SetInfoText("Select this toggle to apply the Nord Racial Ability: +50% Frost Resistance. Select again to remove.")

endIf

 

if (info == returnPerks)

SetInfoText("Select this toggle to reset your perks and return all your perk points. Note: Not compatible with mods that alter the vanilla perk trees.")

endIf

 

endEvent

 

;Toggle Select

 

event OnOptionSelect(int option)

 

if (option == returnPerks)

 

returnPerksState = !returnPerksState

SetToggleOptionValue(returnPerks, returnPerksState)

 

PerkPoints = 0

 

if (Game.GetPlayer().HasPerk(Alchemist00))

Debug.MessageBox("Has Perk!")

endif

 

ConsoleUtil.ExecuteCommand  ("player.removeperk 79346")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79347")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79348")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79349")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABE8")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D51")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C05")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C06")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C07")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF83")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E94")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E95")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF84")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E96")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E97")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB407")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D52")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF9E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79342")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79343")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79344")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79345")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABE4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106256")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106257")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D50")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3FFFA")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3678")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3679")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F592")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E92")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E93")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F56F")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E90")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E91")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF81")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB406")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79354")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABED")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F61")

ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADB")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F62")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B12")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F63")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F19")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F64")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79376")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79389")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79391")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79392")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE123")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F22")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B17")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107831")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE126")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C6")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C7")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58213")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58210")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5720C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58211")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F23")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F24")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58214")

ConsoleUtil.ExecuteCommand  ("player.removeperk F329A")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE125")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106259")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107830")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3680")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5820A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F26")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3681")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58208")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58209")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3682")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6D")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE124")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58202")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58204")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F28")

ConsoleUtil.ExecuteCommand  ("player.removeperk 96590")

ConsoleUtil.ExecuteCommand  ("player.removeperk D79A0")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58201")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58205")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE128")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CE")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CF")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07D0")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07D1")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F75")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F72")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F79")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F29")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A5")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE127")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CA")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CB")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CC")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CD")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58215")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58216")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58217")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58218")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5821D")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D0")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C3")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B77")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E1")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B78")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C5")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B5")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581FD")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B76")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CE")

ConsoleUtil.ExecuteCommand  ("player.removeperk 640B3")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F30")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F31")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BB")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BC")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581DD")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB419")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BD")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB41A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581DE")

ConsoleUtil.ExecuteCommand  ("player.removeperk D5F1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BE")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA8")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CF")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BF")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581EA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58200")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCFA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F32")

ConsoleUtil.ExecuteCommand  ("player.removeperk F392E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C0")

ConsoleUtil.ExecuteCommand  ("player.removeperk F3933")

ConsoleUtil.ExecuteCommand  ("player.removeperk F3F0E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C1")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C2")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CAA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D1")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F5")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 68BCC")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C8")

ConsoleUtil.ExecuteCommand  ("player.removeperk A3F64")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C9")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44CA")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CD")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B7")

ConsoleUtil.ExecuteCommand  ("player.removeperk D7999")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799A")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 53128")

ConsoleUtil.ExecuteCommand  ("player.removeperk 53129")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5312A")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F7")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BA")

ConsoleUtil.ExecuteCommand  ("player.removeperk BEE97")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367D")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F80")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F81")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F82")

ConsoleUtil.ExecuteCommand  ("player.removeperk 108A44")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7F")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40D")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40F")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB414")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB410")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB412")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB411")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB413")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52190")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7935E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79361")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79362")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79374")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107832")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79355")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79356")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79357")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79358")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCCAE")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F68")

ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")

ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F594")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F69")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106253")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F66")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6A")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5218E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106258")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1036F0")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5820C")

ConsoleUtil.ExecuteCommand  ("player.removeperk F392A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581FC")

 

Game.AddPerkPoints(PerkPoints)

 

returnPerksState = !returnPerksState

SetToggleOptionValue(returnPerks, returnPerksState)

 

PerkPoints = 0

 

endIf

 

if (option == execute)

 

Debug.Messagebox("Your skills are being set to your desired values. Please wait for the script to finish before saving your game. You will be notified when the script is done.")

 

executeState = !executeState

SetToggleOptionValue(execute, executeState)

 

ActorValueInfo.GetAVIByName("Alteration").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Conjuration").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Destruction").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Enchanting").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Illusion").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Restoration").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Marksman").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Block").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("HeavyArmor").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("OneHanded").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Smithing").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("TwoHanded").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Alchemy").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("LightArmor").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Lockpicking").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Pickpocket").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Sneak").SetSkillExperience(0)

ActorValueInfo.GetAVIByName("Speechcraft").SetSkillExperience(0)

 

Float altIndex = Game.GetPlayer().GetActorValue("Alteration")

int altLevel = altIndex as int

float altxp = ActorValueInfo.GetAVIByName("Alteration").GetExperienceForLevel(altLevel)

 

While altIndex < alts

 

Game.AdvanceSkill("Alteration", altxp)

altIndex = Game.GetPlayer().GetActorValue("Alteration")

 

endWhile

 

ActorValueInfo.GetAVIByName("Alteration").SetSkillExperience(0)

 

Float conIndex = Game.GetPlayer().GetActorValue("conjuration")

int conLevel = conIndex as int

float conxp = ActorValueInfo.GetAVIByName("Conjuration").GetExperienceForLevel(conLevel)

 

While conIndex < cons

 

Game.AdvanceSkill("conjuration", conxp)

conIndex = Game.GetPlayer().GetActorValue("conjuration")

 

endWhile

 

ActorValueInfo.GetAVIByName("Conjuration").SetSkillExperience(0)

 

Float desIndex = Game.GetPlayer().GetActorValue("Destruction")

int desLevel = desIndex as int

float desxp = ActorValueInfo.GetAVIByName("Destruction").GetExperienceForLevel(desLevel)

 

While desIndex < dess

 

Game.AdvanceSkill("Destruction", desxp)

desIndex = Game.GetPlayer().GetActorValue("Destruction")

 

endWhile

 

ActorValueInfo.GetAVIByName("Destruction").SetSkillExperience(0)

 

Float enchIndex = Game.GetPlayer().GetActorValue("Enchanting")

int enchLevel = enchIndex as int

float enchxp = ActorValueInfo.GetAVIByName("Enchanting").GetExperienceForLevel(enchLevel)

 

While enchIndex < enchs

 

Game.AdvanceSkill("Enchanting", 0.5)

enchIndex = Game.GetPlayer().GetActorValue("Enchanting")

 

endWhile

 

ActorValueInfo.GetAVIByName("Enchanting").SetSkillExperience(0)

 

Float illIndex = Game.GetPlayer().GetActorValue("Illusion")

int illLevel = illIndex as int

float illxp = ActorValueInfo.GetAVIByName("Illusion").GetExperienceForLevel(illLevel)

 

While illIndex < ills

 

Game.AdvanceSkill("Illusion", illxp)

illIndex = Game.GetPlayer().GetActorValue("Illusion")

 

endWhile

 

ActorValueInfo.GetAVIByName("Illusion").SetSkillExperience(0)

 

Float resIndex = Game.GetPlayer().GetActorValue("Restoration")

int resLevel = resIndex as int

float resxp = ActorValueInfo.GetAVIByName("Restoration").GetExperienceForLevel(resLevel)

 

While resIndex < ress

 

Game.AdvanceSkill("Restoration", resxp)

resIndex = Game.GetPlayer().GetActorValue("Restoration")

 

endWhile

 

ActorValueInfo.GetAVIByName("Restoration").SetSkillExperience(0)

 

float archIndex = Game.GetPlayer().GetActorValue("Marksman")

int archLevel = archIndex as int

float archxp = ActorValueInfo.GetAVIByName("Marksman").GetExperienceForLevel(archLevel)

 

While archIndex < archs

 

Game.AdvanceSkill("Marksman", archxp)

archIndex = Game.GetPlayer().GetActorValue("Marksman")

 

endWhile

 

ActorValueInfo.GetAVIByName("Marksman").SetSkillExperience(0)

 

Float blkIndex = Game.GetPlayer().GetActorValue("Block")

int blkLevel = blkIndex as int

float blkxp = ActorValueInfo.GetAVIByName("Block").GetExperienceForLevel(blkLevel)

 

While blkIndex < blks

 

Game.AdvanceSkill("Block", blkxp)

blkIndex = Game.GetPlayer().GetActorValue("Block")

 

endWhile

 

ActorValueInfo.GetAVIByName("Block").SetSkillExperience(0)

 

Float harmIndex = Game.GetPlayer().GetActorValue("HeavyArmor")

int harmLevel = harmIndex as int

float harmxp = ActorValueInfo.GetAVIByName("HeavyArmor").GetExperienceForLevel(harmLevel)

 

While harmIndex < harms

 

Game.AdvanceSkill("HeavyArmor", harmxp)

harmIndex = Game.GetPlayer().GetActorValue("HeavyArmor")

 

endWhile

 

ActorValueInfo.GetAVIByName("HeavyArmor").SetSkillExperience(0)

 

Float onehIndex = Game.GetPlayer().GetActorValue("OneHanded")

int onehLevel = onehIndex as int

float onehxp = ActorValueInfo.GetAVIByName("OneHanded").GetExperienceForLevel(onehLevel)

 

While onehIndex < onehs

 

Game.AdvanceSkill("OneHanded", onehxp)

onehIndex = Game.GetPlayer().GetActorValue("OneHanded")

 

endWhile

 

ActorValueInfo.GetAVIByName("OneHanded").SetSkillExperience(0)

 

Float smithIndex = Game.GetPlayer().GetActorValue("Smithing")

int smithLevel = smithIndex as int

float smithxp = ActorValueInfo.GetAVIByName("Smithing").GetExperienceForLevel(smithLevel)

 

While smithIndex < smiths

 

Game.AdvanceSkill("Smithing", smithxp)

smithIndex = Game.GetPlayer().GetActorValue("Smithing")

 

endWhile

 

ActorValueInfo.GetAVIByName("Smithing").SetSkillExperience(0)

 

Float twohIndex = Game.GetPlayer().GetActorValue("TwoHanded")

int twohLevel = twohIndex as int

float twohxp = ActorValueInfo.GetAVIByName("TwoHanded").GetExperienceForLevel(twohLevel)

 

While twohIndex < twohs

 

Game.AdvanceSkill("TwoHanded", twohxp)

twohIndex = Game.GetPlayer().GetActorValue("TwoHanded")

 

endWhile

 

ActorValueInfo.GetAVIByName("TwoHanded").SetSkillExperience(0)

 

Float alchIndex = Game.GetPlayer().GetActorValue("Alchemy")

int alchLevel = alchIndex as int

float alchxp = ActorValueInfo.GetAVIByName("Alchemy").GetExperienceForLevel(alchLevel)

 

While alchIndex < alchs

 

Game.AdvanceSkill("Alchemy", alchxp)

alchIndex = Game.GetPlayer().GetActorValue("Alchemy")

 

endWhile

 

ActorValueInfo.GetAVIByName("Alchemy").SetSkillExperience(0)

 

Float larmIndex = Game.GetPlayer().GetActorValue("LightArmor")

int larmLevel = larmIndex as int

float larmxp = ActorValueInfo.GetAVIByName("LightArmor").GetExperienceForLevel(larmLevel)

 

While larmIndex < larms

 

Game.AdvanceSkill("LightArmor", larmxp)

larmIndex = Game.GetPlayer().GetActorValue("LightArmor")

 

endWhile

 

ActorValueInfo.GetAVIByName("LightArmor").SetSkillExperience(0)

 

Float lockIndex = Game.GetPlayer().GetActorValue("Lockpicking")

int lockLevel = lockIndex as int

float lockxp = ActorValueInfo.GetAVIByName("Lockpicking").GetExperienceForLevel(lockLevel)

 

While lockIndex < locks

 

Game.AdvanceSkill("Lockpicking", lockxp)

lockIndex = Game.GetPlayer().GetActorValue("Lockpicking")

 

endWhile

 

ActorValueInfo.GetAVIByName("Lockpicking").SetSkillExperience(0)

 

Float pickIndex = Game.GetPlayer().GetActorValue("Pickpocket")

int pickLevel = pickIndex as int

float pickxp = ActorValueInfo.GetAVIByName("Pickpocket").GetExperienceForLevel(pickLevel)

 

While pickIndex < picks

 

Game.AdvanceSkill("Pickpocket", 0.5)

pickIndex = Game.GetPlayer().GetActorValue("Pickpocket")

 

endWhile

 

ActorValueInfo.GetAVIByName("Pickpocket").SetSkillExperience(0)

 

Float snkIndex = Game.GetPlayer().GetActorValue("Sneak")

int snkLevel = snkIndex as int

float snkxp = ActorValueInfo.GetAVIByName("Sneak").GetExperienceForLevel(snkLevel)

 

While snkIndex < snks

 

Game.AdvanceSkill("Sneak", snkxp)

snkIndex = Game.GetPlayer().GetActorValue("Sneak")

 

endWhile

 

ActorValueInfo.GetAVIByName("Sneak").SetSkillExperience(0)

 

Float spkIndex = Game.GetPlayer().GetActorValue("Speechcraft")

int spkLevel = spkIndex as int

float spkxp = ActorValueInfo.GetAVIByName("Speechcraft").GetExperienceForLevel(spkLevel)

 

While spkIndex < spks

 

Game.AdvanceSkill("Speechcraft", spkxp)

spkIndex = Game.GetPlayer().GetActorValue("Speechcraft")

 

endWhile

 

ActorValueInfo.GetAVIByName("Speechcraft").SetSkillExperience(0)

 

executeState = !executeState

SetToggleOptionValue(execute, executeState)

 

Debug.MessageBox("Your skills have been set to your desired values. You may use the save function now.")

 

endif

 

if (option == PowRemove)

 

PowRemoveState = !PowRemoveState

SetToggleOptionValue(PowRemove, PowRemoveState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40c8")

ConsoleUtil.ExecuteCommand("player.removespell e40d5")

ConsoleUtil.ExecuteCommand("player.removespell e40cf")

ConsoleUtil.ExecuteCommand("player.removespell aa022")

ConsoleUtil.ExecuteCommand("player.removespell e40d4")

ConsoleUtil.ExecuteCommand("player.removespell e40ca")

ConsoleUtil.ExecuteCommand("player.removespell aa01d")

ConsoleUtil.ExecuteCommand("player.removespell e40c3")

ConsoleUtil.ExecuteCommand("player.removespell aa026")

ConsoleUtil.ExecuteCommand("player.removespell e40ce")

 

HighbornState = False

SetToggleOptionValue(Highborn, HighbornState)

 

HistskinState = False

SetToggleOptionValue(Histskin, HistskinState)

 

CmdAnimalState = False

SetToggleOptionValue(CmdAnimal, CmdAnimalState)

 

DragonskinState = False

SetToggleOptionValue(Dragonskin, DragonskinState)

 

AncWrathState = False

SetToggleOptionValue(AncWrath, AncWrathState)

 

VoiceState = False

SetToggleOptionValue(Voice, VoiceState)

 

NightEyeState = False

SetToggleOptionValue(NightEye, NightEyeState)

 

BattleCryState = False

SetToggleOptionValue(BattleCry, BattleCryState)

 

BerserkerRageState = False

SetToggleOptionValue(BerserkerRage, BerserkerRageState)

 

AdrRushState = False

SetToggleOptionValue(AdrRush, AdrRushState)

 

PowRemoveState = !PowRemoveState

SetToggleOptionValue(PowRemove, PowRemoveState)

 

endIf

 

if (option == Highborn)

 

if (HighbornState == True)

 

HighbornState = !HighBornState

SetToggleOptionValue(Highborn, HighbornState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40c8")

 

else

 

HighbornState = !HighBornState

SetToggleOptionValue(Highborn, HighbornState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40c8")

 

endif

 

endIf

 

if (option == Histskin)

 

if (HistskinState == True)

 

HistskinState = !HistskinState

SetToggleOptionValue(Histskin, HistskinState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40d5")

 

else

 

HistskinState = !HistskinState

SetToggleOptionValue(Histskin, HistskinState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40d5")

 

endif

 

endIf

 

if (option == CmdAnimal)

 

if (CmdAnimalState == True)

 

CmdAnimalState = !CmdAnimalState

SetToggleOptionValue(CmdAnimal, CmdAnimalState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40cf")

 

else

 

CmdAnimalState = !CmdAnimalState

SetToggleOptionValue(CmdAnimal, CmdAnimalState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40cf")

 

endif

 

endIf

 

if (option == Dragonskin)

 

if (DragonskinState == True)

 

DragonskinState = !DragonskinState

SetToggleOptionValue(Dragonskin, DragonskinState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa022")

 

else

 

DragonskinState = !DragonskinState

SetToggleOptionValue(Dragonskin, DragonskinState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa022")

 

endif

 

endIf

 

if (option == AncWrath)

 

if (AncWrathState == True)

 

AncWrathState = !AncWrathState

SetToggleOptionValue(AncWrath, AncWrathState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40d4")

 

else

 

AncWrathState = !AncWrathState

SetToggleOptionValue(AncWrath, AncWrathState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40d4")

 

endif

 

endIf

 

if (option == Voice)

 

if (VoiceState == True)

 

VoiceState = !VoiceState

SetToggleOptionValue(Voice, VoiceState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40ca")

 

else

 

VoiceState = !VoiceState

SetToggleOptionValue(Voice, VoiceState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40ca")

 

endif

 

endIf

 

if (option == NightEye)

 

if (NightEyeState == True)

 

NightEyeState = !NightEyeState

SetToggleOptionValue(NightEye, NightEyeState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa01d")

 

else

 

NightEyeState = !NightEyeState

SetToggleOptionValue(NightEye, NightEyeState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa01d")

 

endif

 

endIf

 

if (option == BattleCry)

 

if (BattleCryState == True)

 

BattleCryState = !BattleCryState

SetToggleOptionValue(BattleCry, BattleCryState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40c3")

 

else

 

BattleCryState = !BattleCryState

SetToggleOptionValue(BattleCry, BattleCryState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40c3")

 

endif

 

endIf

 

if (option == BerserkerRage)

 

if (BerserkerRageState == True)

 

BerserkerRageState = !BerserkerRageState

SetToggleOptionValue(BerserkerRage, BerserkerRageState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa026")

 

else

 

BerserkerRageState = !BerserkerRageState

SetToggleOptionValue(BerserkerRage, BerserkerRageState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa026")

 

endif

 

endIf

 

if (option == AdrRush)

 

if (AdrRushState == True)

 

AdrRushState = !AdrRushState

SetToggleOptionValue(AdrRush, AdrRushState)

 

ConsoleUtil.ExecuteCommand("player.removespell e40ce")

 

else

 

AdrRushState = !AdrRushState

SetToggleOptionValue(AdrRush, AdrRushState)

 

ConsoleUtil.ExecuteCommand("player.addspell e40ce")

 

endif

 

endIf

 

if (option == AbiRemove)

 

AbiRemoveState = !AbiRemoveState

SetToggleOptionValue(AbiRemove, AbiRemoveState)

 

ConsoleUtil.ExecuteCommand("player.removespell 105f16")

ConsoleUtil.ExecuteCommand("player.removespell 104acf")

ConsoleUtil.ExecuteCommand("player.removespell aa01b")

ConsoleUtil.ExecuteCommand("player.removespell aa025")

ConsoleUtil.ExecuteCommand("player.removespell aa01f")

ConsoleUtil.ExecuteCommand("player.removespell aa021")

ConsoleUtil.ExecuteCommand("player.removespell eb7eb")

ConsoleUtil.ExecuteCommand("player.removespell aa01e")

ConsoleUtil.ExecuteCommand("player.removespell aa020")

ConsoleUtil.ExecuteCommand("player.removespell aa023")

 

AbiRemoveState = !AbiRemoveState

SetToggleOptionValue(AbiRemove, AbiRemoveState)

 

AltMagState = False

SetToggleOptionValue(AltMag, AltMagState)

 

ArgDisState = False

SetToggleOptionValue(ArgDis, ArgDisState)

 

ArgWatState = False

SetToggleOptionValue(ArgWat, ArgWatState)

 

BosPoisState = False

SetToggleOptionValue(BosPois, BosPoisState)

 

BreRMagState = False

SetToggleOptionValue(BreRMag, BreRMagState)

 

DunFireState = False

SetToggleOptionValue(DunFire, DunFireState)

 

ImpLuckState = False

SetToggleOptionValue(ImpLuck, ImpLuckState)

 

KhaClawState = False

SetToggleOptionValue(KhaClaw, KhaClawState)

 

NordFrostState = False

SetToggleOptionValue(NordFrost, NordFrostState)

 

RedPoisState = False

SetToggleOptionValue(RedPois, RedPoisState)

 

endIf

 

if (option == AltMag)

 

if (AltMagState == true)

 

AltMagState = !AltMagState

SetToggleOptionValue(AltMag, AltMagState)

 

ConsoleUtil.ExecuteCommand("player.removespell 105f16")

 

else

 

AltMagState = !AltMagState

SetToggleOptionValue(AltMag, AltMagState)

 

ConsoleUtil.ExecuteCommand("player.addspell 105f16")

 

endIf

 

endif

 

if (option == ArgDis)

 

if (ArgDisState == true)

 

ArgDisState = !ArgDisState

SetToggleOptionValue(ArgDis, ArgDisState)

 

ConsoleUtil.ExecuteCommand("player.removespell 104acf")

 

else

 

ArgDisState = !ArgDisState

SetToggleOptionValue(ArgDis, ArgDisState)

 

ConsoleUtil.ExecuteCommand("player.addspell 104acf")

 

endIf

 

endif

 

if (option == ArgWat)

 

if (ArgWatState == true)

 

ArgWatState = !ArgWatState

SetToggleOptionValue(ArgWat, ArgWatState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa01b")

 

else

 

ArgWatState = !ArgWatState

SetToggleOptionValue(ArgWat, ArgWatState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa01b")

 

endIf

 

endIf

 

if (option == BosPois)

 

if (BosPoisState == true)

 

BosPoisState = !BosPoisState

SetToggleOptionValue(BosPois, BosPoisState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa025")

 

else

 

BosPoisState = !BosPoisState

SetToggleOptionValue(BosPois, BosPoisState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa025")

 

endIf

 

endif

 

if (option == BreRMag)

 

if (BreRMagState == true)

 

BreRMagState = !BreRMagState

SetToggleOptionValue(BreRMag, BreRMagState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa01f")

 

else

 

BreRMagState = !BreRMagState

SetToggleOptionValue(BreRMag, BreRMagState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa01f")

 

endIf

 

endif

 

if (option == DunFire)

 

if (DunFireState == true)

 

DunFireState = !DunFireState

SetToggleOptionValue(DunFire, DunFireState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa021")

 

else

 

DunFireState = !DunFireState

SetToggleOptionValue(DunFire, DunFireState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa021")

 

endIf

 

endif

 

if (option == ImpLuck)

 

if (ImpLuckState == true)

 

ImpLuckState = !ImpLuckState

SetToggleOptionValue(ImpLuck, ImpLuckState)

 

ConsoleUtil.ExecuteCommand("player.removespell eb7eb")

 

else

 

ImpLuckState = !ImpLuckState

SetToggleOptionValue(ImpLuck, ImpLuckState)

 

ConsoleUtil.ExecuteCommand("player.addspell eb7eb")

 

endIf

 

endif

 

if (option == KhaClaw)

 

if (KhaClawState == true)

 

KhaClawState = !KhaClawState

SetToggleOptionValue(KhaClaw, KhaClawState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa01e")

 

else

 

KhaClawState = !KhaClawState

SetToggleOptionValue(KhaClaw, KhaClawState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa01e")

 

endIf

 

endif

 

if (option == NordFrost)

 

if (NordFrostState == true)

 

NordFrostState = !NordFrostState

SetToggleOptionValue(NordFrost, NordFrostState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa020")

 

else

 

NordFrostState = !NordFrostState

SetToggleOptionValue(NordFrost, NordFrostState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa020")

 

endIf

 

endif

 

if (option == RedPois)

 

if (RedPoisState == true)

 

RedPoisState = !RedPoisState

SetToggleOptionValue(RedPois, RedPoisState)

 

ConsoleUtil.ExecuteCommand("player.removespell aa023")

 

else

 

RedPoisState = !RedPoisState

SetToggleOptionValue(RedPois, RedPoisState)

 

ConsoleUtil.ExecuteCommand("player.addspell aa023")

 

endIf

 

endif

 

if (option == resetLevel)

 

resetLevelState = !resetLevelState

SetToggleOptionValue(resetLevel, resetLevelState)

 

ActorValueInfo.GetAVIByName("Alteration").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Conjuration").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Destruction").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Enchanting").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Illusion").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Restoration").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Marksman").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Block").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("HeavyArmor").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("OneHanded").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Smithing").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("TwoHanded").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Alchemy").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("LightArmor").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Lockpicking").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Pickpocket").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Sneak").SetSkillLegendaryLevel(0)

ActorValueInfo.GetAVIByName("Speechcraft").SetSkillLegendaryLevel(0)

 

ActorValueInfo.GetAVIByName("Alteration").SetSkillExperience(0)

Game.GetPlayer().SetAV("Alteration",15)

 

ActorValueInfo.GetAVIByName("Conjuration").SetSkillExperience(0)

Game.GetPlayer().SetAV("Conjuration",15)

 

ActorValueInfo.GetAVIByName("Destruction").SetSkillExperience(0)

Game.GetPlayer().SetAV("Destruction",15)

 

ActorValueInfo.GetAVIByName("Enchanting").SetSkillExperience(0)

Game.GetPlayer().SetAV("Enchanting",15)

 

ActorValueInfo.GetAVIByName("Illusion").SetSkillExperience(0)

Game.GetPlayer().SetAV("Illusion",15)

 

ActorValueInfo.GetAVIByName("Restoration").SetSkillExperience(0)

Game.GetPlayer().SetAV("Restoration",15)

 

ActorValueInfo.GetAVIByName("Marksman").SetSkillExperience(0)

Game.GetPlayer().SetAV("Marksman",15)

 

ActorValueInfo.GetAVIByName("Block").SetSkillExperience(0)

Game.GetPlayer().SetAV("Block",15)

 

ActorValueInfo.GetAVIByName("HeavyArmor").SetSkillExperience(0)

Game.GetPlayer().SetAV("HeavyArmor",15)

 

ActorValueInfo.GetAVIByName("OneHanded").SetSkillExperience(0)

Game.GetPlayer().SetAV("OneHanded",15)

 

ActorValueInfo.GetAVIByName("Smithing").SetSkillExperience(0)

Game.GetPlayer().SetAV("Smithing",15)

 

ActorValueInfo.GetAVIByName("TwoHanded").SetSkillExperience(0)

Game.GetPlayer().SetAV("TwoHanded",15)

 

ActorValueInfo.GetAVIByName("Alchemy").SetSkillExperience(0)

Game.GetPlayer().SetAV("Alchemy",15)

 

ActorValueInfo.GetAVIByName("LightArmor").SetSkillExperience(0)

Game.GetPlayer().SetAV("LightArmor",15)

 

ActorValueInfo.GetAVIByName("Lockpicking").SetSkillExperience(0)

Game.GetPlayer().SetAV("Lockpicking",15)

 

ActorValueInfo.GetAVIByName("Pickpocket").SetSkillExperience(0)

Game.GetPlayer().SetAV("Pickpocket",15)

 

ActorValueInfo.GetAVIByName("Sneak").SetSkillExperience(0)

Game.GetPlayer().SetAV("Sneak",15)

 

ActorValueInfo.GetAVIByName("Speechcraft").SetSkillExperience(0)

Game.GetPlayer().SetAV("Speechcraft",15)

 

Game.GetPlayer().SetAV("Health", 100)

Game.GetPlayer().SetAV("Stamina", 100)

Game.GetPlayer().SetAV("Magicka", 100)

 

ConsoleUtil.ExecuteCommand("player.setlevel 1")

 

Game.SetPlayerExperience(0)

 

resetLevelState = !resetLevelState

SetToggleOptionValue(resetLevel, resetLevelState)

 

endIf

 

float altPlayer = Game.GetPlayer().GetAV("Alteration")

float conPlayer = Game.GetPlayer().GetAV("Conjuration")

float desPlayer = Game.GetPlayer().GetAV("Destruction")

float enchPlayer = Game.GetPlayer().GetAV("Enchanting")

float illPlayer = Game.GetPlayer().GetAV("Illusion")

float restPlayer = Game.GetPlayer().GetAV("Restoration")

float markPlayer = Game.GetPlayer().GetAV("Marksman")

float blkPlayer = Game.GetPlayer().GetAV("Block")

float harmPlayer = Game.GetPlayer().GetAV("HeavyArmor")

float oneHPlayer = Game.GetPlayer().GetAV("OneHanded")

float smithPlayer = Game.GetPlayer().GetAV("Smithing")

float twoHPlayer = Game.GetPlayer().GetAV("TwoHanded")

float alchPlayer = Game.GetPlayer().GetAV("Alchemy")

float larmPlayer = Game.GetPlayer().GetAV("LightArmor")

float lockPlayer = Game.GetPlayer().GetAV("Lockpicking")

float pickPlayer = Game.GetPlayer().GetAV("Pickpocket")

float snkPlayer = Game.GetPlayer().GetAV("Sneak")

float spkPlayer = Game.GetPlayer().GetAV("Speechcraft")

float magPlayer = Game.GetPlayer().GetAV("Magicka")

 

if(option == HighElf)

 

if (HighElfState == True)

 

Game.GetPlayer().SetAV("Illusion",illPlayer - 10)

Game.GetPlayer().SetAV("Conjuration",conPlayer - 5)

Game.GetPlayer().SetAV("Destruction",desPlayer - 5)

Game.GetPlayer().SetAV("Restoration",restPlayer - 5)

Game.GetPlayer().SetAV("Alteration",altPlayer - 5)

Game.GetPlayer().SetAV("Enchanting",enchPlayer - 5)

 

HighElfState = False

SetToggleOptionValue(HighElf, HighElfState)

 

else

 

HighElfState = !HighElfState

SetToggleOptionValue (HighElf, HighElfState)

 

Game.GetPlayer().SetAV("Illusion",illPlayer +10)

Game.GetPlayer().SetAV("Conjuration",conPlayer +5)

Game.GetPlayer().SetAV("Destruction",desPlayer +5)

Game.GetPlayer().SetAV("Restoration",restPlayer +5)

Game.GetPlayer().SetAV("Alteration",altPlayer +5)

Game.GetPlayer().SetAV("Enchanting",enchPlayer +5)

 

endif

 

endif

 

if (option == Argonian)

 

if (ArgonianState == True)

 

Game.GetPlayer().SetAV("LightArmor",larmPlayer - 5)

Game.GetPlayer().SetAV("Sneak",snkPlayer - 5)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer - 10)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer - 5)

Game.GetPlayer().SetAV("Restoration",restPlayer - 5)

Game.GetPlayer().SetAV("Alteration",altPlayer - 5)

 

ArgonianState = False

SetToggleOptionValue(Argonian, ArgonianState)

 

else

 

ArgonianState = !ArgonianState

SetToggleOptionValue (Argonian, ArgonianState)

 

Game.GetPlayer().SetAV("LightArmor",larmPlayer +5)

Game.GetPlayer().SetAV("Sneak",snkPlayer +5)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer +10)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer +5)

Game.GetPlayer().SetAV("Restoration",restPlayer +5)

Game.GetPlayer().SetAV("Alteration",altPlayer +5)

 

endif

 

endIf

 

if (option == WoodElf)

 

if (WoodElfState == True)

 

Game.GetPlayer().SetAV("Marksman",markPlayer - 10)

Game.GetPlayer().SetAV("LightArmor",larmPlayer - 5)

Game.GetPlayer().SetAV("Sneak",snkPlayer - 5)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer - 5)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer - 5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer - 5)

 

WoodElfState = False

SetToggleOptionValue(WoodElf, WoodElfState)

 

else

 

WoodElfState = !WoodElfState

SetToggleOptionValue (WoodElf, WoodElfState)

 

Game.GetPlayer().SetAV("Marksman",markPlayer +10)

Game.GetPlayer().SetAV("LightArmor",larmPlayer +5)

Game.GetPlayer().SetAV("Sneak",snkPlayer +5)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer +5)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer +5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer +5)

 

endif

 

endIf

 

if (option == Breton)

 

if (BretonState == True)

 

Game.GetPlayer().SetAV("Speechcraft",spkPlayer - 5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer - 5)

Game.GetPlayer().SetAV("Illusion",illPlayer - 5)

Game.GetPlayer().SetAV("Conjuration",conPlayer - 10)

Game.GetPlayer().SetAV("Restoration",restPlayer - 5)

Game.GetPlayer().SetAV("Alteration",altPlayer - 5)

 

BretonState = False

SetToggleOptionValue(Breton, BretonState)

 

else

 

BretonState = !BretonState

SetToggleOptionValue (Breton, BretonState)

 

Game.GetPlayer().SetAV("Speechcraft",spkPlayer +5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer +5)

Game.GetPlayer().SetAV("Illusion",illPlayer +5)

Game.GetPlayer().SetAV("Conjuration",conPlayer +10)

Game.GetPlayer().SetAV("Restoration",restPlayer +5)

Game.GetPlayer().SetAV("Alteration",altPlayer +5)

 

endif

 

endIf

 

if (option == DarkElf)

 

if (DarkElfState == True)

 

Game.GetPlayer().SetAV("LightArmor",larmPlayer - 5)

Game.GetPlayer().SetAV("Sneak",snkPlayer - 5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer - 5)

Game.GetPlayer().SetAV("Illusion",illPlayer - 5)

Game.GetPlayer().SetAV("Destruction",desPlayer - 10)

Game.GetPlayer().SetAV("Alteration",altPlayer - 5)

 

DarkElfState = False

SetToggleOptionValue(DarkElf, DarkElfState)

 

else

 

DarkElfState = !DarkElfState

SetToggleOptionValue (DarkElf, DarkElfState)

 

Game.GetPlayer().SetAV("LightArmor",larmPlayer +5)

Game.GetPlayer().SetAV("Sneak",snkPlayer +5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer +5)

Game.GetPlayer().SetAV("Illusion",illPlayer +5)

Game.GetPlayer().SetAV("Destruction",desPlayer +10)

Game.GetPlayer().SetAV("Alteration",altPlayer +5)

 

endif

 

endIf

 

if (option == Imperial)

 

if (ImperialState == True)

 

Game.GetPlayer().SetAV("HeavyArmor",harmPlayer - 5)

Game.GetPlayer().SetAV("Block",blkPlayer - 5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer - 5)

Game.GetPlayer().SetAV("Destruction",desPlayer - 5)

Game.GetPlayer().SetAV("Restoration",restPlayer - 10)

Game.GetPlayer().SetAV("Enchanting",enchPlayer - 5)

 

ImperialState = False

SetToggleOptionValue(Imperial, ImperialState)

 

else

 

ImperialState =! ImperialState

SetToggleOptionValue (Imperial, ImperialState)

 

Game.GetPlayer().SetAV("HeavyArmor",harmPlayer +5)

Game.GetPlayer().SetAV("Block",blkPlayer +5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer +5)

Game.GetPlayer().SetAV("Destruction",desPlayer +5)

Game.GetPlayer().SetAV("Restoration",restPlayer +10)

Game.GetPlayer().SetAV("Enchanting",enchPlayer +5)

 

endif

 

endIf

 

if (option == Khajiit)

 

if (KhajiitState == True)

 

Game.GetPlayer().SetAV("OneHanded",onehPlayer - 5)

Game.GetPlayer().SetAV("Marksman",markPlayer - 5)

Game.GetPlayer().SetAV("Sneak",snkPlayer - 10)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer - 5)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer - 5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer - 5)

 

KhajiitState = !KhajiitState

SetToggleOptionValue (Khajiit, KhajiitState)

 

else

 

KhajiitState = !KhajiitState

SetToggleOptionValue (Khajiit, KhajiitState)

 

Game.GetPlayer().SetAV("OneHanded",onehPlayer +5)

Game.GetPlayer().SetAV("Marksman",markPlayer +5)

Game.GetPlayer().SetAV("Sneak",snkPlayer +10)

Game.GetPlayer().SetAV("Lockpicking",lockPlayer +5)

Game.GetPlayer().SetAV("Pickpocket",pickPlayer +5)

Game.GetPlayer().SetAV("Alchemy",alchPlayer +5)

 

endif

 

endIf

 

if (option == Nord)

 

if (NordState == True)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer - 5)

Game.GetPlayer().SetAV("Block",blkPlayer - 5)

Game.GetPlayer().SetAV("TwoHanded",twohPlayer - 10)

Game.GetPlayer().SetAV("OneHanded",onehPlayer - 5)

Game.GetPlayer().SetAV("LightArmor",larmPlayer - 5)

Game.GetPlayer().SetAV("Speechcraft",spkPlayer - 5)

 

NordState = !NordState

SetToggleOptionValue (Nord, NordState)

 

else

 

NordState = !NordState

SetToggleOptionValue (Nord, NordState)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer +5)

Game.GetPlayer().SetAV("Block",blkPlayer +5)

Game.GetPlayer().SetAV("TwoHanded",twohPlayer +10)

Game.GetPlayer().SetAV("OneHanded",onehPlayer +5)

Game.GetPlayer().SetAV("LightArmor",larmPlayer +5)

Game.GetPlayer().SetAV("Speechcraft",spkPlayer +5)

 

endif

 

endIf

 

if (option == Orc)

 

if (OrcState == True)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer - 5)

Game.GetPlayer().SetAV("HeavyArmor",harmPlayer - 10)

Game.GetPlayer().SetAV("Block",blkPlayer - 5)

Game.GetPlayer().SetAV("TwoHanded",twohPlayer - 5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer - 5)

Game.GetPlayer().SetAV("Enchanting",enchPlayer - 5)

 

OrcState = !OrcState

SetToggleOptionValue (Orc, OrcState)

 

else

 

OrcState = !OrcState

SetToggleOptionValue (Orc, OrcState)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer +5)

Game.GetPlayer().SetAV("HeavyArmor",harmPlayer +10)

Game.GetPlayer().SetAV("Block",blkPlayer +5)

Game.GetPlayer().SetAV("TwoHanded",twohPlayer +5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer +5)

Game.GetPlayer().SetAV("Enchanting",enchPlayer +5)

 

endif

 

endIf

 

if (option == Redguard)

 

if (RedGuardState == True)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer - 5)

Game.GetPlayer().SetAV("Block",blkPlayer - 5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer - 10)

Game.GetPlayer().SetAV("Marksman",markPlayer - 5)

Game.GetPlayer().SetAV("Destruction",desPlayer - 5)

Game.GetPlayer().SetAV("Alteration",altPlayer - 5)

 

RedguardState = !RedguardState

SetToggleOptionValue (Redguard, RedguardState)

 

else

 

RedguardState = !RedguardState

SetToggleOptionValue (Redguard, RedguardState)

 

Game.GetPlayer().SetAV("Smithing",smithPlayer +5)

Game.GetPlayer().SetAV("Block",blkPlayer +5)

Game.GetPlayer().SetAV("OneHanded",onehPlayer +10)

Game.GetPlayer().SetAV("Marksman",markPlayer +5)

Game.GetPlayer().SetAV("Destruction",desPlayer +5)

Game.GetPlayer().SetAV("Alteration",altPlayer +5)

 

RedguardState = !RedguardState

SetToggleOptionValue (Redguard, RedguardState)

 

endif

 

endIf

 

if (option == resetSouls)

 

resetSoulsState = !resetSoulsState

SetToggleOptionValue (resetSouls, resetSoulsState)

 

ConsoleUtil.ExecuteCommand ("player.setav dragonsouls 0")

 

resetSoulsState = !resetSoulsState

SetToggleOptionValue (resetSouls, resetSoulsState)

 

endIf

 

if (option == resetPerks)

 

resetPerksState = !resetPerksState

SetToggleOptionValue(resetPerks, resetPerksState)

 

Game.SetPerkPoints(0)

 

ConsoleUtil.ExecuteCommand  ("player.removeperk 79346")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79347")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79348")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79349")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABE8")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D51")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C05")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C06")

ConsoleUtil.ExecuteCommand  ("player.removeperk C5C07")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF83")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E94")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E95")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF84")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E96")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E97")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB407")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D52")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF9E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79342")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79343")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79344")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79345")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABE4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106256")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106257")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52D50")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3FFFA")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3678")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3679")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F592")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E92")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E93")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F56F")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E90")

ConsoleUtil.ExecuteCommand  ("player.removeperk C1E91")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF81")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB406")

ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7934D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79354")

ConsoleUtil.ExecuteCommand  ("player.removeperk BABED")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F61")

ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADB")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F62")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B12")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F63")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F19")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F64")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79376")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79389")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79391")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79392")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE123")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F22")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 51B17")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107831")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE126")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C6")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C7")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07C9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58213")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58210")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5720C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58211")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F23")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F24")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58214")

ConsoleUtil.ExecuteCommand  ("player.removeperk F329A")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE125")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106259")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107830")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3680")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5820A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F26")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3681")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58208")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58209")

ConsoleUtil.ExecuteCommand  ("player.removeperk C3682")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6D")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE124")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58202")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58204")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F28")

ConsoleUtil.ExecuteCommand  ("player.removeperk 96590")

ConsoleUtil.ExecuteCommand  ("player.removeperk D79A0")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58201")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58205")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE128")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CE")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CF")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07D0")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07D1")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F75")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F72")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F79")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F29")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A5")

ConsoleUtil.ExecuteCommand  ("player.removeperk BE127")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CA")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CB")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CC")

ConsoleUtil.ExecuteCommand  ("player.removeperk C07CD")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58215")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58216")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58217")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58218")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5821D")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D0")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C3")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B77")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E1")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B78")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C5")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B5")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581FD")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 59B76")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CE")

ConsoleUtil.ExecuteCommand  ("player.removeperk 640B3")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F30")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F31")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BB")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BC")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581DD")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB419")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BD")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB41A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581DE")

ConsoleUtil.ExecuteCommand  ("player.removeperk D5F1C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BE")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA8")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CF")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BF")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D2")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581EA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58200")

ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCFA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F32")

ConsoleUtil.ExecuteCommand  ("player.removeperk F392E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C0")

ConsoleUtil.ExecuteCommand  ("player.removeperk F3933")

ConsoleUtil.ExecuteCommand  ("player.removeperk F3F0E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C1")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C2")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CAA")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C7")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153D1")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F5")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581E4")

ConsoleUtil.ExecuteCommand  ("player.removeperk 68BCC")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C8")

ConsoleUtil.ExecuteCommand  ("player.removeperk A3F64")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44C9")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44CA")

ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA6")

ConsoleUtil.ExecuteCommand  ("player.removeperk 153CD")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B7")

ConsoleUtil.ExecuteCommand  ("player.removeperk D7999")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799A")

ConsoleUtil.ExecuteCommand  ("player.removeperk D799B")

ConsoleUtil.ExecuteCommand  ("player.removeperk 53128")

ConsoleUtil.ExecuteCommand  ("player.removeperk 53129")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5312A")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B8")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44B9")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581F7")

ConsoleUtil.ExecuteCommand  ("player.removeperk C44BA")

ConsoleUtil.ExecuteCommand  ("player.removeperk BEE97")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367C")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367D")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367E")

ConsoleUtil.ExecuteCommand  ("player.removeperk C367F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F80")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F81")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F82")

ConsoleUtil.ExecuteCommand  ("player.removeperk 108A44")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7F")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40D")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40F")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB414")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB410")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB412")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB411")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB413")

ConsoleUtil.ExecuteCommand  ("player.removeperk 52190")

ConsoleUtil.ExecuteCommand  ("player.removeperk 7935E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79361")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79362")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79374")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6F")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6C")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6D")

ConsoleUtil.ExecuteCommand  ("player.removeperk 107832")

ConsoleUtil.ExecuteCommand  ("player.removeperk 105F33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79355")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79356")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79357")

ConsoleUtil.ExecuteCommand  ("player.removeperk 79358")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCCAE")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F68")

ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")

ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5F594")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F69")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106253")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F66")

ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6A")

ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")

ConsoleUtil.ExecuteCommand  ("player.removeperk CB40E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5218E")

ConsoleUtil.ExecuteCommand  ("player.removeperk 106258")

ConsoleUtil.ExecuteCommand  ("player.removeperk 1036F0")

ConsoleUtil.ExecuteCommand  ("player.removeperk 5820C")

ConsoleUtil.ExecuteCommand  ("player.removeperk F392A")

ConsoleUtil.ExecuteCommand  ("player.removeperk 581FC")

 

resetPerksState = !resetPerksState

SetToggleOptionValue(resetPerks, resetPerksState)

 

endif

endEvent

 

;Slider Selection

 

event OnOptionSliderOpen(int option)

 

if (option == alt)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Alteration"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Alteration"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == con)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Conjuration"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Conjuration"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == des)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Destruction"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Destruction"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == ench)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Enchanting"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Enchanting"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == ill)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Illusion"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Illusion"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == res)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Restoration"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Restoration"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == arch)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Marksman"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Marksman"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == blk)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Block"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Block"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == harm)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("HeavyArmor"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("HeavyArmor"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == oneh)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("OneHanded"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("OneHanded"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == smith)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Smithing"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Smithing"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == twoh)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("TwoHanded"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("TwoHanded"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == alch)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Alchemy"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Alchemy"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == larm)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("LightArmor"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("LightArmor"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == lock)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Lockpicking"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Lockpicking"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == pick)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("PickPocket"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("PickPocket"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == snk)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Sneak"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Sneak"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

if (option == spk)

SetSliderDialogStartValue(Game.GetPlayer().GetAV("Speechcraft"))

SetSliderDialogDefaultValue(Game.GetPlayer().GetAV("Speechcraft"))

SetSliderDialogRange(15, 100)

SetSliderDialogInterval(1)

endif

 

endEvent

 

;Slider Accept

 

event OnOptionSliderAccept(int option, float value)

 

if (option == alt)

alts = value

SetSliderOptionValue(alt, alts)

endif

 

if (option == con)

cons = value

SetSliderOptionValue(con, cons)

endif

 

if (option == des)

dess = value

SetSliderOptionValue(des, dess)

endif

 

if (option == ench)

enchs = value

SetSliderOptionValue(ench, enchs)

endif

 

if (option == ill)

ills = value

SetSliderOptionValue(ill, ills)

endif

 

if (option == res)

ress = value

SetSliderOptionValue(res, ress)

endif

 

if (option == arch)

archs = value

SetSliderOptionValue(arch, archs)

endif

 

if (option == blk)

blks = value

SetSliderOptionValue(blk, blks)

endif

 

if (option == harm)

harms = value

SetSliderOptionValue(harm, harms)

endif

 

if (option == oneh)

onehs = value

SetSliderOptionValue(oneh, onehs)

endif

 

if (option == smith)

smiths = value

SetSliderOptionValue(smith, smiths)

endif

 

if (option == twoh)

twohs = value

SetSliderOptionValue(twoh, twohs)

endif

 

if (option == alch)

alchs = value

SetSliderOptionValue(alch, alchs)

endif

 

if (option == larm)

larms = value

SetSliderOptionValue(larm, larms)

endif

 

if (option == lock)

locks = value

SetSliderOptionValue(lock, locks)

endif

 

if (option == pick)

picks = value

SetSliderOptionValue(pick, picks)

endif

 

if (option == snk)

snks = value

SetSliderOptionValue(snk, snks)

endif

 

if (option == spk)

spks = value

SetSliderOptionValue(spk, spks)

endif

 

endEvent

 

Link to comment
Share on other sites

Feel free to wrap that code in spoiler tags to shorten the scrolling...

 

I see nothing wrong with the usage or in the surrounding code. It appears that when you select that particular option in your MCM that regardless of toggle status the perk is to be checked. Correct?

 

I would add a statement to the negative as well. Then try different races on a new game. Make sure that the perk is not already assigned at character creation. Test when the player does not have the perk and when they do have the perk. See what happens.

 

 

if !(Game.GetPlayer().HasPerk(Alchemist00)) ; does not have the perk
  Debug.MessageBox("Does not have perk!")
Else                                        ; otherwise has perk
  Debug.MessageBox("Has Perk!")
endif

 

 

 

One thought, perhaps that code cannot run while in the MCM menu. You may wish to temporarily set up a hotkey to see if it will work outside of the MCM menu system.

Link to comment
Share on other sites

Thanks for the quick response Ishara... I don't know why I didn't try starting from scratch without mods... it works with an unmodded profile. So now I have the pleasure of trying to find which mod is altering the names of vanilla perks.

 

Again, many thanks!

Link to comment
Share on other sites

So, I was able to get Alchemist00 to work but nothing else. I started tinkering with the structuring of my code and found, that for some reason, the only structure that works with HasPerk is as follows:

 

 

if Game.GetPlayer().HasPerk(Alchemist80)
PerkPoints += 1
endIf
 
if Game.GetPlayer().HasPerk(Alchemist60)
PerkPoints += 1
endIf
 
if Game.GetPlayer().HasPerk(Alchemist40)
PerkPoints += 1
endIf
Link to comment
Share on other sites

May I suggest putting your perks into an array or formlist. You'd be able to check them with much less code.

 

Formlist example:

 

 

Formlist Property PerkList Auto
{create a formlist record and assign all perks to it and then assign that record here}
Actor PlayerRef

Event OnConfigInit()
  PlayerRef == Game.GetPlayer()  ; use PlayerRef throughout remainder of script to reference the player
  ;rest of OnConfigInit event
EndEvent

Event OnOptionSelect(int option)
  if (option == returnPerks)
    returnPerksState = !returnPerksState
    SetToggleOptionValue(returnPerks, returnPerksState)
    PerkPoints = 0
    Int Size = PerkList.GetSize()
    While Size >= 0
      Perk Entry = PerkList.GetAt(Size)
      If PlayerRef.HasPerk(Entry)
        Debug.Trace("Player has perk: "+Entry.GetName())
        PerkPoints += 1
      EndIf
      Size -= 1
    EndWhile
  EndIf
  ; other options to be selected
EndEvent

Note with the formlist route you can do the following:

1. Create small patch plugins for each mod that changes perks and override the formlist with a corrected one. Change in formlist should be reflected mid-game since it is the formlist contents that change and not the property assignment value itself. However, would need testing for verification.

2. Utilize a script for SSEEdit / TES5Edit to create a patch plugin and build the formlist from scratch based upon whatever perks the player has in their game (requires an initially empty formlist)

 

 

 

Array example:

 

 

Perk[] Property PerkList Auto
{Fill with perks in the Creation Kit, can exceed 128 entries unlike script created arrays}
Actor PlayerRef

Event OnConfigInit()
  PlayerRef == Game.GetPlayer()  ; use PlayerRef throughout remainder of script to reference the player
  ;rest of OnConfigInit event
EndEvent

event OnOptionSelect(int option)
  if (option == returnPerks)
    returnPerksState = !returnPerksState
    SetToggleOptionValue(returnPerks, returnPerksState)
    PerkPoints = 0
    Int Size = PerkList.Length
    While Size >= 0
      Perk Entry = PerkList[Size]
      If PlayerRef.HasPerk(Entry)
        Debug.Trace("Player has perk: "+Entry.GetName())
        PerkPoints += 1
      EndIf
      Size -= 1
    EndWhile
  EndIf
  ; other options to be selected
EndEvent

Note array route you can do the following:

1. Create small patch plugins for each mod that changes perks and adjust the array property values accordingly. Do note that property values would probably not update mid-game if a patch plugin were added. This is due to the MCM quest already being active. However, testing to verify is warranted.

 

 

Link to comment
Share on other sites

  • 4 weeks later...

Your posted sample script (Jun3d1) had some issues, I splitted it into two scripts for better overview and stripped out variables by using arrays like IsharaMeradin.

 

junMCM_TestScriptExtender

 

Scriptname junMCM_TestScriptExtender extends SKI_ConfigBase
; outsourced code for better overview

; https://forums.nexusmods.com/index.php?/topic/7923663-hasperk-not-working/

  Actor player

  Int  iThreads
  Int  iCounter
  Bool bCounter        ; [default=False]


EVENT OnUpdate()
    int n1
    int n2
    int n3
    bool bOK

int c = 0
int i = 0
WHILE (i < 45)
    IF     (i < 10)
        IF     (i == 0)
                        n1 = 0x00079346
                        n2 = 0x00079347
                        n3 = 0x00079348
        ELSEIF (i == 1)
                        n1 = 0x00079349
                        n2 = 0x000BABE8
                        n3 = 0x00052D51
        ELSEIF (i == 2)
                        n1 = 0x000C5C05
                        n2 = 0x000C5C06
                        n3 = 0x000C5C07
        ELSEIF (i == 3)
                        n1 = 0x0003AF83
                        n2 = 0x000C1E94
                        n3 = 0x000C1E95
        ELSEIF (i == 4)
                        n1 = 0x0003AF84
                        n2 = 0x000C1E96
                        n3 = 0x000C1E97
        ELSEIF (i == 5)
                        n1 = 0x000CB407
                        n2 = 0x00052D52
                        n3 = 0x0003AF9E
        ELSEIF (i == 6)
                        n1 = 0x0003AFA7
                        n2 = 0x00079342
                        n3 = 0x00079343
        ELSEIF (i == 7)
                        n1 = 0x00079344
                        n2 = 0x00079345
                        n3 = 0x000BABE4
        ELSEIF (i == 8)
                        n1 = 0x00106256
                        n2 = 0x00106257
                        n3 = 0x00052D50
        ELSE
                        n1 = 0x0003FFFA
                        n2 = 0x000C3678
                        n3 = 0x000C3679
        ENDIF

    ELSEIF (i < 20)
        IF     (i == 10)
                        n1 = 0x0005F592
                        n2 = 0x000C1E92
                        n3 = 0x000C1E93
        ELSEIF (i == 11)
                        n1 = 0x0005F56F
                        n2 = 0x000C1E90
                        n3 = 0x000C1E91
        ELSEIF (i == 12)
                        n1 = 0x0003AF81
                        n2 = 0x000CB406
                        n3 = 0x0003AFA6
        ELSEIF (i == 13)
                        n1 = 0x0007934A
                        n2 = 0x0007934B
                        n3 = 0x0007934D
        ELSEIF (i == 14)
                        n1 = 0x00079354
                        n2 = 0x000BABED
                        n3 = 0x00058F61
        ELSEIF (i == 15)
                        n1 = 0x00103ADA
                        n2 = 0x00103ADB
                        n3 = 0x00105F1C
        ELSEIF (i == 16)
                        n1 = 0x00105F1E
                        n2 = 0x00105F1F
                        n3 = 0x00058F62
        ELSEIF (i == 17)
                        n1 = 0x00051B12
                        n2 = 0x00058F63
                        n3 = 0x00105F19
        ELSEIF (i == 18)
                        n1 = 0x00058F64
                        n2 = 0x00079376
                        n3 = 0x00079389
        ELSE
                        n1 = 0x00079391
                        n2 = 0x00079392
                        n3 = 0x000BE123
        ENDIF

    ELSEIF (i < 30)
        IF     (i == 20)
                        n1 = 0x00051B1B
                        n2 = 0x00051B1C
                        n3 = 0x00105F22
        ELSEIF (i == 21)
                        n1 = 0x000BCD2B
                        n2 = 0x00051B17
                        n3 = 0x00107831
        ELSEIF (i == 22)
                        n1 = 0x000BE126
                        n2 = 0x000C07C6
                        n3 = 0x000C07C7
        ELSEIF (i == 23)
                        n1 = 0x000C07C8
                        n2 = 0x000C07C9
                        n3 = 0x00058213
        ELSEIF (i == 24)
                        n1 = 0x00058210
                        n2 = 0x0005720C
                        n3 = 0x00058211
        ELSEIF (i == 25)
                        n1 = 0x00105F23
                        n2 = 0x00105F24
                        n3 = 0x00058214
        ELSEIF (i == 26)
                        n1 = 0x000F329A
                        n2 = 0x000BE125
                        n3 = 0x00106259
        ELSEIF (i == 27)
                        n1 = 0x00107830
                        n2 = 0x000C3680
                        n3 = 0x0005820A
        ELSEIF (i == 28)
                        n1 = 0x00105F26
                        n2 = 0x000C3681
                        n3 = 0x00058208
        ELSE
                        n1 = 0x00058209
                        n2 = 0x000C3682
                        n3 = 0x00018E6A
        ENDIF

    ELSEIF (i < 40)
        IF     (i == 30)
                        n1 = 0x00018E6B
                        n2 = 0x00018E6C
                        n3 = 0x00018E6D
        ELSEIF (i == 31)
                        n1 = 0x000BE124
                        n2 = 0x00058202
                        n3 = 0x00058204
        ELSEIF (i == 32)
                        n1 = 0x00105F28
                        n2 = 0x00096590
                        n3 = 0x000D79A0
        ELSEIF (i == 33)
                        n1 = 0x00058201
                        n2 = 0x00058205
                        n3 = 0x000BE128
        ELSEIF (i == 34)
                        n1 = 0x000C07CE
                        n2 = 0x000C07CF
                        n3 = 0x000C07D0
        ELSEIF (i == 35)
                        n1 = 0x000C07D1
                        n2 = 0x00058F75
                        n3 = 0x00058F72
        ELSEIF (i == 36)
                        n1 = 0x00058F7A
                        n2 = 0x001090A2
                        n3 = 0x00058F7B
        ELSEIF (i == 37)
                        n1 = 0x00058F79
                        n2 = 0x00105F29
                        n3 = 0x001090A5
        ELSEIF (i == 38)
                        n1 = 0x000BE127
                        n2 = 0x000C07CA
                        n3 = 0x000C07CB
        ELSE
                        n1 = 0x000C07CC
                        n2 = 0x000C07CD
                        n3 = 0x00058215
        ENDIF

    ELSE
        IF     (i == 40)
                        n1 = 0x00058216
                        n2 = 0x00058217
                        n3 = 0x00105F2F
        ELSEIF (i == 41)
                        n1 = 0x00058218
                        n2 = 0x00105F2A
                        n3 = 0x00105F2B
        ELSEIF (i == 42)
                        n1 = 0x00105F2E
                        n2 = 0x00105F2C
                        n3 = 0x0005821D
        ELSEIF (i == 43)
                        n1 = 0x000F2CA9
                        n2 = 0x000153D0
                        n3 = 0x000C44C3
        ELSE ;IF (i == 44)
                        n1 = 0x00059B77
                        n2 = 0x000581E2
                        n3 = 0x000581E1
        ENDIF
    ENDIF

;    --------
    perk p = Game.GetForm(n1) as Perk                ; converting: "int" -> "form" -> "perk"
    IF ( p )
        bOK = player.RemovePerk(p)                    ; if valid perk then try to remove
        IF (bOK) && (bCounter)
            c = c + 1                                ; increase internal perk counter
        ENDIF
    ENDIF
;    --------
    p = Game.GetForm(n2) as Perk
    IF ( p )
        bOK = player.RemovePerk(p)
        IF (bOK) && (bCounter)
            c = c + 1
        ENDIF
    ENDIF
;    --------
    p = Game.GetForm(n3) as Perk
    IF ( p )
        bOK = player.RemovePerk(p)
        IF (bOK) && (bCounter)
            c = c + 1
        ENDIF
    ENDIF

    i = i + 1
ENDWHILE

    myF_Count(c)
ENDEVENT


EVENT OnUpdateGameTime()
    int n1
    int n2
    int n3
    bool bOK

int c = 0
int i = 0
WHILE (i < 40)
    IF     (i < 10)
        IF     (i == 0)
                        n1 = 0x000C44C4
                        n2 = 0x00059B78
                        n3 = 0x000581E2
        ELSEIF (i == 1)
                        n1 = 0x000C44C5
                        n2 = 0x000C44B5
                        n3 = 0x000581FD
        ELSEIF (i == 2)
                        n1 = 0x000C44C6
                        n2 = 0x00059B76
                        n3 = 0x000F2CA7
        ELSEIF (i == 3)
                        n1 = 0x000153CE
                        n2 = 0x000640B3
                        n3 = 0x00105F30
        ELSEIF (i == 4)
                        n1 = 0x00105F31
                        n2 = 0x000C44BB
                        n3 = 0x000C44BC
        ELSEIF (i == 5)
                        n1 = 0x000D799E
                        n2 = 0x000581DD
                        n3 = 0x000CB419
        ELSEIF (i == 6)
                        n1 = 0x000D799C
                        n2 = 0x000C44BD
                        n3 = 0x000CB41A
        ELSEIF (i == 7)
                        n1 = 0x000581DE
                        n2 = 0x000D5F1C
                        n3 = 0x000C44BE
        ELSEIF (i == 8)
                        n1 = 0x000F2CA8
                        n2 = 0x000153CF
                        n3 = 0x000581E7
        ELSE
                        n1 = 0x0010FCF8
                        n2 = 0x000C44BF
                        n3 = 0x000153D2
        ENDIF

    ELSEIF (i < 20)
        IF     (i == 10)
                        n1 = 0x000581EA
                        n2 = 0x0010FCF9
                        n3 = 0x00058200
        ELSEIF (i == 11)
                        n1 = 0x0010FCFA
                        n2 = 0x00105F32
                        n3 = 0x000F392E
        ELSEIF (i == 12)
                        n1 = 0x000C44C0
                        n2 = 0x000F3933
                        n3 = 0x000F3F0E
        ELSEIF (i == 13)
                        n1 = 0x000C44C1
                        n2 = 0x000C44C2
                        n3 = 0x000F2CAA
        ELSEIF (i == 14)
                        n1 = 0x000581F9
                        n2 = 0x000581F8
                        n3 = 0x000C44C7
        ELSEIF (i == 15)
                        n1 = 0x000153D1
                        n2 = 0x000581F4
                        n3 = 0x000581F5
        ELSEIF (i == 16)
                        n1 = 0x000581E4
                        n2 = 0x00068BCC
                        n3 = 0x000C44C8
        ELSEIF (i == 17)
                        n1 = 0x000A3F64
                        n2 = 0x000C44C9
                        n3 = 0x000C44CA
        ELSEIF (i == 18)
                        n1 = 0x000F2CA6
                        n2 = 0x000153CD
                        n3 = 0x000C44B7
        ELSE
                        n1 = 0x000D7999
                        n2 = 0x000D799A
                        n3 = 0x000D799B
        ENDIF

    ELSEIF (i < 30)
        IF     (i == 20)
                        n1 = 0x00053128
                        n2 = 0x00053129
                        n3 = 0x0005312A
        ELSEIF (i == 21)
                        n1 = 0x000C44B8
                        n2 = 0x000C44B9
                        n3 = 0x000581F7
        ELSEIF (i == 22)
                        n1 = 0x000C44BA
                        n2 = 0x000BEE97
                        n3 = 0x000C367C
        ELSEIF (i == 23)
                        n1 = 0x000C367D
                        n2 = 0x000C367E
                        n3 = 0x000C367F
        ELSEIF (i == 24)
                        n1 = 0x00058F80
                        n2 = 0x00058F7E
                        n3 = 0x00058F7C
        ELSEIF (i == 25)
                        n1 = 0x00058F81
                        n2 = 0x00058F7D
                        n3 = 0x00058F82
        ELSEIF (i == 26)
                        n1 = 0x00108A44
                        n2 = 0x00058F7F
                        n3 = 0x000CB40D
        ELSEIF (i == 27)
                        n1 = 0x000CB40F
                        n2 = 0x000CB414
                        n3 = 0x000CB410
        ELSEIF (i == 28)
                        n1 = 0x000CB412
                        n2 = 0x000CB411
                        n3 = 0x000CB413
        ELSE
                        n1 = 0x00052190
                        n2 = 0x0007935E
                        n3 = 0x00079361
        ENDIF

    ELSE ;IF (i < 40)
        IF     (i == 30)
                        n1 = 0x00079362
                        n2 = 0x00079374
                        n3 = 0x000BCD2A
        ELSEIF (i == 31)
                        n1 = 0x00058F6E
                        n2 = 0x00058F6F
                        n3 = 0x00058F6C
        ELSEIF (i == 32)
                        n1 = 0x00058F6D
                        n2 = 0x00107832
                        n3 = 0x00105F33
        ELSEIF (i == 33)
                        n1 = 0x00079355
                        n2 = 0x00079356
                        n3 = 0x00079357
        ELSEIF (i == 34)
                        n1 = 0x00079358
                        n2 = 0x000BCCAE
                        n3 = 0x00058F68
        ELSEIF (i == 35)
                        n1 = 0x00058F67
                        n2 = 0x000D8C33
                        n3 = 0x0005F594
        ELSEIF (i == 36)
                        n1 = 0x00058F69
                        n2 = 0x00106253
                        n3 = 0x00058F66
        ELSEIF (i == 37)
                        n1 = 0x00058F6A
                        n2 = 0x000BCD2B
                        n2 = 0x000CB40E
        ELSEIF (i == 38)
                        n1 = 0x0005218E
                        n2 = 0x00106258
                        n3 = 0x001036F0
        ELSE ;IF (i == 39)
                        n1 = 0x0005820C
                        n2 = 0x000F392A
                        n3 = 0x000581FC
        ENDIF
    ENDIF

;    --------
    perk p = Game.GetForm(n1) as Perk                ; converting: "int" -> "form" -> "perk"
    IF ( p )
        bOK = player.RemovePerk(p)                    ; if valid perk then try to remove
        IF (bOK) && (bCounter)
            c = c + 1                                ; increase internal perk counter
        ENDIF
    ENDIF
;    --------
    p = Game.GetForm(n2) as Perk
    IF ( p )
        bOK = player.RemovePerk(p)
        IF (bOK) && (bCounter)
            c = c + 1
        ENDIF
    ENDIF
;    --------
    p = Game.GetForm(n3) as Perk
    IF ( p )
        bOK = player.RemovePerk(p)
        IF (bOK) && (bCounter)
            c = c + 1
        ENDIF
    ENDIF

    i = i + 1
ENDWHILE

    myF_Count(c)
ENDEVENT


; -- FUNCTIONs -- 2

;------------------------
FUNCTION myF_Count(Int c)  ; internal helper
;------------------------
    iCounter = iCounter + c
    iThreads = iThreads - 1
ENDFUNCTION


;----------------------------------
Int FUNCTION myF_Perks(Bool bCount)  ; external called by child function
;----------------------------------
    player = Game.GetPlayer()
    bCounter = bCount
    iCounter = 0
    iThreads = 2

    RegisterForSingleUpdate(0.0)
    RegisterForSingleUpdateGameTime(0.0)

    WHILE (iThreads > 0)
        Utility.Wait(0.25)
    ENDWHILE

    player = None
    RETURN iCounter
ENDFUNCTION


; -== PERKs ==-
;;;    FormList PROPERTY PerkList auto        ; create an own formlist with all of the following perks

 ;Perk Property Alchemist00 Auto
 ;Perk Property Alchemist20 Auto
 ;Perk Property Alchemist40 Auto
 ;Perk Property Alchemist60 Auto
 ;Perk Property Alchemist80 Auto

 ;Perk Property Physician Auto
 ;Perk Property Benefactor Auto
 ;Perk Property Poisoner Auto

 ;Perk Property Experimenter50 Auto
 ;Perk Property Experimenter70 Auto
 ;Perk Property Experimenter90 Auto

 ;Perk Property ConcentratedPoison Auto
 ;Perk Property GreenThumb Auto
 ;Perk Property SnakeBlood Auto
 ;Perk Property Purity Auto

 ;Perk Property AlterationNovice00 Auto
 ;Perk Property AlterationApprentice25 Auto
 ;Perk Property AlterationAdept50 Auto
 ;Perk Property AlterationExpert75 Auto
 ;Perk Property AlterationMaster100 Auto
 ;Perk Property AlterationDualCasting Auto

 ;Perk Property MageArmor30 Auto
 ;Perk Property MageArmor50 Auto
 ;Perk Property MageArmor70 Auto

 ;Perk Property MagicResistance30 Auto
 ;Perk Property MagicResistance50 Auto
 ;Perk Property MagicResistance70 Auto

 ;Perk Property Stability Auto
 ;Perk Property atronach Auto

 ;Perk Property Overdraw00 Auto
 ;Perk Property Overdraw20 Auto
 ;Perk Property Overdraw40 Auto
 ;Perk Property Overdraw60 Auto
 ;Perk Property Overdraw80 Auto

 ;Perk Property EagleEye30 Auto
 ;Perk Property CriticalShot30 Auto
 ;Perk Property CriticalShot60 Auto
 ;Perk Property CriticalShot90 Auto
 ;Perk Property SteadyHand40 Auto
 ;Perk Property SteadyHand60 Auto
 ;Perk Property PowerShot Auto
 ;Perk Property HuntersDiscipline Auto
 ;Perk Property Ranger Auto
 ;Perk Property QuickShot Auto
 ;Perk Property Bullseye Auto

 ;Perk Property ShieldWall00 Auto
 ;Perk Property ShieldWall20 Auto
 ;Perk Property ShieldWall40 Auto
 ;Perk Property ShieldWall60 Auto
 ;Perk Property ShieldWall80 Auto

 ;Perk Property QuickReflexes Auto
 ;Perk Property DeflectArrows Auto
 ;Perk Property PowerBashPerk Auto
 ;Perk Property ElementalProtection Auto
 ;Perk Property DeadlyBash Auto
 ;Perk Property DisarmingBash Auto
 ;Perk Property ShieldCharge Auto
 ;Perk Property BlockRunner Auto

 ;Perk Property ConjurationAdept50 Auto
 ;Perk Property ConjurationApprentice25 Auto
 ;Perk Property ConjurationExpert75 Auto
 ;Perk Property ConjurationMaster100 Auto
 ;Perk Property ConjurationNovice00 Auto
 ;Perk Property ConjurationDualCasting Auto
 ;Perk Property MysticBinding Auto
 ;Perk Property Summoner30 Auto
 ;Perk Property Summoner70 Auto
 ;Perk Property SoulStealer Auto
 ;Perk Property OblivionBinding Auto
 ;Perk Property Necromancy Auto
 ;Perk Property Atromancy Auto
 ;Perk Property ElementalPotency Auto
 ;Perk Property DarkSouls Auto
 ;Perk Property TwinSouls Auto

 ;Perk Property DestructionAdept50 Auto
 ;Perk Property DestructionApprentice25 Auto
 ;Perk Property DestructonDualCasting Auto
 ;Perk Property DestructionExpert75 Auto
 ;Perk Property DestructionMaster100 Auto
 ;Perk Property DestructionNovice00 Auto
 ;Perk Property Impact Auto
 ;Perk Property RuneMaster Auto
 ;Perk Property AugmentedFlames Auto
 ;Perk Property AugmentedFlames60 Auto
 ;Perk Property AugmentedFrost Auto
 ;Perk Property AugmentedFrost60 Auto
 ;Perk Property AugmentedShock Auto
 ;Perk Property AugmentedShock60 Auto
 ;Perk Property DeepFreeze Auto
 ;Perk Property Disintegrate Auto
 ;Perk Property IntenseFlames Auto

 ;Perk Property Enchanter00 Auto
 ;Perk Property Enchanter20 Auto
 ;Perk Property Enchanter40 Auto
 ;Perk Property Enchanter60 Auto
 ;Perk Property Enchanter80 Auto
 ;Perk Property SoulSqueezer Auto
 ;Perk Property FireEnchanter Auto
 ;Perk Property FrostEnchanter Auto
 ;Perk Property SoulSiphon Auto
 ;Perk Property InsightfulEnchanter Auto
 ;Perk Property CorpusEnchanter Auto
 ;Perk Property StormEnchanter Auto
 ;Perk Property ExtraEffect Auto
 ;Perk Property Juggernaut00 Auto
 ;Perk Property Juggernaut20 Auto
 ;Perk Property Juggernaut40 Auto
 ;Perk Property Juggernaut60 Auto
 ;Perk Property Juggernaut80 Auto
 ;Perk Property WellFitted Auto

 ;Perk Property TowerOfStrength Auto
 ;Perk Property MatchingSetHeavy Auto
 ;Perk Property ReflectBlows Auto
 ;Perk Property FistsOfSteel Auto
 ;Perk Property Cushioned Auto
 ;Perk Property Conditioning Auto

 ;Perk Property IllusionNovice00 Auto
 ;Perk Property IllusionMaster100 Auto
 ;Perk Property IllusionExpert75 Auto
 ;Perk Property IllusionDualCasting Auto
 ;Perk Property IllusionApprentice25 Auto
 ;Perk Property IllusionAdept50 Auto
 ;Perk Property Animage Auto
 ;Perk Property KindredMage Auto
 ;Perk Property HypnoticGaze Auto
 ;Perk Property AspectOfTerror Auto
 ;Perk Property QuietCasting Auto
 ;Perk Property Rage Auto
 ;Perk Property MasterOfTheMind Auto
 ;Perk Property AgileDefender00 Auto
 ;Perk Property AgileDefender20 Auto
 ;Perk Property AgileDefender40 Auto
 ;Perk Property AgileDefender60 Auto
 ;Perk Property AgileDefender80 Auto
 ;Perk Property CustomFit Auto
 ;Perk Property Unhindered Auto
 ;Perk Property WindWalker Auto
 ;Perk Property MatchingSet Auto
 ;Perk Property DeftMovement Auto

 ;Perk Property NoviceLocks00 Auto
 ;Perk Property MasterLocks100 Auto
 ;Perk Property ExpertLocks75 Auto
 ;Perk Property ApprenticeLocks25 Auto
 ;Perk Property AdeptLocks50 Auto
 ;Perk Property Locksmith Auto
 ;Perk Property QuickHands Auto
 ;Perk Property WaxKey Auto
 ;Perk Property GoldenTouch Auto
 ;Perk Property TreasureHunter Auto
 ;Perk Property Unbreakable Auto

 ;Perk Property Armsman00 Auto
 ;Perk Property Armsman20 Auto
 ;Perk Property Armsman40 Auto
 ;Perk Property Armsman60 Auto
 ;Perk Property Armsman80 Auto
 ;Perk Property FightingStance Auto
 ;Perk Property HackAndSlash30 Auto
 ;Perk Property HackAndSlash60 Auto
 ;Perk Property HackAndSlash90 Auto
 ;Perk Property BoneBreaker30 Auto
 ;Perk Property BoneBreaker60 Auto
 ;Perk Property BoneBreaker90 Auto
 ;Perk Property DualFlurry30 Auto
 ;Perk Property DualFlurry50 Auto
 ;Perk Property SavageStrike Auto
 ;Perk Property CriticalCharge Auto
 ;Perk Property DualSavagery Auto
 ;Perk Property ParalyzingStrike Auto
 ;Perk Property LightFingers00 Auto
 ;Perk Property LightFingers20 Auto
 ;Perk Property LightFingers40 Auto
 ;Perk Property LightFingers60 Auto
 ;Perk Property LightFingers80 Auto
 ;Perk Property NightThief Auto
 ;Perk Property Poisoned Auto
 ;Perk Property Cutpurse Auto
 ;Perk Property KeyMaster Auto
 ;Perk Property ExtraPockets Auto
 ;Perk Property Misdirection Auto
 ;Perk Property PerfectTouch Auto

 ;Perk Property RestorationAdept50 Auto
 ;Perk Property RestorationApprentice25 Auto
 ;Perk Property RestorationDualCasting Auto
 ;Perk Property RestorationExpert75 Auto
 ;Perk Property RestorationMaster100 Auto
 ;Perk Property RestorationNovice00 Auto
 ;Perk Property Regeneration Auto
 ;Perk Property Respite Auto
 ;Perk Property Recovery30 Auto
 ;Perk Property Recovery50 Auto
 ;Perk Property AvoidDeath Auto
 ;Perk Property Necromage Auto
 ;Perk Property wardAbsorb Auto

 ;Perk Property DaedricSmithing Auto
 ;Perk Property DwarvenSmithing Auto
 ;Perk Property EbonySmithing Auto
 ;Perk Property ElvenSmithing Auto
 ;Perk Property GlassSmithing Auto
 ;Perk Property OrcishSmithing Auto
 ;Perk Property SteelSmithing Auto
 ;Perk Property AdvancedArmors Auto
 ;Perk Property ArcaneBlacksmith Auto

 ;Perk Property Stealth00 Auto
 ;Perk Property Stealth20 Auto
 ;Perk Property Stealth40 Auto
 ;Perk Property Stealth60 Auto
 ;Perk Property Stealth80 Auto
 ;Perk Property Backstab Auto
 ;Perk Property DeadlyAim Auto
 ;Perk Property AssassinsBlade Auto
 ;Perk Property MuffledMovement Auto
 ;Perk Property LightFoot Auto
 ;Perk Property SilentRoll Auto
 ;Perk Property Silence Auto
 ;Perk Property ShadowWarrior Auto
 ;Perk Property Haggling00 Auto
 ;Perk Property Haggling20 Auto
 ;Perk Property Haggling40 Auto
 ;Perk Property Haggling60 Auto
 ;Perk Property Haggling80 Auto

 ;Perk Property Bribery Auto
 ;Perk Property Allure Auto
 ;Perk Property Persuasion Auto
 ;Perk Property Merchant Auto
 ;Perk Property Investor Auto
 ;Perk Property Intimidation Auto
 ;Perk Property fence Auto
 ;Perk Property MasterTrader Auto

 ;Perk Property Barbarian00 Auto
 ;Perk Property Barbarian20 Auto
 ;Perk Property Barbarian40 Auto
 ;Perk Property Barbarian60 Auto
 ;Perk Property Barbarian80 Auto
 ;Perk Property ChampionsStance Auto
 ;Perk Property Limbsplitter30 Auto
 ;Perk Property Limbsplitter60 Auto
 ;Perk Property Limbsplitter90 Auto
 ;Perk Property DeepWounds30 Auto
 ;Perk Property DeepWounds60 Auto
 ;Perk Property DeepWounds90 Auto
 ;Perk Property Skullcrusher30 Auto
 ;Perk Property Skullcrusher60 Auto
 ;Perk Property Skullcrusher90 Auto
 ;Perk Property DevastatingBlow Auto
 ;Perk Property GreatCriticalCharge Auto
 ;Perk Property Sweep Auto
 ;Perk Property Warmaster Auto

;/ ***
;----------------------------
FUNCTION myF_RemoveAllPerks()
;----------------------------
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79346")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79347")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79348")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79349")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BABE8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 52D51")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C5C05")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C5C06")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C5C07")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF83")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E94")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E95")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF84")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E96")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E97")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB407")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 52D52")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF9E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79342")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79343")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79344")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79345")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BABE4")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 106256")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 106257")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 52D50")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3FFFA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C3678")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C3679")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5F592")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E92")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E93")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5F56F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E90")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C1E91")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AF81")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB406")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 3AFA6")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 7934A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 7934B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 7934D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79354")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BABED")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F61")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 103ADB")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F1F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F62")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 51B12")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F63")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F19")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F64")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79376")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79389")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79391")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79392")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE123")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 51B1C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F22")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 51B17")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 107831")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE126")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07C6")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07C7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07C8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07C9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58213")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58210")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5720C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58211")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F23")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F24")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58214")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F329A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE125")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 106259")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 107830")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C3680")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5820A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F26")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C3681")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58208")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58209")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C3682")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 18E6D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE124")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58202")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58204")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F28")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 96590")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D79A0")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58201")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58205")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE128")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CE")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CF")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07D0")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07D1")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F75")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F72")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A2")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F79")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F29")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 1090A5")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BE127")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CB")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CC")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C07CD")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58215")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58216")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58217")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58218")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F2C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5821D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153D0")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C3")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 59B77")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581E1")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C4")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 59B78")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581E2")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C5")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44B5")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581FD")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C6")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 59B76")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153CE")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 640B3")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F30")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F31")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BB")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BC")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D799E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581DD")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB419")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D799C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BD")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB41A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581DE")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D5F1C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BE")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153CF")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581E7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BF")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153D2")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581EA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCF9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58200")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 10FCFA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F32")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F392E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C0")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F3933")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F3F0E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C1")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C2")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F2CAA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581F9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581F8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153D1")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581F4")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581F5")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581E4")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 68BCC")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk A3F64")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44C9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44CA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F2CA6")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 153CD")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44B7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D7999")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D799A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D799B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 53128")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 53129")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5312A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44B8")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44B9")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581F7")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C44BA")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BEE97")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C367C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C367D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C367E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk C367F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F80")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F81")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F82")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 108A44")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F7F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB40D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB40F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB414")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB410")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB412")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB411")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB413")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 52190")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 7935E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79361")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79362")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79374")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6F")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6D")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 107832")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 105F33")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79355")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79356")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79357")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 79358")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BCCAE")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F68")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")
    ConsoleUtil.ExecuteCommand  ("player.removeperk D8C33")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F67")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5F594")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F69")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 106253")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F66")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 58F6A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk BCD2B")
    ConsoleUtil.ExecuteCommand  ("player.removeperk CB40E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5218E")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 106258")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 1036F0")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 5820C")
    ConsoleUtil.ExecuteCommand  ("player.removeperk F392A")
    ConsoleUtil.ExecuteCommand  ("player.removeperk 581FC")
ENDFUNCTION *** /;

 

 

 

junMCM_TestScript

 

Scriptname junMCM_TestScript extends junMCM_TestScriptExtender

; https://forums.nexusmods.com/index.php?/topic/7923663-hasperk-not-working/
 
  ;Import SKSE
  ;Import ActorValueInfo

;;; Actor Property Player Auto

  Int execute                    ; [default=0]
  Bool executeState                ; [default=False]

  Int returnPerks
  Bool returnPerksState

  Int resetPerks
  Bool resetPerksState

  Int resetLevel
  bool resetLevelState

  Int resetSouls
  Bool resetSoulsState

  Int[] RR                        ; array to hold values for specials in race, power and ability
 
  Int PowRemove
  Bool PowRemoveState

  Int AbiRemove
  Bool AbiRemoveState

;/ ***
; -- RACE --
; ----------
  int HighElf            ; 0
  bool HighElfState

  int Argonian             ; 2
  bool ArgonianState

  int WoodElf             ; 4
  bool WoodElfState

  int Breton             ; 6
  bool BretonState

  int DarkElf             ; 8
  bool DarkElfState

  int Imperial             ; 10
  bool ImperialState

  int Khajiit             ; 12
  bool KhajiitState

  int Nord                 ; 14
  bool NordState

  int Orc                 ; 16
  bool OrcState

  int Redguard             ; 18
  bool RedguardState

; -- POWER --
;------------
  int Highborn             ; 20
  bool HighbornState

  int Histskin            ; 22
  bool HistskinState

  int CmdAnimal            ; 24
  bool CmdAnimalState

  int Dragonskin        ; 26
  bool DragonskinState

  int AncWrath            ; 28
  bool AncWrathState

  int Voice                ; 30
  bool VoiceState

  int NightEye            ; 32
  bool NightEyeState

  int BattleCry            ; 34
  bool BattleCryState

  int BerserkerRage        ; 36
  bool BerserkerRageState

  int AdrRush            ; 38
  bool AdrRushState

; -- ABILITY --
; -------------
  int AltMag             ; 40
  bool AltMagState

  int ArgDis            ; 42
  bool ArgDisState

  int ArgWat            ; 44
  bool ArgWatState

 ;int ArgUn                ; 46
 ;bool ArgUnState

  int BosPois            ; 48
  bool BosPoisState

  int BreRMag            ; 50
  bool BreRMagState

  int DunFire             ; 52
  bool DunFireState

  int ImpLuck            ; 54
  bool ImpLuckState

  int KhaClaw            ; 56
  bool KhaClawState

  int NordFrost            ; 58
  bool NordFrostState

  int RedPois            ; 60
  bool RedPoisState
*** /;

  Float[] FF
 ;float alts
 ;float cons
 ;float dess
 ;float enchs
 ;float ills
 ;float ress
 ;float archs
 ;float blks
 ;float harms
 ;float onehs
 ;float smiths
 ;float twohs
 ;float alchs
 ;float larms
 ;float locks
 ;float picks
 ;float snks
 ;float spks

  Int[] II
 ;Int alt
 ;Int con
 ;Int des
 ;Int ench
 ;Int ill
 ;Int res
 ;Int arch
 ;Int blk
 ;Int harm
 ;Int oneh
 ;Int smith
 ;Int twoh
 ;Int alch
 ;Int larm
 ;Int lock
 ;Int pick
 ;Int snk
 ;Int spk

  Int PerkPoints


; -----------------------
Int Function GetVersion()  ; Version Check
;------------------------
; https://github.com/schlangster/skyui/wiki/MCM-Advanced-Features

    RETURN 4     ; <-- latest version
ENDFUNCTION


; -- EVENTs --

EVENT OnConfigInit()
;=================
    Pages = new String[3]
    Pages[0] = "Reset Character"
    Pages[1] = "Set Racials"
    Pages[2] = "Set Skill Levels"

    FF = new Float[18]
    II = new Int[18]

    RR = new Int[62]
ENDEVENT


EVENT OnVersionUpdate(Int a_version)
;====================
IF (a_version >= 4) && (CurrentVersion < 4)
    Debug.Trace(self+" - Updating mcm script to version " + a_version)
    OnConfigInit()
ENDIF
ENDEVENT

 
EVENT OnPageReset(String page)
;================
IF (page == "")
    LoadCustomContent("SkyBuild.dds", 0, 50)
    RETURN    ; - STOP -
ENDIF
;---------------------
    UnloadCustomContent()

IF (page == "Reset Character")
    resetPerks  = AddToggleOption("Reset Perks & Zero Points",   resetPerksState)
    resetLevel  = AddToggleOption("Reset Level & Skills",        resetLevelState)
    resetSouls  = AddToggleOption("Reset Dragon Souls",          resetSoulsState)
    returnPerks = AddToggleOption("Reset Perks & Return Points", returnPerksState)
    RETURN    ; - STOP -
ENDIF
;---------------------
IF (page == "Set Skill Levels")
    II[0] = AddSliderOption("Alteration",  FF[0])    ; alt, alts
    II[1] = AddSliderOption("Conjuration", FF[1])    ; con, cons
    II[2] = AddSliderOption("Destruction", FF[2])    ; des, dess
    II[3] = AddSliderOption("Enchanting",  FF[3])    ; ench, enchs
    II[4] = AddSliderOption("Illusion",    FF[4])    ; ill, ills
    II[5] = AddSliderOption("Restoration", FF[5])    ; res, ress
    II[6] = AddSliderOption("Archery",     FF[6])    ; arch, archs
    II[7] = AddSliderOption("Block",       FF[7])    ; blk, blks
    II[8] = AddSliderOption("Heavy Armor", FF[8])    ; harm, harms
    II[9] = AddSliderOption("One Handed",  FF[9])    ; oneh, onehs
    II[10]= AddSliderOption("Smithing",    FF[10])    ; smith, smiths
    II[11]= AddSliderOption("Two Handed",  FF[11])    ; twoh, twohs
    II[12]= AddSliderOption("Alchemy",     FF[12])    ; alch, alchs
    II[13]= AddSliderOption("Light Armor", FF[13])    ; larm, larms
    II[14]= AddSliderOption("Lockpicking", FF[14])    ; lock, locks
    II[15]= AddSliderOption("Pickpocket",  FF[15])    ; pick, picks
    II[16]= AddSliderOption("Sneak",       FF[16])    ; snk, snks
    II[17]= AddSliderOption("Speech",      FF[17])    ; spk, spks

    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()

    execute = AddToggleOption("Execute Changes?", executeState)
    RETURN    ; - STOP -
ENDIF
;---------------------
IF (page == "Set Racials")
    AddHeaderOption("- Boni - Racial Stats")
    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()

     RR[0] = AddToggleOption("Altmer (HighElf)", RR[1] as Bool)      ; HighElf, HighElfState
    RR[2] = AddToggleOption("Argonian",         RR[3] as Bool)        ; Arginian, ArgonianState
    RR[4] = AddToggleOption("Bosmer (WoodElf)", RR[5] as Bool)        ; WoodElf, WoodElfState
    RR[6] = AddToggleOption("Breton",           RR[7] as Bool)        ; Breton, BretonState
    RR[8] = AddToggleOption("Dunmer (DarkElf)", RR[9] as Bool)        ; DarkElf, DarkElfState
    RR[10]= AddToggleOption("Imperial",         RR[11] as Bool)        ; Imperial, ImperialState
    RR[12]= AddToggleOption("Khajiit",          RR[13] as Bool)        ; Khajiit, KhajiitState
    RR[14]= AddToggleOption("Nord",             RR[15] as Bool)        ; Nord, NordState
    RR[16]= AddToggleOption("Orc",              RR[17] as Bool)        ; Orc, OrcState
    RR[18]= AddToggleOption("Redguard",         RR[19] as Bool)        ; Redguard, RedguardState

    AddEmptyOption()
    AddEmptyOption()

    AddHeaderOption("Racial Powers")
    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()
 
    PowRemove = AddToggleOption("Do you want to remove *All* Racial Powers?", PowRemoveState)

    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()
 
    RR[20]= AddToggleOption("Highborn",             RR[21] as Bool)        ; Highborn, HighbornState
    RR[22]= AddToggleOption("Histskin",             RR[23] as Bool)        ; Histskin, HistskinState
    RR[24]= AddToggleOption("Command Animal",       RR[25] as Bool)        ; CmdAnimal, CmdAnimalState
    RR[26]= AddToggleOption("Dragonskin",           RR[27] as Bool)        ; Dragonskin, DragonskinState
    RR[28]= AddToggleOption("Ancestor's Wrath",     RR[29] as Bool)        ; AncWrath, AncWrathState
    RR[30]= AddToggleOption("Voice of the Emperor", RR[31] as Bool)        ; Voice, VoiceState
    RR[32]= AddToggleOption("Night Eye",            RR[33] as Bool)        ; NightEye, NightEyeState
    RR[34]= AddToggleOption("Battle Cry",           RR[35] as Bool)        ; BattleCry, BattleCryState
    RR[36]= AddToggleOption("Berserker Rage",       RR[37] as Bool)        ; BerserkerRage, BerserkerRageState
    RR[38]= AddToggleOption("Adrenaline Rush",      RR[39] as Bool)        ; AdrRush, AdrRushState

    AddEmptyOption()
    AddEmptyOption()
 
    AddHeaderOption("Racial Abilities")
    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()

     AbiRemove = AddToggleOption("Do you want to remove *All* Racial Abilities?", AbiRemoveState)

    AddEmptyOption()
    AddEmptyOption()
    AddEmptyOption()

    RR[40]= AddToggleOption("Altmer: Magicka +50",                  RR[41] as Bool)    ; AltMag, AltMagState
    RR[42]= AddToggleOption("Argonian: Disease Resistance 50%",     RR[43] as Bool)    ; ArgDis, ArgDisState
    RR[44]= AddToggleOption("Argonian: Waterbreathing",             RR[45] as Bool)    ; ArgWat, ArgWatState
;    RR[46]= AddToggleOption("Argonian: Higher Unarmed Damage",      RR[47] as Bool)    ; ArgUn, ArgUnState
    RR[48]= AddToggleOption("Bosmer: Resist to Poison/Disease 50%", RR[49] as Bool)    ; BosPois, BosPoisState
    RR[50]= AddToggleOption("Breton: Magic Resistance 25%",         RR[51] as Bool)    ; BreRMag, BreRMagState
    RR[52]= AddToggleOption("Dunmer: Fire Resistance 50%",          RR[53] as Bool)    ; DunFire, DunFireState
    RR[54]= AddToggleOption("Imperial: Find More Gold",             RR[55] as Bool)    ; ImpLuck, ImpLuckState
    RR[56]= AddToggleOption("Khajiit: Claws (Unarmed Damage)",      RR[57] as Bool)    ; KhaClaw, KhaClawState
    RR[58]= AddToggleOption("Nord: Frost Resistance 50%",           RR[59] as Bool)    ; NordFrost, NordFrostState
    RR[60]= AddToggleOption("Redguard: Poison Resistance 50%",      RR[61] as Bool)    ; RedPois, RedPoisState
ENDIF
ENDEVENT


EVENT OnOptionSliderAccept(Int option, Float value)
;=========================
    IF     (option == II[0])
                                FF[0] = value
    ELSEIF (option == II[1])
                                FF[1] = value
    ELSEIF (option == II[2])
                                FF[2] = value
    ELSEIF (option == II[3])
                                FF[3] = value
    ELSEIF (option == II[4])
                                FF[4] = value
    ELSEIF (option == II[5])
                                FF[5] = value
    ELSEIF (option == II[6])
                                FF[6] = value
    ELSEIF (option == II[7])
                                FF[7] = value
    ELSEIF (option == II[8])
                                FF[8] = value
    ELSEIF (option == II[9])
                                FF[9] = value
    ELSEIF (option == II[10])
                                FF[10] = value
    ELSEIF (option == II[11])
                                FF[11] = value
    ELSEIF (option == II[12])
                                FF[12] = value
    ELSEIF (option == II[13])
                                FF[13] = value
    ELSEIF (option == II[14])
                                FF[14] = value
    ELSEIF (option == II[15])
                                FF[15] = value
    ELSEIF (option == II[16])
                                FF[16] = value
    ELSEIF (option == II[17])
                                FF[17] = value
    ELSE
        RETURN    ; - STOP -    unknown option !?
    ENDIF
;-------------------------
    SetSliderOptionValue(option, value)
ENDEVENT


EVENT OnOptionSliderOpen(Int option)
;=======================
    string s
 
    IF     (option == II[0])
                                s = "Alteration"
    ELSEIF (option == II[1])
                                s = "Conjuration"
    ELSEIF (option == II[2])
                                s = "Destruction"
    ELSEIF (option == II[3])
                                s = "Enchanting"
    ELSEIF (option == II[4])
                                s = "Illusion"
    ELSEIF (option == II[5])
                                s = "Restoration"
    ELSEIF (option == II[6])
                                s = "Marksman"
    ELSEIF (option == II[7])
                                s = "Block"
    ELSEIF (option == II[8])
                                s = "HeavyArmor"
    ELSEIF (option == II[9])
                                s = "OneHanded"
    ELSEIF (option == II[10])
                                s = "Smithing"
    ELSEIF (option == II[11])
                                s = "TwoHanded"
    ELSEIF (option == II[12])
                                s = "Alchemy"
    ELSEIF (option == II[13])
                                s = "LightArmor"
    ELSEIF (option == II[14])
                                s = "Lockpicking"
    ELSEIF (option == II[15])
                                s = "PickPocket"
    ELSEIF (option == II[16])
                                s = "Sneak"
    ELSEIF (option == II[17])
                                s = "Speechcraft"
    ELSE
        RETURN    ; - STOP -    unknown option !?
    ENDIF
;-------------------------
    float f = Game.GetPlayer().GetActorValue(s)
    SetSliderDialogStartValue(f)
    SetSliderDialogDefaultValue(f)
    SetSliderDialogRange(15, 100)
    SetSliderDialogInterval(1)
ENDEVENT


EVENT OnOptionHighlight(Int info)
;======================
    IF     (info == resetPerks)
        SetInfoText("Check to reset all your perks. WARNING: Does will not return Perk Points!")

    ELSEIF (info == resetLevel)
        SetInfoText("Check to reset your level to 1 and your skills to 15. You must select a racial bonus in the 'Set Racials' section under the 'Racial Stat Bonuses' header.")

    ELSEIF (info == resetSouls)
        SetInfoText("Effectively removes any Dragon Souls you've obtained.")

     ELSEIF (info == returnPerks)
        SetInfoText("Select this toggle to reset your perks and return all your perk points. Note: Not compatible with mods that alter the vanilla perk trees.")

    ELSEIF (info == execute)
        SetInfoText("Check this toggle to execute the changes you've made to the skill sliders. WARNING: DO NOT SAVE YOUR GAME WHILE THE SCRIPT IS RUNNING! WAIT FOR THE SCRIPT TO FINISH!")


    ELSEIF (info == RR[0])    ; HighElf
        SetInfoText("Select this toggle to apply Altmer Racial Stat Bonuses: +10 Illusion, +5 Alteration, +5 Conjuration, +5 Destruction, +5 Enchanting, +5 Restoration. Note: +50 Magicka Bonus can be applied from the 'Racial Abilities' section.")

    ELSEIF (info == RR[2])    ; Argonian
        SetInfoText("Select this toggle to apply Argonian Racial Stat Bonuses: +10 Lockpicking, +5 Light Armor, +5 Pickpocket,  +5 Restoration, +5 Sneak")

    ELSEIF (info == RR[4])    ; WoodElf
        SetInfoText("Select this toggle to apply Bosmer Racial Stat Bonuses: +10 Archery, +5 Alchemy, +5 Light Armor, +5 Lockpicking, +5 Pickpocket, +5 Sneak")

    ELSEIF (info == RR[6])    ; Breton
        SetInfoText("Select this toggle to apply Breton Racial Stat Bonuses: +10 Conjuration, +5 Alchemy, +5 Alteration, +5 Illusion, +5 Restoration, +5 Speech")
 
    ELSEIF (info == RR[8])    ; DarkElf
        SetInfoText("Select this toggle to apply Dunmer Racial Stat Bonuses: +10 Destruction, +5 Alchemy, +5 Alteration, +5 Illusion, +5 Light Armor, +5 Sneak")

    ELSEIF (info == RR[10])    ; Imperial
        SetInfoText("Select this toggle to apply Imperial Racial Stat Bonuses: +10 Restoration, +5 Block, +5 Destruction, +5 Enchanting, +5 Heavy Armor, +5 One-Handed")

    ELSEIF (info == RR[12])    ; Khajiit
        SetInfoText("Select this toggle to apply Khajiit Racial Stat Bonuses: +10 Sneak, +5 Alchemy, +5 Archery, +5 Lockpicking, +5 One-Handed, +5 Pickpocket")

    ELSEIF (info == RR[14])    ; Nord
        SetInfoText("Select this toggle to apply Nord Racial Stat Bonuses: +10 Two-Handed, +5 Block, +5 Light Armor, +5 One-Handed, +5 Smithing, +5 Speech")

    ELSEIF (info == RR[16])    ; Orc
        SetInfoText("Select this toggle to apply Orsimer Racial Stat Bonuses: +10 Heavy Armor, +5 Block, +5 Enchanting, +5 One-Handed, +5 Smithing, +5 Two-Handed")

    ELSEIF (info == RR[18])    ; Redguard
        SetInfoText("Select this toggle to apply Redguard Racial Stat Bonuses: +10 One-Handed, +5 Alteration, +5 Archery, +5 Block, +5 Destruction, +5 Smithing")


    ELSEIF (info == PowRemove)
        SetInfoText("Select this to remove all Racial Powers!")

    ELSEIF (info == RR[20])    ; Highborn
        SetInfoText("Select this toggle to apply the Highborn Racial Power: Regenerate magicka 25x faster for 60 seconds, once per day.")

    ELSEIF (info == RR[22])    ; Histskin
        SetInfoText("Select this toggle to apply the Histskin Racial Power: Recover health 10x faster for 60 seconds, once per day.")

    ELSEIF (info == RR[24])    ; CmdAnimal
        SetInfoText("Select this toggle to apply the Command Animal Racial Power: Make an animal an ally for 60 seconds, once per day.")

    ELSEIF (info == RR[26])    ; Dragonskin
        SetInfoText("Select this toggle to apply the Dragonskin Racial Power: Absorb 50% of the magicka from hostile spells for 60 seconds, once per day.")
 
    ELSEIF (info == RR[28])    ; AncWrath
        SetInfoText("Select this toggle to apply the Ancestor's Wrath Racial Power: Opponents getting too close take 8 points of fire damage per second for 60 seconds, once per day.")

    ELSEIF (info == RR[30])    ; Voice
        SetInfoText("Select this toggle to apply the Voice of the Emperor Racial Power: Calms nearby people for 60 seconds, once per day.")

    ELSEIF (info == RR[32])    ; NightEye
        SetInfoText("Select this toggle to apply the Night Eye Racial Power: Improved night vision for 60 seconds, can be used multiple times per day.")

    ELSEIF (info == RR[34])    ; Battlecry
        SetInfoText("Select this toggle to apply the Battle Cry Racial Power: Targets flee for 30 seconds, once per day.")

    ELSEIF (info == RR[36])    ; BerserkerRage
        SetInfoText("Select this toggle to apply the Berserker Rage Racial Power: You take half damage and do double damage for 60 seconds, once per day.")

    ELSEIF (info == RR[38])    ; AdrRush
        SetInfoText("Select this toggle to apply the Adrenaline Rush Racial Power: Stamina regenerates 10x faster for 60 seconds, once per day.")


    ELSEIF (info == AbiRemove)
        SetInfoText("Select this to remove all racial abilities!")

    ELSEIF (info == RR[40])    ; AltMag
        SetInfoText("Toggle on/off the Altmer Racial Ability: Magicka +50")
 
    ELSEIF (info == RR[42])    ; ArgDis
        SetInfoText("Toggle on/off Argonian Racial Ability: Disease Resistance 50%")

    ELSEIF (info == RR[44])    ; ArgWat
        SetInfoText("Toggle on/off the Argonian Racial Ability: Waterbreathing")

;    ELSEIF (info == RR[46])    ; ArgUn
;        SetInfoText("Select this to apply the Argonian Racial Ability: Higher Unarmed Damage. Select again to remove.")

    ELSEIF (info == RR[48])    ; BosPois
        SetInfoText("Toggle on/off the Bosmer Racial Ability: +Poison Resistance 50%")

    ELSEIF (info == RR[50])    ; BreRMag
        SetInfoText("Toggle on/off the Breton Racial Ability: Magic Resistance +25%")

    ELSEIF (info == RR[52])    ; DunFire
        SetInfoText("Toggle on/off the Dunmer Racial Ability: Fire Resistance +50%")

    ELSEIF (info == RR[54])    ; ImpLuck
        SetInfoText("Toggle on/off the Imperial Racial Ability: Find More Gold In Containers")

    ELSEIF (info == RR[56])    ; KhaClaw
        SetInfoText("Toggle on/off the Khajiit Racial Ability: Claws (Increased Unarmed Damage)")

    ELSEIF (info == RR[58])    ; NordFrost
        SetInfoText("Toggle on/off the Nord Racial Ability: Frost Resistance +50%")

    ELSEIF (info == RR[60])    ; RedPois
        SetInfoText("Toggle on/off the Redguard Racial Ability: Poison Resistance +50%")

    ELSE
        myF_SkillText(info)
    ENDIF
ENDEVENT


;-------------------------------
FUNCTION myF_SkillText(Int info)
;-------------------------------
int i = 0
    WHILE (i < II.Length)
        IF (II[i] == info)
            i = II.Length
        ENDIF
        i = i + 1
    ENDWHILE

    IF (i > II.Length)
        SetInfoText("Set the slider to your desired skill level after that check the execute box!")
    ENDIF
ENDFUNCTION


;---------------------------------
FUNCTION myF_ResetAV(Actor player)
;---------------------------------
    string s

int i = 0
    WHILE (i < 18)
        IF     (i < 6)                    ; magician
            IF     (i == 0)
                s = "Alteration"
            ELSEIF (i == 1)
                s = "Conjuration"
            ELSEIF (i == 2)
                s = "Destruction"
            ELSEIF (i == 3)
                s = "Enchanting"
            ELSEIF (i == 4)
                s = "Illusion"
            ELSE
                s = "Restoration"
            ENDIF
        ELSEIF (i < 12)                    ; warrior
            IF     (i == 6)
                s = "Marksman"
            ELSEIF (i == 7)
                s = "Block"
            ELSEIF (i == 8)
                s = "HeavyArmor"
            ELSEIF (i == 9)
                s = "OneHanded"
            ELSEIF (i == 10)
                s = "Smithing"
            ELSE
                s = "TwoHanded"
            ENDIF
        ELSE                            ; thief
            IF     (i == 12)
                s = "Alchemy"
            ELSEIF (i == 13)
                s = "LightArmor"
            ELSEIF (i == 14)
                s = "Lockpicking"
            ELSEIF (i == 15)
                s = "Pickpocket"
            ELSEIF (i == 16)
                s = "Sneak"
            ELSE
                s = "Speechcraft"
            ENDIF
        ENDIF

        actorValueInfo AVI = ActorValueInfo.GetActorValueInfoByName(s)
        AVI.SetSkillLegendaryLevel(0)
        AVI.SetSkillExperience(0)
        player.SetActorValue(s, 15)

        i = i + 1
    ENDWHILE
ENDFUNCTION


;--------------------------------
FUNCTION myF_ExecAV(Actor player)
;--------------------------------
; https://www.creationkit.com/index.php?title=GetActorValueInfoByName_-_ActorValueInfo

    string s

int i = 0
    WHILE (i < 18)
        IF     (i < 6)                    ; magician
            IF     (i == 0)
                s = "Alteration"
            ELSEIF (i == 1)
                s = "Conjuration"
            ELSEIF (i == 2)
                s = "Destruction"
            ELSEIF (i == 3)
                s = "Enchanting"
            ELSEIF (i == 4)
                s = "Illusion"
            ELSE
                s = "Restoration"
            ENDIF
        ELSEIF (i < 12)                    ; warrior
            IF     (i == 6)
                s = "Marksman"
            ELSEIF (i == 7)
                s = "Block"
            ELSEIF (i == 8)
                s = "HeavyArmor"
            ELSEIF (i == 9)
                s = "OneHanded"
            ELSEIF (i == 10)
                s = "Smithing"
            ELSE
                s = "TwoHanded"
            ENDIF
        ELSE                            ; thief
            IF     (i == 12)
                s = "Alchemy"
            ELSEIF (i == 13)
                s = "LightArmor"
            ELSEIF (i == 14)
                s = "Lockpicking"
            ELSEIF (i == 15)
                s = "Pickpocket"
            ELSEIF (i == 16)
                s = "Sneak"
            ELSE
                s = "Speechcraft"
            ENDIF
        ENDIF

        ActorValueInfo AVI = ActorValueInfo.GetActorValueInfoByName(s)
        AVI.SetSkillExperience(0)    ; *0*
;------
        float fMax = FF[i]                                ; alts, cons, ..
        float f = player.GetActorValue(s)                ; altIndex, ..
        float x = AVI.GetExperienceForLevel(f as Int)    ; altxp, conxp, ..

        WHILE (f < fMax)
            Game.AdvanceSkill(s, x)
            f = player.GetActorValue(s)
        ENDWHILE
;------
        AVI.SetSkillExperience(f)    ; *f*

        i = i + 1
    ENDWHILE

;;;    ActorValueInfo.GetAVIByName("Alteration").SetSkillExperience(0)
;;;    float altIndex = player.GetActorValue("Alteration")
;;;    float altxp    = ActorValueInfo.GetAVIByName("Alteration").GetExperienceForLevel(altIndex as Int)
;
;;;    WHILE (altIndex < alts)
;;;        Game.AdvanceSkill("Alteration", altxp)
;;;        altIndex = player.GetActorValue("Alteration")
;;;    ENDWHILE
;;;    ActorValueInfo.GetAVIByName("Alteration").SetSkillExperience(0)
ENDFUNCTION


EVENT OnOptionSelect(Int option)  ; Toggle Select
;===================
    actor player = Game.GetPlayer()

IF (option == returnPerks)                                ; return perks
    returnPerksState = !returnPerksState
    SetToggleOptionValue(option, returnPerksState)

    PerkPoints = myF_Perks(bCount=TRUE)                    ; set scriptVariable "PerkPoints" and remove all perks
    Game.AddPerkPoints(PerkPoints)            ; *P*
    PerkPoints = 0                            ; *0*

    returnPerksState = !returnPerksState
    SetToggleOptionValue(option, returnPerksState)
;    --------------------

ELSEIF (option == resetPerks)                            ; reset perks
    resetPerksState = !resetPerksState
    SetToggleOptionValue(option, resetPerksState)

    Game.SetPerkPoints(0)                    ; ***
    myF_Perks(bCount=False)                                ; do not count "PerkPoints", only remove all perks

    resetPerksState = !resetPerksState
    SetToggleOptionValue(option, resetPerksState)
;    --------------------

ELSEIF (option == resetSouls)                            ; reset souls
    resetSoulsState = !resetSoulsState
    SetToggleOptionValue(option, resetSoulsState)

    ConsoleUtil.ExecuteCommand("player.setav dragonsouls 0")

    resetSoulsState = !resetSoulsState
    SetToggleOptionValue(option, resetSoulsState)
;    --------------------

ELSEIF (option == resetLevel)                            ; reset player level
    resetLevelState = !resetLevelState
    SetToggleOptionValue(option, resetLevelState)

    myF_ResetAV(player)
    player.SetActorValue("Health",  100)
    player.SetActorValue("Stamina", 100)
    player.SetActorValue("Magicka", 100)

    ConsoleUtil.ExecuteCommand("player.setlevel 1")
    Game.SetPlayerExperience(0)
 
    resetLevelState = !resetLevelState
    SetToggleOptionValue(option, resetLevelState)
;    --------------------

ELSEIF (option == execute)                                ; adjust AV by choice
    Debug.Messagebox("Your skills are being set to your desired values. Please wait for the script to finish before saving your game. You will be notified when the script is done.")
;    -----
    executeState = !executeState
    SetToggleOptionValue(option, executeState)

    myF_ExecAV(player)

    executeState = !executeState
    SetToggleOptionValue(execute, executeState)
;    -----
    Debug.MessageBox("Your skills have been set to your desired values. You may use the save function now.")


ELSEIF (option == PowRemove)                            ; remove power
    PowRemoveState = !PowRemoveState
    SetToggleOptionValue(option, PowRemoveState)

    myF_Remove(player, bPower=TRUE)

    RR[21] = 0                                ; HighbornState
    SetToggleOptionValue(RR[20], False)        ; Highborn

    RR[23] = 0                                ; HistskinState
    SetToggleOptionValue(RR[22], False)        ; Histskin

    RR[25] = 0                                ; CmdAnimalState
    SetToggleOptionValue(RR[24], False)        ; CmdAnimal

     RR[27] = 0                                ; DragonskinState
    SetToggleOptionValue(RR[26], False)        ; Dragonskin

    RR[29] = 0                                ; AncWrathState
    SetToggleOptionValue(RR[28], False)        ; AncWrath

    RR[31] = 0                                ; VoiceState = False
    SetToggleOptionValue(RR[30], False)        ; Voice

    RR[33] = 0                                ; NightEyeState
    SetToggleOptionValue(RR[32], False)        ; NightEye

    RR[35] = 0                                ; BattleCryState
    SetToggleOptionValue(RR[34], False)        ; BattleCry

    RR[37] = 0                                ; BerserkerRageState
    SetToggleOptionValue(RR[36], False)        ; BerserkerRage

    RR[39] = 0                                ; AdrRushState
    SetToggleOptionValue(RR[38], False)        ; AdrRush

     PowRemoveState = !PowRemoveState
    SetToggleOptionValue(PowRemove, PowRemoveState)
;    --------------------

ELSEIF (option == AbiRemove)                            ; remove ability
    AbiRemoveState = !AbiRemoveState
    SetToggleOptionValue(option, AbiRemoveState)

    myF_Remove(player, bPower=False)

    RR[41] = 0                                ; AltMagState
    SetToggleOptionValue(RR[40], False)        ; AltMag

    RR[43] = 0                                ; ArgDisState
    SetToggleOptionValue(RR[42], False)        ; ArgDis

    RR[45] = 0                                ; ArgWatState
    SetToggleOptionValue(RR[44], False)        ; ArgWat

;    RR[47] = 0                                    ; ArgUnState
;    SetToggleOptionValue(RR[46], False)            ; ArgUn

    RR[49] = 0                                ; BosPoisState
    SetToggleOptionValue(RR[48], False)        ; BosPois

    RR[51] = 0                                ; BreRMagState
    SetToggleOptionValue(RR[50], False)        ; BreRMag

    RR[53] = 0                                ; DunFireState
    SetToggleOptionValue(RR[52], False)        ; DunFire

    RR[55] = 0                                ; ImpLuckState
    SetToggleOptionValue(RR[54], False)        ; ImpLuck

    RR[57] = 0                                ; KhaClawState
    SetToggleOptionValue(RR[56], False)        ; KhaClaw

    RR[59] = 0                                ; NordFrostState
    SetToggleOptionValue(RR[58], False)        ; NordFrost
 
    RR[61] = 0                                ; RedPoisState
    SetToggleOptionValue(RR[60], False)        ; RedPois

    AbiRemoveState = !AbiRemoveState
    SetToggleOptionValue(option, AbiRemoveState)
;    --------------------

ELSEIF (option == RR[20])    ; Highborn
    myF_Toggle(option, 21, 0x000e40c8)

ELSEIF (option == RR[22])    ; Histskin
    myF_Toggle(option, 23, 0x000e40d5)

ELSEIF (option == RR[24])    ; CmdAnimal
    myF_Toggle(option, 25, 0x000e40cf)

ELSEIF (option == RR[26])    ; Dragonskin
    myF_Toggle(option, 27, 0x000aa022)

ELSEIF (option == RR[28])    ; AncWrath
    myF_Toggle(option, 29, 0x000e40d4)

ELSEIF (option == RR[30])    ; Voice
    myF_Toggle(option, 31, 0x000e40ca)
    
ELSEIF (option == RR[32])    ; NightEye
    myF_Toggle(option, 33, 0x000aa01d)
    
ELSEIF (option == RR[34])    ; BattleCry
    myF_Toggle(option, 35, 0x000e40c3)
    
ELSEIF (option == RR[36])    ; BerserkerRage
    myF_Toggle(option, 37, 0x000aa026)

ELSEIF (option == RR[38])    ; AdrRush
    myF_Toggle(option, 39, 0x000e40ce)


ELSEIF (option == RR[40])    ; AltMag
    myF_Toggle(option, 41, 0x00105f16)

ELSEIF (option == RR[42])    ; ArgDis
    myF_Toggle(option, 43, 0x00104acf)

ELSEIF (option == RR[44])    ; ArgWat
    myF_Toggle(option, 45, 0x000aa01b)

;ELSEIF (option == RR[46])    ; ArgUn
;    myF_Toggle(option, 47, "???")

ELSEIF (option == RR[48])    ; BosPois
    myF_Toggle(option, 49, 0x000aa025)

ELSEIF (option == RR[50])    ; BreRMag
    myF_Toggle(option, 51, 0x000aa01f)
 
ELSEIF (option == RR[52])    ; DunFire
    myF_Toggle(option, 53, 0x000aa021)

ELSEIF (option == RR[54])    ; ImpLuck
    myF_Toggle(option, 55, 0x000eb7eb)

ELSEIF (option == RR[56])    ; KhaClaw
    myF_Toggle(option, 57, 0x000aa01e)

ELSEIF (option == RR[58])    ; NordFrost
    myF_Toggle(option, 59, 0x000aa020)

ELSEIF (option == RR[60])    ; RedPois
    myF_Toggle(option, 61, 0x000aa023)

 
ELSE
    myF_Race(option, player)
ENDIF
ENDEVENT


;---------------------------------------------
FUNCTION myF_Remove(Actor player, Bool bPower)
;---------------------------------------------
    int[] a = new Int[10]

IF ( bPower )                ; power
    a[0] = 0x000e40c8
    a[1] = 0x000e40d5
    a[2] = 0x000e40cf
    a[3] = 0x000aa022
    a[4] = 0x000e40d4
    a[5] = 0x000e40ca
    a[6] = 0x000aa01d
    a[7] = 0x000e40c3
    a[8] = 0x000aa026
    a[9] = 0x000e40ce
ELSE                        ; ability
    a[0] = 0x00105f16
    a[1] = 0x00104acf
    a[2] = 0x000aa01b
    a[3] = 0x000aa025
    a[4] = 0x000aa01f
    a[5] = 0x000aa021
    a[6] = 0x000eb7eb
    a[7] = 0x000aa01e
    a[8] = 0x000aa020
    a[9] = 0x000aa023
ENDIF

    int i = 0
    WHILE (i < a.Length)
        spell sp = Game.GetForm( a[i] ) as Spell
        IF ( sp )
            player.RemoveSpell(sp)
        ENDIF
        i = i + 1
    ENDWHILE
ENDFUNCTION


;--------------------------------------------
FUNCTION myF_Toggle(Int option, Int i, Int n)
;--------------------------------------------
;;;    HighbornState = !HighBornState
;;;    SetToggleOptionValue(option, HighbornState)
;;;    IF ( HighbornState )                                        ; == TRUE
;;;        ConsoleUtil.ExecuteCommand("player.Addspell e40c8")
;;;    ELSE
;;;        ConsoleUtil.ExecuteCommand("player.Removespell e40c8")
;;;    ENDIF

    bool bState = RR[i] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)

    spell sp = Game.GetForm(n) as Spell            ; convert "int" -> "form" -> "spell"

    IF ( bState )
        Game.GetPlayer().AddSpell(sp)
;;;        ConsoleUtil.ExecuteCommand("player.Addspell " +s)
        RR[i] = 1        ; TRUE
    ELSE
        Game.GetPlayer().RemoveSpell(sp)
;;;        ConsoleUtil.ExecuteCommand("player.Removespell " +s)
        RR[i] = 0        ; False
    ENDIF
ENDFUNCTION


;------------------------------------------
FUNCTION myF_Race(Int option, Actor player)
;------------------------------------------
    int[]    b = new Int[6]                ; pointer to string
    string[] a = new String[18]            ; string holder array

; magician
    a[0] = "Alteration"            ; altplayer
    a[1] = "Conjuration"        ; conplayer
    a[2] = "Destruction"        ; desplayer
    a[3] = "Enchanting"            ; enchplayer
    a[4] = "Illusion"            ; illplayer
    a[5] = "Restoration"        ; restplayer

; warrior
    a[6] = "Marksman"            ; markplayer
    a[7] = "Block"                ; blkplayer
    a[8] = "HeavyArmor"            ; harmplayer
    a[9] = "OneHanded"            ; oneHplayer
    a[10]= "Smithing"            ; smithplayer
    a[11]= "TwoHanded"            ; twoHplayer

; thief
    a[12]= "Alchemy"            ; alchplayer
    a[13]= "LightArmor"            ; larmplayer
    a[14]= "Lockpicking"        ; lockplayer
    a[15]= "Pickpocket"            ; pickplayer
    a[16]= "Sneak"                ; snkplayer
    a[17]= "Speechcraft"        ; spkplayer

    bool bState
    int c

IF (option == RR[0])            ; == HighElf
    bState = RR[1] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[1] = bState as Int        ; HighElfState

    b[0] = 0    ; "Alteration"
    b[1] = 1    ; "Conjuration"
    b[2] = 2    ; "Destruction"
    b[3] = 3    ; "Enchanting"
    b[4] = 4    ; "Illusion"        ; +10
    b[5] = 5    ; "Restoration"

    c = 4                    ; for actorValue ("Illusion") use 10.0 instead of default value 5.0

;----------------
ELSEIF (option == RR[2])        ; == Argonian
    bState = RR[3] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[3] = bState as Int        ; ArgonianState

    b[0] = 0    ; "Alteration"
    b[1] = 5    ; "Restoration"
    b[2] = 13    ; "LightArmor"
    b[3] = 14    ; "Lockpicking"        ; +10
    b[4] = 15    ; "Pickpocket"
    b[5] = 16    ; "Sneak"

    c = 3                    ; for actorValue ("Lockpicking") use 10.0 instead of 5.0

;----------------
ELSEIF (option == RR[4])        ; == WoodElf
    bState = RR[5] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[5] = bState as Int        ; WoodElfState

    b[0] = 6    ; "Marksman"        ; +10
    b[1] = 12    ; "Alchemy"
    b[2] = 13    ; "LightArmor"
    b[3] = 14    ; "Lockpicking"
    b[4] = 15    ; "Pickpocket"
    b[5] = 16    ; "Sneak"

    c = 0
    
;----------------
ELSEIF (option == RR[6])        ; == Breton
    bState = RR[7] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[7] = bState as Int        ; BretonState

    b[0] = 0    ; "Alteration"
    b[1] = 1    ; "Conjuration"        ; +10
    b[2] = 4    ; "Illusion"
    b[3] = 5    ; "Restoration"
    b[4] = 12    ; "Alchemy"
    b[5] = 17    ; "Speechcraft"

    c = 1

;----------------
ELSEIF (option == RR[8])        ; == DarkElf
    bState = RR[9] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[9] = bState as Int        ; DarkElfState

    b[0] = 0    ; "Alteration"
    b[1] = 2    ; "Destruction"        ; +10
    b[2] = 4    ; "Illusion"
    b[3] = 12    ; "Alchemy"
    b[4] = 13    ; "LightArmor"    
    b[5] = 16    ; "Sneak"

    c = 1

;----------------
ELSEIF (option == RR[10])        ; == Imperial
    bState = RR[11] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[11] = bState as Int        ; ImperialState

    b[0] = 2    ; "Destruction"
    b[1] = 3    ; "Enchanting"
    b[2] = 5    ; "Restoration"        ; +10
    b[3] = 7    ; "Block"
    b[4] = 8    ; "HeavyArmor"
    b[5] = 9    ; "OneHanded"

    c = 2

;----------------
ELSEIF (option == RR[12])        ; == Khajiit
    bState = RR[13] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[13] = bState as Int        ; KhajiitState

    b[0] = 6    ; "Marksman"
    b[1] = 9    ; "OneHanded"
    b[2] = 12    ; "Alchemy"
    b[3] = 14    ; "Lockpicking"
    b[4] = 15    ; "Pickpocket"    
    b[5] = 16    ; "Sneak"            ; +10

    c = 5

;----------------
ELSEIF (option == RR[14])        ; == Nord
    bState = RR[15] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[15] = bState as Int        ; NordState

    b[0] = 7    ; "Block"
    b[1] = 9    ; "OneHanded"
    b[2] = 10    ; "Smithing"
    b[3] = 11    ; "TwoHanded"        ; +10
    b[4] = 13    ; "LightArmor"
    b[5] = 17    ; "Speechcraft"

    c = 3

;----------------
ELSEIF (option == RR[16])        ; == Orc
    bState = RR[17] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[17] = bState as Int        ; OrcState

    b[0] = 3    ; "Enchanting"
    b[1] = 7    ; "Block"
    b[2] = 8    ; "HeavyArmor"        ; +10
    b[3] = 9    ; "OneHanded"
    b[4] = 10    ; "Smithing"
    b[5] = 11    ; "TwoHanded"

    c = 2

;----------------
ELSEIF (option == RR[18])        ; == Redguard
    bState = RR[19] as Bool
    bState = !bState
    SetToggleOptionValue(option, bState)
    RR[19] = bState as Int        ; RedguardState

    b[0] = 0    ; "Alteration"
    b[1] = 2    ; "Destruction"
    b[2] = 6    ; "Marksman"
    b[3] = 7    ; "Block"
    b[4] = 9    ; "OneHanded"        ; +10
    b[5] = 10    ; "Smithing"

    c = 4

ELSE
    RETURN    ; - STOP -    unknown option !?
ENDIF
;---------------------
    int i = 0
    WHILE (i < 6)
        int   n = b[i]
        float f = player.GetActorValue(a[n])        ; get the actorValue depends on race predefined string pointers

        IF (i == c)                    ; adjust by 10
            IF ( bState )
                f = f + 10.0
            ELSE
                f = f - 10.0
            ENDIF
        ELSE                        ; adjust by 5
            IF ( bState )
                f = f + 5.0    
            ELSE
                f = f - 5.0
            ENDIF
        ENDIF

        player.SetActorValue(a[n], f)
        i = i + 1
    ENDWHILE
ENDFUNCTION


; -== SPELLs ==-
 ;SPELL PROPERTY PowerHighElfMagickaRegen  auto  
 ;SPELL PROPERTY PowerArgonianHistskin     auto  
 ;SPELL PROPERTY PowerWoodElfCommandAnimal auto  
 ;SPELL PROPERTY PowerBretonAbsorbSpell    auto  
 ;SPELL PROPERTY PowerDarkElfFlameCloak    auto  
 ;SPELL PROPERTY PowerImperialPacify       auto  
 ;SPELL PROPERTY PowerKhajiitNightEye      auto  
 ;SPELL PROPERTY PowerNordBattleCry        auto  
 ;SPELL PROPERTY RaceOrcBerserk            auto
 ;SPELL PROPERTY PowerRedguardStaminaRegen auto  

; -== RACEs ==-
 ;Race GetRace
 ;Race HighElfRace
 ;Race ArgonianRace
 ;Race WoodElfRace
 ;Race BretonRace
 ;Race DarkElfRace
 ;Race ImperialRace
 ;Race KhajiitRace
 ;Race NordRace
 ;Race OrcRace

 

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...