BEGIN ~GelTDia~
///////////////////////////DUAL CLASS: TO THIEF//////////////////////////////////////////
IF ~Class(LastTalkedToBy(Myself),THIEF)~ THEN BEGIN GelStart
  SAY ~Do you want to change your Thief Kit?~
  IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
  IF ~~ THEN REPLY ~Yes.~ GOTO GelFirstKit
END

IF ~~ THEN BEGIN GelFirstKit
  SAY ~Do you also want to keep your first class kit bonuses, restrictions and abilities?~
  IF ~Kit(LastTalkedToBy(Myself),KENSAI)~ THEN REPLY ~Keep Kensai Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepKen","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),BERSERKER)~ THEN REPLY ~Keep Berskerker Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBer","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),WIZARD_SLAYER)~ THEN REPLY ~Keep Wizard_Slayer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepWiS","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),BARBARIAN)~ THEN REPLY ~Keep Barbarian Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBar","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),ABJURER)~ THEN REPLY ~Keep Abjurer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAbj","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelAbju",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),CONJURER)~ THEN REPLY ~Keep Conjurer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepCon","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelConj",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),DEVINER)~ THEN REPLY ~Keep Deviner Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDev","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDevi",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),ENCHANTER)~ THEN REPLY ~Keep Enchanter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepEnc","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelEnch",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),ILLUSIONIST)~ THEN REPLY ~Keep Illusionist Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepIll","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelIllu",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),INVOKER)~ THEN REPLY ~Keep Invoker Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepInv","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelInvo",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),NECROMANCER)~ THEN REPLY ~Keep Necromancer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepNec","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelNecr",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),TRANSMUTER)~ THEN REPLY ~Keep Transmuter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTra","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelTran",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),TALOS)~ THEN REPLY ~Keep Talos Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTal","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),LATHANDER)~ THEN REPLY ~Keep Lathander Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepLat","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),HELM)~ THEN REPLY ~Keep Helm Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepHel","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),TEMPUS)~ THEN REPLY ~Keep Tempus Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTem","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~Kit(LastTalkedToBy(Myself),TYR)~ THEN REPLY ~Keep Tyr Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTyr","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelOrgi",LastTalkedToBy(Myself)))~ GOTO GelPickThief
  END

IF ~~ THEN BEGIN GelPickThief
  SAY ~Choose your thief kit overlay~
  IF ~~ THEN REPLY ~Assassin~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ASSASIN"))~ GOTO GelApplied
  IF ~~ THEN REPLY ~Shadowdancer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SHADOWDANCER"))~ GOTO GelApplied
  IF ~~ THEN REPLY ~Swashbuckler~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SWASHBUCKLER"))~ GOTO GelApplied
  IF ~~ THEN REPLY ~Bounty Hunter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BOUNTYHUNTER"))~ GOTO GelApplied
  IF ~~ THEN REPLY ~I want all Thief kits combined into one!~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SHADOWDANCER")) ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelSuperThief","LOCALS",1))~ GOTO GelApplied
  IF ~~ THEN REPLY ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

// No need this section, only shadowdancer has special HLA and thats the kit superthief uses anyway.
//IF ~~ THEN BEGIN GelSuperThief
//SAY ~Do you also want to add kit specific HLA abilities on certain high levels?~
//IF ~~ THEN REPLY ~No.~ GOTO GelApplied
//IF ~~ THEN REPLY ~Yes.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelSuperThiefHLA","LOCALS",1)) SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
//END

IF ~~ THEN BEGIN GelApplied
  SAY ~Done. Your Kit overlay is active~
  IF ~~ THEN REPLY ~Thanks.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

