MOD - Change Base Thief kit to kitted thief.
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:
GelTDia.D:
GelThiefKitChange.tp2:
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
0
Comments
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.
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 ENDGelkenz.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.
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
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 ENDBCS 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",60) Global("GelKeepKen","LOCALS",1) THEN RESPONSE #100 SetGlobal("GelKeepKen","LOCALS",2) ENDIF ~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. ENDThis 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. ENDOkay, 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