Skip to content

MOD - Change Base Thief kit to kitted thief.

Gel87Gel87 Member Posts: 387
edited January 27 in General Modding
Yo, dno if this exists from before, but it was for personal need :P
Updates:
Included multiclasses
Removed Circle of creature.

This mod basicly allows you to change "unkitted thiefs" into kitted thieves via dialog.
A spell is put into the clabth01.2da which is automaticly casted and starts this thing for any thief entering your party.

So what the effect does:
Change Thief kit in a multiclass, or right after dual class to thief, or on THIEF.
Works for NPC's as well.

I have barely tested anything besides candlekeep and immoen + montraron on next map. But should work in baldur's gate 2, should work with RR mod, should work with scs and tweaks(NPC customization) etc. The line added in clab table is unicue, wont crash with anything else. But the main idea here is that im a noob and this mod should if used be installed as early as possible, but after mod merger. I also am lazy so any language besides en_US it will fail.
I did what i could for it to not crash with other mods, espesially things like RR / SCS / Tweaks.

I use pronounce GEL or Gel on everything i make, so should not crash with stuff. I have had tons of mods installed and my GEL in internal name has never crashed with anything.

And yes, the effect has a animation, making the function not 100% invisible :P The invisible creature has a shadow, and forgot to remove circle. But that was only good in my fault searching xD

I leave all stuff directly written, incase people has improvements, other features or want to copy it to do the same on other classes. Forexample dual into a kitted mage.

Items/cre/spl/eff used are:
GelTDia.itm (immunity amulet for creature)
GelTDia.eff (summoning effect for spell)
GelTDia.spl (summoning spell for creature, added as AP in base thief clab)
GelTDia.cre ("invisible" creature helping perfoming the thing)

GelTDia.baf:
IF
    OnCreation()
THEN
    RESPONSE #100
        SetGlobal("GelTDia_Init","LOCALS",1)
END

IF
    Global("GelTDia_Init","LOCALS",1)
    Exists(LastSummonerOf(Myself))
    InParty(LastSummonerOf(Myself))
THEN
    RESPONSE #100
        ClearAllActions()
        StartDialogNoSet(LastSummonerOf(Myself))
        SetGlobal("GelTDia_Init","LOCALS",2)
END

IF
    Global("GelTDia_Init","LOCALS",1)
    !Exists(LastSummonerOf(Myself))
THEN
    RESPONSE #100
        DestroySelf()
END

IF
    Global("GelTDia_Init","LOCALS",3)
THEN
    RESPONSE #100
        DestroySelf()
END

GelTDia.D:
BEGIN ~GelTDia~

IF ~EXIST(LastTalkedToBy(Myself))~ 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 GelPick
END

IF ~~ THEN BEGIN GelPick
  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 ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
END

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

GelThiefKitChange.tp2:
BACKUP ~GelThiefKitChange/backup~
AUTHOR ~Gel87~
VERSION ~1.0~

BEGIN ~Thief Kit Overlay Menu~
REQUIRE_PREDICATE (GAME_IS ~bgee bg2ee eet iwdee~ && FILE_EXISTS ~engine.lua~) ~Requires Enhanced Edition 2.0+ game.~
INCLUDE ~GelThiefKitChange/lib/a7#add_kit_ex.tpa~

COPY ~GelThiefKitChange/GelTDia.spl~ ~Override~
  SAY NAME1 ~Summon kit thief kit choice~

COPY ~GelThiefKitChange/GelTDia.eff~ ~Override~

COPY ~GelThiefKitChange/GelTDia.itm~ ~Override~
  SAY NAME1 ~InviCreature: Immunities~

COMPILE ~GelThiefKitChange/GelTDia.baf~
COMPILE ~GelThiefKitChange/GelTDia.d~

COPY ~GelThiefKitChange/GelTDia.cre~ ~override~
  SAY NAME1 ~KitChanger~
  SAY NAME2 ~KitChanger~
  WRITE_ASCII 0x248 ~GelTDia~ #8    // Override script
  WRITE_ASCII 0x2CC ~GelTDia~ #8    // Dialog file

COPY_EXISTING ~CLABTH01.2DA~ ~override~
  INSERT_2DA_ROW 7 40 ~GELLITY7    AP_GelTDia  ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****    ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****        ****~
BUT_ONLY
Post edited by Gel87 on