////////////////////////////MULTICLASS SECTION////////////////////////////////
IF ~Class(LastTalkedToBy(Myself),FIGHTER_MAGE_THIEF~ THEN BEGIN GelFMT1
SAY ~Do you want to change kits on your Fighter / Mage / Thief?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelMageMulti","LOCALS",1) SetGlobal("GelThiefMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),FIGHTER_MAGE_CLERIC~ THEN BEGIN GelFMC1
SAY ~Do you want to change kits on your Fighter / Mage / Cleric?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelMageMulti","LOCALS",1) SetGlobal("GelClericMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),FIGHTER_MAGE~ THEN BEGIN GelFM1
SAY ~Do you want to change kits on your Mage / Thief?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelMageMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),FIGHTER_THIEF~ THEN BEGIN GelFT1
SAY ~Do you want to change kits on your Fighter / Thief?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelThiefMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),FIGHTER_CLERIC~ THEN BEGIN GelFC1
SAY ~Do you want to change kits on your Fighter / Cleric?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelClericMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),FIGHTER_DRUID~ THEN BEGIN GelFD1
SAY ~Do you want to change kits on your Fighter / Druid?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelDruidMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),MAGE_THIEF~ THEN BEGIN GelMT1
SAY ~Do you want to change kits on your Mage / Thief?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelMageMulti","LOCALS",1) SetGlobal("GelThiefMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),CLERIC_MAGE~ THEN BEGIN GelCM1
SAY ~Do you want to change kits on your Cleric / Mage?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelMageMulti","LOCALS",1) SetGlobal("GelClericMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),CLERIC_THIEF~ THEN BEGIN GelCT1
SAY ~Do you want to change kits on your Cleric / Thief?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelClericMulti","LOCALS",1) SetGlobal("GelThiefMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~Class(LastTalkedToBy(Myself),CLERIC_RANGER~ THEN BEGIN GelCR1
SAY ~Do you want to change kits on your Cleric / Ranger?~
IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelClericMulti","LOCALS",1) SetGlobal("GelRangerMulti","LOCALS",1)~ GOTO GelNextMulti
IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~~ THEN BEGIN GelNextMulti
SAY ~Class Found Pick Kits~
IF ~Global("GelFighterMulti","LOCALS",1)~ THEN REPLY ~Choose Fighter Kit~ DO ~SetGlobal("GelFighterMulti","LOCALS",2)~ GOTO GelFighterMulti
IF ~Global("GelMageMulti","LOCALS",1)~ THEN REPLY ~Choose Mage Kit~ DO ~SetGlobal("GelMageMulti","LOCALS",2)~ GOTO GelMageMulti
IF ~Global("GelThiefMulti","LOCALS",1)~ THEN REPLY ~Choose Thief Kit~ DO ~SetGlobal("GelThiefMulti","LOCALS",2)~ GOTO GelThiefMulti
IF ~Global("GelClericMulti","LOCALS",1)~ THEN REPLY ~Choose Cleric Kit~ DO ~SetGlobal("GelClericMulti","LOCALS",2)~ GOTO GelClericMulti
IF ~Global("GelRangerMulti","LOCALS",1)~ THEN REPLY ~Choose Ranger Kit~ DO ~SetGlobal("GelRangerMulti","LOCALS",2)~ GOTO GelRangerMulti
IF ~Global("GelDruidMulti","LOCALS",1)~ THEN REPLY ~Choose Druid Kit~ DO ~SetGlobal("GelDruidMulti","LOCALS",2)~ GOTO GelRangerMulti
IF ~~ THEN REPLY ~Im done.~ DO ~ ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMult",LastTalkedToBy(Myself))) SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

IF ~~ THEN BEGIN GelFighterMulti
SAY ~Which fighter kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Kensai~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiKen","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Barbarian~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBar","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Berserker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBer","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Dwarven Defender~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiDwD","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Wizard Slayer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiWiS","LOCALS",1))~ GOTO GelNextMulti
END

IF ~~ THEN BEGIN GelMageMulti
SAY ~Which mage kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Abjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiAbj","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Conjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiCon","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Deviner~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiDev","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Enchanter~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiEnc","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Illusionist~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiIll","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Invoker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiInv","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiNec","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Tansmuter~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiTra","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~SuperKit, with no restrictions and 1 extra spellcast~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSup","LOCALS",1))~ GOTO GelNextMulti
END

IF ~~ THEN BEGIN GelThiefMulti
SAY ~Which Thief kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Assassin~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiAss","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Bounty Hunter~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBou","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Swashbuckler~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSwa","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Shadowdancer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSha","LOCALS",1))~ GOTO GelMultiSuperThief
END

IF ~~ THEN BEGIN GelMultiSuperThief
SAY ~Do you also want to add kit specific HLA abilities on certain high levels?~
IF ~~ THEN REPLY ~No.~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Yes.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelThiefHLA","LOCALS",1))~ GOTO GelNextMulti

IF ~~ THEN BEGIN GelClericMulti
SAY ~Which Cleric kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Talos~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiTal","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Helm~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiHel","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Lathander~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiLat","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Tempus~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiTemp","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Tyr~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiTyr","LOCALS",1))~ GOTO GelNextMulti
END

IF ~~ THEN BEGIN GelDruidMulti
SAY ~Which Druid kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Totemic Druid~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiTot","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Shapeshifter~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSha","LOCALS",1))~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Avenger~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiAve","LOCALS",1))~ GOTO GelNextMulti
END

IF ~~ THEN BEGIN GelRangerMulti
SAY ~Which Ranger kit do you want?~
IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
IF ~~ THEN REPLY ~Stalker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSta","LOCALS",1))~ GOTO GelNextMulti
//IF ~~ THEN REPLY ~Beast Master~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBea","LOCALS",1))~ GOTO GelNextMulti
//IF ~~ THEN REPLY ~Archer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiArc","LOCALS",1))~ GOTO GelNextMulti
END