GAH!
The script for those interested:
Scriptname DnDSpellChoices extends ReferenceAlias Message Property DnDWantToChangeSpells autoMessage Property DnDSpellLevelChoice autoMessage Property DnDConfirmSpellChoice autoMessage Property DnDAddRemove auto;some testing propertiesGlobalVariable Property DnDSpell1DailyCastsMessage Property DnDSpellLvl1Pg1 autoMessage Property DnDSpellLvl1Pg2 autoMessage Property DnDSpellLvl1Pg3 autoMessage Property DnDSpellLvl2Pg1 autoMessage Property DnDSpellLvl2Pg2 autoMessage Property DnDSpellLvl2Pg3 autoMessage Property DnDSpellLvl3Pg1 autoMessage Property DnDSpellLvl3Pg2 autoMessage Property DnDSpellLvl3Pg3 autoMessage Property DnDSpellLvl4Pg1 autoMessage Property DnDSpellLvl5Pg1 autoMessage Property DnDSpellLvl5Pg1 autoMessage Property DnDSpellLvl7Pg1 autoMessage Property DnDSpellLvl8Pg1 autoMessage Property DnDSpellLvl9Pg1 auto;actual spells;1Spell Property DnDreignofangerSpell autoSpell Property DnDarmorSpell autoSpell Property DnDblindnessSpell autoSpell Property DnDchromaticorbSpell autoSpell Property DnDfistofironSpell autoSpell Property DnDfriendsSpell autoSpell Property DnDidentifySpell autoSpell Property DnDmagicmissileSpell autoSpell Property DnDminorembalmingSpell autoSpell Property DnDpacifySpell autoSpell Property DnDscriptureofsteelSpell autoSpell Property DnDseethingflamesSpell autoSpell Property DnDshieldSpell autoSpell Property DnDsubmergethewillSpell autoSpell Property DnDvilquarseyeSpell auto;2Spell Property DnDadderskissSpell autoSpell Property DnDblackbarbedcurseSpell autoSpell Property DnDbloodbridgeSpell autoSpell Property DnDblurSpell autoSpell Property DnDgreaterembalmingSpell autoSpell Property DnDhorrorSpell autoSpell Property DnDiceknifeSpell autoSpell Property DnDIgnusterrorSpell autoSpell Property DnDinfernalorbSpell autoSpell Property DnDknockSpell autoSpell Property DnDluckSpell autoSpell Property DnDpowerofoneSpell autoSpell Property DnDstrengthSpell autoSpell Property DnDswarmcurseSpell auto;3Spell Property DnDfieryrainSpell autoSpell Property DnDaxeoftormentSpell autoSpell Property DnDbalanceinallthingsSpell autoSpell Property DnDballlightningSpell autoSpell Property DnDcloakofwardingSpell autoSpell Property DnDElisiumstearsSpell autoSpell Property DnDholdundeadSpell autoSpell Property DnDinfernalshieldSpell autoSpell Property DnDvampirictouchSpell autoSpell Property DnDZerthimonsfocusSpell auto;4Spell Property DnDelementalstrikeSpell autoSpell Property DnDblacksphereSpell autoSpell Property DnDconfusionSpell autoSpell Property DnDforcemissilesSpell autoSpell Property DnDimprovedstrengthSpell autoSpell Property DnDremovecurseSpell autoSpell Property DnDshroudofshadowsSpell auto;5Spell Property DnDcloudkillSpell autoSpell Property DnDconeofcoldSpell autoSpell Property DnDdeserthellSpell autoSpell Property DnDEnollEvaduplicationSpell autoSpell Property DnDfireandiceSpell auto;6Spell Property DnDchainlightningstormSpell autoSpell Property DnDglobeofinvulnerabilitySpell auto;7Spell Property DnDacidstormSpell autoSpell Property DnDbladestormSpell autoSpell Property DnDStygianicestormSpell auto;8Spell Property DnDdeathboltSpell autoSpell Property DnDMechanuscannonSpell autoSpell Property DnDmeteorstormbombardmentSpell autoSpell Property DnDpowerwordblindSpell auto;9Spell Property DnDabyssalfurySpell autoSpell Property DnDcelestialhostSpell autoSpell Property DnDpowerwordkillSpell auto;the add/remove messages for each [censored] spellMessage Property DnDreignofangerAddRemove autoMessage Property DnDarmorAddRemove autoMessage Property DnDblindnessAddRemove autoMessage Property DnDchromaticorbAddRemove autoMessage Property DnDfistofironAddRemove autoMessage Property DnDfriendsAddRemove autoMessage Property DnDidentifyAddRemove autoMessage Property DnDmagicmissileAddRemove autoMessage Property DnDminorembalmingAddRemove autoMessage Property DnDpacifyAddRemove autoMessage Property DnDscriptureofsteelAddRemove autoMessage Property DnDseethingflamesAddRemove autoMessage Property DnDshieldAddRemove autoMessage Property DnDsubmergethewillAddRemove autoMessage Property DnDvilquarseyeAddRemove auto;2Message Property DnDadderskissAddRemove autoMessage Property DnDblackbarbedcurseAddRemove autoMessage Property DnDbloodbridgeAddRemove autoMessage Property DnDblurAddRemove autoMessage Property DnDgreaterembalmingAddRemove autoMessage Property DnDhorrorAddRemove autoMessage Property DnDiceknifeAddRemove autoMessage Property DnDIgnusterrorAddRemove autoMessage Property DnDinfernalorbAddRemove autoMessage Property DnDknockAddRemove autoMessage Property DnDluckAddRemove autoMessage Property DnDpowerofoneAddRemove autoMessage Property DnDstrengthAddRemove autoMessage Property DnDswarmcurseAddRemove auto;3Message Property DnDfieryrainAddRemove autoMessage Property DnDaxeoftormentAddRemove autoMessage Property DnDbalanceinallthingsAddRemove autoMessage Property DnDballlightningAddRemove autoMessage Property DnDcloakofwardingAddRemove autoMessage Property DnDElisiumstearsAddRemove autoMessage Property DnDholdundeadAddRemove autoMessage Property DnDinfernalshieldAddRemove autoMessage Property DnDvampirictouchAddRemove autoMessage Property DnDZerthimonsfocusAddRemove auto;4Message Property DnDelementalstrikeAddRemove autoMessage Property DnDblacksphereAddRemove autoMessage Property DnDconfusionAddRemove autoMessage Property DnDforcemissilesAddRemove autoMessage Property DnDimprovedstrengthAddRemove autoMessage Property DnDremovecurseAddRemove autoMessage Property DnDshroudofshadowsAddRemove auto;5Message Property DnDcloudkillAddRemove autoMessage Property DnDconeofcoldAddRemove autoMessage Property DnDdeserthellAddRemove autoMessage Property DnDEnollEvaduplicationAddRemove autoMessage Property DnDfireandiceAddRemove auto;6Message Property DnDchainlightningstormAddRemove autoMessage Property DnDglobeofinvulnerabilityAddRemove auto;7Message Property DnDacidstormAddRemove autoMessage Property DnDbladestormAddRemove autoMessage Property DnDStygianicestormAddRemove auto;8Message Property DnDdeathboltAddRemove autoMessage Property DnDMechanuscannonAddRemove autoMessage Property DnDmeteorstormbombardmentAddRemove autoMessage Property DnDpowerwordblindAddRemove auto;9Message Property DnDabyssalfuryAddRemove autoMessage Property DnDcelestialhostAddRemove autoMessage Property DnDpowerwordkillAddRemove auto;1GlobalVariable Property DnDreignofangerDailyCasts autoGlobalVariable Property DnDarmorDailyCasts autoGlobalVariable Property DnDblindnessDailyCasts autoGlobalVariable Property DnDchromaticorbDailyCasts autoGlobalVariable Property DnDfistofironDailyCasts autoGlobalVariable Property DnDfriendsDailyCasts autoGlobalVariable Property DnDidentifyDailyCasts autoGlobalVariable Property DnDmagicmissileDailyCasts autoGlobalVariable Property DnDminorembalmingDailyCasts autoGlobalVariable Property DnDpacifyDailyCasts autoGlobalVariable Property DnDscriptureofsteelDailyCasts autoGlobalVariable Property DnDseethingflamesDailyCasts autoGlobalVariable Property DnDshieldDailyCasts autoGlobalVariable Property DnDsubmergethewillDailyCasts autoGlobalVariable Property DnDvilquarseyeDailyCasts auto;2GlobalVariable Property DnDadderskissDailyCasts autoGlobalVariable Property DnDblackbarbedcurseDailyCasts autoGlobalVariable Property DnDbloodbridgeDailyCasts autoGlobalVariable Property DnDblurDailyCasts autoGlobalVariable Property DnDgreaterembalmingDailyCasts autoGlobalVariable Property DnDhorrorDailyCasts autoGlobalVariable Property DnDiceknifeDailyCasts autoGlobalVariable Property DnDIgnusterrorDailyCasts autoGlobalVariable Property DnDinfernalorbDailyCasts autoGlobalVariable Property DnDknockDailyCasts autoGlobalVariable Property DnDluckDailyCasts autoGlobalVariable Property DnDpowerofoneDailyCasts autoGlobalVariable Property DnDstrengthDailyCasts autoGlobalVariable Property DnDswarmcurseDailyCasts auto;3GlobalVariable Property DnDfieryrainDailyCasts autoGlobalVariable Property DnDaxeoftormentDailyCasts autoGlobalVariable Property DnDbalanceinallthingsDailyCasts autoGlobalVariable Property DnDballlightningDailyCasts autoGlobalVariable Property DnDcloakofwardingDailyCasts autoGlobalVariable Property DnDElisiumstearsDailyCasts autoGlobalVariable Property DnDholdundeadDailyCasts autoGlobalVariable Property DnDinfernalshieldDailyCasts autoGlobalVariable Property DnDvampirictouchDailyCasts autoGlobalVariable Property DnDZerthimonsfocusDailyCasts auto;4GlobalVariable Property DnDelementalstrikeDailyCasts autoGlobalVariable Property DnDblacksphereDailyCasts autoGlobalVariable Property DnDconfusionDailyCasts autoGlobalVariable Property DnDforcemissilesDailyCasts autoGlobalVariable Property DnDimprovedstrengthDailyCasts autoGlobalVariable Property DnDremovecurseDailyCasts autoGlobalVariable Property DnDshroudofshadowsDailyCasts auto;5GlobalVariable Property DnDcloudkillDailyCasts autoGlobalVariable Property DnDconeofcoldDailyCasts autoGlobalVariable Property DnDdeserthellDailyCasts autoGlobalVariable Property DnDEnollEvaduplicationDailyCasts autoGlobalVariable Property DnDfireandiceDailyCasts auto;6GlobalVariable Property DnDchainlightningstormDailyCasts autoGlobalVariable Property DnDglobeofinvulnerabilityDailyCasts auto;7GlobalVariable Property DnDacidstormDailyCasts autoGlobalVariable Property DnDbladestormDailyCasts autoGlobalVariable Property DnDStygianicestormDailyCasts auto;8GlobalVariable Property DnDdeathboltDailyCasts autoGlobalVariable Property DnDMechanuscannonDailyCasts autoGlobalVariable Property DnDmeteorstormbombardmentDailyCasts autoGlobalVariable Property DnDpowerwordblindDailyCasts auto;9GlobalVariable Property DnDabyssalfuryDailyCasts autoGlobalVariable Property DnDcelestialhostDailyCasts autoGlobalVariable Property DnDpowerwordkillDailyCasts auto;casts remaining;1GlobalVariable Property DnDreignofangerDailyCastsR autoGlobalVariable Property DnDarmorDailyCastsR autoGlobalVariable Property DnDblindnessDailyCastsR autoGlobalVariable Property DnDchromaticorbDailyCastsR autoGlobalVariable Property DnDfistofironDailyCastsR autoGlobalVariable Property DnDfriendsDailyCastsR autoGlobalVariable Property DnDidentifyDailyCastsR autoGlobalVariable Property DnDmagicmissileDailyCastsR autoGlobalVariable Property DnDminorembalmingDailyCastsR autoGlobalVariable Property DnDpacifyDailyCastsR autoGlobalVariable Property DnDscriptureofsteelDailyCastsR autoGlobalVariable Property DnDseethingflamesDailyCastsR autoGlobalVariable Property DnDshieldDailyCastsR autoGlobalVariable Property DnDsubmergethewillDailyCastsR autoGlobalVariable Property DnDvilquarseyeDailyCastsR auto;2GlobalVariable Property DnDadderskissDailyCastsR autoGlobalVariable Property DnDblackbarbedcurseDailyCastsR autoGlobalVariable Property DnDbloodbridgeDailyCastsR autoGlobalVariable Property DnDblurDailyCastsR autoGlobalVariable Property DnDgreaterembalmingDailyCastsR autoGlobalVariable Property DnDhorrorDailyCastsR autoGlobalVariable Property DnDiceknifeDailyCastsR autoGlobalVariable Property DnDIgnusterrorDailyCastsR autoGlobalVariable Property DnDinfernalorbDailyCastsR autoGlobalVariable Property DnDknockDailyCastsR autoGlobalVariable Property DnDluckDailyCastsR autoGlobalVariable Property DnDpowerofoneDailyCastsR autoGlobalVariable Property DnDstrengthDailyCastsR autoGlobalVariable Property DnDswarmcurseDailyCastsR auto;3GlobalVariable Property DnDfieryrainDailyCastsR autoGlobalVariable Property DnDaxeoftormentDailyCastsR autoGlobalVariable Property DnDbalanceinallthingsDailyCastsR autoGlobalVariable Property DnDballlightningDailyCastsR autoGlobalVariable Property DnDcloakofwardingDailyCastsR autoGlobalVariable Property DnDElisiumstearsDailyCastsR autoGlobalVariable Property DnDholdundeadDailyCastsR autoGlobalVariable Property DnDinfernalshieldDailyCastsR autoGlobalVariable Property DnDvampirictouchDailyCastsR autoGlobalVariable Property DnDZerthimonsfocusDailyCastsR auto;4GlobalVariable Property DnDelementalstrikeDailyCastsR autoGlobalVariable Property DnDblacksphereDailyCastsR autoGlobalVariable Property DnDconfusionDailyCastsR autoGlobalVariable Property DnDforcemissilesDailyCastsR autoGlobalVariable Property DnDimprovedstrengthDailyCastsR autoGlobalVariable Property DnDremovecurseDailyCastsR autoGlobalVariable Property DnDshroudofshadowsDailyCastsR auto;5GlobalVariable Property DnDcloudkillDailyCastsR autoGlobalVariable Property DnDconeofcoldDailyCastsR autoGlobalVariable Property DnDdeserthellDailyCastsR autoGlobalVariable Property DnDEnollEvaduplicationDailyCastsR autoGlobalVariable Property DnDfireandiceDailyCastsR auto;6GlobalVariable Property DnDchainlightningstormDailyCastsR autoGlobalVariable Property DnDglobeofinvulnerabilityDailyCastsR auto;7GlobalVariable Property DnDacidstormDailyCastsR autoGlobalVariable Property DnDbladestormDailyCastsR autoGlobalVariable Property DnDStygianicestormDailyCastsR auto;8GlobalVariable Property DnDdeathboltDailyCastsR autoGlobalVariable Property DnDMechanuscannonDailyCastsR autoGlobalVariable Property DnDmeteorstormbombardmentDailyCastsR autoGlobalVariable Property DnDpowerwordblindDailyCastsR auto;9GlobalVariable Property DnDabyssalfuryDailyCastsR autoGlobalVariable Property DnDcelestialhostDailyCastsR autoGlobalVariable Property DnDpowerwordkillDailyCastsR autoFaction Property DnDLvl1SpellSlotsRemaining autoFaction Property DnDLvl2SpellSlotsRemaining autoFaction Property DnDLvl3SpellSlotsRemaining autoFaction Property DnDLvl4SpellSlotsRemaining autoFaction Property DnDLvl5SpellSlotsRemaining autoFaction Property DnDLvl5SpellSlotsRemaining autoFaction Property DnDLvl7SpellSlotsRemaining autoFaction Property DnDLvl8SpellSlotsRemaining autoFaction Property DnDLvl9SpellSlotsRemaining autoevent OnUpdate() Actor SpellLearner = ((self as referencealias).GetReference() as actor) int WantToButton = DnDWantToChangeSpells.Show() if WantToButton!=-1 if WantToButton==0 SpellLevelChoice() endIf if WantToButton==1 ConfirmChoice() endIf endIfendEventfunction SpellLevelChoice() int LevelChoice=DnDSpellLevelChoice.Show() if LevelChoice!=-1 if LevelChoice==0 ConfirmChoice() endIf if LevelChoice==1 SpellLvl1Pg1()endIfif LevelChoice==2 SpellLvl2Pg1()endIfif LevelChoice==3 SpellLvl3Pg1()endIfif LevelChoice==4 SpellLvl4Pg1()endIfif LevelChoice==5 SpellLvl5Pg1()endIfif LevelChoice==6 SpellLvl5Pg1()endIf if LevelChoice==7 SpellLvl7Pg1()endIfif LevelChoice==8 SpellLvl8Pg1()endIfif LevelChoice==9 SpellLvl9Pg1()endIf endIfendFunctionfunction SpellLvl1Pg1()int SpellChoiceButton=DnDSpellLvl1Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 SpellLvl1Pg2() endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg1() endIfendIfendFunctionfunction SpellLvl1Pg2()int SpellChoiceButton=DnDSpellLvl1Pg2.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl1Pg1() endIf if SpellChoiceButton==2 SpellLvl1Pg3() endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg2() endIfendIfendFunctionfunction SpellLvl1Pg3()int SpellChoiceButton=DnDSpellLvl1Pg3.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl1Pg2() endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl1SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl1SpellSlotsRemaining) as int)+1)) endIf SpellLvl1Pg3() endIfendIfendFunctionfunction SpellLvl2Pg1()int SpellChoiceButton=DnDSpellLvl2Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 SpellLvl2Pg2() endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg1() endIfendIfendFunctionfunction SpellLvl2Pg2()int SpellChoiceButton=DnDSpellLvl2Pg2.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl2Pg1() endIf if SpellChoiceButton==2 SpellLvl2Pg3() endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg2() endIfendIfendFunctionfunction SpellLvl2Pg3()int SpellChoiceButton=DnDSpellLvl2Pg3.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl2Pg2() endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg3() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg3() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg3() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg3() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIf endIf SpellLvl2Pg3() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl2Pg3() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl2SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl2SpellSlotsRemaining) as int)+1)) endIf SpellLvl2Pg3() endIfendIfendFunctionfunction SpellLvl3Pg2()int SpellChoiceButton=DnDSpellLvl3Pg2.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl3Pg1() endIf if SpellChoiceButton==2 SpellLvl3Pg3() endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg2() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg2() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg2() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg2() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg2() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg2() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg2() endIfendIfendFunctionfunction SpellLvl3Pg3()int SpellChoiceButton=DnDSpellLvl3Pg3.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 SpellLvl3Pg2() endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg3() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg3() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg3() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl3Pg3() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg3() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg3() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl3SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl3SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl3Pg3() endIfendIfendFunctionfunction SpellLvl4Pg1()int SpellChoiceButton=DnDSpellLvl4Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl4Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl4Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl4Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl4Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl4Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl4Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl4SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl4SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl4Pg1() endIfendIfendFunctionfunction SpellLvl5Pg1()int SpellChoiceButton=DnDSpellLvl5Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl5Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl5Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl5Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl5Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl5Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl5Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl5SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl5SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl5Pg1() endIfendIfendFunctionfunction SpellLvl6Pg1()int SpellChoiceButton=DnDSpellLvl6Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl6Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl6Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl6Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl6Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl6Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl6Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl6SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl6SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl6Pg1() endIfendIfendFunctionffunction SpellLvl7Pg1()int SpellChoiceButton=DnDSpellLvl7Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl7Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl7Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl7Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl7Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl7Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl7Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl7SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl7SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl7Pg1() endIfendIfendFunctionfunction SpellLvl8Pg1()int SpellChoiceButton=DnDSpellLvl8Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl8Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl8Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl8Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl8Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl8Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl8Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl8SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl8SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl8Pg1() endIfendIfendFunctionffunction SpellLvl9Pg1()int SpellChoiceButton=DnDSpellLvl9Pg1.Show()if SpellChoiceButton!=-1 if SpellChoiceButton==0 SpellLevelChoice() endIf if SpellChoiceButton==1 ; endIf if SpellChoiceButton==2 ; endIf if SpellChoiceButton==3 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl9Pg1() endIf if SpellChoiceButton==4 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl9Pg1() endIf if SpellChoiceButton==5 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl9Pg1() endIf if SpellChoiceButton==6 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIf SpellLvl9Pg1() endIf if SpellChoiceButton==7 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl9Pg1() endIf if SpellChoiceButton==8 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl9Pg1() endIf if SpellChoiceButton==9 int AddRemoveButton = DnDAddRemove.Show() if AddRemoveButton!=-1 if AddRemoveButton==0 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+-1)) endIf if AddRemoveButton==1 DnDSpell1DailyCasts.SetValue((DnDSpell1DailyCasts.GetValue() as int)+-1) SpellLearner.SetFactionRank(DnDLvl9SpellSlotsRemaining, ((SpellLearner.GetFactionRank(DnDLvl9SpellSlotsRemaining) as int)+1)) endIfendIfSpellLvl9Pg1() endIfendIfendFunctionfunction ConfirmChoice();1DnDreignofangerDailyCastsR.SetValue(DnDreignofangerDailyCasts.GetValue() as int)DnDarmorDailyCastsR.SetValue(DnDarmorDailyCasts.GetValue() as int)DnDblindnessDailyCastsR.SetValue(DnDblindnessDailyCasts.GetValue() as int)DnDchromaticorbDailyCastsR.SetValue(DnDchromaticorbDailyCasts.GetValue() as int)DnDfistofironDailyCastsR.SetValue(DnDfistofironDailyCasts.GetValue() as int)DnDfriendsDailyCastsR.SetValue(DnDfriendsDailyCasts.GetValue() as int)DnDidentifyDailyCastsR.SetValue(DnDidentifyDailyCasts.GetValue() as int)DnDmagicmissileDailyCastsR.SetValue(DnDmagicmissileDailyCasts.GetValue() as int)DnDminorembalmingDailyCastsR.SetValue(DnDminorembalmingDailyCasts.GetValue() as int)DnDpacifyDailyCastsR.SetValue(DnDpacifyDailyCasts.GetValue() as int)DnDscriptureofsteelDailyCastsR.SetValue(DnDscriptureofsteelDailyCasts.GetValue() as int)DnDseethingflamesDailyCastsR.SetValue(DnDseethingflamesDailyCasts.GetValue() as int)DnDshieldDailyCastsR.SetValue(DnDshieldDailyCastsR.GetValue() as int)DnDsubmergethewillDailyCastsR.SetValue(DnDsubmergethewillDailyCasts.GetValue() as int)DnDvilquarseyeDailyCastsR.SetValue(DnDvilquarseyeDailyCasts.GetValue() as int);2DnDadderskissDailyCastsR.SetValue(DnDadderskissDailyCasts.GetValue() as int)DnDblackbarbedcurseDailyCastsR.SetValue(DnDblackbarbedcurseDailyCasts.GetValue() as int)DnDbloodbridgeDailyCastsR.SetValue(DnDbloodbridgeDailyCasts.GetValue() as int)DnDblurDailyCastsR.SetValue(DnDblurDailyCasts.GetValue() as int)DnDgreaterembalmingDailyCastsR.SetValue(DnDgreaterembalmingDailyCasts.GetValue() as int)DnDhorrorDailyCastsR.SetValue(DnDhorrorDailyCasts.GetValue() as int)DnDiceknifeDailyCastsR.SetValue(DnDiceknifeDailyCasts.GetValue() as int)DnDIgnusterrorDailyCastsR.SetValue(DnDIgnusterrorDailyCasts.GetValue() as int)DnDinfernalorbDailyCastsR.SetValue(DnDinfernalorbDailyCasts.GetValue() as int)DnDknockDailyCastsR.SetValue(DnDknockDailyCasts.GetValue() as int)DnDluckDailyCastsR.SetValue(DnDluckDailyCasts.GetValue() as int)DnDpowerofoneDailyCastsR.SetValue(DnDpowerofoneDailyCasts.GetValue() as int)DnDstrengthDailyCastsR.SetValue(DnDstrengthDailyCasts.GetValue() as int)DnDswarmcurseDailyCastsR.SetValue(DnDswarmcurseDailyCasts.GetValue() as int);3DnDfieryrainDailyCastsR.SetValue(DnDfieryrainDailyCasts.GetValue() as int)DnDaxeoftormentDailyCastsR.SetValue(DnDaxeoftormentDailyCasts.GetValue() as int)DnDbalanceinallthingsDailyCastsR.SetValue(DnDbalanceinallthingsDailyCasts.GetValue() as int)DnDballlightningDailyCastsR.SetValue(DnDballlightningDailyCasts.GetValue() as int)DnDcloakofwardingDailyCastsR.SetValue(DnDcloakofwardingDailyCasts.GetValue() as int)DnDElisiumstearsDailyCastsR.SetValue(DnDElisiumstearsDailyCasts.GetValue() as int)DnDholdundeadDailyCastsR.SetValue(DnDholdundeadDailyCasts.GetValue() as int)DnDinfernalshieldDailyCastsR.SetValue(DnDinfernalshieldDailyCasts.GetValue() as int)DnDvampirictouchDailyCastsR.SetValue(DnDvampirictouchDailyCasts.GetValue() as int)DnDZerthimonsfocusDailyCastsR.SetValue(DnDZerthimonsfocusDailyCasts.GetValue() as int);4DnDelementalstrikeDailyCastsR.SetValue(DnDelementalstrikeDailyCasts.GetValue() as int)DnDblacksphereDailyCastsR.SetValue(DnDblacksphereDailyCasts.GetValue() as int)DnDconfusionDailyCastsR.SetValue(DnDconfusionDailyCasts.GetValue() as int)DnDforcemissilesDailyCastsR.SetValue(DnDforcemissilesDailyCasts.GetValue() as int)DnDimprovedstrengthDailyCastsR.SetValue(DnDimprovedstrengthDailyCasts.GetValue() as int)DnDremovecurseDailyCastsR.SetValue(DnDremovecurseDailyCasts.GetValue() as int)DnDshroudofshadowsDailyCastsR.SetValue(DnDshroudofshadowsDailyCasts.GetValue() as int);5DnDcloudkillDailyCastsR.SetValue(DnDcloudkillDailyCasts.GetValue() as int)DnDconeofcoldDailyCastsR.SetValue(DnDconeofcoldDailyCasts.GetValue() as int)DnDdeserthellDailyCastsR.SetValue(DnDdeserthellDailyCasts.GetValue() as int)DnDEnollEvaduplicationDailyCastsR.SetValue(DnDEnollEvaduplicationDailyCasts.GetValue() as int)DnDfireandiceDailyCastsR.SetValue(DnDfireandiceDailyCasts.GetValue() as int);6DnDchainlightningstormDailyCastsR.SetValue(DnDchainlightningstormDailyCasts.GetValue() as int)DnDglobeofinvulnerabilityDailyCastsR.SetValue(DnDglobeofinvulnerabilityDailyCasts.GetValue() as int);7DnDacidstormDailyCastsR.SetValue(DnDacidstormDailyCasts.GetValue() as int)DnDbladestormDailyCastsR.SetValue(DnDbladestormDailyCasts.GetValue() as int)DnDStygianicestormDailyCastsR.SetValue(DnDStygianicestormDailyCasts.GetValue() as int);8DnDdeathboltDailyCastsR.SetValue(DnDdeathboltDailyCasts.GetValue() as int)DnDMechanuscannonDailyCastsR.SetValue(DnDMechanuscannonDailyCasts.GetValue() as int)DnDmeteorstormbombardmentDailyCastsR.SetValue(DnDmeteorstormbombardmentDailyCasts.GetValue() as int)DnDpowerwordblindDailyCastsR.SetValue(DnDpowerwordblindDailyCasts.GetValue() as int);9DnDabyssalfuryDailyCastsR.SetValue(DnDabyssalfuryDailyCasts.GetValue() as int)DnDcelestialhostDailyCastsR.SetValue(DnDcelestialhostDailyCasts.GetValue() as int)DnDpowerwordkillDailyCastsR.SetValue(DnDpowerwordkillDailyCasts.GetValue() as int)endFunction;now that the daily casts remaining has been set to be equal to your daily casts preferences, we must add spells;to the character, because they may have been removed beforeif DnDreignofangerDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDreignofangerSpell)==0 SpellLearner.addSpell(DnDreignofangerSpell) endIfif DnDarmorDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDarmorSpell)==0 SpellLearner.addSpell(DnDarmorSpell) endIfif DnDblindnessDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDblindnessSpell)==0 SpellLearner.addSpell(DnDblindnessSpell) endIfif DnDchromaticorbDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDchromaticorbSpell)==0 SpellLearner.addSpell(DnDchromaticorbSpell) endIfif DnDfistofironDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDfistofironSpell)==0 SpellLearner.addSpell(DnDfistofironSpell) endIfif DnDfriendsDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDfriendsSpell)==0 SpellLearner.addSpell(DnDfriendsSpell) endIfif DnDidentifyDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDidentifySpell)==0 SpellLearner.addSpell(DnDidentifySpell) endIfif DnDmagicmissileDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDmagicmissileSpell)==0 SpellLearner.addSpell(DnDmagicmissileSpell) endIfif DnDminorembalmingDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDminorembalmingSpell)==0 SpellLearner.addSpell(DnDminorembalmingSpell) endIfif DnDpacifyDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDpacifySpell)==0 SpellLearner.addSpell(DnDpacifySpell) endIfif DnDscriptureofsteelDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDscriptureofsteelSpell)==0 SpellLearner.addSpell(DnDscriptureofsteelSpell) endIfif DnDseethingflamesDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDseethingflamesSpell)==0 SpellLearner.addSpell(DnDseethingflamesSpell) endIfif DnDshieldDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDshieldSpell)==0 SpellLearner.addSpell(DnDshieldSpell) endIfif DnDsubmergethewillDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDsubmergethewillSpell)==0 SpellLearner.addSpell(DnDsubmergethewillSpell) endIfif DnDvilquarseyeDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDvilquarseyeSpell)==0 SpellLearner.addSpell(DnDvilquarseyeSpell) endIf;2if DnDadderskissDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDadderskissSpell)==0 SpellLearner.addSpell(DnDadderskissSpell) endIfif DnDblackbarbedcurseDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDblackbarbedcurseSpell)==0 SpellLearner.addSpell(DnDblackbarbedcurseSpell) endIfif DnDbloodbridgeDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDbloodbridgeSpell)==0 SpellLearner.addSpell(DnDbloodbridgeSpell) endIfif DnDblurDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDblurSpell)==0 SpellLearner.addSpell(DnDblurSpell) endIfif DnDgreaterembalmingDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDgreaterembalmingSpell)==0 SpellLearner.addSpell(DnDgreaterembalmingSpell) endIfif DnDhorrorDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDhorrorSpell)==0 SpellLearner.addSpell(DnDhorrorSpell) endIfif DnDiceknifeDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDiceknifeSpell)==0 SpellLearner.addSpell(DnDiceknifeSpell) endIfif DnDIgnusterrorDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDIgnusterrorSpell)==0 SpellLearner.addSpell(DnDIgnusterrorSpell) endIfif DnDinfernalorbDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDinfernalorbSpell)==0 SpellLearner.addSpell(DnDinfernalorbSpell) endIfif DnDknockDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDknockSpell)==0 SpellLearner.addSpell(DnDknockSpell) endIfif DnDluckDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDluckSpell)==0 SpellLearner.addSpell(DnDluckSpell) endIfif DnDpowerofoneDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDpowerofoneSpell)==0 SpellLearner.addSpell(DnDpowerofoneSpell) endIfif DnDstrengthDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDstrengthSpell)==0 SpellLearner.addSpell(DnDstrengthSpell) endIfif DnDswarmcurseDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDswarmcurseSpell)==0 SpellLearner.addSpell(DnDswarmcurseSpell) endIf;3if DnDfieryrainDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDfieryrainSpell)==0 SpellLearner.addSpell(DnDfieryrainSpell) endIfif DnDaxeoftormentDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDaxeoftormentSpell)==0 SpellLearner.addSpell(DnDaxeoftormentSpell) endIfif DnDbalanceinallthingsDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDbalanceinallthingsSpell)==0 SpellLearner.addSpell(DnDbalanceinallthingsSpell) endIfif DnDballlightningDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDballlightningSpell)==0 SpellLearner.addSpell(DnDballlightningSpell) endIfif DnDcloakofwardingDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDcloakofwardingSpell)==0 SpellLearner.addSpell(DnDcloakofwardingSpell) endIfif DnDElisiumstearsDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDElisiumstearsSpell)==0 SpellLearner.addSpell(DnDElisiumstearsSpell) endIfif DnDholdundeadDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDholdundeadSpell)==0 SpellLearner.addSpell(DnDholdundeadSpell) endIfif DnDinfernalshieldDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDinfernalSpell)==0 SpellLearner.addSpell(DnDinfernalSpell) endIfif DnDvampirictouchDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDvampirictouchSpell)==0 SpellLearner.addSpell(DnDvampirictouchSpell) endIfif DnDZerthimonsfocusDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDZerthimonsfocusSpell)==0 SpellLearner.addSpell(DnDZerthimonsfocusSpell) endIf;4if DnDelementalstrikeDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDelementalstrikeSpell)==0 SpellLearner.addSpell(DnDelementalstrikeSpell) endIfif DnDblacksphereDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDblacksphereSpell)==0 SpellLearner.addSpell(DnDblacksphereSpell) endIfif DnDconfusionDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDconfusionSpell)==0 SpellLearner.addSpell(DnDconfusionSpell) endIfif DnDforcemissilesDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDforcemissilesSpell)==0 SpellLearner.addSpell(DnDforcemissilesSpell) endIfif DnDimprovedstrengthDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDimprovedstrengthSpell)==0 SpellLearner.addSpell(DnDimprovedstrengthSpell) endIfif DnDremovecurseDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDremovecurseSpell)==0 SpellLearner.addSpell(DnDremovecurseSpell) endIfif DnDshroudofshadowsDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDshroudofshadowsSpell)==0 SpellLearner.addSpell(DnDshroudofshadowsSpell) endIf;5if DnDcloudkillDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDcloudkillSpell)==0 SpellLearner.addSpell(DnDcloudkillSpell) endIfif DnDconeofcoldDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDconeofcoldSpell)==0 SpellLearner.addSpell(DnDconeofcoldSpell) endIfif DnDdeserthellDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDdeserthellSpell)==0 SpellLearner.addSpell(DnDdeserthellSpell) endIfif DnDEnollEvaduplicationDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDEnollEvaduplicationSpell)==0 SpellLearner.addSpell(DnDEnollEvaduplicationSpell) endIfif DnDfireandiceDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDfireandiceSpell)==0 SpellLearner.addSpell(DnDfireandiceSpell) endIf;6if DnDchainlightningstormDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(Spell)==0 SpellLearner.addSpell(Spell) endIfif DnDglobeofinvulnerabilityDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(Spell)==0 SpellLearner.addSpell(Spell) endIf;7if DnDacidstormDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDacidstormSpell)==0 SpellLearner.addSpell(DnDacidstormSpell) endIfif DnDbladestormDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDbladestormSpell)==0 SpellLearner.addSpell(DnDbladestormSpell) endIfif DnDStygianicestormDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDStygianicestormSpell)==0 SpellLearner.addSpell(DnDStygianicestormSpell) endIf;8if DnDdeathboltDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDdeathboltSpell)==0 SpellLearner.addSpell(DnDdeathboltSpell) endIfif DnDMechanuscannonDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDMechanuscannonSpell)==0 SpellLearner.addSpell(DnDMechanuscannonSpell) endIfif DnDmeteorstormbombardmentDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDmeteorstormbombardmentSpell)==0 SpellLearner.addSpell(DnDmeteorstormbombardmentSpell) endIfif DnDpowerwordblindDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDpowerwordblindSpell)==0 SpellLearner.addSpell(DnDpowerwordblindSpell) endIf;9if DnDabyssalfuryDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDabyssalfurySpell)==0 SpellLearner.addSpell(DnDabyssalfurySpell) endIfif DnDcelestialhostDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDcelestialhostSpell)==0 SpellLearner.addSpell(DnDcelestialhostSpell) endIfif DnDpowerwordkillDailyCastsR.GetValue() as int>=1 && SpellLearner.HasSpell(DnDpowerwordkillSpell)==0 SpellLearner.addSpell(DnDpowerwordkillSpell) endIfendFunction