Comments

  • Gel87Gel87 Member Posts: 387
    edited January 27
    Okay, i forgot about multiclass.
    Montaron even summoned the creature. Which means i should do this to add feature for multiclasses:
    IF ~Class(LastTalkedToBy(Myself),THIEF)~ THEN BEGIN Start
    change into:
    IF ~~ THEN BEGIN Start

    Should then also work for multiclasses. Because montaron summoned the creature, and it did not Destroyed itself.

    I will make some fixes another evening:
    - Remove the check for class. (allows multiclasses to change thief kit)
    - Remove circle from invisible creature
    - Remove visual effect for summoning of the creature.


    Edit:
    I also now have a plan for how to keep first kit bonuses etc on a dual class.
    When forexample a kensai deside to dual. He now has the kensai kit active. Which means we can read the kit type before we change thief kit.

    So after you click «yes’» to change kit, you will be sendt to a section which checks your current kit. And based on this it will assign a override script which can see when your thief class revives ur first class. Then it can check ur fighter level and cast a spell based on that level to get first kit spesifications such as bonuses, restrictions, passives, abilities etc.

    Example:
    You just dualed from kensai to thief.
    You get asked if you want to change ur thief kit. If you click yes you get asked if you also want to keep ur kensai bonuses, abilities and restriction once fighter class is revived.
    If you say yes to this a spell will be cast on you and you will be assigned a override script called Gelkenz.

    If ur a berskerker, the spell will be GelBerz.spl and the override script will be GelBerz.bcs.
    If your a necromancer the spell will be GelNecr.spl and the Override script will be GelNecro.bcs.
    Etc.

    Should work wonders, i will think if im able to fake 2 kits on a multiclass and 3 on a multi FMT as well.
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    GelTDia.D // Adding function for multiclass + adding function for keeping initial first class kit:
    BEGIN ~GelTDia~
    
    IF ~~ THEN BEGIN GelStart // Added function to multiclass and unicified start
      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 // Locating first kit, adding OverrideScript to keep track and apply later.
      SAY ~Do you also want to keep your first 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("GelKenz", LastTalkedToBy(Myself)))
      ~ GOTO GelPick
      IF ~Kit(LastTalkedToBy(Myself),BARBARIAN)~ THEN REPLY ~Keep Barbarian Kit specifications~ DO ~
        ActionOverride(LastTalkedToBy(Myself), SetGlobal("GelKeepBarb","LOCALS",1))
        ActionOverride(LastTalkedToBy(Myself), ReallyForceSpellRES("GelBarb", LastTalkedToBy(Myself)))
      ~ GOTO GelPick
      IF ~~ THEN REPLY ~No, i want unkitted first class~ GOTO GelPick
      END
    
    IF ~~ THEN BEGIN GelPick
      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 ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelApplied
      SAY ~Done. Your thief overlay is active~
      IF ~~ THEN REPLY ~Thanks.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    

    Gelkenz.spl Example:
    ChangeScript (82)
    Preset target
    Permanent
    Override
    None Magical / Natural

    GelKens.baf: // Script to add correct first class kit treats.
    // GELKENS.BAF - On PC (via op82)
    // A) Sync when levelup (Both Classes)
    IF
      LevelUp()
      Global("GelKeepKen","LOCALS",1)
    THEN
      RESPONSE #100
        Continue()
    END
    
    // B) TIER 1: Fighter lvl 1+
    IF
      Global("GelKeepKen","LOCALS",1)
      LevelGT(Myself,FIGHTER,0)
      Global("GelKen1","LOCALS",0)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // +tohit/+dmg, base ac bonus, 1x Kai, restrict armor parts
        SetGlobal("GelKen1","LOCALS",1)
    END
    
    // C) TIER 2: Fighter lvl 5+
    IF
      Global("GelKeepKen","LOCALS",1)
      LevelGT(Myself,FIGHTER,4)
      Global("GelKen2","LOCALS",0)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen2",Myself) // Next step kit bonuses/restrictions
        SetGlobal("GelKen2","LOCALS",1)
    END
    
    // D) TIER 3: Fighter lvl 9+
    IF
      Global("GelKeepKen","LOCALS",1)
      LevelGT(Myself,FIGHTER,8)
      Global("GelKen3","LOCALS",0)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen3",Myself)
        SetGlobal("GelKen3","LOCALS",1)
    END
    
    // ... more tiers (13+, 18+, 24+)
    

    GelKen1 and 2 and 3 is Tier spell. It applies kitbonuses/restriction for correct level.
    Will have to add for all kits that can dual to thief.
    Fighter kits
    Mage kits
    Clerci kits


    Also unsure if i miss a level check for dual kits:
    IF thief class > fighter class, then apply.
  • GraionDilachGraionDilach Member Posts: 614
    NPC_EE && Dual-to-Kit.
  • Gel87Gel87 Member Posts: 387
    NPC_EE && Dual-to-Kit.

    What you mean? Is that mods which already does the function? :)
    Edit: Googlet it and found out, thanks :)

    Anyway, i have increased my plans now.

    1. Dual to kitted thief, lose first kit if any: Status Done.
    2. Dual to kitted thief + keep/fake first class kit via spell casts. (working on this)
    3. Apply thief kit on thief multi classes + add kit spells other classes if chosen. Example: Kensai/Illusionist/Shadowdancer(FMT) - Working on this.

    So the different based on what i found on google is that i will make it so you can choose a kit for all classes the character has. (only 1 is true kit, other ones are faked with spells, example the kit description will be: Fighter 13 - Assassin XX or Figher/Assassin, but the Kai abiliy will be availeble, the bonus speed, thaco, damago and restriction on ranged/armor/gloves etc will be there still.

    Adding stalker / cleric will be a part as well later. Because i love that dual, and would love it in a multi form as well :D
  • Gel87Gel87 Member Posts: 387
    edited January 29
    Okay, i started on the Dual first kit revival for Kensai:
    Done until level 12 kensai revival. Need to make until 40, but should be fast. Not likely that anyone will dual at 40, but whatever.

    Dialog file:
    BEGIN ~GelTDia~
    
    IF ~EXIST(LastTalkedToBy(Myself))~ 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("GelKenz",LastTalkedToBy(Myself)))~ GOTO GelPick
      IF ~~ THEN REPLY ~No, i want unkitted first class~ GOTO GelPick
      END
    
    IF ~~ THEN BEGIN GelPick
      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 ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelApplied
      SAY ~Done. Your thief overlay is active~
      IF ~~ THEN REPLY ~Thanks.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    

    BCS file for override script which is set on the character by GelKenz.spl:
    ////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////// DUAL CLASS FIRST KIT KENSAI ////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    //Kensai: lvl 1 = 2 bonus AC and Gain Kai Ability + restric armor & gauntlet & ranged, each 3 level = 1 damage and thaco, each 4 level = -1 speedfactor, each 5th level = kai ability //
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    IF
      Global("GelKeepKen","LOCALS",1)
      LevelGT(Myself,FIGTHER,0)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",1)
    END
    
    IF
      Global("GelKen1","LOCALS",1)
      LevelGT(Myself,FIGTHER,1)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",2)
    END
    
    IF
      Global("GelKen1","LOCALS",2)
      LevelGT(Myself,FIGTHER,2)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",3)
    END
    
    IF
      Global("GelKen1","LOCALS",3)
      LevelGT(Myself,FIGTHER,3)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",4)
    END
    
    IF
      Global("GelKen1","LOCALS",4)
      LevelGT(Myself,FIGTHER,4)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",5)
    END
    
    IF
      Global("GelKen1","LOCALS",5)
      LevelGT(Myself,FIGTHER,5)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",6)
    END
    
    IF
      Global("GelKen1","LOCALS",6)
      LevelGT(Myself,FIGTHER,6)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",7)
    END
    
    IF
      Global("GelKen1","LOCALS",7)
      LevelGT(Myself,FIGTHER,7)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",8)
    END
    
    IF
      Global("GelKen1","LOCALS",8)
      LevelGT(Myself,FIGTHER,8)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",9)
    END
    
    IF
      Global("GelKen1","LOCALS",9)
      LevelGT(Myself,FIGTHER,9)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",10)
    END
    
    IF
      Global("GelKen1","LOCALS",10)
      LevelGT(Myself,FIGTHER,10)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",11)
    END
    
    IF
      Global("GelKen1","LOCALS",11)
      LevelGT(Myself,FIGHTER,11)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",12)
    END
    
    IF
      Global("GelKen1","LOCALS",12)
      LevelGT(Myself,FIGHTER,12)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",13)
    END
    
    IF
      Global("GelKen1","LOCALS",13)
      LevelGT(Myself,FIGHTER,13)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",14)
    END
    
    IF
      Global("GelKen1","LOCALS",14)
      LevelGT(Myself,FIGHTER,14)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",15)
    END
    
    IF
      Global("GelKen1","LOCALS",15)
      LevelGT(Myself,FIGHTER,15)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",16)
    END
    
    IF
      Global("GelKen1","LOCALS",16)
      LevelGT(Myself,FIGHTER,16)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",17)
    END
    
    IF
      Global("GelKen1","LOCALS",17)
      LevelGT(Myself,FIGHTER,17)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",18)
    END
    
    IF
      Global("GelKen1","LOCALS",18)
      LevelGT(Myself,FIGHTER,18)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",19)
    END
    
    IF
      Global("GelKen1","LOCALS",19)
      LevelGT(Myself,FIGHTER,19)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",20)
    END
    
    IF
      Global("GelKen1","LOCALS",20)
      LevelGT(Myself,FIGHTER,20)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",21)
    END
    
    IF
      Global("GelKen1","LOCALS",21)
      LevelGT(Myself,FIGHTER,21)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",22)
    END
    
    IF
      Global("GelKen1","LOCALS",22)
      LevelGT(Myself,FIGHTER,22)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",23)
    END
    
    IF
      Global("GelKen1","LOCALS",23)
      LevelGT(Myself,FIGHTER,23)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",24)
    END
    
    IF
      Global("GelKen1","LOCALS",24)
      LevelGT(Myself,FIGHTER,24)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",25)
    END
    
    IF
      Global("GelKen1","LOCALS",25)
      LevelGT(Myself,FIGHTER,25)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",26)
    END
    
    IF
      Global("GelKen1","LOCALS",26)
      LevelGT(Myself,FIGHTER,26)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",27)
    END
    
    IF
      Global("GelKen1","LOCALS",27)
      LevelGT(Myself,FIGHTER,27)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",28)
    END
    
    IF
      Global("GelKen1","LOCALS",28)
      LevelGT(Myself,FIGHTER,28)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",29)
    END
    
    IF
      Global("GelKen1","LOCALS",29)
      LevelGT(Myself,FIGHTER,29)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",30)
    END
    
    IF
      Global("GelKen1","LOCALS",30)
      LevelGT(Myself,FIGHTER,30)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",31)
    END
    
    IF
      Global("GelKen1","LOCALS",31)
      LevelGT(Myself,FIGHTER,31)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",32)
    END
    
    IF
      Global("GelKen1","LOCALS",32)
      LevelGT(Myself,FIGHTER,32)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",33)
    END
    
    IF
      Global("GelKen1","LOCALS",33)
      LevelGT(Myself,FIGHTER,33)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",34)
    END
    
    IF
      Global("GelKen1","LOCALS",34)
      LevelGT(Myself,FIGHTER,34)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",35)
    END
    
    IF
      Global("GelKen1","LOCALS",35)
      LevelGT(Myself,FIGHTER,35)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",36)
    END
    
    IF
      Global("GelKen1","LOCALS",36)
      LevelGT(Myself,FIGHTER,36)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",37)
    END
    
    IF
      Global("GelKen1","LOCALS",37)
      LevelGT(Myself,FIGHTER,37)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",38)
    END
    
    IF
      Global("GelKen1","LOCALS",38)
      LevelGT(Myself,FIGHTER,38)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",39)
    END
    
    IF
      Global("GelKen1","LOCALS",39)
      LevelGT(Myself,FIGHTER,39)
    THEN
      RESPONSE #100
        SetGlobal("GelKen1","LOCALS",40)
    END
    
    IF
      Global("GelKen1","LOCALS",1)
      LevelGT(Myself,THIEF,1)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Kai, 2 bonus AC.
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",2)
      LevelGT(Myself,THIEF,2)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Kai, 2 bonus AC.
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",3)
      LevelGT(Myself,THIEF,3)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",4)
      LevelGT(Myself,THIEF,4)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",5)
      LevelGT(Myself,THIEF,5)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",6)
      LevelGT(Myself,THIEF,6)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",7)
      LevelGT(Myself,THIEF,7)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",8)
      LevelGT(Myself,THIEF,8)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",9)
      LevelGT(Myself,THIEF,9)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",10)
      LevelGT(Myself,THIEF,10)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",11)
      LevelGT(Myself,THIEF,11)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",12)
      LevelGT(Myself,THIEF,12)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",13)
      LevelGT(Myself,THIEF,13)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",14)
      LevelGT(Myself,THIEF,14)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",15)
      LevelGT(Myself,THIEF,15)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",16)
      LevelGT(Myself,THIEF,16)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",17)
      LevelGT(Myself,THIEF,17)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",18)
      LevelGT(Myself,THIEF,18)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",19)
      LevelGT(Myself,THIEF,19)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",20)
      LevelGT(Myself,THIEF,20)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",21)
      LevelGT(Myself,THIEF,21)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",22)
      LevelGT(Myself,THIEF,22)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",23)
      LevelGT(Myself,THIEF,23)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",24)
      LevelGT(Myself,THIEF,24)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",60)
      Global("GelKeepKen","LOCALS",1)
    THEN
      RESPONSE #100
        SetGlobal("GelKeepKen","LOCALS",2)
    END
    
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited January 28
    Working on a plan for multiclass. Should not AddSuperKit on those, because that will ruin their HLA table.
    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.~ GOTO GelFMT2 
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelFMT2
    SAY ~Which fighter kit do you want?~
    IF ~~ THEN REPLY ~None~ GOTO GelFMT3
    IF ~~ THEN REPLY ~Kensai~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiKen","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMKen",LastTalkedToBy(Myself)))~ GOTO GelFMT3
    IF ~~ THEN REPLY ~Barbarian~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBar","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBar",LastTalkedToBy(Myself)))~ GOTO GelFMT3 
    IF ~~ THEN REPLY ~Berserker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBer","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBer",LastTalkedToBy(Myself)))~ GOTO GelFMT3
    IF ~~ THEN REPLY ~Dwarven Defender~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMDwD",LastTalkedToBy(Myself)))~ GOTO GelFMT3
    IF ~~ THEN REPLY ~Wizard Slayer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiWiS","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMWiS",LastTalkedToBy(Myself)))~ GOTO GelFMT3
    END
    
    IF ~~ THEN BEGIN GelFMT3
    SAY ~Which mage kit do you want?~
    IF ~~ THEN REPLY ~None~ GOTO GelFMT4 
    IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiNec","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMNec",LastTalkedToBy(Myself)))~ GOTO GelFMT4 
    IF ~~ THEN REPLY ~SuperKit, with no restrictions and 1 extra spellcast~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSup","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMSup",LastTalkedToBy(Myself)))~ GOTO GelFMT4
    ////// Remaining Mage kits same way.
    END 
    
    IF ~~ THEN BEGIN GelFMT4
    SAY ~Which Thief kit do you want?~ 
    IF ~~ THEN REPLY ~None~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    IF ~~ THEN REPLY ~Assassin~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMAss",LastTalkedToBy(Myself))) SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    ////// Same way for remaining kits. 
    END
    

    This means the full dialog will look something like this:
    BEGIN ~GelTDia~
    
    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("GelKenz",LastTalkedToBy(Myself)))~ GOTO GelPickThief
      IF ~~ THEN REPLY ~No, i want unkitted first class~ 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 ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelApplied
      SAY ~Done. Your thief overlay is active~
      IF ~~ THEN REPLY ~Thanks.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    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.~ GOTO GelFighterMulti 
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelFighterMultiClass
    SAY ~Which fighter kit do you want?~
    IF ~~ THEN REPLY ~None~ GOTO GelMageMulti
    IF ~~ THEN REPLY ~Kensai~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiKen","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMKen",LastTalkedToBy(Myself)))~ GOTO GelMageMulti
    IF ~~ THEN REPLY ~Barbarian~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBar","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBar",LastTalkedToBy(Myself)))~ GOTO GelMageMulti 
    IF ~~ THEN REPLY ~Berserker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBer","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBer",LastTalkedToBy(Myself)))~ GOTO GelMageMulti
    IF ~~ THEN REPLY ~Dwarven Defender~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMDwD",LastTalkedToBy(Myself)))~ GOTO GelMageMulti
    IF ~~ THEN REPLY ~Wizard Slayer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiWiS","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMWiS",LastTalkedToBy(Myself)))~ GOTO GelMageMulti
    END
    
    IF ~~ THEN BEGIN GelMageMulti
    SAY ~Which mage kit do you want?~
    IF ~~ THEN REPLY ~None~ GOTO GelThiefMulti 
    IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiNec","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMNec",LastTalkedToBy(Myself)))~ GOTO GelThiefMulti 
    IF ~~ THEN REPLY ~SuperKit, with no restrictions and 1 extra spellcast~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSup","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMSup",LastTalkedToBy(Myself)))~ GOTO GelThiefMulti
    ////// Remaining Mage kits same way.
    END 
    
    IF ~~ THEN BEGIN GelThiefMulti
    SAY ~Which Thief kit do you want?~ 
    IF ~~ THEN REPLY ~None~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    IF ~~ THEN REPLY ~Assassin~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMAss",LastTalkedToBy(Myself))) SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    ////// Same way for remaining kits. 
    END
    

    Okay, I see now that i need a flow-router block so that i can reuse:
    GelFighterMulti
    GelMageMulti
    GelThiefMulti
    and later:
    GelClericMulti
    GelRangerMulti

    with check for something like this instead:
    IF ~
      Class(LastTalkedToBy(Myself),FIGHTER)
      Class(LastTalkedToBy(Myself),THIEF)
      !Class(LastTalkedToBy(Myself),MAGE)
    ~ THEN BEGIN GelFT_Start
      SAY ~Do you want to apply kit overlays?~
      IF ~~ THEN REPLY ~Yes.~
        DO ~
          SetGlobal("GelHasFighter","LOCALS",1)
          SetGlobal("GelHasMage","LOCALS",0)
          SetGlobal("GelHasThief","LOCALS",1)
          SetGlobal("GelNext","LOCALS",1) // start at fighter
        ~
        GOTO GelMultiRouter
    END
    

    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited January 28
    Last Version of code
    BEGIN ~GelTDia~
    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("GelKenz",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("GelBers",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("GelWiza",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("GelBarb",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("GelTalo",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("GelLath",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("GelHelm",LastTalkedToBy(Myself)))~ GOTO GelPickThief
      IF ~~ THEN REPLY ~No, i want unkitted first class~ 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 ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    IF ~~ THEN BEGIN GelApplied
      SAY ~Done. Your thief overlay is active~
      IF ~~ THEN REPLY ~Thanks.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    END
    
    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),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 ~~ THEN BEGIN GelNextMulti
    SAY ~Class Found Pick Kit~
    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 ~~ THEN REPLY ~Im done.~ DO ~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)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMKen",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~Barbarian~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBar","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBar",LastTalkedToBy(Myself)))~ GOTO GelNextMulti 
    IF ~~ THEN REPLY ~Berserker~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiBer","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMBer",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~Dwarven Defender~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMDwD",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~Wizard Slayer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiWiS","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMWiS",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    END
    
    IF ~~ THEN BEGIN GelMageMulti
    SAY ~Which mage kit do you want?~
    IF ~~ THEN REPLY ~None~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiNec","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMNec",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~SuperKit, with no restrictions and 1 extra spellcast~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelMultiSup","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMSup",LastTalkedToBy(Myself)))~ GOTO GelNextMulti
    ////// Remaining Mage kits same way.
    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)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMAss",LastTalkedToBy(Myself))) ~ GOTO GelNextMulti
    ////// Same way for remaining kits. 
    END
    

    Classes with thief will not summon the creature.
    So they will instead summon:
    GelMDia (Mage)
    GelFDia (Fighter)
    GelRDia (Ranger)
    GelCDia (Cleric)
    GelDDia (Druid)

    I want all class checks, kit changes etc to be handled by GelTDia.cre nomatter what creature that are summoned via clab.
    But i also want to make sure kit change possibilites only happens onces.
    Theese creatures function is to:
    ActionOverride(LastSummonerOf(Myself),ReallyForceSpellRES("GelTDia",LastSummonerOf(Myself)))
    But only if it does not exists.
    I Dont want a FMT to forexample Summon:
    GelTDia
    GelFDia
    GelMDia
    And ending up with summoning of total 3 GelTDia...

    So GelMDia etc need a script to prevent that:
    //// GelMDia.bcs
    IF
    OnCreation()
    THEN
    RESPONSE #100
    Wait(1)
    SetGlobal("GelMDiaActive","LOCALS",1) 
    SetGlobal("GelMDiaClaim","LOCALS",1) 
    END
    
    IF
    Global("GelTDiaActive","LOCALS",1) 
    THEN
    RESPONSE #100
    DestroySelf()
    END
    
    IF
    Global("GelFDiaClaim","LOCALS",1) 
    THEN
    RESPONSE #100
    DestroySelf()
    END
    
    IF
    Global("GelCDiaClaim","LOCALS",1) 
    THEN
    RESPONSE #100
    DestroySelf()
    END
    
    IF
    Global("GelRDiaClaim","LOCALS",1) 
    THEN
    RESPONSE #100
    DestroySelf()
    END
    
    
    IF
    Global("GelTDiaActive","LOCALS",0)
    Global("GelMDiaActive","LOCALS",1)
    THEN
    RESPONSE #100
    ActionOverride(LastSummonerOf(Myself),ReallyForceSpellRES("GelTDia",LastSummonerOf(Myself)))
    DestroySelf()
    END
    
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited January 28
    Okay maby this one is better for secondary creatures:
    IF
      OnCreation()
      Global("GelTDiaClaimed","LOCALS",0)
    THEN
      RESPONSE #100
        SetGlobal("GelTDiaClaimed","LOCALS",1)
        ActionOverride(LastSummonerOf(Myself),ReallyForceSpellRES("GelTDia",LastSummonerOf(Myself)))
        SetGlobal("GelTDiaClaimed","LOCALS",2)
        DestroySelf()
    END
    
    IF
      OnCreation()
      Global("GelTDiaClaimed","LOCALS",2)
    THEN
      RESPONSE #100
        DestroySelf()
    END
    
    IF
      OnCreation()
      Global("GelTDiaActive","LOCALS",1) /// Remember to Put this global in GelTDia.baf
    THEN
      RESPONSE #100
        DestroySelf()
    END
    
    

    I also made a new section for chosing all thief classes combined into one. Like a super thief kit. For now only for dual classes.
    It means i have to assign override script if people choose to go with unkitted first class as well. Because i can only assign one override script in total.

    The function basicly adds super kit Shadowdancer(so it can use the hardcoded hide in plain sight), and then it add assassin/bountyhunter/swashbuckler stuff by a single spell which is built with level tier which correspond. And then it reapply it each level by checking the global value together with LevelGT(Myself,Thief,X). The global value will increase each tier to avoid stacking the effects more than once.

    Your also prompted to ask if you want to add the «kit spesific HLA» on different levels such as 25, 28, 32, 36, 38, 40 as an example.
    Same way, other spell, other global value and different level checks.

    Im on phone now so cannot show progress
    Edit:
    Well thanks to us living in 2026 i was able to get a hold on the plan on my phone as well:

    // Added in choose thief kit dual class section
    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 GelSuperThief

    IF ~~ THEN BEGIN GelSuperThief
    SAY ~Do you also want to add kit specific HLA abilities on certain high levels?~
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT
    IF ~~ THEN REPLY ~Yes.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelSuperThiefHLA","LOCALS",1)) SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT

    GelSupT.spl is beeing made for kit effects.

    Melee Ability 1: Required level 1: Give lvl 1 abilities/passives(assassin, bounty hunter, Swashbuckler)
    Melee Ability 2: Required level 2: Give lvl 2 abilities/passives(assassin, bounty hunter, Swashbuckler)
    etc.

    GelSupH.spl
    For learn kit specific HLA’s.

    // Kit abilities section, added to all override scripts. Possible easiest to use extend_bottom in tp2 file. And question if your plan is to install RR parts changing thief kit, and RR part changing thief HLA to install correct spell for RR/No RR. (Death attack, acid trap etc).

    IF
    LevelGT(Myself,THIEF,0)
    Global("GelSuperThief","LOCALS",1)
    THEN
    REPSONSE #100
    ReallyForceSpellRES("GelSupT",Myself)
    SetGlobal("GelSuperThief","LOCALS",2)
    END

    IF
    LevelGT(Myself,THIEF,1)
    Global("GelSuperThief","LOCALS",2)
    THEN
    REPSONSE #100
    ReallyForceSpellRES("GelSupT",Myself)
    SetGlobal("GelSuperThief","LOCALS",3)
    END

    /// HLA based spells:
    IF
    LevelGT(Myself,THIEF,24)
    Global("GelSuperThiefHLA","LOCALS",1)
    THEN
    REPSONSE #100
    ReallyForceSpellRES("GelSupH",Myself)
    SetGlobal("GelSuperThief","LOCALS",2)
    END

    IF
    LevelGT(Myself,THIEF,26)
    Global("GelSuperThiefHLA","LOCALS",2)
    THEN
    REPSONSE #100
    ReallyForceSpellRES("GelSupH",Myself)
    SetGlobal("GelSuperThief","LOCALS",3)
    END

    SHADOWDANCER as real kit due to Hardcoded "hide in plain sight"
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    Second part of keep kensai dual script(Post to long)
    IF
      Global("GelKen1","LOCALS",25)
      LevelGT(Myself,THIEF,25)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",26)
      LevelGT(Myself,THIEF,26)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",27)
      LevelGT(Myself,THIEF,27)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",28)
      LevelGT(Myself,THIEF,28)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",29)
      LevelGT(Myself,THIEF,29)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",30)
      LevelGT(Myself,THIEF,30)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",31)
      LevelGT(Myself,THIEF,31)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",32)
      LevelGT(Myself,THIEF,32)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",33)
      LevelGT(Myself,THIEF,33)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",34)
      LevelGT(Myself,THIEF,34)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",35)
      LevelGT(Myself,THIEF,35)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",36)
      LevelGT(Myself,THIEF,36)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",37)
      LevelGT(Myself,THIEF,37)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",38)
      LevelGT(Myself,THIEF,38)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",39)
      LevelGT(Myself,THIEF,39)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    IF
      Global("GelKen1","LOCALS",40)
      LevelGT(Myself,THIEF,40)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        SetGlobal("GelKen1","LOCALS",60)
    END
    
  • Gel87Gel87 Member Posts: 387
    edited February 1
    I lold, tried to bypass all the writing protection on C disk and made a new Disk.
    When in fact the issue was that on this PC my language was set to No_NB instead of En_US.
    Amyway what happened was that due to super IT dude setup that D: disk deleted itself upon PC restart.
    All progression was lost for a while, but luckely I have loads of chats with AI and could just copy most back.

    So now i dont take any chances and upload last version of kit here, this version is per now not playable. The one in Post 1 is(but only for Changing Thief Kit)

    The new one will soon have ALL class kit changes.
    BARD, PALA, FIGHTER, MAGE, THIEF, CLERIC, DRUID, RANGER and all multiclasses and dual classes can also change all their classes kits.

    Also added a super thief and a supermage.

    Skipped Cleric dual and multi to BeastMaster and Archer. Those combies make ZERO sense.
    So instead i will create a new kit within the mod called: Slinging Beastmaster, which will substitute both those. (Quarterstaff, Sling, Club, 5 all those profience availeble, the find familiar, called shot, Ranged bonuses).

    So then you can kit forxample:
    Dual: Stalker lvl XX - Talos
    Multi: Stalker - Helm
    Multi: Slinging Beastmaster / Tyr

    Or a simple:
    Barbarian / Illusionist / Assassin

    Or straight out change Rasaad to a usefull monk kit.

    Make that idiot bard NPC into a blade live etc.

    Cant show code as each .baf for GelMult and GelDual are several hundred of thousands of digits, so wont fit in post XD

    But i guess the post have place for the D file. It will work for anything dualing into thief, and any multiclass with thief. But i have other triggers which summons it for mages etc and can then change their kits as well. Need to add a few functions thought to make it happen, but i have a plan for those.

    Bard/Paladin/Monk are none dual/multi, so those are easy with another creature/.d/.creature.baf which uses the simplicity of AddSuperKit.

    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

    Update: Changed so that Pure thief classes not get the original question of changing first class.
    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 ~!Class(LastTalkedToBy(Myself),MAGE) !Class(LastTalkedToBy(Myself),FIGHTER) !Class(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelPickThief 
    IF ~OriginalClass(CLERIC)~ THEN REPLY ~Yes.~ GOTO GelFirstKit 
    IF ~OriginalClass(FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelFirstKit 
    IF ~OriginalClass(MAGE)~ 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
    


    I feel i have good progress, learned to write dialog code a week ago :P
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited February 1
    So the way it holds together(when done) :
    Monk/Paladin/Bard are unable to dual or multi. So those will have a common Creature with a common Creature D file and Creature Dialog File. The spell to summon that creature will be added as new ability line for each and applied in lvl 1.
    // GelSing.D
    BEGIN ~GelSingleClass~
    
    IF ~Class(LastTalkedToBy(Myself),MONK)~ THEN BEGIN GelMonk
    SAY ~Do you want to change kit on your monk?~
    IF ~~ THEN REPLY ~Yes.~ GOTO GelMonkKitPick
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END 
    
    // Need to check kitlist.2da for monk spelling of kits.
    IF ~~ THEN BEGIN GelMonkKitPick
    SAY ~Which kit do you want?~
    IF ~~ THEN REPLY ~Dark Moon~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("DARK_MOON"))~ GOTO GelMonkDone
    IF ~~ THEN REPLY ~Sun Soul~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SUN_SOUL"))~ GOTO GelMonkDone
    IF ~~ THEN REPLY ~Nevermind.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    
    IF ~~ THEN BEGIN GelMonkDone
    SAY ~Your Monk kit overlay is done~
    IF ~~ THEN REPLY ~Thanks~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    
    IF ~Class(LastTalkedToBy(Myself),BARD)~ THEN BEGIN GelBard
    SAY ~Do you want to change kit on your Bard?~
    IF ~~ THEN REPLY ~Yes.~ GOTO GelBardKitPick
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END 
    
    IF ~~ THEN BEGIN GelBardKitPick
    SAY ~Which kit do you want?~
    IF ~~ THEN REPLY ~Blade~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BLADE"))~ GOTO GelBardDone
    IF ~~ THEN REPLY ~Jester~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("JESTER"))~ GOTO GelBardDone
    IF ~~ THEN REPLY ~Skald~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SKALD"))~ GOTO GelBardDone
    IF ~~ THEN REPLY ~Nevermind.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    
    IF ~~ THEN BEGIN GelBardDone
    SAY ~Your Bard kit overlay is done~
    IF ~~ THEN REPLY ~Thanks~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    
    IF ~Class(LastTalkedToBy(Myself),PALADIN)~ THEN BEGIN GelPaladin
    SAY ~Do you want to change kit on your Paladin?~
    IF ~~ THEN REPLY ~Yes.~ GOTO GelPaladinKitPick
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END 
    
    IF ~~ THEN BEGIN GelPaladinKitPick
    SAY ~Which kit do you want?~
    IF ~~ THEN REPLY ~Cavalier~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("CAVALIER"))~ GOTO GelPaladinDone
    IF ~~ THEN REPLY ~Inquisitor~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("INQUISITOR"))~ GOTO GelPaladinDone
    IF ~~ THEN REPLY ~Undead Hunter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("UNDEAD_HUNTER"))~ GOTO GelPaladinDone
    IF ~~ THEN REPLY ~Blackguard~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BLACKGUARD"))~ GOTO GelPaladinDone
    IF ~~ THEN REPLY ~Nevermind.~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    
    IF ~~ THEN BEGIN GelPaladinDone
    SAY ~Your Paladin kit overlay is done~
    IF ~~ THEN REPLY ~Thanks~ DO ~SetGlobal("GelSingleClass","LOCALS",3)~ EXIT // Destroys self
    END
    

    Same for paladin, same for bard.

    Script will be something like this:
    //GelSing.Baf
    IF
        OnCreation()
    THEN
        RESPONSE #100
            SetGlobal("GelSingleClass","LOCALS",1)
    END
    
    IF
        Global("GelSingleClass","LOCALS",1)
        Exists(LastSummonerOf(Myself))
        InParty(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
            ClearAllActions()
            StartDialogNoSet(LastSummonerOf(Myself))
            SetGlobal("GelSingleClass","LOCALS",2)
    END
    
    IF
        Global("GelSingleClass","LOCALS",1)
        !Exists(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
            DestroySelf()
    END
    
    IF
        Global("GelSingleClass","LOCALS",3)
    THEN
        RESPONSE #100
            DestroySelf()
    END
    
    IF
      !InParty(LastSummonerOf(Myself))
    THEN
      RESPONSE #100
        DestroySelf()
    END
    

    Adding Dualing to mage part:
    ///////////////////////////DUAL CLASS: TO Mage////////////////////////////////////////// 
    IF ~Class(LastTalkedToBy(Myself),MAGE)~ THEN BEGIN GelStartMage 
    SAY ~Do you want to change your Mage Kit?~ 
    IF ~~ THEN REPLY ~No.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT 
    IF ~!Class(LastTalkedToBy(Myself),THIEF) !Class(LastTalkedToBy(Myself),FIGHTER) !Class(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelPickMage 
    IF ~OriginalClass(CLERIC)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    IF ~OriginalClass(FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    IF ~OriginalClass(THIEF)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    END 
    
    IF ~~ THEN BEGIN GelMageFirstKit 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    IF ~Kit(LastTalkedToBy(Myself),ASSASIN)~ THEN REPLY ~Keep Assassin Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),SHADOWDANCER)~ THEN REPLY ~Keep Shadowdancer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSha","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),BOUNTY_HUNTER)~ THEN REPLY ~Keep Bounty Hunter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBou","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),SWASHBUCKLER)~ THEN REPLY ~Keep Swashbuckler Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSwa","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    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 GelPickMage 
    END 
    
    IF ~~ THEN BEGIN GelPickMage 
    SAY ~Choose your thief kit overlay~ 
    IF ~~ THEN REPLY ~Abjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ABJURER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Conjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("CONJURER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Diviner~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("DIVINER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Enchanter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ENCHANTER"))~ GOTO GelApplied IF ~~ THEN REPLY ~Illusionist~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ILLUSIONIST"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Invoker~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("INVOKER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("NECROMANCER"))~ GOTO GelApplied
    IF ~~ THEN REPLY ~Transmuter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("TRANSMUTER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~I want Super Mage kit with 1 extra spells cast per level, no class restrictions or bonuses.~ DO ~ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelSMag",LastTalkedToBy(Myself)))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Never mind.~ DO ~SetGlobal("GelTDia_Init","LOCALS",3)~ EXIT 
    END
    
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited February 5
    I found a weakness in my claim function.
    Correct target of locals values.
    Prevents more than 1 dialog.
    Updated here:

    GelTDia.Baf:
    ///// Allowed to exists if first. And kill all other creatures such as GelTDia, GelMDia, GelFDia etc.////
    IF
        OnCreation()
        Global("GelTDia_Init","LOCALS",0,LastSummonerOf(Myself))
    THEN
        RESPONSE #100
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",1))
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",2))
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",1))
    END
    
    // Removed if not first.///
    IF
      OnCreation()
      GlobalGT("GelTDia_Init","LOCALS",0,LastSummonerOf(Myself))
    THEN
      RESPONSE #100
         DestroySelf()
    END
    
    // Starts dialog
    IF
        Global("GelTDia_Init","LOCALS",1,LastSummonerOf(Myself))
        Exists(LastSummonerOf(Myself))
        InParty(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
            ClearAllActions()
            StartDialogNoSet(LastSummonerOf(Myself))
            ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",2))
    END
    
    // 
    IF
        Global("GelTDia_Init","LOCALS",1,LastSummonerOf(Myself))
        !Exists(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
            DestroySelf()
    END
    
    IF
        Global("GelTDia_Init","LOCALS",3,LastSummonerOf(Myself))
    THEN
        RESPONSE #100
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",0))
           DestroySelf()
    END
    

    GelTDia.D
    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 ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT 
    IF ~!Class(LastTalkedToBy(Myself),MAGE) !Class(LastTalkedToBy(Myself),FIGHTER) !Class(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelPickThief 
    IF ~OriginalClass(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelFirstKit 
    IF ~OriginalClass(LastTalkedToBy(Myself),FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelFirstKit 
    IF ~OriginalClass(LastTalkedToBy(Myself),MAGE)~ 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),DWARVEN_DEFENDER)~ THEN REPLY ~Keep Dwarven Defender Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDwD","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),DIVINER)~ THEN REPLY ~Keep Diviner 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),OHTEMPUS)~ 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),OHTYR)~ 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("GelDual",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 ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    
    IF ~~ THEN BEGIN GelApplied
      SAY ~Done. Your Kit overlay is active~
      IF ~~ THEN REPLY ~Thanks.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    
    ///////////////////////////DUAL CLASS: To Mage////////////////////////////////////////// 
    
    IF ~Class(LastTalkedToBy(Myself),MAGE)~ THEN BEGIN GelStartMage 
    SAY ~Do you want to change your Mage Kit?~ 
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT 
    IF ~!Class(LastTalkedToBy(Myself),THIEF) !Class(LastTalkedToBy(Myself),FIGHTER) !Class(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelPickMage 
    IF ~OriginalClass(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    IF ~OriginalClass(LastTalkedToBy(Myself),FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    IF ~OriginalClass(LastTalkedToBy(Myself),THIEF)~ THEN REPLY ~Yes.~ GOTO GelMageFirstKit 
    END 
    
    IF ~~ THEN BEGIN GelMageFirstKit 
    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 GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),DWARVEN_DEFENDER)~ THEN REPLY ~Keep Dwarven Defender Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage  
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    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 GelPickMage 
    IF ~Kit(LastTalkedToBy(Myself),OHTEMPUS)~ THEN REPLY ~Keep Tempus Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTem","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage 
    IF ~Kit(LastTalkedToBy(Myself),OHTYR)~ THEN REPLY ~Keep Tyr Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTyr","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage 
    IF ~Kit(LastTalkedToBy(Myself),ASSASIN)~ THEN REPLY ~Keep Assassin Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),SHADOWDANCER)~ THEN REPLY ~Keep Shadowdancer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSha","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),BOUNTY_HUNTER)~ THEN REPLY ~Keep Bounty Hunter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBou","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~Kit(LastTalkedToBy(Myself),SWASHBUCKLER)~ THEN REPLY ~Keep Swashbuckler Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSwa","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage
    IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickMage 
    END 
    
    IF ~~ THEN BEGIN GelPickMage 
    SAY ~Choose your Mage kit overlay~ 
    IF ~~ THEN REPLY ~Abjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ABJURER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Conjurer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("CONJURER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Diviner~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("DIVINER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Enchanter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ENCHANTER"))~ GOTO GelApplied IF ~~ THEN REPLY ~Illusionist~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("ILLUSIONIST"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Invoker~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("INVOKER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Necromancer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("NECROMANCER"))~ GOTO GelApplied
    IF ~~ THEN REPLY ~Transmuter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("TRANSMUTER"))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~I want Super Mage kit with 1 extra spells cast per level, no class restrictions or bonuses.~ DO ~ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelSMag",LastTalkedToBy(Myself)))~ GOTO GelApplied 
    IF ~~ THEN REPLY ~Never mind.~ DO ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 Fighter / Mage?~
    IF ~~ THEN REPLY ~Yes.~ DO ~SetGlobal("GelFighterMulti","LOCALS",1) SetGlobal("GelMageMulti","LOCALS",1)~ GOTO GelNextMulti
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 ~ActionOverride(LastTalkedToBy(Myself),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 GelDruidMulti
    IF ~~ THEN REPLY ~Im done.~ DO ~ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelMult",LastTalkedToBy(Myself))) ActionOverride(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
    END
    
    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
    

    GelMDia.baf, same for GelFDia, GelRDia, GelCDia:
      OnCreation()
      Global("GelTDiaClaimed","LOCALS",0,LastSummonerOf(Myself))
    THEN
      RESPONSE #100
        ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaClaimed","LOCALS",1))
        ActionOverride(LastSummonerOf(Myself),ReallyForceSpellRES("GelTDia",LastSummonerOf(Myself)))
        SetGlobal("GelTDiaClaimed","LOCALS",2,LastSummonerOf(Myself))
        DestroySelf()
    END
    
    IF
      OnCreation()
      Global("GelTDiaClaimed","LOCALS",2,LastSummonerOf(Myself))
    THEN
      RESPONSE #100
        DestroySelf()
    END
    
    IF
      OnCreation()
      Global("GelTDiaActive","LOCALS",1,LastSummonerOf(Myself))
    THEN
      RESPONSE #100
        DestroySelf()
    END
    

    This way they work together and prevent double dialog.
    They also allows other characters to do their dialog, example if 2 NPC joins at same time(Khalid/Jaheira, Montaron/Xzar)
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited February 4
    Sorry for many posts, but posts are not allowed to be the lenght i need them to be....
    So here is Dual to cleric, druid, fighter, ranger the first IF blocks, i will finnish the kit choices etc later.
    I have also done some changes in previous post.
    The claim system, the prevention of more than 1 dialog, yet still allowing new dialog if you dual and then pick kit again.

    Example:
    Immoen BGEE is THIEF (No kit).
    WHen you party here, you get the choice to pick a Thief kit. Lets say: Shadowdancer.
    Then later you decide to dual here to something. Mage to keep the lore rolling.
    Now right after dual you get new dialog, she can choose to keep the shadowdancer kit by faking it with spells, and also pick a kit for here mage.

    Other example:
    Both Jaheira and Khalid joins.
    You can change Jaheira to Berserker / Totemic Druid by faking kit features with spells.
    You can change Khalid to Forexample Kensai, then later dual him(if he is human, im unsure xD) to cleric and choose to keep Kensai kit, and chose to be Tyr kit cleric. Your actual kit will be TYR, because it will override Kensai, but the information of Kensai and Level is stored and you will be given the correct Kit adds by spells for that Kensai level once your cleric level > Fighter level.

    Other example:
    Im am unsure what happens if you are already a leveled up, but i think it may work then as well, if not it should work together with "Customizable NPCs" from Anatholy Tweaks aka CD#Tweaks.
    Anyway, since BG2EE Imoen is Thief/Mage you will not be able to chose a thief kit, only kits that you ARE when dualing will be allowed to be chosen. This is a intention from me. So the choices for here in BG2EE is THIEF / Any Mage kit.
    But there is a twist, if you really want to have "2 kits" on here, you can use the "Customizable NPCs" from CDtweaks. Because i believe that will first reset here to thief lvl 1. Then you pick kit. Then you level up. Then you dual. Then you pick second kit and choose to keep first kit by faking it with spells.
    Once done i will test theese scenarios, if it crash i will add some checks to make sure it wont crash.

    I added zero Race checks, this is intentional. Because there are tweaks that allows other races to dual/multi.
    //////////////////////DUAL TO CLERIC//////////////////////////////
    /// DUAL TO CLERIC
    IF ~Class(LastTalkedToBy(Myself),CLERIC)~ THEN BEGIN GelStartCleric
    SAY ~Do you want to change your Cleric Kit?~
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    IF ~!Class(LastTalkedToBy(Myself),MAGE) !Class(LastTalkedToBy(Myself),THIEF) !Class(LastTalkedToBy(Myself),FIGHTER) !Class(LastTalkedToBy(Myself),RANGER)~ THEN REPLY ~Yes.~ GOTO GelPickCleric
    OR(4)
    IF ~OriginalClass(LastTalkedToBy(Myself),MAGE)~ THEN REPLY ~Yes.~ GOTO GelClericFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),THIEF)~ THEN REPLY ~Yes.~ GOTO GelClericFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelClericFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),RANGER)~ THEN REPLY ~Yes.~ GOTO GelClericFirstKit
    END
    
    IF ~~ THEN BEGIN GelClericFirstKit
      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 GelPickCleric
    IF ~Kit(LastTalkedToBy(Myself),DWARVEN_DEFENDER)~ THEN REPLY ~Keep Dwarven Defender Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      IF ~Kit(LastTalkedToBy(Myself),DIVINER)~ THEN REPLY ~Keep Diviner Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDev","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDevi",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      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 GelPickCleric
      IF ~Kit(LastTalkedToBy(Myself),STALKER)~ THEN REPLY ~Keep Stalker Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSta","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
      IF ~Kit(LastTalkedToBy(Myself),GelSling)~ THEN REPLY ~Keep Slinging Beastmaster Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSli","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
    IF ~Kit(LastTalkedToBy(Myself),ASSASIN)~ THEN REPLY ~Keep Assassin Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
    IF ~Kit(LastTalkedToBy(Myself),SHADOWDANCER)~ THEN REPLY ~Keep Shadowdancer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSha","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
    IF ~Kit(LastTalkedToBy(Myself),BOUNTY_HUNTER)~ THEN REPLY ~Keep Bounty Hunter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBou","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
    IF ~Kit(LastTalkedToBy(Myself),SWASHBUCKLER)~ THEN REPLY ~Keep Swashbuckler Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSwa","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
      IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickCleric
      END
    
    IF ~~ THEN BEGIN GelPickCleric
      SAY ~Choose your Cleric kit overlay~
      IF ~~ THEN REPLY ~Talos~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("TALOS"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Lathander~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("LATHANDER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Helm~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("HELM"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Tempus~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("OHTEMPUS"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Tyr~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("OHTYR"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Never mind.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    
    ////////////////////DUAL TO FIGHTER//////////////////////////////////
    IF ~Class(LastTalkedToBy(Myself),FIGHTER)~ THEN BEGIN GelStartFighter
    SAY ~Do you want to change your Fighter Kit?~
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    IF ~!Class(LastTalkedToBy(Myself),MAGE) !Class(LastTalkedToBy(Myself),THIEF) !Class(LastTalkedToBy(Myself),DRUID) !Class(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelPickFighter
    OR(4)
    IF ~OriginalClass(LastTalkedToBy(Myself),MAGE)~ THEN REPLY ~Yes.~ GOTO GelFighterFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),THIEF)~ THEN REPLY ~Yes.~ GOTO GelFighterFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),DRUID)~ THEN REPLY ~Yes.~ GOTO GelFighterFirstKit
    IF ~OriginalClass(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelFighterFirstKit
    END
    
    IF ~~ THEN BEGIN GelFighterFirstKit
      SAY ~Do you also want to keep your first class kit bonuses, restrictions and abilities?~
      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 GelPickFighter
      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 GelPickFighter
      IF ~Kit(LastTalkedToBy(Myself),DIVINER)~ THEN REPLY ~Keep Diviner Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDev","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDevi",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
      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 GelPickFighter
      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 GelPickFighter
      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 GelPickFighter
      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 GelPickFighter
      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 GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),ASSASIN)~ THEN REPLY ~Keep Assassin Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAss","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),SHADOWDANCER)~ THEN REPLY ~Keep Shadowdancer Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSha","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),BOUNTY_HUNTER)~ THEN REPLY ~Keep Bounty Hunter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepBou","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),SWASHBUCKLER)~ THEN REPLY ~Keep Swashbuckler Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepSwa","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),TOTEMIC_DRUID)~ THEN REPLY ~Keep Totemic Druid Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTot","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),SHAPESHIFTER)~ THEN REPLY ~Keep Shapeshifter Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepShp","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
    IF ~Kit(LastTalkedToBy(Myself),BEAST_FRIEND)~ THEN REPLY ~Keep Avenger Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepAve","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
      IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickFighter
      END
    
    IF ~~ THEN BEGIN GelPickFighter
      SAY ~Choose your Fighter kit overlay~
      IF ~~ THEN REPLY ~Kensai~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("KENSAI"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Dwarven Defender~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("DWARVEN_DEFENDER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Berserker~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BERSERKER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Wizard Slayer~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("WIZARD_SLAYER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Barbarian~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BARBARIAN"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Never mind.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    
    ///////////////////////DUAL TO RANGER////////////////////////////////
    IF ~Class(LastTalkedToBy(Myself),RANGER)~ THEN BEGIN GelStartRanger
    SAY ~Do you want to change your Ranger Kit?~
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    IF ~OriginalClass(LastTalkedToBy(Myself),CLERIC)~ THEN REPLY ~Yes.~ GOTO GelRangerFirstKit
    END
    
    IF ~~ THEN BEGIN GelRangerFirstKit
      SAY ~Do you also want to keep your first class kit bonuses, restrictions and abilities?~
      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 GelPickRanger
      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 GelPickRanger
      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 GelPickRanger
      IF ~Kit(LastTalkedToBy(Myself),OHTEMPUS)~ THEN REPLY ~Keep Tempus Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTem","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickRanger
      IF ~Kit(LastTalkedToBy(Myself),OHTYR)~ THEN REPLY ~Keep Tyr Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepTyr","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickRanger
      IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickRanger
      END
    
    IF ~~ THEN BEGIN GelPickRanger
      SAY ~Choose your Ranger kit overlay~
      IF ~~ THEN REPLY ~Stalker~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("STALKER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~I want a the new Slinging Beastmaster~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("GelSling"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Never mind.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    
    //////////////////////////DUAL TO DRUID///////////////////////////////////
    IF ~Class(LastTalkedToBy(Myself),DRUID)~ THEN BEGIN GelStartDruid
    SAY ~Do you want to change your Druid Kit?~
    IF ~~ THEN REPLY ~No.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    IF ~OriginalClass(LastTalkedToBy(Myself),FIGHTER)~ THEN REPLY ~Yes.~ GOTO GelDruidFirstKit
    END
    
    IF ~~ THEN BEGIN GelDruidFirstKit
      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 GelPickDruid
    IF ~Kit(LastTalkedToBy(Myself),DWARVEN_DEFENDER)~ THEN REPLY ~Keep Dwarven Defender Kit specifications~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepDwD","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickDruid
      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 GelPickDruid
      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 GelPickDruid
      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 GelPickDruid
      IF ~~ THEN REPLY ~No, i want unkitted first class~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelKeepOrg","LOCALS",1)) ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastTalkedToBy(Myself)))~ GOTO GelPickDruid
      END
    
    IF ~~ THEN BEGIN GelPickDruid
      SAY ~Choose your Druid kit overlay~
      IF ~~ THEN REPLY ~Totemic Druid~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("TOTEMIC_DRUID"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Shapeshifter~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("SHAPESHIFTER"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Avenger~ DO ~ActionOverride(LastTalkedToBy(Myself),AddSuperKit("BEAST_FRIEND"))~ GOTO GelApplied
      IF ~~ THEN REPLY ~Never mind.~ DO ~ActionOverride(LastTalkedToBy(Myself),SetGlobal("GelTDia_Init","LOCALS",3))~ EXIT
    END
    

    At risk of losing my progress on this common PC, here is last updated progression of kit:
    The progress:
    Cleaning up faults.
    Finnishing more or all classess in both dual and multi script
    Updating to last code for creatures
    Solidify script, and add general factors such as:
    IF
      Global("GelKen1","LOCALS",23)
      OR(4)
      LevelGT(Myself,THIEF,23)
      LevelGT(Myself,CLERIC,23)
      LevelGT(Myself,MAGE,23)
      LevelGT(Myself,DRUID,23)
      !Kit(Myself,KENSAI)
    THEN
      RESPONSE #100
        ApplySpellRES("GelKen1",Myself) // Restrictions, Learn Kai, 2 bonus AC.
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        ApplySpellRES("GelKen5",Myself) // Learn Kai
        ApplySpellRES("GelKen4",Myself) // -1 speed factor
        ApplySpellRES("GelKen3",Myself) // +1thaco & damage
        SetGlobal("GelKen1","LOCALS",60)
    END
    
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    edited February 7
    I have gotten very far, progress not shown in topic yet.
    Done with Dual class, singleclass, Multiclass with exception of making the spells, and with exception of changing kit on any NPC.

    Trying to add the feature to change kits on Singleclas NPC:
    // GelKit1.BAF // No Need THIS...
    IF
      JoinParty(LastSummonerOf(Myself))
      GlobalObject("GelSKitItemGiven",LastSummonerOf(Myself),0)
      OR()
        Kit(LastSummonerOf(Myself),"SUN_SOUL"),
        Kit(LastSummonerOf(Myself),"DARK_MOON"),
        Kit(LastSummonerOf(Myself),"BLADE"),
        Kit(LastSummonerOf(Myself),"JESTER"),
        Kit(LastSummonerOf(Myself),"SKALD"),
        Kit(LastSummonerOf(Myself),"INQUISITOR"),
        Kit(LastSummonerOf(Myself),"CAVALIER"),
        Kit(LastSummonerOf(Myself),"BLACKGUARD"),
        Kit(LastSummonerOf(Myself),"KENSAI"),
        Kit(LastSummonerOf(Myself),"DWARVEN_DEFENDER"),
        Kit(LastSummonerOf(Myself),"BARBARIAN"),
        Kit(LastSummonerOf(Myself),"BERSERKER"),
        Kit(LastSummonerOf(Myself),"WIZARD_SLAYER"),
        Kit(LastSummonerOf(Myself),"FERALAN"),
        Kit(LastSummonerOf(Myself),"BEASTMASTER"),
        Kit(LastSummonerOf(Myself),"STALKER"),
        Kit(LastSummonerOf(Myself),"DIVINER"),
        Kit(LastSummonerOf(Myself),"ABJURER"),
        Kit(LastSummonerOf(Myself),"ENCHANTER"),
        Kit(LastSummonerOf(Myself),"CONJURER"),
        Kit(LastSummonerOf(Myself),"INVOKER"),
        Kit(LastSummonerOf(Myself),"NECROMANCER"),
        Kit(LastSummonerOf(Myself),"TRANSMUTER")
    THEN
      RESPONSE #100
        GiveItem(LastSummonerOf(Myself),"GelSKit",1)
        ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitItemGiven","LOCALS",1))
    END
    
    // Når item brukes, starter dialog
    IF
      ItemUsed("GelSKit")
    THEN
      RESPONSE #100
        StartDialogNoSet(LastSummonerOf(Myself))
        DestroyItem("GelKit1")
        ActionOverride(LastSummonerOf(Myself,SetGlobal("GelSKitItemGiven","LOCALS",2)) // mark done
    END
    

    GelTDia.baf:
    IF
        OnCreation()
        IsPlayer(LastSummonerOf(Myself)) 
        GlobalObject("GelTDia_Init",LastSummonerOf(Myself),0)
    THEN
        RESPONSE #100
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",1))
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",2))
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",1))
    END
    
    // Removed if not first.///
    IF
      OnCreation()
      GlobalObject("GelTDia_Init",LastSummonerOf(Myself),0)
    THEN
      RESPONSE #100
         DestroySelf()
    END
    
    // Starts dialog
    IF
        GlobalObject("GelTDia_Init",LastSummonerOf(Myself),1)
        Exists(LastSummonerOf(Myself))
        InParty(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
            ClearAllActions()
            StartDialogNoSet(LastSummonerOf(Myself))
            ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",2))
    END
    
    //  Safeguard if dead
    IF
        GlobalObject("GelTDia_Init",LastSummonerOf(Myself),1)
        !Exists(LastSummonerOf(Myself))
    THEN
        RESPONSE #100
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",0)) 
           DestroySelf() 
    END
    
    IF
        GlobalObject("GelTDia_Init",LastSummonerOf(Myself),3)
    THEN
        RESPONSE #100
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",0))
           ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",0))
           DestroySelf()
    END
    
    IF
        OnCreation()
        !IsPlayer(LastSummonerOf(Myself)) 
    
    THEN
        RESPONSE #100
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDia_Init","LOCALS",0)) 
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelKitClaimed","LOCALS",0)) 
          ActionOverride(LastSummonerOf(Myself),SetGlobal("GelTDiaActive","LOCALS",0)) 
    END
    

    Hmm TP2 adds:
    EXTEND_TOP ~Xzar.bcs~ ~MyMod/Scripts/GelDual.baf~
    EXTEND_TOP ~Montaron.bcs~ ~MyMod/Scripts/GelMult.baf~
    EXTEND_TOP ~Rasaad.bcs~ ~MyMod/Scripts/GelSing.baf~

    Adding bottom of all them new scripts(GelDual.baf, GelMult.baf, GelSing.baf, GelKit1.baf) :
    IF
      Global("GelJoinParty","LOCALS",0)
      JoinParty()
    THEN
      RESPONSE# 100
        SetGlobal("GelJoinParty","LOCALS",1)
        ReallyForceSpellRES("GelNDia",Myself) // Summons GelNDia.cre
    END
    
    IF
      Global("GelJoinParty","LOCALS",1)
    THEN
      RESPONSE# 100
        SetGlobal("GelJoinParty","LOCALS",99)
    END
    

    GelNDia.cre uses same dialog as GelTDia.cre, but without any:
    ActionOverride(LastTalkedToBy(Myself),ReallyForceSpellRES("GelDual",LastSummonerOf(Myself)))
    Will only set the globals for level/kit tracking.
    But i Need to add for already Kitted NPC's in GelNDia:
    IF
      ~Class(LastTalkedToBy(Myself),FIGHTER)
      !Class(LastTalkedToBy(Myself),MAGE)
      !Class(LastTalkedToBy(Myself),THIEF)
      !Class(LastTalkedToBy(Myself),CLERIC)
      OR(5)
      Kit(LastTalkedToBy(Myself),KENSAI)
      Kit(LastTalkedToBy(Myself),DWARVEN_DEFENDER)
      Kit(LastTalkedToBy(Myself),WIZARD_SLAYER)
      Kit(LastTalkedToBy(Myself),BERSERKER)
      Kit(LastTalkedToBy(Myself),BARBARIAN)~ THEN BEGIN GelKittedSingle
    IF ~Kit(LastTalkedToBy(Myself),KENSAI)~ THEN REPLY ~I want to change kit on my Kensai~ GOTO GelPickSingle
    Then same for all singleclasses.
    
    Post edited by Gel87 on
  • Gel87Gel87 Member Posts: 387
    Okay HUGE updates. Now implemented NPCs correct, or at least closing in on it. (Going to Add to their scripts for the functions)
    Not done, this is as far as i came in the evenings after workhours while stuck on work :P
  • jmerryjmerry Member Posts: 4,192
    edited February 13
    Fundamental structural issue: none of the standard thief kits work properly in a multiclass, and there's nothing you can do about it. If you're just assigning standard kits, all of them have class features that rely on reading tables that the multiclass just doesn't. (Well, it reads those tables, but it reads the data for the multiclass rather than the data for the kit)

    Some of these issues might be solvable by creating proper multiclass kits. You are not doing anything of the sort.

    Thief kits do work properly in a dual class, either before or after. I quite like how a Fighter -> Assassin plays.

    Assassin/X:
    - Gets 25 skill points per level. No disadvantage compared to basic thief/X.

    Bounty Hunter/X:
    - Gets 25 skill points per level. No disadvantage compared to basic thief/X.

    Swashbuckler/X:
    - Can't go beyond one dot in any proficiency unless the other class is Fighter.
    - Chooses from standard thief HLAs rather than the modified Swashbuckler list.
    - Gets full backstab modifier. No disadvantage compared to basic thief/X.

    Shadowdancer/X:
    - Gets 25 skill points per level.
    - Can waste skill points in Set Traps (no uses of Set Snare to use them with).
    - Gets full backstab multiplier.
  • Gel87Gel87 Member Posts: 387
    edited February 15
    jmerry wrote: »
    Fundamental structural issue: none of the standard thief kits work properly in a multiclass, and there's nothing you can do about it. If you're just assigning standard kits, all of them have class features that rely on reading tables that the multiclass just doesn't. (Well, it reads those tables, but it reads the data for the multiclass rather than the data for the kit)

    Some of these issues might be solvable by creating proper multiclass kits. You are not doing anything of the sort.

    Thief kits do work properly in a dual class, either before or after. I quite like how a Fighter -> Assassin plays.

    Assassin/X:
    - Gets 25 skill points per level. No disadvantage compared to basic thief/X.

    Bounty Hunter/X:
    - Gets 25 skill points per level. No disadvantage compared to basic thief/X.

    Swashbuckler/X:
    - Can't go beyond one dot in any proficiency unless the other class is Fighter.
    - Chooses from standard thief HLAs rather than the modified Swashbuckler list.
    - Gets full backstab modifier. No disadvantage compared to basic thief/X.

    Shadowdancer/X:
    - Gets 25 skill points per level.
    - Can waste skill points in Set Traps (no uses of Set Snare to use them with).
    - Gets full backstab multiplier.

    I have solved many of theese issues:
    There are 2 different dialog scripts, 2 different invisible creatures.
    If summoner is Player, then GelNDia will destroy itself upon OnCreation().
    If summoner is !Player, then GelTDia will destroy itself upon OnCreation().
    If more than 1 relevant creature is summoned, the 2nd one will Destroy itself.
    GelDual.baf is Append_Top to every Sinlge or Dual class NPC script/bcs.
    GelDual.baf is given to player via spell casted via dialog to every single or dual class.
    GelMulti.baf is Append_Top to every Multiclass NPC script/bcs.
    GelMulti.Baf is given to player via spell casted via dialog to multiclass characters.

    Summoning of GelTDia and GelNDia is assigned to very none kitted class in clab. Not in any kitted class. And not for shaman.

    1. Assassin/X. (Dual'ed function):
    You are an assassin. This can happen 2 ways. You change ur kit with AddSuperKit dialog function, or you start out as assassin or the NPC is an assassin by default. Then you dual to another class. The new class is a none kitted one and GelNDia or GelTDia will be summoned via lvl 1 clab and start dialog. You are now asked if you want to change kit on ur new class. And you will also be asked if you want to keep your first class kit. Keep assassin or not keep kit will be the only 2 choices. Since you already clicked yes you will have to change kit on second class, and this will override the assassin kit as engine only accept 1 kit. You will loose every assassin specifications and abilities with it, the assassin text will disspear as well. But since you set the GelKeepAss local on ur character, it has already tracked your level and a final ("GelAss1","LOCALS",X) has been set to know which kit and level you where.
    Once ur next class is 1 level higher than the GelAss1 local the appropiate spell packages will be casted on urself. It includes any relevant restriction, bonuses, abilities etc. And since ur a dual the correct HLA table will be given(the one for ur second class).
    Thieving skill has been nerfed correctly as you where a true assassin before dual.

    2. Assassin/X (Multiclass):
    This is different. Here locals will trigger each level, and give that 1 or 2 relevant features the kit has each time. Its a progressional setup instead of a once cast spellpack. The kit is only simulated with spell, but restrictions, bonuses and abilities are included.(Alignment is not, because i wanted a more free system).
    You are here very correct that the thieving skill will be gained as normal thief, I could however fake nerf it by removing 10% to hide in shadows each level with a spell. The same goes for Bounty hunter. Im not assigning true kits as multiclass, im faking everything via scripts and spells and tracking with global values and level and class checks.

    3. Swashbuckler:
    The -4 to backstab multiplier is already in its base kit spell which are forced upon him. It will keep it at 1 multiplier forever, unless testing shows that they can infact go negative, where i have to assign it at appropiate levels instead. Yes it chooses from standard thief HLA, however wirlwind can be assigned, assassiniation can be removed. The main idea here is a good readme file.
    Yes its not perfect, but it allows more builds. Some which may be op, some which may be weak.
    However, the global values already ensure a few kit specific HLA's like Maze Trap etc is given at level 25 for shadowdancer, then Shadow twin at level 27 and then Shadow form at 29, but theese are asked for in dialog.
    I can fake specialization by giving: 1 thaco, 2 damage extra. Not 100% the same, its an upgrade though.

    4. Shadowdancer, i can cast a spell every level on multiclasses and remove 10% hide in shadows. It will be 10% wasted points each time, and act as the same nerf more or less. Shadowdancer already has -1 to backstab multiplier in kit specification spell casted in level 1. Maby i have not read good enought on him, did not even know he could'nt use traps :P But i can add:
    // GelDual
    IF
      GlobalGT("GelKeepSha","LOCALS",0)
      !GlobalGT("GelKeepSupT","LOCALS",0)
      OR(4)
        HasSpell("SPCL412")
        HasSpell("SPCL910")
        HasSpell("SPCL911")
        HasSpell("SPCL912")
    THEN
      RESPONSE #100
        ReallyForceSpellRES("GelTrapR",Myself) // RemoveSpell(the traps)
    END
    
    // GelMult
    IF
      GlobalGT("GelMultiSha","LOCALS",0)
      !GlobalGT("GelSuperThiefP","LOCALS",0)
      OR(4)
        HasSpell("SPCL412")
        HasSpell("SPCL910")
        HasSpell("SPCL911")
        HasSpell("SPCL912")
    THEN
      RESPONSE #100
        ReallyForceSpellRES("GelTrapR",Myself) // RemoveSpell(the traps)
    END
    

    It wont prevent people from choosing HLA TRAPS, but it will remove them.
    Its the same way I remove the regular shapeshift spell for the druid kits used in multiclasses or when keeping kit in dual class.. (not that people tend to dual FROM druid.. But i leave the choice.)

    But my main issue now is:
    Adding save penalty to the mage schools via spell/eff... (Hopefully fixed this with a Cast Spell on condition, with proximity / per round)

    The latest version, with how far i come per now is uploaded in post.

    Edit: For myself:
    Thief = 25 skillpoints per level (30 lvl 1)
    Shadowdancer = 20 skillpoints per level(30 lvl 1)
    Assassin = 15 skillpoints per level (30 lvl 1)
    Bounty Hunter = 20 skillpoints per level(30 lvl 1)
    Swashbuckler = Same as regular thief.

    The Hide in plain sight for "none true shadowdancer kits" are done by script and a simple blind and local value in spell.

    The stalkers backstab is also faked when in multiclass or in "GelkeepSta" form aka, when the kit is not SET by AddSuperKit.
    Scripted to cast a spell with 20, 40, 60 damage bonus (level 1, 9, 17).
    Post edited by Gel87 on
Sign In or Register to comment.