ScriptName SDQuestScript
Short Initialised
Short InitialisationStage
Short MCount
Short MBaseCount
Short MCurrentCount
Short SpecialCount
Float fQuestDelayTime
Short HasRunOnce
Short Button
Short CurrentMenu
Short SkillIncreases
Short Value1
Short Value2
Short CurrentLevel
Short CalcLevel
Short InvalidTillLevelUp
Short SkillCombat
Short SkillMagic
Short SkillStealth
;These variables record which is the specialisation
Short SpecialCombat
Short SpecialMagic
Short SpecialStealth
;These variables record the stat at the start of the level
Short BBlock
Short BArmorer
Short BHeavyArmor
Short BBlunt
Short BBlade
Short BAthletics
Short BHandToHand
Short BDestruction
Short BAlteration
Short BIllusion
Short BConjuration
Short BMysticism
Short BRestoration
Short BAlchemy
Short BSecurity
Short BSneak
Short BAcrobatics
Short BLightArmor
Short BMarksman
Short BMercantile
Short BSpeechcraft
;These variables record which stats are major stats
Short MBlock
Short MArmorer
Short MHeavyArmor
Short MBlunt
Short MBlade
Short MAthletics
Short MHandToHand
Short MDestruction
Short MAlteration
Short MIllusion
Short MConjuration
Short MMysticism
Short MRestoration
Short MAlchemy
Short MSecurity
Short MSneak
Short MAcrobatics
Short MLightArmor
Short MMarksman
Short MMercantile
Short MSpeechcraft
;Calculation vars
Short CBlock
Short CArmorer
Short CHeavyArmor
Short CBlunt
Short CBlade
Short CAthletics
Short CHandToHand
Short CDestruction
Short CAlteration
Short CIllusion
Short CConjuration
Short CMysticism
Short CRestoration
Short CAlchemy
Short CSecurity
Short CSneak
Short CAcrobatics
Short CLightArmor
Short CMarksman
Short CMercantile
Short CSpeechcraft
Begin GameMode
If HasRunOnce == 0
Set fQuestDelayTime to .01
Set HasRunOnce to 1
StopQuest SDSkillDiaryQuest
Return
EndIf
If Initialised == 1
;Every 2s check for a change to major skills
Set fQuestDelayTime to 2
If GetPCMiscStat 2 > SkillIncreases
Set SkillIncreases to GetPCMiscStat 2
Set MCurrentCount to Player.GetBaseActorValue Block * MBlock + Player.GetBaseActorValue Armorer * MArmorer + Player.GetBaseActorValue HeavyArmor * MHeavyArmor + Player.GetBaseActorValue Blunt * MBlunt + Player.GetBaseActorValue Blade * MBlade + Player.GetBaseActorValue Athletics * MAthletics + Player.GetBaseActorValue HandToHand * MHandToHand
Set MCurrentCount to MCurrentCount + Player.GetBaseActorValue Destruction * MDestruction + Player.GetBaseActorValue Alteration * MAlteration + Player.GetBaseActorValue Illusion * MIllusion + Player.GetBaseActorValue Conjuration * MConjuration + Player.GetBaseActorValue Mysticism * MMysticism + Player.GetBaseActorValue Restoration * MRestoration + Player.GetBaseActorValue Alchemy * MAlchemy
Set MCurrentCount to MCurrentCount + Player.GetBaseActorValue Security * MSecurity + Player.GetBaseActorValue Sneak * MSneak + Player.GetBaseActorValue Acrobatics * MAcrobatics + Player.GetBaseActorValue LightArmor * MLightArmor + Player.GetBaseActorValue Marksman * MMarksman + Player.GetBaseActorValue Mercantile * MMercantile + Player.GetBaseActorValue Speechcraft * MSpeechcraft
Set Value1 to Player.GetActorValue Vampirism / 5
Set Value2 to 3 * GetStageDone MS52 100
Set MCurrentCount to MCurrentCount - (MAcrobatics + MAthletics + MDestruction + MHandToHand + MIllusion + MMysticism + MSneak) * Value1 - (MBlade + MBlock + MAthletics) * Value2
Set CalcLevel to (MCurrentCount - MBaseCount) / 10 + 2
If CalcLevel > CurrentLevel
;The level has been locked the next level is now being calculated
Set CurrentLevel to CalcLevel
;Record each of the stats at the start of the level.
Set BBlock to Player.GetBaseActorValue Block - Value2
Set BArmorer to Player.GetBaseActorValue Armorer
Set BHeavyArmor to Player.GetBaseActorValue HeavyArmor
Set BBlunt to Player.GetBaseActorValue Blunt
Set BBlade to Player.GetBaseActorValue Blade - Value2
Set BAthletics to Player.GetBaseActorValue Athletics - Value1 - Value2
Set BHandToHand to Player.GetBaseActorValue HandToHand - Value1
Set BDestruction to Player.GetBaseActorValue Destruction - Value1
Set BAlteration to Player.GetBaseActorValue Alteration
Set BIllusion to Player.GetBaseActorValue Illusion - Value1
Set BConjuration to Player.GetBaseActorValue Conjuration
Set BMysticism to Player.GetBaseActorValue Mysticism - Value1
Set BRestoration to Player.GetBaseActorValue Restoration
Set BAlchemy to Player.GetBaseActorValue Alchemy
Set BSecurity to Player.GetBaseActorValue Security
Set BSneak to Player.GetBaseActorValue Sneak - Value1
Set BAcrobatics to Player.GetBaseActorValue Acrobatics - Value1
Set BLightArmor to Player.GetBaseActorValue LightArmor
Set BMarksman to Player.GetBaseActorValue Marksman
Set BMercantile to Player.GetBaseActorValue Mercantile
Set BSpeechcraft to Player.GetBaseActorValue Speechcraft
Set InvalidTillLevelUp to 0
EndIf
EndIf
EndIf
End
Begin MenuMode
If Initialised == 1
;Every 1s check for a change to major skills
Set fQuestDelayTime to 1
If GetPCMiscStat 2 > SkillIncreases
Set SkillIncreases to GetPCMiscStat 2
Set MCurrentCount to Player.GetBaseActorValue Block * MBlock + Player.GetBaseActorValue Armorer * MArmorer + Player.GetBaseActorValue HeavyArmor * MHeavyArmor + Player.GetBaseActorValue Blunt * MBlunt + Player.GetBaseActorValue Blade * MBlade + Player.GetBaseActorValue Athletics * MAthletics + Player.GetBaseActorValue HandToHand * MHandToHand
Set MCurrentCount to MCurrentCount + Player.GetBaseActorValue Destruction * MDestruction + Player.GetBaseActorValue Alteration * MAlteration + Player.GetBaseActorValue Illusion * MIllusion + Player.GetBaseActorValue Conjuration * MConjuration + Player.GetBaseActorValue Mysticism * MMysticism + Player.GetBaseActorValue Restoration * MRestoration + Player.GetBaseActorValue Alchemy * MAlchemy
Set MCurrentCount to MCurrentCount + Player.GetBaseActorValue Security * MSecurity + Player.GetBaseActorValue Sneak * MSneak + Player.GetBaseActorValue Acrobatics * MAcrobatics + Player.GetBaseActorValue LightArmor * MLightArmor + Player.GetBaseActorValue Marksman * MMarksman + Player.GetBaseActorValue Mercantile * MMercantile + Player.GetBaseActorValue Speechcraft * MSpeechcraft
Set Value1 to Player.GetActorValue Vampirism / 5
Set Value2 to 3 * GetStageDone MS52 100
Set MCurrentCount to MCurrentCount - (MAcrobatics + MAthletics + MDestruction + MHandToHand + MIllusion + MMysticism + MSneak) * Value1 - (MBlade + MBlock + MAthletics) * Value2
Set CalcLevel to (MCurrentCount - MBaseCount) / 10 + 2
If CalcLevel > CurrentLevel
;The level has been locked the next level is now being calculated
Set CurrentLevel to CalcLevel
;Record each of the stats at the start of the level.
Set BBlock to Player.GetBaseActorValue Block - Value2
Set BArmorer to Player.GetBaseActorValue Armorer
Set BHeavyArmor to Player.GetBaseActorValue HeavyArmor
Set BBlunt to Player.GetBaseActorValue Blunt
Set BBlade to Player.GetBaseActorValue Blade - Value2
Set BAthletics to Player.GetBaseActorValue Athletics - Value1 - Value2
Set BHandToHand to Player.GetBaseActorValue HandToHand - Value1
Set BDestruction to Player.GetBaseActorValue Destruction - Value1
Set BAlteration to Player.GetBaseActorValue Alteration
Set BIllusion to Player.GetBaseActorValue Illusion - Value1
Set BConjuration to Player.GetBaseActorValue Conjuration
Set BMysticism to Player.GetBaseActorValue Mysticism - Value1
Set BRestoration to Player.GetBaseActorValue Restoration
Set BAlchemy to Player.GetBaseActorValue Alchemy
Set BSecurity to Player.GetBaseActorValue Security
Set BSneak to Player.GetBaseActorValue Sneak - Value1
Set BAcrobatics to Player.GetBaseActorValue Acrobatics - Value1
Set BLightArmor to Player.GetBaseActorValue LightArmor
Set BMarksman to Player.GetBaseActorValue Marksman
Set BMercantile to Player.GetBaseActorValue Mercantile
Set BSpeechcraft to Player.GetBaseActorValue Speechcraft
Set InvalidTillLevelUp to 0
EndIf
EndIf
EndIf
End
Begin MenuMode 1026
;The book is always open during initialisation
If Initialised == 0
If InitialisationStage == 0
Set Button to GetButtonPressed
If CurrentMenu == 0
MessageBox "Hallo!! Ich bin Abacus das Skill Tagebuch. Ich werde Dich über Deine Entwicklung im Detail auf dem laufenden halten. Doch zunächst möchte ich mehr über Deine Hauptfertigkeiten und Deine Spezialisierung erfahren.", "Na klar immer doch!"
Set CurrentMenu to 1
Return
ElseIf CurrentMenu == 1
If Button == -1
Return
EndIf
Set CurrentMenu to 0
EndIf
Set Value1 to Player.GetActorValue Vampirism / 5
Set Value2 to 3 * GetStageDone MS52 100
Set BBlock to Player.GetBaseActorValue Block - Value2
Set BArmorer to Player.GetBaseActorValue Armorer
Set BHeavyArmor to Player.GetBaseActorValue HeavyArmor
Set BBlunt to Player.GetBaseActorValue Blunt
Set BBlade to Player.GetBaseActorValue Blade - Value2
Set BAthletics to Player.GetBaseActorValue Athletics - Value1 - Value2
Set BHandToHand to Player.GetBaseActorValue HandToHand - Value1
Set BDestruction to Player.GetBaseActorValue Destruction - Value1
Set BAlteration to Player.GetBaseActorValue Alteration
Set BIllusion to Player.GetBaseActorValue Illusion - Value1
Set BConjuration to Player.GetBaseActorValue Conjuration
Set BMysticism to Player.GetBaseActorValue Mysticism - Value1
Set BRestoration to Player.GetBaseActorValue Restoration
Set BAlchemy to Player.GetBaseActorValue Alchemy
Set BSecurity to Player.GetBaseActorValue Security
Set BSneak to Player.GetBaseActorValue Sneak - Value1
Set BAcrobatics to Player.GetBaseActorValue Acrobatics - Value1
Set BLightArmor to Player.GetBaseActorValue LightArmor
Set BMarksman to Player.GetBaseActorValue Marksman
Set BMercantile to Player.GetBaseActorValue Mercantile
Set BSpeechcraft to Player.GetBaseActorValue Speechcraft
Set InitialisationStage to 1
EndIf
If InitialisationStage == 1
;Get Race bonuses
If GetPCIsRace Argonian
Set CAlchemy to 5
Set CBlade to 5
Set CHandToHand to 5
Set CIllusion to 5
Set CMysticism to 5
Set CAthletics to 10
Set CSecurity to 10
ElseIf GetPCIsRace Breton
Set CAlchemy to 5
Set CAlteration to 5
Set CIllusion to 5
Set CConjuration to 10
Set CMysticism to 10
Set CRestoration to 10
ElseIf GetPCIsRace DarkElf
Set CAthletics to 5
Set CBlunt to 5
Set CLightArmor to 5
Set CMarksman to 5
Set CMysticism to 5
Set CBlade to 10
Set CDestruction to 10
ElseIf GetPCIsRace HighElf
Set CAlchemy to 5
Set CConjuration to 5
Set CIllusion to 5
Set CAlteration to 10
Set CDestruction to 10
Set CMysticism to 10
ElseIf GetPCIsRace Imperial
Set CBlade to 5
Set CBlunt to 5
Set CHandToHand to 5
Set CHeavyArmor to 10
Set CMercantile to 10
Set CSpeechcraft to 10
ElseIf GetPCIsRace Khajiit
Set CAthletics to 5
Set CBlade to 5
Set CLightArmor to 5
Set CSecurity to 5
Set CSneak to 5
Set CAcrobatics to 10
Set CHandToHand to 10
ElseIf GetPCIsRace Nord
Set CArmorer to 5
Set CBlock to 5
Set CRestoration to 5
Set CBlade to 10
Set CBlunt to 10
Set CHeavyArmor to 10
ElseIf GetPCIsRace Orc
Set CHandToHand to 5
Set CArmorer to 10
Set CBlock to 10
Set CBlunt to 10
Set CHeavyArmor to 10
ElseIf GetPCIsRace Redguard
Set CLightArmor to 5
Set CHeavyArmor to 5
Set CMercantile to 5
Set CAthletics to 10
Set CBlade to 10
Set CBlunt to 10
ElseIf GetPCIsRace WoodElf
Set CAcrobatics to 5
Set CAlteration to 5
Set CLightArmor to 5
Set CAlchemy to 10
Set CMarksman to 10
Set CSneak to 10
Else
Set InitialisationStage to 0
Set CurrentMenu to 0
MessageBox "Ich weiss nur etwas über Standardrassen, tut mir leid."
StopQuest SDSkillDiaryQuest
Return
EndIf
Set InitialisationStage to 2
EndIf
If InitialisationStage == 2
;Begin auto detection
Set MBlock to 0
Set MArmorer to 0
Set MHeavyArmor to 0
Set MBlunt to 0
Set MBlade to 0
Set MAthletics to 0
Set MHandToHand to 0
Set MDestruction to 0
Set MAlteration to 0
Set MIllusion to 0
Set MConjuration to 0
Set MMysticism to 0
Set MRestoration to 0
Set MAlchemy to 0
Set MSecurity to 0
Set MSneak to 0
Set MAcrobatics to 0
Set MLightArmor to 0
Set MMarksman to 0
Set MMercantile to 0
Set MSpeechcraft to 0
Set MCount to 0
If BBlock - CBlock >= 25
Set MBlock to 1
Set MCount to MCount + 1
EndIf
If BArmorer - CArmorer >= 25
Set MArmorer to 1
Set MCount to MCount + 1
EndIf
If BHeavyArmor - CHeavyArmor >= 25
Set MHeavyArmor to 1
Set MCount to MCount + 1
EndIf
If BBlunt - CBlunt >= 25
Set MBlunt to 1
Set MCount to MCount + 1
EndIf
If BBlade - CBlade >= 25
Set MBlade to 1
Set MCount to MCount + 1
EndIf
If BAthletics - CAthletics >= 25
Set MAthletics to 1
Set MCount to MCount + 1
EndIf
If BHandToHand - CHandToHand >= 25
Set MHandToHand to 1
Set MCount to MCount + 1
EndIf
If BDestruction - CDestruction >= 25
Set MDestruction to 1
Set MCount to MCount + 1
EndIf
If BAlteration - CAlteration >= 25
Set MAlteration to 1
Set MCount to MCount + 1
EndIf
If BIllusion - CIllusion >= 25
Set MIllusion to 1
Set MCount to MCount + 1
EndIf
If BConjuration - CConjuration >= 25
Set MConjuration to 1
Set MCount to MCount + 1
EndIf
If BMysticism - CMysticism >= 25
Set MMysticism to 1
Set MCount to MCount + 1
EndIf
If BRestoration - CRestoration >= 25
Set MRestoration to 1
Set MCount to MCount + 1
EndIf
If BAlchemy - CAlchemy >= 25
Set MAlchemy to 1
Set MCount to MCount + 1
EndIf
If BSecurity - CSecurity >= 25
Set MSecurity to 1
Set MCount to MCount + 1
EndIf
If BSneak - CSneak >= 25
Set MSneak to 1
Set MCount to MCount + 1
EndIf
If BAcrobatics - CAcrobatics >= 25
Set MAcrobatics to 1
Set MCount to MCount + 1
EndIf
If BLightArmor - CLightArmor >= 25
Set MLightArmor to 1
Set MCount to MCount + 1
EndIf
If BMarksman - CMarksman >= 25
Set MMarksman to 1
Set MCount to MCount + 1
EndIf
If BMercantile - CMercantile >= 25
Set MMercantile to 1
Set MCount to MCount + 1
EndIf
If BSpeechcraft - CSpeechcraft >= 25
Set MSpeechcraft to 1
Set MCount to MCount + 1
EndIf
If MCount != 7
MessageBox "Du musst Deine Hauptfertigkeiten und Deine Spezialisierung eintragen.", "Mach ich!", "Nö keine Lust!"
Set InitialisationStage to 5
Set CurrentMenu to 0
Else
Set InitialisationStage to 3
EndIf
EndIf
If InitialisationStage == 3
;Auto detect specialisation
Set SpecialCombat to 0
Set SpecialMagic to 0
Set SpecialStealth to 0
Set SpecialCount to 0
Set Value1 to MBlock + MArmorer + MHeavyArmor + MBlunt + MBlade + MAthletics + MHandToHand
Set SkillCombat to BBlock + BArmorer + BHeavyArmor + BBlunt + BBlade + BAthletics + BHandToHand - (4*Value1 + 7) * 5 - CBlock - CArmorer - CHeavyArmor - CBlunt - CBlade - CAthletics - CHandToHand
Set Value1 to MDestruction + MAlteration + MIllusion + MConjuration + MMysticism + MRestoration + MAlchemy
Set SkillMagic to BDestruction + BAlteration + BIllusion + BConjuration + BMysticism + BRestoration + BAlchemy - (4*Value1 + 7) * 5 - CDestruction - CAlteration - CIllusion - CConjuration - CMysticism - CRestoration - CAlchemy
Set Value1 to MSecurity + MSneak + MAcrobatics + MLightArmor + MMarksman + MMercantile + MSpeechcraft
Set SkillStealth to BSecurity + BSneak + BAcrobatics + BLightArmor + BMarksman + BMercantile + BSpeechcraft - (4*Value1 + 7) * 5 - CSecurity - CSneak - CAcrobatics - CLightArmor - CMarksman - CMercantile - CSpeechcraft
If SkillCombat >= 35
Set SpecialCombat to 1
Set SpecialCount to SpecialCount + 1
Endif
If SkillMagic >= 35
Set SpecialMagic to 1
Set SpecialCount to SpecialCount + 1
EndIf
If SkillStealth >= 35
Set SpecialStealth to 1
Set SpecialCount to SpecialCount + 1
EndIf
Set CurrentMenu to 0
If SpecialCount != 1
MessageBox "Du musst Deine Hauptfertigkeiten und Deine Spezialisierung eintragen.", "Mach ich", "Nö keine Lust"
Set InitialisationStage to 5
Else
Set InitialisationStage to 4
MessageBox "Ich kann Deine Hauptfertigkeiten und Deine Spezialisierung auch suchen, möchtest du das?", "Sicher", "Dazu brauch ich kein verf.... Buch", "Ich machs manuell! Partyyyyy!!", "Ach halts Maul"
EndIf
EndIf
If InitialisationStage == 4
;Check what the player wants to do now that settings are done
Set Button to GetButtonPressed
If Button == 0
;Confirm
Set InitialisationStage to 7
Set CurrentMenu to 0
MessageBox "Deine Hauptfertigkeiten sind...", "Ja was denn nun?"
ElseIf Button == 1
;Finish
Set InitialisationStage to 8
Set CurrentMenu to 0
ElseIf Button == 2
;Manually set them
MessageBox "Du musst Deine Hauptfertigkeiten und Deine Spezialisierung eintragen.", "Mach ich", "Nö keine Lust"
Set InitialisationStage to 5
Set CurrentMenu to 0
ElseIf Button == 3
;Cancel
Set CurrentMenu to 0
Set InitialisationStage to 0
StopQuest SDSkillDiaryQuest
Return
EndIf
EndIf
If InitialisationStage == 5
;Enter Majors
Set Button to GetButtonPressed
If Button == -1
Return
EndIf
If CurrentMenu == 0
;The Continue/Cancel menu
If Button == 0
;Continue
Set CurrentMenu to 1
Set Button to 7
;First reset all the vars for the majors
Set MBlock to 0
Set MArmorer to 0
Set MHeavyArmor to 0
Set MBlunt to 0
Set MBlade to 0
Set MAthletics to 0
Set MHandToHand to 0
Set MDestruction to 0
Set MAlteration to 0
Set MIllusion to 0
Set MConjuration to 0
Set MMysticism to 0
Set MRestoration to 0
Set MAlchemy to 0
Set MSecurity to 0
Set MSneak to 0
Set MAcrobatics to 0
Set MLightArmor to 0
Set MMarksman to 0
Set MMercantile to 0
Set MSpeechcraft to 0
Set MCount to 0
ElseIf Button == 1
;Cancel
Set Button to 8
EndIf
ElseIf CurrentMenu == 1
;The menu for Combat skills
If Button == 0
;Block
Set CurrentMenu to 1 + 3 * MBlock
Set MCount to MCount + 1 - MBlock
Set MBlock to 1
ElseIf Button == 1
;Armorer
Set CurrentMenu to 1 + 3 * MArmorer
Set MCount to MCount + 1 - MArmorer
Set MArmorer to 1
ElseIf Button == 2
;Heavy Armor
Set CurrentMenu to 1 + 3 * MHeavyArmor
Set MCount to MCount + 1 - MHeavyArmor
Set MHeavyArmor to 1
ElseIf Button == 3
;Blunt
Set CurrentMenu to 1 + 3 * MBlunt
Set MCount to MCount + 1 - MBlunt
Set MBlunt to 1
ElseIf Button == 4
;Blade
Set CurrentMenu to 1 + 3 * MBlade
Set MCount to MCount + 1 - MBlade
Set MBlade to 1
ElseIf Button == 5
;Athletics
Set CurrentMenu to 1 + 3 * MAthletics
Set MCount to MCount + 1 - MAthletics
Set MAthletics to 1
ElseIf Button == 6
;Hand To Hand
Set CurrentMenu to 1 + 3 * MHandToHand
Set MCount to MCount + 1 - MHandToHand
Set MHandToHand to 1
ElseIf Button == 7
;Next Page
Set CurrentMenu to 2
EndIf
ElseIf CurrentMenu == 2
;The menu for magic skills
If Button == 0
;Destruction
Set CurrentMenu to 2 + 3 * MDestruction
Set MCount to MCount + 1 - MDestruction
Set MDestruction to 1
ElseIf Button == 1
;Alteration
Set CurrentMenu to 2 + 3 * MAlteration
Set MCount to MCount + 1 - MAlteration
Set MAlteration to 1
ElseIf Button == 2
;Illusion
Set CurrentMenu to 2 + 3 * MIllusion
Set MCount to MCount + 1 - MIllusion
Set MIllusion to 1
ElseIf Button == 3
;Conjuration
Set CurrentMenu to 2 + 3 * MConjuration
Set MCount to MCount + 1 - MConjuration
Set MConjuration to 1
ElseIf Button == 4
;Mysticism
Set CurrentMenu to 2 + 3 * MMysticism
Set MCount to MCount + 1 - MMysticism
Set MMysticism to 1
ElseIf Button == 5
;Restoration
Set CurrentMenu to 2 + 3 * MRestoration
Set MCount to MCount + 1 - MRestoration
Set MRestoration to 1
ElseIf Button == 6
;Alchemy
Set CurrentMenu to 2 + 3 * MAlchemy
Set MCount to MCount + 1 - MAlchemy
Set MAlchemy to 1
ElseIf Button == 7
;Next Page
Set CurrentMenu to 3
EndIf
ElseIf CurrentMenu == 3
If Button == 0
;Security
Set CurrentMenu to 3 + 3 * MSecurity
Set MCount to MCount + 1 - MSecurity
Set MSecurity to 1
ElseIf Button == 1
;Sneak
Set CurrentMenu to 3 + 3 * MSneak
Set MCount to MCount + 1 - MSneak
Set MSneak to 1
ElseIf Button == 2
;Acrobatics
Set CurrentMenu to 3 + 3 * MAcrobatics
Set MCount to MCount + 1 - MAcrobatics
Set MAcrobatics to 1
ElseIf Button == 3
;Light Armor
Set CurrentMenu to 3 + 3 * MLightArmor
Set MCount to MCount + 1 - MLightArmor
Set MLightArmor to 1
ElseIf Button == 4
;Marksman
Set CurrentMenu to 3 + 3 * MMarksman
Set MCount to MCount + 1 - MMarksman
Set MMarksman to 1
ElseIf Button == 5
;Mercantile
Set CurrentMenu to 3 + 3 * MMercantile
Set MCount to MCount + 1 - MMercantile
Set MMercantile to 1
ElseIf Button == 6
;Speechcraft
Set CurrentMenu to 3 + 3 * MSpeechcraft
Set MCount to MCount + 1 - MSpeechcraft
Set MSpeechcraft to 1
ElseIf Button == 7
;Next Page
Set CurrentMenu to 1
EndIf
ElseIf CurrentMenu >= 4
;The error menus
If Button == 0
;Re-Select Skill
Set CurrentMenu to CurrentMenu - 3
ElseIf Button == 1
;Cancel
Set Button to 8
EndIf
EndIf
If Button == 8
;Quit the initialisation process
Set CurrentMenu to 0
Set InitialisationStage to 0
StopQuest SDSkillDiaryQuest
Return
EndIf
If Mcount < 7
Set Value1 to MCount + 1
If CurrentMenu == 1
;Show Combat skill menu
MessageBox "Wähle Hauptfertigkeit Nr. %.0f:", Value1, "Blocken", "Waffenschmied", "Schwere Rüstung", "Stumpfe Waffen", "Schwertkampf", "Athletik", "Nahkampf", "Nächste Seite", "Stop"
ElseIf CurrentMenu == 2
;Show Magic skill menu
MessageBox "Wähle Hauptfertigkeit Nr. %.0f:", Value1, "Zersörung", "Veränderung", "Illusion", "Beschwörung", "Mystik", "Wiederherstellung", "Alchemie", "Nächste Seite", "Stop"
ElseIf CurrentMenu == 3
;Show Stealth skill menu
MessageBox "Wähle Hauptfertigkeit Nr. %.0f:", Value1, "Sicherheit", "Schleichen", "Akrobatik", "Leichte Rüstung", "Schütze", "Handelsgeschick", "Wortgewandtheit", "Erste Seite", "Stop"
ElseIf CurrentMenu >= 4
;Show invalid data menu
MessageBox "Du hast das bereits als Hauptfertigkeit eingetragen.", "Dann eben was anderes!", "Ups dann nich!"
EndIf
Else
;We are done lets go to the specialisation selection
Set InitialisationStage to 6
Set CurrentMenu to 0
MessageBox "Wähle deine Spezialisierung: ", "Kampf", "Magie", "Diebesfähigkeit", "Ich wähl lieber die FDP..und geh!"
EndIf
EndIf
If InitialisationStage == 6
;Get the specialisation
Set Button to GetButtonPressed
If Button == -1
Return
EndIf
;Reset the specialisation vars
Set SpecialCombat to 0
Set SpecialMagic to 0
Set SpecialStealth to 0
Set SpecialCount to 0
If CurrentMenu == 0
If Button == 0
;Combat
Set SpecialCombat to 1
ElseIf Button == 1
;Magic
Set SpecialMagic to 1
ElseIf Button == 2
;Stealth
Set SpecialStealth to 1
ElseIf Button == 3
;Cancel
Set InitialisationStage to 0
Set CurrentMenu to 0
StopQuest SDSkillDiaryQuest
Return
EndIf
EndIf
Set InitialisationStage to 4
Set CurrentMenu to 0
MessageBox "Sicher das alle Angaben Korrekt sind?" "Ja zur Hölle", "Nein ich will LESEN! JETZT!", "Von vorn", "Hau doch ab"
EndIf
If InitialisationStage == 7
;Confirm the settings here
Set Button to GetButtonPressed
If Button == -1
Return
ElseIf Button == 1
;Incorrect
MessageBox "Gib Deine Hauptfertigkeiten und Deine Spezialisierung ein.", "Zu Befehl", "Nix gibts!"
Set InitialisationStage to 5
Set CurrentMenu to 0
Return
EndIf
If MBlock == 1 && CurrentMenu < 1
MessageBox "Blocken", "Du kommscht hier ned rein!", "Die Mauer muss weg!"
Set CurrentMenu to 1
ElseIf MArmorer == 1 && CurrentMenu < 2
MessageBox "Waffenschmied", "Japp", "Bin ichn Zwerg oder was?"
Set CurrentMenu to 2
ElseIf MHeavyArmor == 1 && CurrentMenu < 3
MessageBox "Schwere Rüstung", "Des isn Klacks!", "Da heb mir nur nen Bruch"
Set CurrentMenu to 3
ElseIf MBlunt == 1 && CurrentMenu < 4
MessageBox "Stumpfe Waffen", "SIND DER HAMMER!", "Nö echt nich!"
Set CurrentMenu to 4
ElseIf MBlade == 1 && CurrentMenu < 5
MessageBox "Schwertkampf", "Yeah! Nenn mich den Schnetzler", "Viel zu scharf!"
Set CurrentMenu to 5
ElseIf MAthletics == 1 && CurrentMenu < 6
MessageBox "Athletik", "Arni isn ******* gegen mich!", "GÄHN..wasis?"
Set CurrentMenu to 6
ElseIf MHandToHand == 1 && CurrentMenu < 7
MessageBox "Nahkampf", "Jaaa! Voll auf die Kauleiste!", "Und meine Nägel?"
Set CurrentMenu to 7
ElseIf MDestruction == 1 && CurrentMenu < 8
MessageBox "Zerstörung", "Brenn du sau!", "Ich will aber Feuerwehrmann werden!"
Set CurrentMenu to 8
ElseIf MAlteration == 1 && CurrentMenu < 9
MessageBox "Veränderung", "...ist Leben! Jawoll!", "Ich bleib so wie ich bin"
Set CurrentMenu to 9
ElseIf MIllusion == 1 && CurrentMenu < 10
MessageBox "Illusion", "Ghost! Nachricht von Septim!", "Ich hab Angst vor sowas!"
Set CurrentMenu to 10
ElseIf MConjuration == 1 && CurrentMenu < 11
MessageBox "Beschwörung", "Ich Spawn mir mal ne Lustsklavin!", "Ich HASSE die Viecher!"
Set CurrentMenu to 11
ElseIf MMysticism == 1 && CurrentMenu < 12
MessageBox "Mystik", "Schweb mer noch ne Runde?", "Des is mir zu hoch!"
Set CurrentMenu to 12
ElseIf MRestoration == 1 && CurrentMenu < 13
MessageBox "Wiederherstellung", "Genau! Erst Scribmus...dann Förmchen!", "Nix was hin is, is hin!"
Set CurrentMenu to 13
ElseIf MAlchemy == 1 && CurrentMenu < 14
MessageBox "Alchemie", "Ah diese Farbeeen...", "Drogen sind *******e!"
Set CurrentMenu to 14
ElseIf MSecurity == 1 && CurrentMenu < 15
MessageBox "Sicherheit", "Hehe der Keuschheitsgürtelknacker!", "Hab zwei linke Hände!"
Set CurrentMenu to 15
ElseIf MSneak == 1 && CurrentMenu < 16
MessageBox "Schleichen", "Spanner von Beruf!", "Und zwei linke Füße!"
Set CurrentMenu to 16
ElseIf MAcrobatics == 1 && CurrentMenu < 17
MessageBox "Akrobatik", "Doing! Doing! Doing!", "Da wird mir schlecht von!"
Set CurrentMenu to 17
ElseIf MLightArmor == 1 && CurrentMenu < 18
MessageBox "Leichte Rüstung", "Jawoll Latexrobe!", "Nixda! Ebenerzpanzer Rulez!"
Set CurrentMenu to 18
ElseIf MMarksman == 1 && CurrentMenu < 19
MessageBox "Schütze", "Legolas himself YEAH!", "Ich steh ned auf Federn!"
Set CurrentMenu to 19
ElseIf MMercantile == 1 && CurrentMenu < 20
MessageBox "Handelsgeschick", "Ich hab da mal was vorbereitet...", "No Money, No Problems!"
Set CurrentMenu to 20
ElseIf MSpeechcraft == 1 && CurrentMenu < 21
MessageBox "Wortgewandtheit", "Oh cherie deine augen sind so...", "Sorry! Ich lissspel!"
Set CurrentMenu to 21
ElseIf SpecialCombat == 1 && CurrentMenu < 22
MessageBox "Deine Spezialisierung ist Kampf", "Japp immer feste druff!", "Nene! Pazifist!"
Set CurrentMenu to 22
ElseIf SpecialMagic == 1 && CurrentMenu < 23
MessageBox "Deine Spezialisierung ist Magie", "Jo! Willst meinen Stab sehn?", "Schau ich aus wie Potter?"
Set CurrentMenu to 23
ElseIf SpecialStealth == 1 && CurrentMenu < 24
MessageBox "Deine Spezialisierung ist Diebesfähigkeit", "Hey is meins isch schwör!", "Ungesetzliches Pack! Niemals!"
Set CurrentMenu to 24
Else
MessageBox "Möchtest du von vorne beginnen? Oder bist du fertig?", "Nochmal von gaaanz vorne ja?", "Fix und Fertisch!", "Nochmal vom Zweiten aus!", "Kein Bock mehr!"
Set CurrentMenu to 0
Set InitialisationStage to 4
EndIf
EndIf
If InitialisationStage == 8
Set MCurrentCount to BBlock * MBlock + BArmorer * MArmorer + BHeavyArmor * MHeavyArmor + BBlunt * MBlunt + BBlade * MBlade + BAthletics * MAthletics + BHandToHand * MHandToHand
Set MCurrentCount to MCurrentCount + BDestruction * MDestruction + BAlteration * MAlteration + BIllusion * MIllusion + BConjuration * MConjuration + BMysticism * MMysticism + BRestoration * MRestoration + BAlchemy * MAlchemy
Set MCurrentCount to MCurrentCount + BSecurity * MSecurity + BSneak * MSneak + BAcrobatics * MAcrobatics + BLightArmor * MLightArmor + BMarksman * MMarksman + BMercantile * MMercantile + BSpeechcraft * MSpeechcraft
Set BBlock to MBlock * 25 + CBlock + 5 * SpecialCombat - (5 * (MBlock - 1))
Set BArmorer to MArmorer * 25 + CArmorer + 5 * SpecialCombat - (5 * (MArmorer - 1))
Set BHeavyArmor to MHeavyArmor * 25 + CHeavyArmor + 5 * SpecialCombat - (5 * (MHeavyArmor - 1))
Set BBlunt to MBlunt * 25 + CBlunt + 5 * SpecialCombat - (5 * (MBlunt - 1))
Set BBlade to MBlade * 25 + CBlade + 5 * SpecialCombat - (5 * (MBlade - 1))
Set BAthletics to MAthletics * 25 + CAthletics + 5 * SpecialCombat - (5 * (MAthletics - 1))
Set BHandToHand to MHandToHand * 25 + CHandToHand + 5 * SpecialCombat - (5 * (MHandToHand - 1))
Set BDestruction to MDestruction * 25 + CDestruction + 5 * SpecialMagic - (5 * (MDestruction - 1))
Set BAlteration to MAlteration * 25 + CAlteration + 5 * SpecialMagic - (5 * (MAlteration - 1))
Set BIllusion to MIllusion * 25 + CIllusion + 5 * SpecialMagic - (5 * (MIllusion - 1))
Set BConjuration to MConjuration * 25 + CConjuration + 5 * SpecialMagic - (5 * (MConjuration - 1))
Set BMysticism to MMysticism * 25 + CMysticism + 5 * SpecialMagic - (5 * (MMysticism - 1))
Set BRestoration to MRestoration * 25 + CRestoration + 5 * SpecialMagic - (5 * (MRestoration - 1))
Set BAlchemy to MAlchemy * 25 + CAlchemy + 5 * SpecialMagic - (5 * (MAlchemy - 1))
Set BSecurity to MSecurity * 25 + CSecurity + 5 * SpecialStealth - (5 * (MSecurity - 1))
Set BSneak to MSneak * 25 + CSneak + 5 * SpecialStealth - (5 * (MSneak - 1))
Set BAcrobatics to MAcrobatics * 25 + CAcrobatics + 5 * SpecialStealth - (5 * (MAcrobatics - 1))
Set BLightArmor to MLightArmor * 25 + CLightArmor + 5 * SpecialStealth - (5 * (MLightArmor - 1))
Set BMarksman to MMarksman * 25 + CMarksman + 5 * SpecialStealth - (5 * (MMarksman - 1))
Set BMercantile to MMercantile * 25 + CMercantile + 5 * SpecialStealth - (5 * (MMercantile - 1))
Set BSpeechcraft to MSpeechcraft * 25 + CSpeechcraft + 5 * SpecialStealth - (5 * (MSpeechcraft - 1))
Set MBaseCount to BBlock * MBlock + BArmorer * MArmorer + BHeavyArmor * MHeavyArmor + BBlunt * MBlunt + BBlade * MBlade + BAthletics * MAthletics + BHandToHand * MHandToHand
Set MBaseCount to MBaseCount + BDestruction * MDestruction + BAlteration * MAlteration + BIllusion * MIllusion + BConjuration * MConjuration + BMysticism * MMysticism + BRestoration * MRestoration + BAlchemy * MAlchemy
Set MBaseCount to MBaseCount + BSecurity * MSecurity + BSneak * MSneak + BAcrobatics * MAcrobatics + BLightArmor * MLightArmor + BMarksman * MMarksman + BMercantile * MMercantile + BSpeechcraft * MSpeechcraft
Set CurrentLevel to (MCurrentCount - MBaseCount) / 10 + 2
If CurrentLevel > 2
Set InvalidTillLevelUp to 1
EndIf
Set fQuestDelayTime to 2
Set Initialised to 1
Return
EndIf
EndIf
End