BACKUP ~TDD/backup~

AUTHOR ~Max and Minto, Horred The Plague (WeiDU), King Diamond (WeiDU revision), Hoppy (Further updates)~ NO_IF_EVAL_BUG

VERSION ~v1.14~

AUTO_TRA ~TDD/Language/%s~

LANGUAGE ~English~
         ~English~
         ~TDD/Language/English/setup.tra~
         ~TDD/Language/English/tp2.tra~

LANGUAGE ~Russian(aerie-ru)~
         ~Russian~
         ~TDD/Language/Russian/setup.tra~
         ~TDD/Language/Russian/tp2.tra~

LANGUAGE ~Polish(by SoM, part of CoB Clan, in co-operation with TB Team)~
         ~Polish~
         ~TDD/Language/Polish/setup.tra~
         ~TDD/Language/Polish/tp2.tra~

LANGUAGE ~German(Leonardo Watson)~
         ~German~
         ~TDD/Language/German/setup.tra~
         ~TDD/Language/German/tp2.tra~

LANGUAGE ~Francais(Isaya)~
         ~French~
         ~TDD/Language/French/setup.tra~
         ~TDD/Language/French/tp2.tra~

LANGUAGE ~Italian(ilot)~
         ~Italian~
         ~TDD/Language/Italian/setup.tra~
         ~TDD/Language/Italian/tp2.tra~
         
LANGUAGE ~Spanish(Clan REO)~
         ~Spanish~
         ~TDD/Language/Spanish/setup.tra~
         ~TDD/Language/Spanish/tp2.tra~


BEGIN @20000

//*****************************************************************************************
//*** GUI Switcher
//*****************************************************************************************
PRINT @20001

<<<<<<<< new_gui_switcher.tp2
BACKUP ~GUI_Mods/Backup~
AUTHOR ~King Diamond~

>>>>>>>>
<<<<<<<< GUI_Mods.2DA
NEXT_AVAILABLE_MOD_SLOT      1
CURRENT_ACTIVE_MOD_GUI       0
RESERVED2                    -1
RESERVED3                    -1
RESERVED4                    -1
RESERVED5                    -1
RESERVED6                    -1
RESERVED7                    -1
RESERVED8                    -1
RESERVED9                    -1
>>>>>>>>
<<<<<<<< orig_gui.tp2
//***********************************************************************************
BEGIN ~"Original SoA/ToB"~
SUBCOMPONENT ~Game Graphical User Interface (GUI)~

COPY_EXISTING ~GUI_Mods/GUI_Mods.2DA~ ~GUI_Mods~
 SET_2DA_ENTRY  1 1 2    0   //CURRENT_ACTIVE_MOD_GUI
AT_EXIT ~Setup-GUI.exe --uninstall~

>>>>>>>>
<<<<<<<< mod_gui.tp2
//***********************************************************************************
BEGIN ~"The Darkest Day"~
SUBCOMPONENT ~Game Graphical User Interface (GUI)~

COPY_EXISTING ~GUI_Mods/GUI_Mods.2DA~ ~GUI_Mods~
 SET_2DA_ENTRY  1 1 2   "%gui_slot_name%"  //CURRENT_ACTIVE_MOD_GUI
COPY ~GUI_Mods/%gui_slot_name%~  ~override~

>>>>>>>>

ACTION_IF NOT FILE_EXISTS ~Setup-GUI.tp2~
THEN BEGIN
  MKDIR ~GUI_Mods~
  COPY ~Setup-TDD.exe~ ~Setup-GUI.exe~
  COPY ~GUI_Mods.2DA~ ~GUI_Mods/GUI_Mods.2DA~
  COPY ~new_gui_switcher.tp2~ ~Setup-GUI.tp2~
   APPEND_FILE ~orig_gui.tp2~
END
ELSE BEGIN
  COPY_EXISTING - ~GUI_Mods/GUI_Mods.2DA~ ~GUI_Mods~
   READ_2DA_ENTRY 1 1 2 "active_gui"   //CURRENT_ACTIVE_MOD_GUI

  ACTION_IF ("%active_gui%">0) THEN BEGIN
    UNINSTALL ~Setup-GUI.tp2~ ~%active_gui%~
  END
END

OUTER_SET gui_slot_name=0
COPY_EXISTING ~GUI_Mods/GUI_Mods.2DA~ ~GUI_Mods~
 READ_2DA_ENTRY 0 1 2 gui_slot_name
 SET_2DA_ENTRY  0 1 2 gui_slot_name+1  //NEXT_AVAILABLE_MOD_SLOT

COPY_EXISTING ~Setup-GUI.tp2~ ~Setup-GUI.tp2~
 APPEND_FILE_EVALUATE ~mod_gui.tp2~

MKDIR ~GUI_Mods/%gui_slot_name%~
COPY ~TDD/gui~ ~GUI_Mods/%gui_slot_name%~
//*****************************************************************************************
//*****************************************************************************************
REQUIRE_FILE ~BG2FIXPACK/SETUP-BG2FIXPACK.TP2~ ~Please install the Gibberlings3 BG2 Fixpack Core Fixes before The Darkest Day~
COPY + ~Setup-TDD.exe~ ~WeiDU.exe~

COPY + ~chitin.key~ ~TDD/chitin.tdd~
COPY_LARGE + ~dialog.tlk~ ~TDD/dialog.tdd~
MKDIR ~TDD/over.bak~
COPY_LARGE + ~override~ ~TDD/over.bak~
MKDIR ~TDD-ARE~
MKDIR ~TDD-BCS~
MKDIR ~TDD-BAM~
MKDIR ~TDD-CRE~
MKDIR ~TDD-DLG~
MKDIR ~TDD-ITM~
MKDIR ~TDD-MOS~
MKDIR ~TDD-RULE~
MKDIR ~TDD-SPL~
MKDIR ~TDD-TIS1~
MKDIR ~TDD-TIS2~
MKDIR ~TDD-TIS3~
MKDIR ~TDD-TIS4~
MKDIR ~TDD-WAV~
MKDIR ~DLGCASH~

COPY ~TDD/SFX~  ~override~   //to overwrite files there!!!
COPY ~TDD/RULE~ ~override~   //to overwrite files there!!!
COPY ~TDD/BAM~  ~override~   //to overwrite files there!!!
COPY ~TDD/MOS~  ~override~   //to overwrite files there!!!
COPY ~TDD/WED~  ~override~   //to overwrite files there!!!
COPY ~TDD/BMP~  ~override~   //to overwrite files there!!!



//Substitute the SoA button prompt string  ************************************
COPY_EXISTING + ~TDD/title.tr~ ~TDD/title.tra~
 SPRINT bgt " "
 SPRINT tdd ""
 SPRINT sos ""
 SPRINT ts  ""
 SPRINT nej ""
 SPRINT ctb ""
 SPRINT bp  ""
 SPRINT rot  ""
 SPRINT separator ""
 PATCH_IF (FILE_EXISTS ~data/BG1ARE.BIF~) BEGIN
   SPRINT bgt @20003
 END
 PATCH_IF (FILE_EXISTS ~data/TS-RULE.BIF~) BEGIN
   SPRINT ts @20004
   SPRINT separator ", "
 END
 SPRINT tdd @20005
 SPRINT separator ", "
 SPRINT separator2 @20006
 PATCH_IF (FILE_EXISTS ~data/SoS-RULE.BIF~) BEGIN
   SPRINT sos @20007
   SPRINT separator ", "
 END
 PATCH_IF ((FILE_EXISTS_IN_GAME ~Bag02NeJ.ITM~) OR (FILE_EXISTS_IN_GAME ~EyeBite.itm~)) BEGIN
   SPRINT nej @20008
   SPRINT separator ", "
 END
 PATCH_IF (FILE_EXISTS ~data/BP-RULE.BIF~) BEGIN
   SPRINT bp @20009
   SPRINT separator ", "
 END
 PATCH_IF (FILE_EXISTS ~data/CTB-RULE.BIF~) BEGIN
   SPRINT ctb @20010
   SPRINT separator ", "
 END
 PATCH_IF (FILE_EXISTS ~data/ROT-RULE.BIF~) BEGIN
   SPRINT rot @200101
   SPRINT separator ", "
 END
 SPRINT str @20011
 REPLACE_TEXTUALLY ~game prompt~ "%str%"

 STRING_SET ~73245~ @123456789 USING ~TDD/title.tra~
///////////////////////////////////////////////////////////////////////////////


//**************************************************
//  Animation compatibility
//**************************************************
PRINT @20102

ACTION_IF NOT FILE_EXISTS ~data/ROT-RULE.BIF~     // Compatibility with RoT
THEN BEGIN
  COPY ~TDD/Compat/anim/MCYC~ ~override~          //CYCLOP
  COPY ~TDD/Compat/anim/MTAN~ ~override~          //MERILITH graphics
  COPY ~TDD/Compat/anim/MNO2~ ~override~          //FROST GIANT

  COPY_EXISTING ~ORC06.cre~          ~override~
                ~HLOLAF.cre~         ~override~
                ~CHAK.cre~           ~override~
                ~AR18FIG.cre~        ~override~
   WRITE_LONG 0x28  0xE700   //IC_OROG1 instead of IC_OROG2
  BUT_ONLY_IF_IT_CHANGES
  
  ACTION_IF (FILE_EXISTS_IN_GAME ~ULIGAR.CRE~) THEN BEGIN
   COPY_EXISTING ~ULIGAR.CRE~        ~override~    //NeJ2
    WRITE_LONG 0x28  0xE700   //IC_OROG1 instead of IC_OROG2
   BUT_ONLY_IF_IT_CHANGES
  END
END


COPY ~TDD/CRE/CYC01.cre~            ~TDD-CRE~  //CYCLOP
     ~TDD/CRE/CYCCALI1.cre~         ~TDD-CRE~
     ~TDD/CRE/CYCCALI2.cre~         ~TDD-CRE~
     ~TDD/CRE/CYCCALI3.cre~         ~TDD-CRE~
  SAY NAME1 @20222
  SAY NAME2 @20222
  WRITE_LONG 0x28 0xE000   //IC_CYCLOP


COPY ~TDD/CRE/EASTGOL1.cre~         ~TDD-CRE~ //Iron Golem
     ~TDD/CRE/EASTGOL2.cre~         ~TDD-CRE~
  SAY NAME1 @20307
  SAY NAME2 @20307
  WRITE_LONG 0x28 0x7F04   //GOLEM_IRON

COPY ~TDD/CRE/IRONTOMB.cre~         ~TDD-CRE~ //Iron Golem
  SAY NAME1 @20329
  SAY NAME2 @20329
  WRITE_LONG 0x28 0x7F04   //GOLEM_IRON


COPY ~TDD/CRE/DDFROST1.cre~         ~TDD-CRE~  //FROST GIANT
     ~TDD/CRE/FROST01.cre~          ~TDD-CRE~
     ~TDD/CRE/HILLFRO1.cre~         ~TDD-CRE~
     ~TDD/CRE/HILLFRO2.cre~         ~TDD-CRE~
     ~TDD/CRE/HILLFRO3.cre~         ~TDD-CRE~
  SAY NAME1 @20240
  SAY NAME2 @20240
  WRITE_LONG 0x28  0xE710   //IC_OROG2

COPY ~TDD/CRE/KNORD.cre~            ~TDD-CRE~
  SAY NAME1 @20335
  SAY NAME2 @20335
  WRITE_LONG 0x28  0xE710   //IC_OROG2


//**************************************************
//  WORLDMAP
//**************************************************
PRINT @20012

ACTION_IF FILE_EXISTS ~Worldmap/map_mods_areas.tbl~ THEN BEGIN
  COPY ~Worldmap/map_mods_areas.tbl~  ~Worldmap~
   APPEND_FILE ~TDD/Worldmap/areas.tbl~

  COPY ~Worldmap/map_mods_links.tbl~  ~Worldmap~
   APPEND_FILE ~TDD/Worldmap/links.tbl~
   PATCH_IF (FILE_EXISTS ~data/SoS-RULE.BIF~) BEGIN
     APPEND_FILE ~TDD/Worldmap/sos_links.tbl~
   END
   PATCH_IF (FILE_EXISTS ~data/ROT-RULE.BIF~) BEGIN
     APPEND_FILE ~TDD/Worldmap/rot_links.tbl~
   END
   PATCH_IF (FILE_EXISTS ~data/CTB-RULE.BIF~) BEGIN
     APPEND_FILE ~TDD/Worldmap/ctb_links.tbl~
   END

  //preliminary step - making LANGUAGE temporary file until the new WeiDU
  COPY - ~TDD/Worldmap/%LANGUAGE%/worldmap.tra~  ~tmp_worldmap.tra~
  COPY ~Worldmap/map_mods_trans.tra~  ~Worldmap~
   APPEND_FILE ~tmp_worldmap.tra~
END
ELSE BEGIN
  MKDIR ~Worldmap~
  COPY ~TDD/Worldmap/areas.tbl~ ~Worldmap/map_mods_areas.tbl~
  COPY ~TDD/Worldmap/links.tbl~ ~Worldmap/map_mods_links.tbl~
  COPY ~TDD/Worldmap/%LANGUAGE%/worldmap.tra~ ~Worldmap/map_mods_trans.tra~
END


////////////
//RULESETS//
////////////
PRINT @20025

ACTION_IF (NOT FILE_EXISTS ~data/ROT-RULE.BIF~) AND (NOT FILE_EXISTS_IN_GAME ~BPBAG04.ITM~) THEN BEGIN

PRINT ~Applying Level-50 Ruleset...~

COPY_EXISTING ~BACKSTAB.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   INNER_ACTION BEGIN
     APPEND_COL ~BACKSTAB.2da~ ~9999 9999 %cnt% 5555~
     COPY_EXISTING + ~BACKSTAB.2da~ ~override~
      EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING + ~BACKSTAB.2da~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~
 REPLACE_TEXTUALLY ~5555~    ~ 5~


COPY_EXISTING ~CLABBA02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=45 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABBA02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL521gggg GA_SPCL522gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABBA02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABBA02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABBA02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABDR02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABDR02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL621gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABDR02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABDR02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABDR02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABFI02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=45 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 GA_SPCL321gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABFI03.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI03.2DA~ ~9999 9999 kkkk 9999 9999 9999 kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABFI03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt=41 OR cnt=43 OR cnt=47 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI03.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL131gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
    PATCH_IF( cnt=45 ) THEN BEGIN
      INNER_ACTION BEGIN
        APPEND_COL ~CLABFI03.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL131gggg AP_SPCL131gggg 7777 7777 7777 7777~
        COPY_EXISTING + ~CLABFI03.2DA~ ~override~
         EVALUATE_BUFFER
      END
    END
    ELSE BEGIN
      INNER_ACTION BEGIN
        APPEND_COL ~CLABFI03.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL131gggg AP_SPCL131gggg AP_SPCL819gggg 7777 7777 7777~
        COPY_EXISTING + ~CLABFI03.2DA~ ~override~
         EVALUATE_BUFFER
      END
    END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABFI04.2DA~ ~override~
 COUNT_2DA_ROWS 41 "value"      //special patch - restoring missing 40th column entry in the 1st row of the original 2DA
 PATCH_IF( value=5 ) THEN BEGIN
   SET_2DA_ENTRY 1 39 40 "****        ****"
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~CLABFI04.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI04.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL141gggg GA_SPCL144gggg AP_SPCL143gggg 7777 7777 7777~
       COPY_EXISTING + ~CLABFI04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=44 OR cnt=47 OR cnt=50 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI04.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL141gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=45 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 GA_SPCL144gggg AP_SPCL143gggg 7777 7777 7777~
       COPY_EXISTING + ~CLABFI04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABFI05.2DA~ ~override~
 COUNT_2DA_ROWS 41 "value41"      //special patch - deleting extra column entries in the 1st row of the original 2DA
 COUNT_2DA_ROWS 50 "value50"
 PATCH_IF( value41=6 AND value50=1 ) THEN BEGIN
   SET_2DA_ENTRY 0 40 50 "kkk"
   SET_2DA_ENTRY 0 41 50 "mmm"
   SET_2DA_ENTRY 0 42 50 "mmm"
   SET_2DA_ENTRY 0 43 50 "mmm"
   SET_2DA_ENTRY 0 44 50 "mmm"
   SET_2DA_ENTRY 0 45 50 "mmm"
   SET_2DA_ENTRY 0 46 50 "mmm"
   SET_2DA_ENTRY 0 47 50 "mmm"
   SET_2DA_ENTRY 0 48 50 "mmm"
   SET_2DA_ENTRY 0 49 50 "mmm"
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING + ~CLABFI05.2DA~ ~override~
 REPLACE_TEXTUALLY ~kkk        ~    ~****~
 REPLACE_TEXTUALLY ~mmm        ~    ~~
 REPLACE_TEXTUALLY ~mmm~    ~~

COPY_EXISTING ~CLABFI05.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=45 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI05.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL152gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI05.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABFI05.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABFI05.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABMO01.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABMO01.2DA~ ~9999 9999 kkkk kkkk 9999 kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABMO01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt=41 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABMO01.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL811gggg 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABMO01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=45 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABMO01.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL811gggg AP_SPCL813gggg 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABMO01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=50 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABMO01.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 AP_SPCL813gggg 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABMO01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABMO01.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABMO01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPA01.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPA01.2DA~ ~9999 9999 kkkk 9999 9999 kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABPA01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
     APPEND_COL ~CLABPA01.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL212gggg GA_SPCL213gggg 7777 7777 7777 7777~
     COPY_EXISTING + ~CLABPA01.2DA~ ~override~
      EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPA02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPA02.2DA~ ~9999 9999 kkkk 9999 9999 9999 kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABPA02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
     APPEND_COL ~CLABPA02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL212gggg GA_SPCL213gggg GA_SPCL222gggg 7777 7777 7777 7777 7777~
     COPY_EXISTING + ~CLABPA02.2DA~ ~override~
      EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPA03.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPA03.2DA~ ~9999 9999 kkkk 9999 9999 kkkk kkkk kkkk kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABPA03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
     APPEND_COL ~CLABPA03.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL212gggg GA_SPCL213gggg 7777 7777 7777 7777 7777 7777 7777 7777~
     COPY_EXISTING + ~CLABPA03.2DA~ ~override~
      EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPA04.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPA04.2DA~ ~9999 9999 kkkk 9999 9999 kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABPA04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
     APPEND_COL ~CLABPA04.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL212gggg GA_SPCL213gggg 7777 7777 7777 7777 7777~
     COPY_EXISTING + ~CLABPA04.2DA~ ~override~
      EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPR02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL721gggg GA_SPCL722gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL722gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPR03.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR03.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL731gggg GA_SPCL732gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR03.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL732gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR03.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABPR04.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR04.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL741gggg GA_SPCL742gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR04.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL742gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABPR04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABPR04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABRN01.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=43 OR cnt=45 OR cnt=47 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN01.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL311gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN01.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABRN03.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=43 OR cnt=45 OR cnt=47 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN03.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL311gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN03.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABRN04.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=43 OR cnt=45 OR cnt=47 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN04.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL311gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABRN04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABRN04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABTH01.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH01.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL412gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH01.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH01.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABTH02.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=45 OR cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH02.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL423gggg 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=42 OR cnt=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 GA_SPCL412gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH02.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH02.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABTH03.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=41 OR cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH03.2DA~ ~9999 9999 gggg%cnt%mmmm GA_SPCL412gggg GA_SPCL414gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH03.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH03.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~CLABTH04.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1

 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH04.2DA~ ~9999 9999 kkkk 9999 9999 kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~CLABTH04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt=41 OR cnt=46 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 GA_SPCL412gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=45 OR cnt=50 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH04.2DA~ ~9999 9999 gggg%cnt%mmmm AP_SPCL141gggg AP_SPCL441gggg 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~CLABTH04.2DA~ ~9999 9999 gggg%cnt%mmmm 7777 7777 7777 7777 7777 7777~
       COPY_EXISTING + ~CLABTH04.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING + ~CLABBA02.2DA~ ~override~
                ~CLABDR02.2DA~ ~override~
                ~CLABFI02.2DA~ ~override~
                ~CLABFI03.2DA~ ~override~
                ~CLABFI04.2DA~ ~override~
                ~CLABFI05.2DA~ ~override~
                ~CLABMO01.2DA~ ~override~
                ~CLABPA01.2DA~ ~override~
                ~CLABPA02.2DA~ ~override~
                ~CLABPA03.2DA~ ~override~
                ~CLABPA04.2DA~ ~override~
                ~CLABPR02.2DA~ ~override~
                ~CLABPR03.2DA~ ~override~
                ~CLABPR04.2DA~ ~override~
                ~CLABRN01.2DA~ ~override~
                ~CLABRN03.2DA~ ~override~
                ~CLABRN04.2DA~ ~override~
                ~CLABTH01.2DA~ ~override~
                ~CLABTH02.2DA~ ~override~
                ~CLABTH03.2DA~ ~override~
                ~CLABTH04.2DA~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~
 REPLACE_TEXTUALLY ~gggg~    ~  ~
 REPLACE_TEXTUALLY ~kkkk~    ~      ~
 REPLACE_TEXTUALLY ~mmmm~    ~        ~
 REPLACE_TEXTUALLY ~7777~    ~****        ~


COPY_EXISTING ~HPMONK.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~HPMONK.2DA~ ~%cnt%  8       0       2~
       COPY_EXISTING + ~HPMONK.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~HPPRS.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~HPPRS.2DA~ ~%cnt%  8       0       2~
       COPY_EXISTING + ~HPPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~HPROG.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~HPROG.2DA~ ~%cnt%  6       0       2~
       COPY_EXISTING + ~HPROG.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~HPWAR.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~HPWAR.2DA~ ~%cnt%  10      0       3~
       COPY_EXISTING + ~HPWAR.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~HPWIZ.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~HPWIZ.2DA~ ~%cnt%  4       0       1~
       COPY_EXISTING + ~HPWIZ.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~LAYHANDS.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">=1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     SET cnt2 = cnt*2
     INNER_ACTION BEGIN
       APPEND_COL ~LAYHANDS.2DA~ ~9999 9999 %cnt% %cnt2%~
       COPY_EXISTING + ~LAYHANDS.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES
COPY_EXISTING + ~LAYHANDS.2DA~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~


COPY_EXISTING ~LVLMODWM.2DA~ ~override~
 COUNT_2DA_ROWS 21 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
     INNER_ACTION BEGIN
       APPEND ~LVLMODWM.2DA~ ~%cnt%      -5  -4  -4  -3  -3  -2  -2  -1  -1  0   0   1   1   2   2   3   3   4   4   5~
       COPY_EXISTING + ~LVLMODWM.2DA~ ~override~
        EVALUATE_BUFFER
     END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~MXSPLDRU.2DA~ ~override~
 COUNT_2DA_ROWS 8 "rows"
 FOR(cnt=14; cnt<="%rows%"; cnt=cnt+1) BEGIN  //15-40 levels
   PATCH_IF( cnt=14 ) THEN BEGIN
     SET_2DA_ENTRY cnt 5 8 4
     SET_2DA_ENTRY cnt 6 8 2
     SET_2DA_ENTRY cnt 7 8 1
   END
   PATCH_IF( cnt=15 ) THEN BEGIN
     SET_2DA_ENTRY cnt 2 8 6
     SET_2DA_ENTRY cnt 3 8 6
     SET_2DA_ENTRY cnt 5 8 4
     SET_2DA_ENTRY cnt 6 8 3
     SET_2DA_ENTRY cnt 7 8 1
   END
   PATCH_IF( cnt=16 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 7
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 6
     SET_2DA_ENTRY cnt 5 8 5
     SET_2DA_ENTRY cnt 6 8 3
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=17 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 7
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 6
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 4
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=18 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 4
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=19 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 5
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 7
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=24 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 7
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=32 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=33 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=34 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=35 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=36 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=37 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=38 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
   PATCH_IF( cnt=39 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
   PATCH_IF( cnt=40 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 10
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MXSPLDRU.2DA~ ~override~
 COUNT_2DA_ROWS 8 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  10  10  10  10  9   8~
   END
   PATCH_IF( cnt=42 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  10  10  9   9~
   END
   PATCH_IF( cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  10  10  10  9~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  10  10  10  10  9~
   END
   PATCH_IF( cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  10  10  10  10  9~
   END
   PATCH_IF( cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  10  10  10  9~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  10  10  10  10~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  10  10  10~
   END
   PATCH_IF( cnt=49 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  10  10  10~
   END
   PATCH_IF( cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  11  10  10~
   END

   INNER_ACTION BEGIN
    APPEND ~MXSPLDRU.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~MXSPLPAL.2DA~ ~override~
 COUNT_2DA_ROWS 5 "rows"
 FOR(cnt=13; cnt<="%rows%"; cnt=cnt+1) BEGIN  //15-40 levels
   PATCH_IF( cnt=13 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
   END
   PATCH_IF( cnt=14 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
   END
   PATCH_IF( cnt=15 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
   END
   PATCH_IF( cnt=16 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
   END
   PATCH_IF( cnt=17 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
   END
   PATCH_IF( cnt=18 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
   END
   PATCH_IF( cnt=19 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 4
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 4
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=24 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 4
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 4
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 5
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 5
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 5
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 6
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 5
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 6
     SET_2DA_ENTRY cnt 2 5 5
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 5
   END
   PATCH_IF( cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 5 6
     SET_2DA_ENTRY cnt 2 5 6
     SET_2DA_ENTRY cnt 3 5 5
     SET_2DA_ENTRY cnt 4 5 5
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING mxsplpal.2da override
  COUNT_2DA_COLS num_col
  COUNT_2DA_ROWS 3 num_row
  READ_2DA_ENTRY num_row - 1 0 3 max_level
  PATCH_IF max_level < 50 BEGIN //extend the table to level 50
    SPRINT string ""
    FOR (j=1;j<num_col;++j) BEGIN
      READ_2DA_ENTRY num_row - 1 j 3 entry
      SPRINT string "%string%"^"%entry% "
    END
    i = num_row
    FOR (j=max_level + 1;j<=50;++j) BEGIN
      SPRINT string2 "%j% "^"%string%"
      INSERT_2DA_ROW i 3 "%string2%"
      ++i
    END
  END
  READ_2DA_ENTRIES_NOW r2en_mxsplpal 3
  FOR (i=1;i<r2en_mxsplpal;++i) BEGIN //write the new table values
    READ_2DA_ENTRY_FORMER r2en_mxsplpal i 0 level
    FOR (j=1;j<num_col;++j) BEGIN
      READ_2DA_ENTRY_FORMER r2en_mxsplpal 0 j - 1 spell_level
      READ_2DA_ENTRY_FORMER r2en_mxsplpal i j entry
      SET_2DA_ENTRY_LATER s2el_mxsplpal i j ((level = 22 OR level = 23) AND spell_level < 2)
                                         OR ((level = 24 OR level = 25) AND spell_level < 3)
                                         OR ((level = 26 OR level = 27) AND spell_level < 4)
                                         OR ((level = 28 OR level = 29) AND spell_level < 5)
                                         OR ((level = 30 OR level = 31) AND spell_level > 1 AND spell_level < 5)
                                         OR ((level = 32 OR level = 33) AND spell_level > 2 AND spell_level < 5)
                                         OR ((level = 34 OR level = 35) AND spell_level > 3 AND spell_level < 5)
                                         ? 4 :
                                            ((level = 30 OR level = 31) AND spell_level < 2)
                                         OR ((level = 32 OR level = 33) AND spell_level < 3)
                                         OR ((level = 34 OR level = 35) AND spell_level < 4)
                                         OR ((level = 36 OR level = 37) AND spell_level < 5)
                                         OR ((level = 38 OR level = 39) AND spell_level > 1 AND spell_level < 5)
                                         OR ((level = 40 OR level = 41) AND spell_level > 2 AND spell_level < 5)
                                         OR  (level > 41 AND level < 47 AND spell_level > 3 AND spell_level < 5)
                                         ? 5 : 
                                            ((level = 38 OR level = 39) AND spell_level < 2)
                                         OR ((level = 40 OR level = 41) AND spell_level < 3)
                                         OR  (level = 42                AND spell_level < 4)
                                         OR ((level = 43 OR level = 44) AND spell_level > 1 AND spell_level < 4)
                                         OR ((level = 45 OR level = 46) AND spell_level > 2 AND spell_level < 4)
                                         OR  (level > 46 AND level < 51 AND spell_level > 2 AND spell_level < 5)
                                         ? 6 : 
                                            ((level = 43 OR level = 44) AND spell_level < 2)
                                         OR  (level > 44 AND level < 49 AND spell_level < 3)
                                         OR ((level = 49 OR level = 50) AND spell_level > 1 AND spell_level < 3)
                                         ? 7 :
                                            (level = 49 OR level = 50) AND spell_level < 2
                                         ? 8 : entry
    END
  END
  SET_2DA_ENTRIES_NOW s2el_mxsplpal 3
  PRETTY_PRINT_2DA
BUT_ONLY

APPEND_COL mxsplpal.2da ~$ $ 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4~ UNLESS "^[%tab% ]+1[%tab% ]+2[%tab% ]+3[%tab% ]+4[%tab% ]+5" //add a level 5 column unless there already is one
APPEND_COL mxsplpal.2da ~$ $ 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 2 2 2 2 2~ UNLESS "^[%tab% ]+1[%tab% ]+2[%tab% ]+3[%tab% ]+4[%tab% ]+5[%tab% ]+6" //ditto for level 6


COPY_EXISTING ~MXSPLPRS.2DA~ ~override~
 COUNT_2DA_ROWS 8 "rows"
 FOR(cnt=15; cnt<="%rows%"; cnt=cnt+1) BEGIN  //15-40 levels
   PATCH_IF( cnt=15 ) THEN BEGIN
     SET_2DA_ENTRY cnt 2 8 6
     SET_2DA_ENTRY cnt 3 8 6
   END
   PATCH_IF( cnt=16 ) THEN BEGIN
     SET_2DA_ENTRY cnt 4 8 6
   END
   PATCH_IF( cnt=17 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 7
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 6
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 4
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=18 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 4
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=19 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 7
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 6
     SET_2DA_ENTRY cnt 6 8 5
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 2
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 7
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 8
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 7
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 6
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 8
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 7
     SET_2DA_ENTRY cnt 6 8 7
     SET_2DA_ENTRY cnt 7 8 3
   END
   PATCH_IF( cnt=24 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 7
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 8
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 4
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 8
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 8
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 5
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 8
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 9
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=32 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 6
   END
   PATCH_IF( cnt=33 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 9
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=34 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=35 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 9
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=36 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=37 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 9
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 7
   END
   PATCH_IF( cnt=38 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
   PATCH_IF( cnt=39 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 9
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
   PATCH_IF( cnt=40 ) THEN BEGIN
     SET_2DA_ENTRY cnt 0 8 "%cnt%"+1
     SET_2DA_ENTRY cnt 1 8 10
     SET_2DA_ENTRY cnt 2 8 10
     SET_2DA_ENTRY cnt 3 8 10
     SET_2DA_ENTRY cnt 4 8 10
     SET_2DA_ENTRY cnt 5 8 10
     SET_2DA_ENTRY cnt 6 8 9
     SET_2DA_ENTRY cnt 7 8 8
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MXSPLPRS.2DA~ ~override~
 COUNT_2DA_ROWS 8 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  10  10  10  10  9   8~
   END
   PATCH_IF( cnt=42 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  10  10  9   9~
   END
   PATCH_IF( cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  10  10  10  9~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  10  10  10  10  9~
   END
   PATCH_IF( cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  10  10  10  10  9~
   END
   PATCH_IF( cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  10  10  10  9~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  10  10  10  10~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  10  10  10~
   END
   PATCH_IF( cnt=49 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  10  10  10~
   END
   PATCH_IF( cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  11  11  10  10~
   END
   INNER_ACTION BEGIN
    APPEND ~MXSPLPRS.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~MXSPLRAN.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt=9; cnt<="%rows%"; cnt=cnt+1) BEGIN  //15-40 levels
   PATCH_IF( cnt=9 OR cnt=10 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 4
   END
   PATCH_IF( cnt=11 OR cnt=12 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 4
     SET_2DA_ENTRY cnt 2 4 4
   END
   PATCH_IF( cnt=12 OR cnt=13 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 4
     SET_2DA_ENTRY cnt 2 4 4
     SET_2DA_ENTRY cnt 3 4 4
   END
   PATCH_IF( cnt=14 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 5
     SET_2DA_ENTRY cnt 2 4 4
     SET_2DA_ENTRY cnt 3 4 4
   END
   PATCH_IF( cnt=15 OR cnt=16 OR cnt=17 OR cnt=18 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 5
     SET_2DA_ENTRY cnt 2 4 5
     SET_2DA_ENTRY cnt 3 4 4
   END
   PATCH_IF( cnt=19 OR cnt=20 OR cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 6
     SET_2DA_ENTRY cnt 2 4 5
     SET_2DA_ENTRY cnt 3 4 4
   END
   PATCH_IF( cnt=22 OR cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 6
     SET_2DA_ENTRY cnt 2 4 5
     SET_2DA_ENTRY cnt 3 4 5
   END
   PATCH_IF( cnt=24 OR cnt=25 OR cnt=26 OR cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 6
     SET_2DA_ENTRY cnt 2 4 6
     SET_2DA_ENTRY cnt 3 4 5
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 6
     SET_2DA_ENTRY cnt 2 4 6
     SET_2DA_ENTRY cnt 3 4 6
   END
   PATCH_IF( cnt=29 OR cnt=30 OR cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 7
     SET_2DA_ENTRY cnt 2 4 6
     SET_2DA_ENTRY cnt 3 4 6
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MXSPLRAN.2DA~ ~override~
 COUNT_2DA_ROWS 5 "rows"
 FOR(cnt="%rows%"+1; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 OR cnt=42 OR cnt=43 OR cnt=44 OR cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      7   7   6~
   END
   PATCH_IF( cnt=46 OR cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      8   7   6~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      8   8   6~
   END
   PATCH_IF( cnt=49 OR cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      8   8   7~
   END
   INNER_ACTION BEGIN
    APPEND ~MXSPLRAN.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES

APPEND_COL ~MXSPLRAN.2DA~ ~9999 9999 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6~
APPEND_COL ~MXSPLRAN.2DA~ ~9999 9999 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 2 2 2 2 2 3 3 3 4~
COPY_EXISTING + ~MXSPLPAL.2DA~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~


COPY_EXISTING ~MXSPLSRC.2DA~ ~override~
 COUNT_2DA_ROWS 10 "rows"
 FOR(cnt=0; cnt<="%rows%"; cnt=cnt+1) BEGIN
   PATCH_IF( cnt=0 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 2
   END
   PATCH_IF( cnt=1 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 3
   END
   PATCH_IF( cnt=2 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 4
   END
   PATCH_IF( cnt=3 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 4
     SET_2DA_ENTRY cnt 2 10 2
   END
   PATCH_IF( cnt=4 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 4
     SET_2DA_ENTRY cnt 2 10 3
   END
   PATCH_IF( cnt=5 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 4
     SET_2DA_ENTRY cnt 2 10 3
     SET_2DA_ENTRY cnt 3 10 2
   END
   PATCH_IF( cnt=6 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 5
     SET_2DA_ENTRY cnt 2 10 3
     SET_2DA_ENTRY cnt 3 10 2
   END
   PATCH_IF( cnt=7 OR cnt=8 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 5
     SET_2DA_ENTRY cnt 2 10 4
     SET_2DA_ENTRY cnt 3 10 3
     SET_2DA_ENTRY cnt 4 10 2
   END
   PATCH_IF( cnt=9 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 5
     SET_2DA_ENTRY cnt 2 10 4
     SET_2DA_ENTRY cnt 3 10 3
     SET_2DA_ENTRY cnt 4 10 3
     SET_2DA_ENTRY cnt 5 10 2
   END
   PATCH_IF( cnt=10 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 5
     SET_2DA_ENTRY cnt 2 10 4
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 4 10 3
     SET_2DA_ENTRY cnt 5 10 2
   END
   PATCH_IF( cnt=11 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 5
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 4 10 3
     SET_2DA_ENTRY cnt 5 10 3
     SET_2DA_ENTRY cnt 6 10 2
   END
   PATCH_IF( cnt=12 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 5
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 5 10 3
     SET_2DA_ENTRY cnt 6 10 2
   END
   PATCH_IF( cnt=13 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 5
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 5 10 3
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 2
   END
   PATCH_IF( cnt=14 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 5
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 2
   END
   PATCH_IF( cnt=15 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 5
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 2
   END
   PATCH_IF( cnt=16 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 2
   END
   PATCH_IF( cnt=17 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 2
   END
   PATCH_IF( cnt=18 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 2
   END
   PATCH_IF( cnt=19 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 2
   END
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 2
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=24 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=32 OR cnt=33 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=34 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=35 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=36 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=37 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=38 OR cnt=39 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 8
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MXSPLSRC.2DA~ ~override~
 COUNT_2DA_ROWS 5 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      9   9   8   8   8   7   7   7   5~
   END
   PATCH_IF( cnt=42 OR cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  9   9   8   8   7   7   7   5~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  9   9   8   8   8   7   7   5~
   END
   PATCH_IF( cnt=45 OR cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  10  9   9   8   8   7   7   5~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  9   8   8   8   7   6~
   END
   PATCH_IF( cnt=48 OR cnt=49 OR cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  9   9   8   8   7   6~
   END
   INNER_ACTION BEGIN
    APPEND ~MXSPLSRC.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~MXSPLWIZ.2DA~ ~override~
 COUNT_2DA_ROWS 10 "rows"
 FOR(cnt=12; cnt<="%rows%"; cnt=cnt+1) BEGIN
   PATCH_IF( cnt=12 ) THEN BEGIN
     SET_2DA_ENTRY cnt 3 10 4
   END
   PATCH_IF( cnt=14 ) THEN BEGIN
     SET_2DA_ENTRY cnt 5 10 4
   END
   PATCH_IF( cnt=15 ) THEN BEGIN
     SET_2DA_ENTRY cnt 5 10 4
   END
   PATCH_IF( cnt=16 ) THEN BEGIN
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 7 10 2
   END
   PATCH_IF( cnt=19 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
   END
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 7 10 4
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 4
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 4
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 8 10 4
   END
   PATCH_IF( cnt=24 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=31 OR cnt=32 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=33 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=34 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=35 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=36 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=37 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 8
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=38 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 8
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=39 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 8
     SET_2DA_ENTRY cnt 6 10 8
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 7
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MXSPLWIZ.2DA~ ~override~
 COUNT_2DA_ROWS 5 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      9   9   8   8   8   8   8   7   7~
   END
   PATCH_IF( cnt=42 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      9   9   9   8   8   8   8   7   7~
   END
   PATCH_IF( cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  9   9   9   8   8   8   8   7~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  9   9   9   9   8   8   8   7~
   END
   PATCH_IF( cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  10  9   9   9   9   8   8   7~
   END
   PATCH_IF( cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      10  10  10  9   9   9   9   8   7~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  10  10  10  9   9   9   8   8~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  10  10  10  9   9   9   8~
   END
   PATCH_IF( cnt=49 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      11  11  11  10  10  10  9   9   8~
   END
   PATCH_IF( cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      12  11  11  10  10  10  9   9   8~
   END
   INNER_ACTION BEGIN
    APPEND ~MXSPLWIZ.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~RAISDEAD.2DA~ ~override~
 COUNT_2DA_ROWS 2 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      17500~
   END
   PATCH_IF( cnt=42 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      18000~
   END
   PATCH_IF( cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      18500~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      19000~
   END
   PATCH_IF( cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      19500~
   END
   PATCH_IF( cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      20000~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      20500~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      21000~
   END
   PATCH_IF( cnt=49 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      21500~
   END
   PATCH_IF( cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      22000~
   END
   INNER_ACTION BEGIN
    APPEND ~RAISDEAD.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SAVEMONK.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEMONK.2DA~ ~9999 9999 9999 kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~SAVEMONK.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt>=41 AND cnt<=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEMONK.2DA~ ~9999 9999 %cnt%kkkk 1pppp 3pppp 2pppp 5pppp 2pppp~
       COPY_EXISTING + ~SAVEMONK.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEMONK.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp 1pppp 3pppp 1pppp~
       COPY_EXISTING + ~SAVEMONK.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEMONK.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp 1pppp 2pppp 1pppp~
       COPY_EXISTING + ~SAVEMONK.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SAVEPRS.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEPRS.2DA~ ~9999 9999 9999 kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~SAVEPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt=41 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEPRS.2DA~ ~9999 9999 %cnt%kkkk 2pppp 6pppp 5pppp 8pppp 7pppp~
       COPY_EXISTING + ~SAVEPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt>=42 AND cnt<=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEPRS.2DA~ ~9999 9999 %cnt%kkkk 1pppp 4pppp 3pppp 6pppp 5pppp~
       COPY_EXISTING + ~SAVEPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEPRS.2DA~ ~9999 9999 %cnt%kkkk 1pppp 2pppp 1pppp 4pppp 3pppp~
       COPY_EXISTING + ~SAVEPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEPRS.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp 1pppp 3pppp 2pppp~
       COPY_EXISTING + ~SAVEPRS.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SAVEROG.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEROG.2DA~ ~9999 9999 9999 kkkk kkkk kkkk 9999 kkkk~
       COPY_EXISTING + ~SAVEROG.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt>=41 AND cnt<=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEROG.2DA~ ~9999 9999 %cnt%kkkk 7pppp 4pppp 6pppp 10kkkk 5pppp~
       COPY_EXISTING + ~SAVEROG.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEROG.2DA~ ~9999 9999 %cnt%kkkk 5pppp 2pppp 4pppp 8pppp 3pppp~
       COPY_EXISTING + ~SAVEROG.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEROG.2DA~ ~9999 9999 %cnt%kkkk 4pppp 1pppp 3pppp 7pppp 2pppp~
       COPY_EXISTING + ~SAVEROG.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SAVEWAR.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWAR.2DA~ ~9999 9999 9999 kkkk kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~SAVEWAR.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt>=41 AND cnt<=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWAR.2DA~ ~9999 9999 %cnt%kkkk 1pppp 3pppp 2pppp 2pppp 4pppp~
       COPY_EXISTING + ~SAVEWAR.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWAR.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp 1pppp 1pppp 1pppp~
       COPY_EXISTING + ~SAVEWAR.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWAR.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp 1pppp 1pppp 1pppp~
       COPY_EXISTING + ~SAVEWAR.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SAVEWIZ.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWIZ.2DA~ ~9999 9999 9999 9999 kkkk kkkk kkkk kkkk~
       COPY_EXISTING + ~SAVEWIZ.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   PATCH_IF( cnt>=41 AND cnt<=48 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWIZ.2DA~ ~9999 9999 %cnt%kkkk 8pppp 3pppp 5pppp 7pppp 4pppp~
       COPY_EXISTING + ~SAVEWIZ.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
   PATCH_IF( cnt=49 ) THEN BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWIZ.2DA~ ~9999 9999 %cnt%kkkk 6pppp 1pppp 3pppp 5pppp 2pppp~
       COPY_EXISTING + ~SAVEWIZ.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   ELSE BEGIN
     INNER_ACTION BEGIN
       APPEND_COL ~SAVEWIZ.2DA~ ~9999 9999 %cnt%kkkk 5pppp 1pppp 2pppp 4pppp 1pppp~
       COPY_EXISTING + ~SAVEWIZ.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING + ~SAVEMONK.2DA~ ~override~
                ~SAVEPRS.2DA~ ~override~
                ~SAVEROG.2DA~ ~override~
                ~SAVEWAR.2DA~ ~override~
                ~SAVEWIZ.2DA~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~
 REPLACE_TEXTUALLY ~kkkk~    ~ ~
 REPLACE_TEXTUALLY ~pppp~    ~  ~


COPY_EXISTING ~SKILLBRD.2DA~ ~override~
 COUNT_2DA_ROWS 2 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 OR cnt=42 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      100~
   END
   PATCH_IF( cnt=43 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      105~
   END
   PATCH_IF( cnt=44 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      110~
   END
   PATCH_IF( cnt=45 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      115~
   END
   PATCH_IF( cnt=46 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      120~
   END
   PATCH_IF( cnt=47 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      125~
   END
   PATCH_IF( cnt=48 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      130~
   END
   PATCH_IF( cnt=49 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      135~
   END
   PATCH_IF( cnt=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      140~
   END
   INNER_ACTION BEGIN
    APPEND ~SKILLBRD.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SKILLRNG.2DA~ ~override~
 COUNT_2DA_ROWS 2 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt>=41 AND cnt<=50 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      99~
   END
   INNER_ACTION BEGIN
    APPEND ~SKILLRNG.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SPLSRCKN.2DA~ ~override~
 COUNT_2DA_ROWS 10 "rows"
 FOR(cnt=20; cnt<="%rows%"; cnt=cnt+1) BEGIN
   PATCH_IF( cnt=20 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 6 10 3
   END
   PATCH_IF( cnt=21 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
   END
   PATCH_IF( cnt=22 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 6
     SET_2DA_ENTRY cnt 3 10 4
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
   END
   PATCH_IF( cnt=23 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
   END
   PATCH_IF( cnt=24 OR cnt=25 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 7
     SET_2DA_ENTRY cnt 2 10 6
     SET_2DA_ENTRY cnt 3 10 5
     SET_2DA_ENTRY cnt 4 10 4
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=26 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 3
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=27 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 3
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=28 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 7
     SET_2DA_ENTRY cnt 3 10 6
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 4
     SET_2DA_ENTRY cnt 6 10 4
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 3
     SET_2DA_ENTRY cnt 9 10 3
   END
   PATCH_IF( cnt=29 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 8
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 5
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 4
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=30 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 8
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 5
     SET_2DA_ENTRY cnt 6 10 5
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 4
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=31 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 7
     SET_2DA_ENTRY cnt 4 10 6
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 5
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 4
   END
   PATCH_IF( cnt=32 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 6
     SET_2DA_ENTRY cnt 6 10 6
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 5
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=33 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 8
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 6
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 5
   END
   PATCH_IF( cnt=34 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 7
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 6
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=35 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 7
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 6
   END
   PATCH_IF( cnt=36 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 8
     SET_2DA_ENTRY cnt 5 10 8
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 7
   END
   PATCH_IF( cnt=37 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 9
     SET_2DA_ENTRY cnt 5 10 9
     SET_2DA_ENTRY cnt 6 10 7
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 7
   END
   PATCH_IF( cnt=38 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 9
     SET_2DA_ENTRY cnt 5 10 9
     SET_2DA_ENTRY cnt 6 10 8
     SET_2DA_ENTRY cnt 7 10 7
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 7
   END
   PATCH_IF( cnt=39 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 10 9
     SET_2DA_ENTRY cnt 2 10 9
     SET_2DA_ENTRY cnt 3 10 9
     SET_2DA_ENTRY cnt 4 10 9
     SET_2DA_ENTRY cnt 5 10 9
     SET_2DA_ENTRY cnt 6 10 9
     SET_2DA_ENTRY cnt 7 10 8
     SET_2DA_ENTRY cnt 8 10 7
     SET_2DA_ENTRY cnt 9 10 7
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~SPLSRCKN.2DA~ ~override~
 COUNT_2DA_ROWS 5 "rows"
 FOR(cnt="%rows%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   SPRINT str ~~
   PATCH_IF( cnt=41 ) THEN BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      9   9   9   9   9   9   9   8   8~
   END
   ELSE BEGIN
     SPRINT EVALUATE_BUFFER str ~%cnt%      9   9   9   9   9   9   9   9   9~
   END
   INNER_ACTION BEGIN
    APPEND ~SPLSRCKN.2DA~ "%str%"
   END
  END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~THAC0.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~THAC0.2DA~ ~9999 9999 9999 9999 kkkk kkkk 9999 9999 kkkk kkkk kkkk kkkk kkkk kkkk kkkk 9999 kkkk kkkk kkkk kkkk kkkk kkkk 9999~
       COPY_EXISTING + ~THAC0.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
       APPEND_COL ~THAC0.2DA~ ~9999 9999 %cnt%kkkk 13kkkk 0pppp 6pppp 10kkkk 10kkkk 0pppp 6pppp 0pppp 0pppp 0pppp 0pppp 0pppp 10kkkk 6pppp 6pppp 0pppp 0pppp 0pppp 0pppp 13kkkk~
       COPY_EXISTING + ~THAC0.2DA~ ~override~
        EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~WSPATCK.2DA~ ~override~
 SET rows=2
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   COUNT_2DA_ROWS col_cnt rows
 END
 SET col_cnt = col_cnt - 1
 FOR(cnt="%col_cnt%"; cnt<=50; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt="%col_cnt%" ) THEN BEGIN       //this is a formatting column
     INNER_ACTION BEGIN
       APPEND_COL ~WSPATCK.2DA~ ~9999 9999 9999 kkkk kkkk 9999 9999 9999 9999~
       COPY_EXISTING + ~WSPATCK.2DA~ ~override~
        EVALUATE_BUFFER
     END
   END
   INNER_ACTION BEGIN
       APPEND_COL ~WSPATCK.2DA~ ~9999 9999 %cnt%kkkk 1pppp 1pppp -2kkkk -3kkkk -3kkkk -3kkkk~
       COPY_EXISTING + ~WSPATCK.2DA~ ~override~
        EVALUATE_BUFFER
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING + ~THAC0.2DA~ ~override~
                ~WSPATCK.2DA~ ~override~
 REPLACE_TEXTUALLY ~9999~    ~~
 REPLACE_TEXTUALLY ~kkkk~    ~ ~
 REPLACE_TEXTUALLY ~pppp~    ~  ~


COPY_EXISTING ~WSPECIAL.2DA~ ~override~
 COUNT_2DA_ROWS 4 "rows"
 FOR(cnt=0; cnt<"%rows%"; cnt=cnt+1) BEGIN  //up to 50th level
   PATCH_IF( cnt=5 ) THEN BEGIN
     SET_2DA_ENTRY cnt 1 4 3
     SET_2DA_ENTRY cnt 2 4 3
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~XPCAP.2DA~ ~override~
 REPLACE_TEXTUALLY ~8000000~ ~20000000~
BUT_ONLY_IF_IT_CHANGES

END




COPY ~TDD/RULE/DDTXT01.2DA~ ~override~
 REPLACE ~85747~ @20026
 REPLACE ~85748~ @20027

APPEND ~ITEMEXCL.2DA~
~ARDEADX 1
ICEPLAT 1
RINGBIND 1
ROBE1   1
ROBE2   1
ZGORGET 1
WAUKEEN 1
Guarp   1
DDhrtles 1
elvarmx 1
Chan12zz 1
Blood   1
SWANARM 1
shar20  1
platblue 1
mintanx 1
healclck 1
celebros 1
bsingchn 1
Minbalpl 1
flamplat 1
ROBEARM 1
runeplat 1
jerA    1
samarmx1 1
Chan6XX 1
Glory   1
minplatx 1
trollarm 1
Plat05xx 1~
UNLESS ~Plat05xx~

APPEND ~LOADH25.2DA~ ~79          72254~
UNLESS ~79~

APPEND ~LOADHINT.2DA~ ~75          85749~
APPEND ~LOADHINT.2DA~ ~76          85750~
APPEND ~LOADHINT.2DA~ ~77          85841~
COPY_EXISTING ~LOADHINT.2DA~ ~override~
 REPLACE ~85749~ @20028
 REPLACE ~85750~ @20029
 REPLACE ~85841~ @20030

APPEND ~MASTAREA.2DA~
~ARPO05   value
ARPO25   value
DD3300   value
DD1000   value
DD0200   value
DD0300ct value
DD1200   value
DD1800   value
DD1900   value
DD1x12   value
DD2300   value
DD2500   value
DD3300c1 value
DD3300ct value
DD5000   value
DD8000   value
DD9x00   value
DD9x00c1 value
DX2001   value~
UNLESS ~ARPO05~


ACTION_IF NOT FILE_EXISTS ~data/BG1ARE.BIF~     //BGT-WeiDU compatibility - all NPC will be continous if BGT installed
THEN BEGIN
 APPEND ~PDIALOG.2DA~
~KAGAINDD     KAGAIP             ***              ***       	     ***    	      ***    		    ***    		        ***
YESLICDD     YESLIP             ***               ***                ***    	      ***    		    ***    		        ***
XZARDD       XZARP              ***               ***	             ***    	      ***    		    ***    		        ***
MONTYDD      MONTAP             ***               ***                ***    	      ***    		    ***    		        ***
SHARTEDD     SHARTP             ***               ***         	     ***    	      ***    		    ***    		        ***
KIVANDD      KIVANP             ***               ***        	     ***    	      ***    		    ***    		        ***~
END //BGT-WeiDU compatibility

APPEND ~PDIALOG.2DA~
~ADARIO       ADARIOP            ***               ***                ***    	       ***    		     ***    		        ***
AVAUNIS      AVAUNISP           AVAUNISJ          ***                ***    	      ***    		    ***    		        ***
ROBILARD     ROBILP             ***               ***                ***    	      ***    		    ***    		        ***
VESINE       VESINEP            VESINEJ           ***	             ***    	      ***    		    ***    		        ***~
UNLESS ~ADARIO~


COPY_EXISTING ~TOOLTIP.2DA~ ~override~
//********* input parameter ************
 SET required_columns = 6
//**************************************
 SET rows=2
 SET rows_prev=0
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   rows_prev = rows
   COUNT_2DA_ROWS col_cnt rows
 END
 col_cnt = col_cnt - 1
 SET ccc = col_cnt - 1

 PATCH_IF 1 BEGIN
   SPRINT str_add ""
   SPRINT str ~%ccc%~
   FOR(cnt="%col_cnt%"; cnt<="%required_columns%"; cnt+=1) BEGIN
     SPRINT str "%str%"^"          %cnt%"
     SPRINT str_add "%str_add%"^"         -1"
   END

   READ_2DA_ENTRY 0 0 3 "test"
   PATCH_IF( "%test%"=1 ) BEGIN
     SET_2DA_ENTRY 0 0 3 "0                  1"
   END

   PATCH_IF("%ccc%"<"%required_columns%") BEGIN
     SET_2DA_ENTRY 0 ccc ccc "%str%"

     FOR(j=1; j<="%rows_prev%"; j+=1) BEGIN
       READ_2DA_ENTRY j ccc col_cnt "last"
       SPRINT str "%last%"^"%str_add%"
       SET_2DA_ENTRY j ccc col_cnt "%str%"
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES

APPEND ~TOOLTIP.2DA~ ~ARQUINXX          15527        15529       -1         -1         -1         -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~BEARKNFX          15527        15529       -1         -1         -1         -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~POLAW4A           66666666        77777777       88888888      88888880      88888881      88888882kkkkkk~
APPEND ~TOOLTIP.2DA~ ~ARDEADX           77777772        -1          -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~EREBOS            66666660        77777773       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~GHARBOOT          77777774        -1          -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~HEAVENST          66666661        77777775       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~KIBADAY           66666662        77777776       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~KIBAXX            66666662        77777776       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~LV16ROB           66666663        77777778       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~MHSWD             66666664        77777779       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~MISTY             77777780        77777781       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~MITALBRE          66666665        77777782       77777783       88888883       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~MOONLITE          66666667        77777784       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~MOORSX            66666668        77777785       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~QUAKEHAM          66666669        77777786       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~QUOST             66666670        77777787       77777788       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~ROBE2             77777789        77777790       -1       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~STAFDRAG          66666671        77777791       77777792       88888884       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~STAFFBES          66666672        77777778       77777793       -1       -1       -1kkkkkk~
APPEND ~TOOLTIP.2DA~ ~TYRANT            66666673        77777794       77777795       -1       -1       -1kkkkkk~


COPY_EXISTING ~TOOLTIP.2DA~ ~override~
 //******** number of items in appended rows ***
 SET present_cols = 7
 //*********************************************
 SET rows=2
 SET rows_prev=0
 SET col_cnt=0
 WHILE "%rows%">1 BEGIN
   col_cnt = col_cnt + 1
   rows_prev = rows
   COUNT_2DA_ROWS col_cnt rows
 END
 col_cnt = col_cnt - 1
 SET ccc = col_cnt - 1

 SPRINT str_add ""
 FOR(cnt="%present_cols%"; cnt<"%col_cnt%"; cnt+=1) BEGIN
   SPRINT str_add "%str_add%"^"         -1"
 END
 REPLACE_TEXTUALLY ~kkkkkk~ "%str_add%"

 REPLACE ~66666666~ @20035
 REPLACE ~77777777~ @20036
 REPLACE ~88888888~ @20037
 REPLACE ~88888880~ @20038
 REPLACE ~88888881~ @20039
 REPLACE ~88888882~ @20040

 REPLACE ~77777772~ @20041

 REPLACE ~66666660~ @20042
 REPLACE ~77777773~ @20043

 REPLACE ~77777774~ @20044

 REPLACE ~66666661~ @20045
 REPLACE ~77777775~ @20046

 REPLACE ~66666662~ @20047
 REPLACE ~77777776~ @20048

 REPLACE ~66666663~ @20049
 REPLACE ~77777778~ @20050

 REPLACE ~66666664~ @20051
 REPLACE ~77777779~ @20052

 REPLACE ~77777780~ @20053
 REPLACE ~77777781~ @20054

 REPLACE ~66666665~ @20055
 REPLACE ~77777782~ @20056
 REPLACE ~77777783~ @20057
 REPLACE ~88888883~ @20058

 REPLACE ~66666667~ @20059
 REPLACE ~77777784~ @20060

 REPLACE ~66666668~ @20061
 REPLACE ~77777785~ @20062

 REPLACE ~66666669~ @20063
 REPLACE ~77777786~ @20064

 REPLACE ~66666670~ @20065
 REPLACE ~77777787~ @20066
 REPLACE ~77777788~ @20067

 REPLACE ~77777789~ @20068
 REPLACE ~77777790~ @20069

 REPLACE ~66666671~ @20070
 REPLACE ~77777791~ @20071
 REPLACE ~77777792~ @20072
 REPLACE ~88888884~ @20073

 REPLACE ~66666672~ @20074
 REPLACE ~77777793~ @20075

 REPLACE ~66666673~ @20076
 REPLACE ~77777794~ @20077
 REPLACE ~77777795~ @20078
 

COPY_EXISTING tooltip.2da override
  SET_2DA_ENTRY 0 0 3 ~ ~
BUT_ONLY_IF_IT_CHANGES


ACTION_IF NOT FILE_EXISTS_IN_GAME ~PREASURE.PRO~ THEN BEGIN
  ADD_PROJECTILE ~TDD/PRO/PREASURE.PRO~
END

ACTION_IF NOT FILE_EXISTS_IN_GAME ~STEAMCLD.PRO~ THEN BEGIN
  ADD_PROJECTILE ~TDD/PRO/STEAMCLD.PRO~
END


APPEND ~GTIMES.IDS~ ~6 ONE_ROUND~          UNLESS ~ONE_ROUND~
APPEND ~GTIMES.IDS~ ~12 TWO_ROUNDS~        UNLESS ~TWO_ROUNDS~
APPEND ~GTIMES.IDS~ ~18 THREE_ROUNDS~      UNLESS ~THREE_ROUNDS~
APPEND ~GTIMES.IDS~ ~24 FOUR_ROUNDS~       UNLESS ~FOUR_ROUNDS~
APPEND ~GTIMES.IDS~ ~30 FIVE_ROUNDS~       UNLESS ~FIVE_ROUNDS~
APPEND ~GTIMES.IDS~ ~36 SIX_ROUNDS~        UNLESS ~SIX_ROUNDS~
APPEND ~GTIMES.IDS~ ~42 SEVEN_ROUNDS~      UNLESS ~SEVEN_ROUNDS~
APPEND ~GTIMES.IDS~ ~48 EIGHT_ROUNDS~      UNLESS ~EIGHT_ROUNDS~
APPEND ~GTIMES.IDS~ ~54 NINE_ROUNDS~       UNLESS ~NINE_ROUNDS~
APPEND ~GTIMES.IDS~ ~60 TEN_ROUNDS~        UNLESS ~TEN_ROUNDS~
APPEND ~GTIMES.IDS~ ~60 ONE_TURN~          UNLESS ~ONE_TURN~
APPEND ~GTIMES.IDS~ ~120 TWO_TURNS~        UNLESS ~TWO_TURNS~
APPEND ~GTIMES.IDS~ ~180 THREE_TURNS~      UNLESS ~THREE_TURNS~
APPEND ~GTIMES.IDS~ ~240 FOUR_TURNS~       UNLESS ~FOUR_TURNS~
APPEND ~GTIMES.IDS~ ~300 FIVE_TURNS~       UNLESS ~FIVE_TURNS~
APPEND ~GTIMES.IDS~ ~300 ONE_HOUR~         UNLESS ~ONE_HOUR~
APPEND ~GTIMES.IDS~ ~360 SIX_TURNS~        UNLESS ~SIX_TURNS~
APPEND ~GTIMES.IDS~ ~420 SEVEN_TURNS~      UNLESS ~SEVEN_TURNS~
APPEND ~GTIMES.IDS~ ~480 EIGHT_TURNS~      UNLESS ~EIGHT_TURNS~
APPEND ~GTIMES.IDS~ ~540 NINE_TURNS~       UNLESS ~NINE_TURNS~
APPEND ~GTIMES.IDS~ ~600 TEN_TURNS~        UNLESS ~TEN_TURNS~
APPEND ~GTIMES.IDS~ ~600 TWO_HOURS~        UNLESS ~TWO_HOURS~
APPEND ~GTIMES.IDS~ ~900 FIFTEEN_TURNS~    UNLESS ~FIFTEEN_TURNS~
APPEND ~GTIMES.IDS~ ~900 THREE_HOURS~      UNLESS ~THREE_HOURS~
APPEND ~GTIMES.IDS~ ~1200 FOUR_HOURS~      UNLESS ~FOUR_HOURS~
APPEND ~GTIMES.IDS~ ~1500 FIVE_HOURS~      UNLESS ~FIVE_HOURS~
APPEND ~GTIMES.IDS~ ~1800 SIX_HOURS~       UNLESS ~SIX_HOURS~
APPEND ~GTIMES.IDS~ ~2100 SEVEN_HOURS~     UNLESS ~SEVEN_HOURS~
APPEND ~GTIMES.IDS~ ~2400 EIGHT_HOURS~     UNLESS ~EIGHT_HOURS~
APPEND ~GTIMES.IDS~ ~2700 NINE_HOURS~      UNLESS ~NINE_HOURS~
APPEND ~GTIMES.IDS~ ~3000 TEN_HOURS~       UNLESS ~TEN_HOURS~
APPEND ~GTIMES.IDS~ ~3300 ELEVEN_HOURS~    UNLESS ~ELEVEN_HOURS~
APPEND ~GTIMES.IDS~ ~3600 TWELVE_HOURS~    UNLESS ~TWELVE_HOURS~

//KIT.IDS (by Idobek - thanks!!!)
COPY_EXISTING ~KIT.IDS~ ~override~
  REPLACE_TEXTUALLY ~0x00004000~ ~0x4000~ // TRUECLASS/MAGESCHOOL_GENERALIST
  REPLACE_TEXTUALLY ~0x00000040~ ~0x0040~ // MAGESCHOOL_ABJURER
  REPLACE_TEXTUALLY ~0x00000080~ ~0x0080~ // MAGESCHOOL_CONJURER
  REPLACE_TEXTUALLY ~0x00000100~ ~0x0100~ // MAGESCHOOL_DIVINER
  REPLACE_TEXTUALLY ~0x00000200~ ~0x0200~ // MAGESCHOOL_ENCHANTER
  REPLACE_TEXTUALLY ~0x00000400~ ~0x0400~ // MAGESCHOOL_ILLUSIONIST
  REPLACE_TEXTUALLY ~0x00000800~ ~0x0800~ // MAGESCHOOL_INVOKER
  REPLACE_TEXTUALLY ~0x00001000~ ~0x1000~ // MAGESCHOOL_NECROMANCER
  REPLACE_TEXTUALLY ~0x00002000~ ~0x2000~ // MAGESCHOOL_TRANSMUTER
  REPLACE_TEXTUALLY ~0x00000001~ ~0x4001~ // BERSERKER
  REPLACE_TEXTUALLY ~0x00000002~ ~0x4002~ // WIZARDSLAYER
  REPLACE_TEXTUALLY ~0x00000004~ ~0x4003~ // KENSAI
  REPLACE_TEXTUALLY ~0x00000008~ ~0x4004~ // CAVALIER
  REPLACE_TEXTUALLY ~0x00000010~ ~0x4005~ // INQUISITOR
  REPLACE_TEXTUALLY ~0x00000020~ ~0x4006~ // UNDEADHUNTER
  REPLACE_TEXTUALLY ~0x00008000~ ~0x4007~ // FERALAN
  REPLACE_TEXTUALLY ~0x00010000~ ~0x4008~ // STALKER
  REPLACE_TEXTUALLY ~0x00020000~ ~0x4009~ // BEASTMASTER
  REPLACE_TEXTUALLY ~0x00040000~ ~0x400A~ // ASSASIN
  REPLACE_TEXTUALLY ~0x00080000~ ~0x400B~ // BOUNTYHUNTER
  REPLACE_TEXTUALLY ~0x00100000~ ~0x400C~ // SWASHBUCKLER
  REPLACE_TEXTUALLY ~0x00200000~ ~0x400D~ // BLADE
  REPLACE_TEXTUALLY ~0x00400000~ ~0x400E~ // JESTER
  REPLACE_TEXTUALLY ~0x00800000~ ~0x400F~ // SKALD
  REPLACE_TEXTUALLY ~0x01000000~ ~0x4013~ // GODTALOS
  REPLACE_TEXTUALLY ~0x02000000~ ~0x4014~ // GODHELM
  REPLACE_TEXTUALLY ~0x04000000~ ~0x4015~ // GODLATHANDER
  REPLACE_TEXTUALLY ~0x08000000~ ~0x4010~ // TOTEMIC
  REPLACE_TEXTUALLY ~0x10000000~ ~0x4011~ // SHAPESHIFTER
  REPLACE_TEXTUALLY ~0x20000000~ ~0x4012~ // BEASTFRIEND
  REPLACE_TEXTUALLY ~0x40000000~ ~0x401F~ // BARBARIAN
BUT_ONLY_IF_IT_CHANGES


APPEND ~shoutids.ids~ ~2 LEAVE2~ UNLESS ~LEAVE2~
APPEND ~shoutids.ids~ ~66 DEAD_MEAT~ UNLESS ~^66~
APPEND ~shoutids.ids~ ~68 SUM_ATTACK_GOOD~ UNLESS ~^68~
APPEND ~shoutids.ids~ ~69 SUM_ATTACK_EVIL~ UNLESS ~^69~
APPEND ~shoutids.ids~ ~79 HELP79~ UNLESS ~^79~
APPEND ~shoutids.ids~ ~80 HELPARCHER~ UNLESS ~^80~
APPEND ~shoutids.ids~ ~81 FLEEARCHER~ UNLESS ~^81~
APPEND ~shoutids.ids~ ~82 COMEARCHER~ UNLESS ~^82~
APPEND ~shoutids.ids~ ~83 HELP83~ UNLESS ~^83~
APPEND ~shoutids.ids~ ~84 IM_BLIND~ UNLESS ~^84~
APPEND ~shoutids.ids~ ~89 ATTACK89~ UNLESS ~^89~
APPEND ~shoutids.ids~ ~99 HELPME~ UNLESS ~^99~
APPEND ~shoutids.ids~ ~100 HELP100~ UNLESS ~^100~
APPEND ~shoutids.ids~ ~101 HELP101~ UNLESS ~^101~
APPEND ~shoutids.ids~ ~111 WARNALARM~ UNLESS ~^111~
APPEND ~shoutids.ids~ ~115 HELP_ALIBAKKAR~ UNLESS ~^115~
APPEND ~shoutids.ids~ ~116 HELP_LURRAXOL~ UNLESS ~^116~
APPEND ~shoutids.ids~ ~121 HELP121~ UNLESS ~^121~
APPEND ~shoutids.ids~ ~122 HELP122~ UNLESS ~^122~
APPEND ~shoutids.ids~ ~151 HELP_ME_GROUP151~ UNLESS ~^151~
APPEND ~shoutids.ids~ ~152 ATTACK_MAGE~ UNLESS ~^152~
APPEND ~shoutids.ids~ ~153 HELP_ME_GROUP153~ UNLESS ~^153~
APPEND ~shoutids.ids~ ~154 FLEE_FROM_MAGE~ UNLESS ~^154~
APPEND ~shoutids.ids~ ~155 ATTACK_MAGE~ UNLESS ~^155~
APPEND ~shoutids.ids~ ~156 UNDER_ATTACK~ UNLESS ~^156~
APPEND ~shoutids.ids~ ~199 HELPME_DRUIDS~ UNLESS ~^199~
APPEND ~shoutids.ids~ ~200 POISONED_200~ UNLESS ~^200~

APPEND ~SPELL.IDS~
~1114 COM_DRUID_MAGIC_FANG
1115 COM_DRUID_PASS_WITHOUT_TRACE
1116 COM_DRUID_FEARIE_FIRE
1117 COM_DRUID_RESISTANCE
1118 COM_PRIEST_BANE
1119 COM_PRIEST_DIVINE_FAVOUR
1120 COM_PRIEST_ENTROPIC_SHIELD
1121 COM_DRUID_FREEZING_HANDS
1122 COM_DRUID_ACID_HAND
1215 COM_DRUID_DELAY_POISEN
1216 COM_DRUID_HEAT_METAL
1217 COM_PRIEST_BULLS_STRENGTH
1320 COM_DRUID_GREATER_MAGIC_FANG
1321 COM_PRIEST_BESTOW_CURSE
1322 COM_PRIEST_MAGIC_VESTMENT
1323 COM_PRIEST_PRAYER
1324 COM_PRIEST_SEARING_LIGHT
1325 COM_DRUID_NYMPH_AURA
1326 COM_DRUID_DOMINATE_ANIMAL
1327 COM_DRUID_IRON_KNUCKLES
1328 COM_PRIEST_CLOAK_OF_BRAVERY
1329 COM_PRIEST_CAUSE_DISEASE
1418 COM_DRUID_TEMPERATURE_COLD
1419 COM_DRUID_TEMPERATURE_HEAT
1420 COM_DRUID_FREEDOM_OF_MOVEMENT
1421 COM_DRUID_AIR_POCKET
1422 COM_PRIEST_DIVINE_POWER
1423 COM_PRIEST_TONGUES
1424 COM_DRUID_INCREASE_METABOLISM
1425 COM_DRUID_WINDS_OF_PANDAMONIUM
1426 COM_PRIEST_STATIC_CHARGE
1427 COM_PRIEST_CLOUD_OF_PESTILENCE
1518 COM_DRUID_DEATH_MARK
1519 COM_DRUID_WALL_OF_FIRE
1520 COM_DRUID_ICE_STORM
1521 COM_DRUID_SUMMON_NATURES_ALLY5
1522 COM_PRIEST_HALLOW
1523 COM_PRIEST_SCRYING
1524 COM_PRIEST_CALL_UPON_FAITH
1525 COM_PRIEST_EMBALM
1526 COM_PRIEST_HEROES_FEAST
1527 COM_DRUID_WALL_OF_THORNS
1528 COM_DRUID_VENOM_PLOOM
1615 COM_DRUID_ANIMATE_ROCKS
1616 COM_DRUID_SUMMON_NATURES_ALLY6
1617 COM_DRUID_HEALING_CIRCLE
1618 COM_DRUID_GREATER_DISPELLING
1620 COM_PRIEST_POSSESION
1621 COM_PRIEST_MOON_BEAM
1622 COM_DRUID_VITALITY_DRAIN
1623 COM_PRIEST_VISIONS_OF_PAIN
1624 COM_DRUID_NATURES_DEABILITATING_RATH
1625 COM_DRUID_DEEP_FREEZE
1625 COM_PRIEST_SOUL_MERGE
1628 COM_CONVERSION_TO_THE_DARK
1629 COM_DRUID_SUMMON_LIGHTNING_ELEMENTAL
1718 CLERIC_SYMBOL_STUN
1719 CLERIC_SYMBOL_DEATH
1733 CLERIC_SYMBOL_OF_BANISHMENT
1735 COM_KISS_OF_DEATH
1736 CLERIC_SUMMON_LAVA_ELEMENTAL
1737 CLERIC_SUMMON_WATER_ELEMENTAL
1741 COM_DRUID_EVALUTION
1742 COM_DRUID_SUNBEAM
1743 COM_DRUID_SHAPECHANGE
1744 COM_DRUID_GREATER_SCRYING
1745 COM_PRIEST_DIETY_BIND
1746 COM_PRIEST_ASSIMILATION
1747 COM_PRIEST_MYSTRAS_UNRAVELLING
1748 COM_PRIEST_GREATER_UNDEAD
1749 COM_PRIEST_SUCCOR
1750 COM_DRUID_DRAGON_FLESH
1751 COM_DRUID_DEVALUTION
1752 COM_DRUID_TROLLISH_FORTITUDE
1961 PLATE_OF_SMOLDERING
1962 TOPAZ_DRAGON_BREATH
1963 FRIGHTFUL_MOAN
2126 COM_AZRAGANS_CHANELLING
2127 COM_PHYSICAL_AGILITY
2128 COM_TRUE_STRIKE
2225 COM_TORMENT
2226 COM_STEAM
2228 COM_ENDURANCE
2229 COM_THUNDERCLAP
2327 COM_AURA_OF_FOCUS
2328 COM_ICELANCE
2329 COM_ADRENALIN_RUSH
2427 COM_ICE_SHARD
2428 COM_WEAKEN
2429 BELTYNS_BURNING_BLOOD
2430 COM_DAERRAGHS_AURA_OF_CLEANSING
2528 COM_HEAVY_FOG
2626 COM_MASS_TELEPORT
2724 COM_ASSIMILATION
2725 COM_BLACK_DEATH
2726 COM_RAGING_BULL
2727 COM_FROST_BITE
2728 COM_ARMOUR_MELT
2729 COM_EXECUTION
2819 COM_ORCISH_HOARD
2820 COM_HEMOPHILIA
2821 COM_SOUL_OF_KALANZHAR
2822 COM_RARYS_MNEMONIC_NEGATOR
2825 COM_SUNBURST
2826 COM_SUFFOCATION
2827 COM_GRAVITY
2969 COM_ARMY_DARKNESS
2970 COM_TATTOO
2971 COM_LIFE_WARP
2972 COM_SHATTER_BONES
2973 COM_SACRAFICIAL_TRANSFER
2974 COM_ARCANE_RUNES
2975 COM_RARYS_MNEMONIC_ENCHANCER~
UNLESS ~COM_ARMY_DARKNESS~

ACTION_IF NOT FILE_EXISTS ~data/CTB-RULE.BIF~     //CtB compatibility
THEN BEGIN
APPEND ~SPELL.IDS~
~2227 WIZARD_CATS_GRACE
2440 WIZARD_MORDENKAINENS_FORCE_MISSILES
2627 WIZARD_ANTIMAGIC_FIELD
2823 WIZARD_IRON_BODY
2824 WIZARD_MIND_BLANK~
END

APPEND ~SPELL.IDS~ ~2733 WIZARD_MONSTER_SUMMONING_IV~ //sharing with RoT
 UNLESS ~2733 WIZARD_MONSTER_SUMMONING_IV~
APPEND ~SPELL.IDS~ ~2828 WIZARD_MONSTER_SUMMONING_V~  //sharing with RoT
 UNLESS ~2828 WIZARD_MONSTER_SUMMONING_V~
APPEND ~SPELL.IDS~ ~2968 WIZARD_MONSTER_SUMMONING_VI~ //sharing with RoT
 UNLESS ~2968 WIZARD_MONSTER_SUMMONING_VI~



COPY_EXISTING ~SPELL.IDS~ ~override~
// REPLACE_TEXTUALLY ~2302 WIZARD_DISPEL_MAGIC~            ~2302 WIZARD_REMOVE_MAGIC~
// REPLACE_TEXTUALLY ~2326 WIZARD_TRUE_DISPEL_MAGIC~       ~2326 WIZARD_DISPEL_MAGIC~
// REPLACE_TEXTUALLY ~3544 PSIONIC _SUPERIOR_INVISIBILITY~ ~3544 PSIONIC_SUPERIOR_INVISIBILITY~
 REPLACE_TEXTUALLY ~2302 WIZARD_DISPEL_MAGIC~            ~2302 WIZARD_REMOVE_MAGIC~
 REPLACE_TEXTUALLY ~PSIONIC _SUPERIOR_INVISIBILITY~ ~PSIONIC_SUPERIOR_INVISIBILITY~
BUT_ONLY_IF_IT_CHANGES
APPEND ~SPELL.IDS~ ~2326 WIZARD_DISPEL_MAGIC~
 UNLESS ~2326 WIZARD_DISPEL_MAGIC~


APPEND ~STATE.IDS~ ~0x00102029 STATE_HARMLESS~         UNLESS ~0x00102029~
APPEND ~STATE.IDS~ ~0x80040004 STATE_RANGED_TARGET~    UNLESS ~0x80040004~
APPEND ~STATE.IDS~ ~0x8014202D STATE_OUT_OF_ACTION~    UNLESS ~0x8014202D~
APPEND ~STATE.IDS~ ~0x00400010 STATE_NOT_VISIBLE~      UNLESS ~0x00400010~
APPEND ~STATE.IDS~ ~0x60400010 STATE_ILLUSIONS~        UNLESS ~0x60400010~
APPEND ~STATE.IDS~ ~0x63C08010 STATE_ENCHANTED~        UNLESS ~0x63C08010~


ACTION_IF FILE_EXISTS ~script compiler/AICOMPILE.exe~
THEN BEGIN
COPY_EXISTING   ~GTIMES.IDS~   ~script compiler~
                ~KIT.IDS~      ~script compiler~
                ~PROJECTL.IDS~ ~script compiler~
                ~SHOUTIDS.IDS~ ~script compiler~
                ~SPELL.IDS~    ~script compiler~
                ~STATE.IDS~    ~script compiler~
END


//************************************************************
// AREAS - before scripts to avoid unnecessary WeiDU warnings
//************************************************************
PRINT @20083

COPY ~TDD/ARE/AR1106CT.are~         ~override~
COPY ~TDD/ARE/ARPO05.are~           ~override~
  SAY 0x3cc @20084
  SAY 0x490 @20084
COPY ~TDD/ARE/ARPO06.are~           ~override~
COPY ~TDD/ARE/ARPO07.are~           ~override~
COPY ~TDD/ARE/ARPO08.are~           ~override~
COPY ~TDD/ARE/ARPO10.are~           ~override~
COPY ~TDD/ARE/ARPO25.are~           ~override~
COPY ~TDD/ARE/ARPO27.are~           ~override~
COPY ~TDD/ARE/ARPO28.are~           ~override~
COPY ~TDD/ARE/ARPO29.are~           ~override~
COPY ~TDD/ARE/ARPO30.are~           ~override~
COPY ~TDD/ARE/ARPO31.are~           ~override~
COPY ~TDD/ARE/DD0012.are~           ~override~
COPY ~TDD/ARE/DD0118.are~           ~override~
COPY ~TDD/ARE/DD0119.are~           ~override~
COPY ~TDD/ARE/DD0200.are~           ~override~
COPY ~TDD/ARE/DD0201.are~           ~override~
COPY ~TDD/ARE/DD0202.are~           ~override~
COPY ~TDD/ARE/DD0203.are~           ~override~
COPY ~TDD/ARE/DD0204.are~           ~override~
COPY ~TDD/ARE/DD0205.are~           ~override~
COPY ~TDD/ARE/DD0206.are~           ~override~
COPY ~TDD/ARE/DD0300CT.are~         ~override~
COPY ~TDD/ARE/DD0334.are~           ~override~
  WRITE_ASCII 0x94 ~DD0334~ #8  // Area script, was pointing to AR0334.BCS, so the smith was missing
COPY ~TDD/ARE/DD0401X.are~          ~override~
COPY ~TDD/ARE/DD0508C1.are~         ~override~
COPY ~TDD/ARE/DD0512.are~           ~override~
COPY ~TDD/ARE/DD0903.are~           ~override~
COPY ~TDD/ARE/DD1000.are~           ~override~
COPY ~TDD/ARE/DD1001.are~           ~override~
COPY ~TDD/ARE/DD1002.are~           ~override~
COPY ~TDD/ARE/DD1002C1.are~         ~override~
COPY ~TDD/ARE/DD1002CT.are~         ~override~
COPY ~TDD/ARE/DD1002X1.are~         ~override~
COPY ~TDD/ARE/DD1003.are~           ~override~
COPY ~TDD/ARE/DD1004.are~           ~override~
COPY ~TDD/ARE/DD1005.are~           ~override~
COPY ~TDD/ARE/DD1005CT.are~         ~override~
COPY ~TDD/ARE/DD1006.are~           ~override~
COPY ~TDD/ARE/DD1007.are~           ~override~
COPY ~TDD/ARE/DD1008.are~           ~override~
COPY ~TDD/ARE/DD1008B.are~          ~override~
COPY ~TDD/ARE/DD1009.are~           ~override~
COPY ~TDD/ARE/DD1010.are~           ~override~
COPY ~TDD/ARE/DD1011.are~           ~override~
COPY ~TDD/ARE/DD1103.are~           ~override~
COPY ~TDD/ARE/DD1200.are~           ~override~
COPY ~TDD/ARE/DD1401.are~           ~override~
COPY ~TDD/ARE/DD1607C1.are~         ~override~
COPY ~TDD/ARE/DD1800.are~           ~override~
COPY ~TDD/ARE/DD1900.are~           ~override~
COPY ~TDD/ARE/DD1X12.are~           ~override~
COPY ~TDD/ARE/DD2001.are~           ~override~
COPY ~TDD/ARE/DD2015.are~           ~override~
COPY ~TDD/ARE/DD2016.are~           ~override~
COPY ~TDD/ARE/DD2017.are~           ~override~
COPY ~TDD/ARE/DD2018.are~           ~override~
COPY ~TDD/ARE/DD2019.are~           ~override~
COPY ~TDD/ARE/DD2300.are~           ~override~
COPY ~TDD/ARE/DD2500.are~           ~override~

COPY ~TDD/ARE/DD3300.are~           ~override~
  SAY 0x1b88 @20085
  SAY 0x1c4c @20086
  SAY 0x1d10 @20087

COPY ~TDD/ARE/DD3300C1.are~         ~override~
     ~TDD/ARE/DD3300CT.are~         ~override~
  SAY 0x180 @20085
  SAY 0x244 @20086
  SAY 0x308 @20087

COPY ~TDD/ARE/DD3301.are~           ~override~
COPY ~TDD/ARE/DD3301B.are~          ~override~
COPY ~TDD/ARE/DD3302.are~           ~override~
COPY ~TDD/ARE/DD3302B.are~          ~override~
COPY ~TDD/ARE/DD3303.are~           ~override~
COPY ~TDD/ARE/DD3304.are~           ~override~
COPY ~TDD/ARE/DD3305.are~           ~override~
COPY ~TDD/ARE/DD3306.are~           ~override~
COPY ~TDD/ARE/DD3306B.are~          ~override~
 WRITE_ASCII 0x94 ~DD3306B~ #8  //area script, non-existing, replacing ToB area space
COPY ~TDD/ARE/DD3307.are~           ~override~
COPY ~TDD/ARE/DD3308.are~           ~override~
COPY ~TDD/ARE/DD3309.are~           ~override~
 WRITE_ASCII 0x94 ~DD3309~ #8  //area script, non-existing, replacing ToB area space
COPY ~TDD/ARE/DD3310.are~           ~override~
COPY ~TDD/ARE/DD3311.are~           ~override~
COPY ~TDD/ARE/DD3312.are~           ~override~
COPY ~TDD/ARE/DD3313.are~           ~override~
COPY ~TDD/ARE/DD3314.are~           ~override~
COPY ~TDD/ARE/DD3315.are~           ~override~
COPY ~TDD/ARE/DD3316.are~           ~override~
COPY ~TDD/ARE/DD3317.are~           ~override~
COPY ~TDD/ARE/DD3318.are~           ~override~
COPY ~TDD/ARE/DD3319.are~           ~override~
COPY ~TDD/ARE/DD3319C1.are~         ~override~
COPY ~TDD/ARE/DD3319CT.are~         ~override~
COPY ~TDD/ARE/DD3320.are~           ~override~
COPY ~TDD/ARE/DD3321.are~           ~override~
COPY ~TDD/ARE/DD3322.are~           ~override~
COPY ~TDD/ARE/DD3323.are~           ~override~
COPY ~TDD/ARE/DD3324.are~           ~override~
COPY ~TDD/ARE/DD3325.are~           ~override~
COPY ~TDD/ARE/DD3326.are~           ~override~
COPY ~TDD/ARE/DD3327.are~           ~override~
COPY ~TDD/ARE/DD3328.are~           ~override~
COPY ~TDD/ARE/DD3329.are~           ~override~
COPY ~TDD/ARE/DD3330.are~           ~override~
COPY ~TDD/ARE/DD3331.are~           ~override~
COPY ~TDD/ARE/DD3332.are~           ~override~
COPY ~TDD/ARE/DD3333.are~           ~override~
COPY ~TDD/ARE/DD3334.are~           ~override~
COPY ~TDD/ARE/DD3335.are~           ~override~
COPY ~TDD/ARE/DD3336.are~           ~override~
COPY ~TDD/ARE/DD3337.are~           ~override~
COPY ~TDD/ARE/DD3338.are~           ~override~
COPY ~TDD/ARE/DD3501.are~           ~override~
COPY ~TDD/ARE/DD3503.are~           ~override~
COPY ~TDD/ARE/DD3602.are~           ~override~
COPY ~TDD/ARE/DD3603.are~           ~override~
COPY ~TDD/ARE/DD4002.are~           ~override~
COPY ~TDD/ARE/DD4003.are~           ~override~
COPY ~TDD/ARE/DD5000.are~           ~override~
COPY ~TDD/ARE/DD5401.are~           ~override~
COPY ~TDD/ARE/DD6000.are~           ~override~
COPY ~TDD/ARE/DD6001.are~           ~override~
COPY ~TDD/ARE/DD7000.are~           ~override~
COPY ~TDD/ARE/DD7001.are~           ~override~
COPY ~TDD/ARE/DD7002.are~           ~override~
COPY ~TDD/ARE/DD7003.are~           ~override~
COPY ~TDD/ARE/DD7004.are~           ~override~
COPY ~TDD/ARE/DD7005.are~           ~override~
 WRITE_ASCII 0x94 ~DD7005~ #8  //area script, non-existing, replacing ToB area space
COPY ~TDD/ARE/DD8000.are~           ~override~
READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

//adding new trigger ************************************************
   SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")
   INSERT_BYTES offset 0xc4
   WRITE_ASCII offset ~Tran8001~
   WRITE_SHORT (offset+0x20) 2            //travel trigger
   WRITE_SHORT (offset+0x22) 3871         //bounding box
   WRITE_SHORT (offset+0x24) 3702         //bounding box
   WRITE_SHORT (offset+0x26) 3971         //bounding box
   WRITE_SHORT (offset+0x28) 3802         //bounding box
   WRITE_SHORT (offset+0x2a) 4            //vertices number
   WRITE_LONG  (offset+0x2c) "%vert_num%" //first vertex index
   WRITE_LONG  (offset+0x34) 34           //cursor
   WRITE_ASCII (offset+0x38) ~DD8001~     //destination area
   WRITE_ASCII (offset+0x40) ~EXIT8000~   //destination area's entrance name
   WRITE_LONG  (offset+0x60) 0x00000004   //flags - party required
   WRITE_SHORT (offset+0x70) 3921         //Trap location X
   WRITE_SHORT (offset+0x72) 3752         //Trap location Y
   SET "infotrig_num"="%infotrig_num%"+1
   WRITE_SHORT 0x5a  "%infotrig_num%"

   SET "info_ext"=0xc4
   PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN
     "items_offset"="%items_offset%"+"%info_ext%"
     WRITE_LONG  0x78  "%items_offset%"
   END
   PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN
     "vert_offset"="%vert_offset%"+"%info_ext%"
     WRITE_LONG  0x7c  "%vert_offset%"
   END
   PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END

  //adding 4 new vertices for triggers
   SET offset = ("%vert_offset%"+0x04*"%vert_num%")
   INSERT_BYTES offset (0x04*4)
   WRITE_SHORT  offset      3871
   WRITE_SHORT  (offset+2)  3702
   WRITE_SHORT  (offset+4)  3971
   WRITE_SHORT  (offset+6)  3702
   WRITE_SHORT  (offset+8)  3971
   WRITE_SHORT  (offset+10) 3802
   WRITE_SHORT  (offset+12) 3871
   WRITE_SHORT  (offset+14) 3802
   SET "vert_num"="%vert_num%"+4
   WRITE_SHORT 0x80  "%vert_num%"

   SET "info_ext"=0x04*4
   PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN
     "items_offset"="%items_offset%"+"%info_ext%"
     WRITE_LONG  0x78  "%items_offset%"
   END
   PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN
     "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
     WRITE_LONG  0x5c  "%infotrig_offset%"
   END
   PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END

 //adding 1 new entrance
 SET offset = ("%entrances_offset%"+0x68*"%entrances_num%")
 INSERT_BYTES offset 0x68
 WRITE_ASCII  offset      ~EXIT8001~
 WRITE_SHORT  (offset+0x20)  3921     //X
 WRITE_SHORT  (offset+0x22)  3752     //Y
 WRITE_LONG   (offset+0x24)  "8"      // facing
 SET "entrances_num"="%entrances_num%"+1
 WRITE_LONG 0x6c  "%entrances_num%"

 SET "info_ext"=0x68
 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

COPY ~TDD/ARE/DD8000B.are~          ~override~
COPY ~TDD/ARE/DD8000C.are~          ~override~
COPY ~TDD/ARE/DD8000D.are~          ~override~
COPY ~TDD/ARE/DD8000E.are~          ~override~
COPY ~TDD/ARE/DD8001.are~           ~override~
READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

//adding new trigger ************************************************
   SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")
   INSERT_BYTES offset 0xc4
   WRITE_ASCII offset ~Tranc020~
   WRITE_SHORT (offset+0x20) 2            //travel trigger
   WRITE_SHORT (offset+0x22) 461          //bounding box
   WRITE_SHORT (offset+0x24) 62           //bounding box
   WRITE_SHORT (offset+0x26) 561          //bounding box
   WRITE_SHORT (offset+0x28) 162          //bounding box
   WRITE_SHORT (offset+0x2a) 4            //vertices number
   WRITE_LONG  (offset+0x2c) "%vert_num%" //first vertex index
   WRITE_LONG  (offset+0x34) 34           //cursor
   WRITE_ASCII (offset+0x38) ~DD8000~     //destination area
   WRITE_ASCII (offset+0x40) ~EXIT8001~   //destination area's entrance name
   WRITE_LONG  (offset+0x60) 0x00000004   //flags - party required
   WRITE_SHORT (offset+0x70) 511          //Trap location X
   WRITE_SHORT (offset+0x72) 112          //Trap location Y
   SET "infotrig_num"="%infotrig_num%"+1
   WRITE_SHORT 0x5a  "%infotrig_num%"

   SET "info_ext"=0xc4
   PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN
     "items_offset"="%items_offset%"+"%info_ext%"
     WRITE_LONG  0x78  "%items_offset%"
   END
   PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN
     "vert_offset"="%vert_offset%"+"%info_ext%"
     WRITE_LONG  0x7c  "%vert_offset%"
   END
   PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END

  //adding 4 new vertices for triggers
   SET offset = ("%vert_offset%"+0x04*"%vert_num%")
   INSERT_BYTES offset (0x04*4)
   WRITE_SHORT  offset      461
   WRITE_SHORT  (offset+2)  62
   WRITE_SHORT  (offset+4)  561
   WRITE_SHORT  (offset+6)  62
   WRITE_SHORT  (offset+8)  561
   WRITE_SHORT  (offset+10) 162
   WRITE_SHORT  (offset+12) 461
   WRITE_SHORT  (offset+14) 162
   SET "vert_num"="%vert_num%"+4
   WRITE_SHORT 0x80  "%vert_num%"

   SET "info_ext"=0x04*4
   PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN
     "items_offset"="%items_offset%"+"%info_ext%"
     WRITE_LONG  0x78  "%items_offset%"
   END
   PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN
     "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
     WRITE_LONG  0x5c  "%infotrig_offset%"
   END
   PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END

 //adding 1 new entrance
 SET offset = ("%entrances_offset%"+0x68*"%entrances_num%")
 INSERT_BYTES offset 0x68
 WRITE_ASCII  offset      ~EXIT8000~
 WRITE_SHORT  (offset+0x20)  511      //X
 WRITE_SHORT  (offset+0x22)  112      //Y
 WRITE_LONG   (offset+0x24)  "14"     // facing
 SET "entrances_num"="%entrances_num%"+1
 WRITE_LONG 0x6c  "%entrances_num%"

 SET "info_ext"=0x68
 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

COPY ~TDD/ARE/DD8001B.are~          ~override~
COPY ~TDD/ARE/DD8001C.are~          ~override~
COPY ~TDD/ARE/DD8001D.are~          ~override~
COPY ~TDD/ARE/DD8002.are~           ~override~
COPY ~TDD/ARE/DD8002CT.are~         ~override~
COPY ~TDD/ARE/DD8003.are~           ~override~
COPY ~TDD/ARE/DD8013.are~           ~override~
COPY ~TDD/ARE/DD9000.are~           ~override~
COPY ~TDD/ARE/DD9001.are~           ~override~
COPY ~TDD/ARE/DD9002.are~           ~override~
COPY ~TDD/ARE/DD9003.are~           ~override~
COPY ~TDD/ARE/DD9004.are~           ~override~
COPY ~TDD/ARE/DD9005.are~           ~override~
COPY ~TDD/ARE/DD9006.are~           ~override~
COPY ~TDD/ARE/DD9007.are~           ~override~
COPY ~TDD/ARE/DD9008.are~           ~override~
COPY ~TDD/ARE/DD9009.are~           ~override~
COPY ~TDD/ARE/DD9201.are~           ~override~
COPY ~TDD/ARE/DD9400.are~           ~override~
COPY ~TDD/ARE/DD9501.are~           ~override~
COPY ~TDD/ARE/DD9601.are~           ~override~
COPY ~TDD/ARE/DD9X00.are~           ~override~
COPY ~TDD/ARE/DD9X00C1.are~         ~override~
COPY ~TDD/ARE/DD9X01.are~           ~override~
COPY ~TDD/ARE/DD9X02.are~           ~override~
COPY ~TDD/ARE/DD9X03.are~           ~override~
COPY ~TDD/ARE/DD9X04.are~           ~override~
COPY ~TDD/ARE/DD9X05.are~           ~override~
COPY ~TDD/ARE/DD9X06.are~           ~override~
COPY ~TDD/ARE/DDKIV1.are~           ~override~
COPY ~TDD/ARE/DX2001.are~           ~override~
COPY ~TDD/ARE/MM5102.are~           ~override~
COPY ~TDD/ARE/MM5103.are~           ~override~

                                    
//******************************************************************
//  DIALOGS
//******************************************************************
PRINT @20079

COPY + ~TDD/D~ ~DLGCASH~

ACTION_IF FILE_EXISTS ~data/BG1ARE.BIF~     //BGT-WeiDU compatibility
THEN BEGIN
  COPY + ~TDD/Compat/BGT/aKIVANP.D~ ~DLGCASH~
         ~TDD/Compat/BGT/aKAGAIP.D~ ~DLGCASH~
         ~TDD/Compat/BGT/aYESLIP.D~ ~DLGCASH~
         ~TDD/Compat/BGT/aSHARTP.D~ ~DLGCASH~
         ~TDD/Compat/BGT/aMONTAP.D~ ~DLGCASH~
         ~TDD/Compat/BGT/aXZARP.D~  ~DLGCASH~
END
ELSE BEGIN
  COPY + ~TDD/Compat/TDD/KIVANP.D~ ~DLGCASH~
         ~TDD/Compat/TDD/KAGAIP.D~ ~DLGCASH~
         ~TDD/Compat/TDD/YESLIP.D~ ~DLGCASH~
         ~TDD/Compat/TDD/SHARTP.D~ ~DLGCASH~
         ~TDD/Compat/TDD/MONTAP.D~ ~DLGCASH~
         ~TDD/Compat/TDD/XZARP.D~ ~DLGCASH~
END

//only 3 ToB dialogues modification
COPY + ~TDD/D_TOB/mPIRCOR5.D~ ~DLGCASH~
COPY + ~TDD/D_TOB/mBERNARD.D~ ~DLGCASH~
COPY + ~TDD/D_TOB/mSUELLE2.D~ ~DLGCASH~

COMPILE ~DLGCASH~

//******************************************************************
//  SCRIPTS -- IDS UPDATED
//******************************************************************
PRINT @20080

COMPILE ~TDD/BAF~

// KD - 4 ToB scripts moved from /BAF/ to /SNIP/ *****
COPY_EXISTING ~DDGUARD.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oDDGRD1.BAF~ ~TDD/SNIP/nDDGRD1.BAF~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oDDGRD2.BAF~ ~TDD/SNIP/nDDGRD2.BAF~

COPY_EXISTING ~DDWELL.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oDDWELL.BAF~ ~TDD/SNIP/nDDWELL.BAF~

COMPILE ~TDD/SNIP/DRAGBROW.BAF~
        ~TDD/SNIP/MONTBODY.BAF~
//****************************************************

//it's a general fix - G3FixPack has it
//COPY_EXISTING ~ANOM25.BCS~ ~override~
// REPLACE_BCS_BLOCK ~TDD/SNIP/oANOM25.BAF~ ~TDD/SNIP/nANOM25.BAF~

EXTEND_TOP    ~AR0020.BCS~ ~TDD/SNIP/tAR0020.BAF~
EXTEND_BOTTOM ~AR0020.BCS~ ~TDD/SNIP/bAR0020.BAF~

COPY_EXISTING ~AR0300.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oAR0300.BAF~ ~TDD/SNIP/nAR0300.BAF~
EXTEND_BOTTOM ~AR0300.BCS~ ~TDD/SNIP/bAR0300.BAF~

EXTEND_BOTTOM ~AR0321.BCS~ ~TDD/SNIP/bAR0321.BAF~
EXTEND_BOTTOM ~AR0322.BCS~ ~TDD/SNIP/bAR0322.BAF~
EXTEND_BOTTOM ~AR0323.BCS~ ~TDD/SNIP/bAR0323.BAF~
EXTEND_BOTTOM ~AR0324.BCS~ ~TDD/SNIP/bAR0324.BAF~
EXTEND_BOTTOM ~AR0400.BCS~ ~TDD/SNIP/bAR0400.BAF~
EXTEND_BOTTOM ~AR0402.BCS~ ~TDD/SNIP/bAR0402.BAF~
EXTEND_BOTTOM ~AR0404.BCS~ ~TDD/SNIP/bAR0404.BAF~
EXTEND_BOTTOM ~AR0405.BCS~ ~TDD/SNIP/bAR0405.BAF~
EXTEND_BOTTOM ~AR0406.BCS~ ~TDD/SNIP/bAR0406.BAF~
EXTEND_BOTTOM ~AR0411.BCS~ ~TDD/SNIP/bAR0411.BAF~
EXTEND_BOTTOM ~AR0602.BCS~ ~TDD/SNIP/bAR0602.BAF~
EXTEND_BOTTOM ~AR0603.BCS~ ~TDD/SNIP/bAR0603.BAF~

COPY_EXISTING ~AR0800.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oAR0800.BAF~ ~TDD/SNIP/nAR0800.BAF~

EXTEND_BOTTOM ~AR0801.BCS~ ~TDD/SNIP/bAR0801.BAF~
EXTEND_BOTTOM ~AR0900.BCS~ ~TDD/SNIP/bAR0900.BAF~

COPY_EXISTING ~AR0902.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oAR0902.BAF~ ~TDD/SNIP/nAR0902.BAF~

EXTEND_TOP ~AR0903.BCS~ ~TDD/SNIP/tAR0903.BAF~
EXTEND_BOTTOM ~AR0904.BCS~ ~TDD/SNIP/bAR0904.BAF~
EXTEND_TOP ~AR0906.BCS~ ~TDD/SNIP/tAR0906.BAF~
EXTEND_BOTTOM ~AR1000.BCS~ ~TDD/SNIP/bAR1000.BAF~
EXTEND_TOP ~AR1002.BCS~ ~TDD/SNIP/tAR1002.BAF~
EXTEND_BOTTOM ~AR1005.BCS~ ~TDD/SNIP/bAR1005.BAF~
EXTEND_BOTTOM ~AR1008.BCS~ ~TDD/SNIP/bAR1008.BAF~
EXTEND_BOTTOM ~AR1100.BCS~ ~TDD/SNIP/bAR1100.BAF~
EXTEND_BOTTOM ~AR1105.BCS~ ~TDD/SNIP/bAR1105.BAF~
EXTEND_BOTTOM ~AR1106.BCS~ ~TDD/SNIP/bAR1106.BAF~
EXTEND_BOTTOM ~AR1300.BCS~ ~TDD/SNIP/bAR1300.BAF~
EXTEND_BOTTOM ~AR1301.BCS~ ~TDD/SNIP/bAR1301.BAF~
EXTEND_TOP ~AR1401.BCS~ ~TDD/SNIP/tAR1401.BAF~
EXTEND_TOP ~AR1402.BCS~ ~TDD/SNIP/tAR1402.BAF~

EXTEND_TOP ~AR1700.BCS~ ~TDD/SNIP/tAR1700.BAF~ //Wyvern movie bug - AR1700 is a BG1 area script

EXTEND_BOTTOM ~AR1901.BCS~ ~TDD/SNIP/bAR1901.BAF~

COPY_EXISTING ~AR2900.BCS~ ~override~
 REPLACE_BCS_BLOCK ~TDD/SNIP/oAR2900.BAF~ ~TDD/SNIP/nAR2900.BAF~

EXTEND_BOTTOM ~AR2800.BCS~ ~TDD/SNIP/bAR2800.BAF~
EXTEND_BOTTOM ~AR2901.BCS~ ~TDD/SNIP/bAR2901.BAF~
EXTEND_BOTTOM ~AR2902.BCS~ ~TDD/SNIP/bAR2902.BAF~
EXTEND_BOTTOM ~AR2903.BCS~ ~TDD/SNIP/bAR2903.BAF~

EXTEND_BOTTOM ~AR2905.BCS~ ~TDD/SNIP/bAR2905.BAF~

EXTEND_BOTTOM ~BALDUR.BCS~ ~TDD/SNIP/bBALDUR.BAF~
EXTEND_BOTTOM ~DPLAYER2.BCS~ ~TDD/SNIP/bDPLAYR2.BAF~

// Talos temple fix for Baurian not appearing (initial submission by Isaya)
// Improved and weiduized by Nythrun (http://forums.gibberlings3.net/index.php?showtopic=14146)
COPY_EXISTING ~AR0904.BCS~ ~override~
  DECOMPILE_BCS_TO_BAF
    REPLACE_TEXTUALLY ~^  Dead("talmiss")~
                      ~  Dead("talmiss")  Exists("talmiss2")  !Dead("talmiss2")~
    REPLACE_TEXTUALLY ~^  Dead("talmiss2")~
                      ~  Dead("talmiss2")  Exists("talmiss")  !Dead("talmiss")~
  COMPILE_BAF_TO_BCS
UNLESS ~16465 0 1 0 0 "talmiss[2]?" "" OB~


ACTION_IF FILE_EXISTS ~data/BG1ARE.BIF~   //BGT compatibility
THEN BEGIN
  //****** Kivan  ******************************************************************
  EXTEND_TOP ~AR1100.BCS~ ~TDD/Compat/BGT/Replace/xAR1100.BAF~  //BAF modified

  COPY_EXISTING ~DDKIV1.BCS~ ~override~ //TDD script
   DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"kivandd"~ ~"Kivan"~  //change DeathVar check
   COMPILE_BAF_TO_BCS
  //********************************************************************************

  //****** Kagain ******************************************************************
  EXTEND_TOP ~AR0020.BCS~ ~TDD/Compat/BGT/Replace/xAR0200.BAF~ //BAF modified

  COPY_EXISTING ~BALDUR.BCS~ ~override~
   DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"kagaindd"~ ~"Kagain"~    //change DeathVar check
   REPLACE_TEXTUALLY ~"yeslicdd"~ ~"Yeslick"~   //change DeathVar check
   REPLACE_TEXTUALLY ~"montydd"~  ~"Montaron"~  //change DeathVar check
   REPLACE_TEXTUALLY ~"xzardd"~   ~"Xzar"~      //change DeathVar check
   COMPILE_BAF_TO_BCS
  //********************************************************************************

  //****** Yeslick *****************************************************************
  EXTEND_TOP ~AR0900.BCS~ ~TDD/Compat/BGT/Replace/xAR0900.BAF~ //BAF modified
  //********************************************************************************

  //****** Shar-Teel ***************************************************************
  EXTEND_TOP ~AR1005.BCS~ ~TDD/Compat/BGT/Replace/xAR1005.BAF~

  COPY_EXISTING ~AR0400.BCS~   ~override~    //TDD scripts
                ~SHARFIT1.BCS~ ~override~
   DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"shartedd"~ ~"Sharteel"~   //change DeathVar check
   COMPILE_BAF_TO_BCS

  COPY_EXISTING ~SHARWINS.DLG~   ~override~  //TDD dialogue
   DECOMPILE_DLG_TO_D
   REPLACE_TEXTUALLY ~"shartedd"~ ~"Sharteel"~   //change DeathVar check
   COMPILE_D_TO_DLG
  //********************************************************************************

  //****** Montaron ****************************************************************
  // as far as he's going to be resurrected there's no continuation - his new location is unknown
  // based on MONTAR13.CRE from TDD
  //********************************************************************************

  //****** Xzar ********************************************************************
  COPY_EXISTING ~AR0300.BCS~ ~override~
   REPLACE_BCS_BLOCK ~TDD/Compat/BGT/Replace/rAR0300.BAF~ ~TDD/Compat/BGT/Replace/xAR0300.BAF~

  COPY_EXISTING ~MONTYRAS.BCS~   ~override~    //TDD scripts
                ~DPLAYER2.BCS~   ~override~    //TDD scripts
                ~HARPASS2.BCS~   ~override~    //TDD scripts
   DECOMPILE_BCS_TO_BAF
   REPLACE_TEXTUALLY ~"xzardd"~  ~"Xzar"~        //change DeathVar check
   COMPILE_BAF_TO_BCS

  COPY_EXISTING ~MONTAP.DLG~   ~override~  //TDD dialogue
                ~XZARDD.DLG~   ~override~
                ~XZARTHXB.DLG~   ~override~
   DECOMPILE_DLG_TO_D
   REPLACE_TEXTUALLY ~"xzardd"~  ~"Xzar"~        //change DeathVar check
   COMPILE_D_TO_DLG
  //********************************************************************************


  //BGT Transition (1.0) **********************************************************
  COPY_EXISTING ~ARAM00.BCS~ ~override~
    DECOMPILE_BCS_TO_BAF
    REPLACE_TEXTUALLY
~ActionOverride("Kivan",LeaveParty())
ActionOverride("Kivan",ChangeAIScript("",DEFAULT))
ActionOverride("Kivan",ClearAllActions())
ActionOverride("Kivan",DestroySelf())~
~ActionOverride("Kivan",LeaveParty())
ActionOverride("Kivan",ChangeAIScript("",DEFAULT))
ActionOverride("Kivan",ClearAllActions())
SetGlobal("KivanPartyBG1","GLOBAL",1)
ActionOverride("Kivan",ChangeAIScript("SBTKIV",CLASS))
ActionOverride("Kivan",MoveBetweenAreas("AR1100",[4172.1239],4))~
REPLACE_TEXTUALLY
~ActionOverride("Kagain",LeaveParty())
ActionOverride("Kagain",ChangeAIScript("",DEFAULT))
ActionOverride("Kagain",ClearAllActions())
ActionOverride("Kagain",DestroySelf())~
~ActionOverride("Kagain",LeaveParty())
ActionOverride("Kagain",ChangeAIScript("",DEFAULT))
ActionOverride("Kagain",ClearAllActions())
SetGlobal("KagainPartyBG1","GLOBAL",1)
ActionOverride("Kagain",ChangeAIScript("SBTKAG",CLASS))
ActionOverride("Kagain",MoveBetweenAreas("AR0020",[547.494],12))~
REPLACE_TEXTUALLY
~ActionOverride("Yeslick",LeaveParty())
ActionOverride("Yeslick",ChangeAIScript("",DEFAULT))
ActionOverride("Yeslick",ClearAllActions())
ActionOverride("Yeslick",DestroySelf())~
~ActionOverride("Yeslick",LeaveParty())
ActionOverride("Yeslick",ChangeAIScript("",DEFAULT))
ActionOverride("Yeslick",ClearAllActions())
SetGlobal("YeslickPartyBG1","GLOBAL",1)
ActionOverride("Yeslick",ChangeAIScript("SBTYES",RACE))
ActionOverride("Yeslick",MoveBetweenAreas("AR0900",[3445.1896],4))~
REPLACE_TEXTUALLY
~ActionOverride("Sharteel",LeaveParty())
ActionOverride("Sharteel",ChangeAIScript("",DEFAULT))
ActionOverride("Sharteel",ClearAllActions())
ActionOverride("Sharteel",DestroySelf())~
~ActionOverride("Sharteel",LeaveParty()
ActionOverride("Sharteel",ChangeAIScript("",DEFAULT))
ActionOverride("Sharteel",ClearAllActions())
SetGlobal("SharteelPartyBG1","GLOBAL",1)
ActionOverride("Sharteel",ChangeAIScript("SBTSHR",CLASS))
ActionOverride("Sharteel",MoveBetweenAreas("AR1005",[1131.335],8))~
REPLACE_TEXTUALLY
~ActionOverride("Xzar",LeaveParty())
ActionOverride("Xzar",ChangeAIScript("",DEFAULT))
ActionOverride("Xzar",ClearAllActions())
ActionOverride("Xzar",DestroySelf())~
~ActionOverride("Xzar",LeaveParty())
ActionOverride("Xzar",ChangeAIScript("",DEFAULT))
ActionOverride("Xzar",ClearAllActions())
SetGlobal("XzarPartyBG1","GLOBAL",1)
ActionOverride("Xzar",ChangeAIScript("SBTXZR",RACE))
ActionOverride("Xzar",MoveBetweenAreas("AR0300",[2372.2475],0))~
    COMPILE_BAF_TO_BCS
  //********************************************************************************
END


//******************************************************************
//  AREAS
//******************************************************************
PRINT @20081
PRINT @20082
//*****************************************************
// Patching BG2 areas
//*****************************************************
//AR1303 and AR2812 patching moved to Baldurdash-WeiDU
//*****************************************************
COPY_EXISTING ~AR0202.are~           ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Drawer 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
   END
 END
 PATCH_IF ("%items%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%")) "name"
     PATCH_IF (("%name%" STRING_COMPARE_CASE "DART02")=0) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "TYBBMACE" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0202.are~


COPY_EXISTING ~AR0306.are~           ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Chest 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
   END
 END
 PATCH_IF ("%items%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%")) "name"
     PATCH_IF (("%name%" STRING_COMPARE_CASE "POTN19")=0) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "ROGUE" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0306.are~


COPY_EXISTING ~AR0309.are~           ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Table 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Chest 1")=0) BEGIN
     WRITE_ASCII ("%cont_offset%"+0xc0*cnt)     "Chest_1"   //changing container's name
   END
 END
 PATCH_IF ("%items%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%")) "name"
     PATCH_IF (("%name%" STRING_COMPARE_CASE "MISC07")=0) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "ZZN6GC" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0309.are~


COPY_EXISTING ~AR0400.are~           ~override~
 READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

 SET info_1=1
 FOR( cnt=0; cnt<"%infotrig_num%"; cnt=cnt+1 ) BEGIN  //info/triggers loop
   READ_ASCII ("%infotrig_offset%"+0xc4*cnt)       "info_name"
   PATCH_IF (("%info_name%" STRING_COMPARE_CASE "Adario_assassin_den")=0) BEGIN  //if already exists
     info_1=0
   END
 END

 PATCH_IF (info_1=1) BEGIN                //adding new Travel trigger  *******************************
   SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")
   INSERT_BYTES offset 0xc4
   WRITE_ASCII offset ~Adario_assassin_den~
   WRITE_SHORT (offset+0x20) 2            //travel trigger
   WRITE_SHORT (offset+0x22) 2993         //bounding box
   WRITE_SHORT (offset+0x24) 1542         //bounding box
   WRITE_SHORT (offset+0x26) 3136         //bounding box
   WRITE_SHORT (offset+0x28) 1647         //bounding box
   WRITE_SHORT (offset+0x2a) 4            //vertices number
   WRITE_LONG  (offset+0x2c) "%vert_num%" //first vertex index
   WRITE_LONG  (offset+0x34) 30           //cursor frame number
   WRITE_ASCII (offset+0x38) ~DD0401X~    //destination area
   WRITE_ASCII (offset+0x40) ~Exit0302~   //entrance name
   WRITE_LONG  (offset+0x60) 4            //party required flag
   WRITE_ASCII (offset+0x7c) ~None~       //script
   SET "infotrig_num"="%infotrig_num%"+1
   WRITE_SHORT 0x5a  "%infotrig_num%"
 END

 SET "info_ext"=0xc4*info_1
 PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

 PATCH_IF (info_1=1) BEGIN            //adding vertices for the new trigger
   SET offset = ("%vert_offset%"+0x04*"%vert_num%")
   INSERT_BYTES offset (0x04*4)
   WRITE_SHORT  offset      2993
   WRITE_SHORT  (offset+2)  1577
   WRITE_SHORT  (offset+4)  3067
   WRITE_SHORT  (offset+6)  1647
   WRITE_SHORT  (offset+8)  3136
   WRITE_SHORT  (offset+10) 1612
   WRITE_SHORT  (offset+12) 3057
   WRITE_SHORT  (offset+14) 1542
   SET "vert_num"="%vert_num%"+4
   WRITE_SHORT 0x80  "%vert_num%"
 END

 SET "info_ext"=0x04*info_1*4
 PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0400.are~


COPY_EXISTING ~AR0411.are~           ~override~
 READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (9)
   PATCH_IF ("%items%">0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item_next"        //shift all next containers' items
     WRITE_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "%first_item_next%"+5
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Tool CT 3")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
     WRITE_LONG ("%cont_offset%"+0xc0*cnt+0x44) "%items%"+5  //we'll add 5 more items there
   END
 END

 PATCH_IF ("%items%">0 ) BEGIN
   WRITE_SHORT 0x76  "%items_num%"+5       //increment total items count

   SET offset = ("%items_offset%"+0x14*"%first_item%")  //adding 5 item to container  *******************************
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MINTGOLA~ #8
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MINTGOLB~ #8
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MINTGOLR~ #8
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MINTGOLS~ #8
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~GOLBOOK~ #8

   SET "info_ext"=0x14*5                 //we added 5 items
   PATCH_IF ("%actors_offset%">="%items_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%items_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%items_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%items_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%vert_offset%">="%items_offset%") BEGIN
     "vert_offset"="%vert_offset%"+"%info_ext%"
     WRITE_LONG  0x7c  "%vert_offset%"
   END
   PATCH_IF ("%infotrig_offset%">="%items_offset%") BEGIN
     "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
     WRITE_LONG  0x5c  "%infotrig_offset%"
   END
   PATCH_IF ("%amb_offset%">="%items_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%items_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%items_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%items_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%items_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%items_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%items_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%items_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%items_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0411.are~


COPY_EXISTING ~AR0509.are~           ~override~
 WRITE_ASCII 0x94 "AR0509" #8           //area script
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~AR0802.are~           ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Crate 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
   END
 END
 PATCH_IF ("%items%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%")) "name"
     PATCH_IF (("%name%" STRING_COMPARE_CASE "RING11")=0) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "U1HAX3A" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR0802.are~


COPY_EXISTING ~AR1005.are~           ~override~
 WRITE_ASCII 0x94 "AR1005" #8       //area script
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~AR1100.are~           ~override~
 READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

 SET info_1=1
 FOR( cnt=0; cnt<"%infotrig_num%"; cnt=cnt+1 ) BEGIN  //info/triggers loop
   READ_ASCII ("%infotrig_offset%"+0xc4*cnt)       "info_name"
   PATCH_IF (("%info_name%" STRING_COMPARE_CASE "kivan_orc_cave")=0) BEGIN  //if already exists
     info_1=0
   END
 END

 PATCH_IF (info_1=1) BEGIN                //adding new Travel trigger  *******************************
   SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")
   INSERT_BYTES offset 0xc4
   WRITE_ASCII offset ~kivan_orc_cave~
   WRITE_SHORT (offset+0x20) 2            //travel trigger
   WRITE_SHORT (offset+0x22) 89         //bounding box
   WRITE_SHORT (offset+0x24) 1257         //bounding box
   WRITE_SHORT (offset+0x26) 220         //bounding box
   WRITE_SHORT (offset+0x28) 1396         //bounding box
   WRITE_SHORT (offset+0x2a) 6            //vertices number
   WRITE_LONG  (offset+0x2c) "%vert_num%" //first vertex index
   WRITE_LONG  (offset+0x34) 30           //cursor frame number
   WRITE_ASCII (offset+0x38) ~DDKIV1~    //destination area
   WRITE_ASCII (offset+0x40) ~FR1200~   //entrance name
   WRITE_LONG  (offset+0x60) 4            //party required flag
   WRITE_ASCII (offset+0x7c) ~None~       //script
   SET "infotrig_num"="%infotrig_num%"+1
   WRITE_SHORT 0x5a  "%infotrig_num%"
 END

 SET "info_ext"=0xc4*info_1
 PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

 PATCH_IF (info_1=1) BEGIN            //adding vertices for the new trigger
   SET offset = ("%vert_offset%"+0x04*"%vert_num%")
   INSERT_BYTES offset (0x04*6)
   WRITE_SHORT  offset      89
   WRITE_SHORT  (offset+2)  1396
   WRITE_SHORT  (offset+4)  91
   WRITE_SHORT  (offset+6)  1324
   WRITE_SHORT  (offset+8)  101
   WRITE_SHORT  (offset+10) 1266
   WRITE_SHORT  (offset+12) 150
   WRITE_SHORT  (offset+14) 1257
   WRITE_SHORT  (offset+16) 207
   WRITE_SHORT  (offset+18) 1279
   WRITE_SHORT  (offset+20) 220
   WRITE_SHORT  (offset+22) 1300
   SET "vert_num"="%vert_num%"+6
   WRITE_SHORT 0x80  "%vert_num%"
 END

 SET "info_ext"=0x04*info_1*6
 PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR1100.are~


COPY_EXISTING ~AR1106.ARE~  ~override~
 READ_SHORT  0x48 "flags"
 WRITE_SHORT 0x48 ("%flags%" BOR 0x0020)  //Setting Dungeon flag

 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item"=0
 SET "items"=0
 SET "one"=0
 SET "two"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
   END
 END
 PATCH_IF ("%items%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "AX1H04")=0 AND "%one%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "DIVER" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
       SET "name"=1
       SET "one"=1
     END
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "AX1H04")=0 AND "%two%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item%"))     "SCRX9" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item%")+0xa) 0
       SET "two"=1
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1106.are~


COPY_EXISTING ~AR1202.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 SET "first_item2"=0
 SET "items2"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 9")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item2"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items2"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE03")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "ZZE6PE" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
 PATCH_IF ("%items2%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items2%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC41")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "CELEBROS" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1202.are~


COPY_EXISTING ~AR1301.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 SET "first_item2"=0
 SET "items2"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 7")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item2"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items2"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC39")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "U2HAX4B" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
 SET "done"=0
 PATCH_IF ("%items2%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items2%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "AX1H04")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "SCRX2" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
       SET "done"=1
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1301.are~


COPY_EXISTING ~AR1401.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 SET "first_item2"=0
 SET "items2"=0
 SET "first_item3"=0
 SET "items3"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (12)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 10")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 11")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item2"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items2"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 12")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item3"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items3"
   END
 END
 SET "done"=0
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "DART04")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "SASH" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
       SET "done"=1
     END
   END
 END
 SET "done"=0
 SET "done2"=0
 PATCH_IF ("%items2%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items2%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "DART01")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "SCRX5" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
       SET "done"=1
     END
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "AX1H04")=0 AND "%done2%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "SCRX71" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
       SET "done2"=1
     END
   END
 END
 SET "done"=0
 PATCH_IF ("%items3%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items3%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item3%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "BULL01")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item3%"))     "DROWBMSC" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item3%")+0xa) 0
       SET "done"=1
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1401.are~


COPY_EXISTING ~AR1513.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Table 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC07")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "HELMDED" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1513.are~


COPY_EXISTING ~AR1601.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Drawer 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC07")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "DARKLITE" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1601.are~


COPY_EXISTING ~AR1605.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 SET "first_item2"=0
 SET "items2"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item2"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items2"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE04")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "UDAGG5A" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
 PATCH_IF ("%items2%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items2%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC35")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "SCRX69" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR1605.are~


COPY_EXISTING ~AR1700.are~           ~override~
 READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

 SET info_1=1
 FOR( cnt=0; cnt<"%infotrig_num%"; cnt=cnt+1 ) BEGIN  //info/triggers loop
   READ_ASCII ("%infotrig_offset%"+0xc4*cnt)       "info_name" (12)
   PATCH_IF (("%info_name%" STRING_COMPARE_CASE "Trans DD0119")=0) BEGIN  //if already exists
     info_1=0
   END
 END

 PATCH_IF (info_1=1) BEGIN                //adding new Travel trigger  *******************************
   SET offset = ("%infotrig_offset%"+0xc4*"%infotrig_num%")
   INSERT_BYTES offset 0xc4
   WRITE_ASCII offset ~Trans DD0119~
   WRITE_SHORT (offset+0x20) 2            //travel trigger
   WRITE_SHORT (offset+0x22) 357         //bounding box
   WRITE_SHORT (offset+0x24) 956         //bounding box
   WRITE_SHORT (offset+0x26) 436         //bounding box
   WRITE_SHORT (offset+0x28) 1079         //bounding box
   WRITE_SHORT (offset+0x2a) 4            //vertices number
   WRITE_LONG  (offset+0x2c) "%vert_num%" //first vertex index
   WRITE_LONG  (offset+0x34) 30           //cursor frame number
   WRITE_ASCII (offset+0x38) ~DD0119~    //destination area
   WRITE_ASCII (offset+0x40) ~Exit0200~   //entrance name
   WRITE_LONG  (offset+0x60) 4            //party required flag
   WRITE_ASCII (offset+0x7c) ~None~       //script
   SET "infotrig_num"="%infotrig_num%"+1
   WRITE_SHORT 0x5a  "%infotrig_num%"
 END

 SET "info_ext"=0xc4*info_1
 PATCH_IF ("%actors_offset%">="%infotrig_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%infotrig_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%infotrig_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%infotrig_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%infotrig_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%vert_offset%">="%infotrig_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%amb_offset%">="%infotrig_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%infotrig_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%infotrig_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%infotrig_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%infotrig_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%infotrig_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%infotrig_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%infotrig_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%infotrig_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

 PATCH_IF (info_1=1) BEGIN            //adding vertices for the new trigger
   SET offset = ("%vert_offset%"+0x04*"%vert_num%")
   INSERT_BYTES offset (0x04*4)
   WRITE_SHORT  offset      357
   WRITE_SHORT  (offset+2)  1031
   WRITE_SHORT  (offset+4)  381
   WRITE_SHORT  (offset+6)  1079
   WRITE_SHORT  (offset+8)  436
   WRITE_SHORT  (offset+10) 1033
   WRITE_SHORT  (offset+12) 364
   WRITE_SHORT  (offset+14) 956
   SET "vert_num"="%vert_num%"+4
   WRITE_SHORT 0x80  "%vert_num%"
 END

 SET "info_ext"=0x04*info_1*4
 PATCH_IF ("%actors_offset%">="%vert_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%vert_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%entrances_offset%">="%vert_offset%") BEGIN
   "entrances_offset"="%entrances_offset%"+"%info_ext%"
   WRITE_LONG  0x68  "%entrances_offset%"
 END
 PATCH_IF ("%cont_offset%">="%vert_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%vert_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%vert_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%amb_offset%">="%vert_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%vert_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%vert_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%vert_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%vert_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%vert_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%vert_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%vert_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%vert_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END
 

 SET info_1=1
 FOR( cnt=0; cnt<"%entrances_num%"; cnt=cnt+1 ) BEGIN  //entrances loop
   READ_ASCII ("%entrances_offset%"+0x68*cnt)       "entry_name" (8)
   PATCH_IF (("%entry_name%" STRING_COMPARE_CASE "Exit0119")=0) BEGIN  //if already exists
     info_1=0
   END
 END

 PATCH_IF (info_1=1) BEGIN                //adding new Entry point ******************
   SET offset = ("%entrances_offset%"+0x68*"%entrances_num%")
   INSERT_BYTES offset 0x68
   WRITE_ASCII offset ~Exit0119~
   WRITE_SHORT (offset+0x20) 435         //X
   WRITE_SHORT (offset+0x22) 1040        //Y
   SET "entrances_num"="%entrances_num%"+1
   WRITE_SHORT 0x6c  "%entrances_num%"
 END

 SET "info_ext"=0x68*info_1
 PATCH_IF ("%actors_offset%">="%entrances_offset%") BEGIN
   "actors_offset"="%actors_offset%"+"%info_ext%"
   WRITE_LONG  0x54 "%actors_offset%"
 END
 PATCH_IF ("%infotrig_offset%">="%entrances_offset%") BEGIN
   "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
   WRITE_LONG  0x5c  "%infotrig_offset%"
 END
 PATCH_IF ("%spawns_offset%">="%entrances_offset%") BEGIN
   "spawns_offset"="%spawns_offset%"+"%info_ext%"
   WRITE_LONG  0x60  "%spawns_offset%"
 END
 PATCH_IF ("%cont_offset%">="%entrances_offset%") BEGIN
   "cont_offset"="%cont_offset%"+"%info_ext%"
   WRITE_LONG  0x70  "%cont_offset%"
 END
 PATCH_IF ("%items_offset%">="%entrances_offset%") BEGIN
   "items_offset"="%items_offset%"+"%info_ext%"
   WRITE_LONG  0x78  "%items_offset%"
 END
 PATCH_IF ("%vert_offset%">="%entrances_offset%") BEGIN
   "vert_offset"="%vert_offset%"+"%info_ext%"
   WRITE_LONG  0x7c  "%vert_offset%"
 END
 PATCH_IF ("%amb_offset%">="%entrances_offset%") BEGIN
   "amb_offset"="%amb_offset%"+"%info_ext%"
   WRITE_LONG  0x84  "%amb_offset%"
 END
 PATCH_IF ("%vars_offset%">="%entrances_offset%") BEGIN
   "vars_offset"="%vars_offset%"+"%info_ext%"
   WRITE_LONG  0x88  "%vars_offset%"
 END
 PATCH_IF ("%expbmp_offset%">="%entrances_offset%") BEGIN
   "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
   WRITE_LONG  0xa0  "%expbmp_offset%"
 END
 PATCH_IF ("%doors_offset%">="%entrances_offset%") BEGIN
   "doors_offset"="%doors_offset%"+"%info_ext%"
   WRITE_LONG  0xa8  "%doors_offset%"
 END
 PATCH_IF ("%anim_offset%">="%entrances_offset%") BEGIN
   "anim_offset"="%anim_offset%"+"%info_ext%"
   WRITE_LONG  0xb0  "%anim_offset%"
 END
 PATCH_IF ("%tiled_offset%">="%entrances_offset%") BEGIN
   "tiled_offset"="%tiled_offset%"+"%info_ext%"
   WRITE_LONG  0xb8  "%tiled_offset%"
 END
 PATCH_IF ("%songs_offset%">="%entrances_offset%") BEGIN
   "songs_offset"="%songs_offset%"+"%info_ext%"
   WRITE_LONG  0xbc  "%songs_offset%"
 END
 PATCH_IF ("%rest_spawns_offset%">="%entrances_offset%") BEGIN
   "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
   WRITE_LONG  0xc0  "%rest_spawns_offset%"
 END
 PATCH_IF ("%automap_offset%">="%entrances_offset%") BEGIN
   "automap_offset"="%automap_offset%"+"%info_ext%"
   WRITE_LONG  0xc4  "%automap_offset%"
 END

BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR1700.are~


COPY_EXISTING ~AR1904.are~           ~override~
 READ_LONG  0x54  "actors_offset"
 READ_SHORT 0x58  "actors_num"
 READ_SHORT 0x5a  "infotrig_num"
 READ_LONG  0x5c  "infotrig_offset"
 READ_LONG  0x60  "spawns_offset"
 READ_LONG  0x64  "spawns_num"
 READ_LONG  0x68  "entrances_offset"
 READ_LONG  0x6c  "entrances_num"
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 READ_LONG  0x7c  "vert_offset"
 READ_SHORT 0x80  "vert_num"
 READ_SHORT 0x82  "amb_num"
 READ_LONG  0x84  "amb_offset"
 READ_LONG  0x88  "vars_offset"
 READ_LONG  0x8c  "vars_num"
 READ_LONG  0xa0  "expbmp_offset"
 READ_LONG  0xa4  "doors_num"
 READ_LONG  0xa8  "doors_offset"
 READ_LONG  0xac  "anim_num"
 READ_LONG  0xb0  "anim_offset"
 READ_LONG  0xb4  "tiled_num"
 READ_LONG  0xb8  "tiled_offset"
 READ_LONG  0xbc  "songs_offset"
 READ_LONG  0xc0  "rest_spawns_offset"
 READ_LONG  0xc4  "automap_offset"
 READ_LONG  0xc8  "automap_num"

 SET "first_item"=0
 SET "items"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF ("%items%">0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item_next"        //shift all next containers' items
     WRITE_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "%first_item_next%"+2
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items"
     WRITE_LONG ("%cont_offset%"+0xc0*cnt+0x44) "%items%"+2  //we'll add 2 more items there
   END
 END

 PATCH_IF ("%items%">0 ) BEGIN
   WRITE_SHORT 0x76  "%items_num%"+2       //increment total items count

   SET offset = ("%items_offset%"+0x14*"%first_item%")  //adding 2 items 
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MINTELEF~ #8
   INSERT_BYTES offset        0x14
   WRITE_ASCII  offset        ~MISC07~ #8
   WRITE_SHORT  offset+10     3          //3 gold pieces

   SET "info_ext"=0x14*2                 //we added 2 items
   PATCH_IF ("%actors_offset%">="%items_offset%") BEGIN
     "actors_offset"="%actors_offset%"+"%info_ext%"
     WRITE_LONG  0x54 "%actors_offset%"
   END
   PATCH_IF ("%spawns_offset%">="%items_offset%") BEGIN
     "spawns_offset"="%spawns_offset%"+"%info_ext%"
     WRITE_LONG  0x60  "%spawns_offset%"
   END
   PATCH_IF ("%entrances_offset%">="%items_offset%") BEGIN
     "entrances_offset"="%entrances_offset%"+"%info_ext%"
     WRITE_LONG  0x68  "%entrances_offset%"
   END
   PATCH_IF ("%cont_offset%">="%items_offset%") BEGIN
     "cont_offset"="%cont_offset%"+"%info_ext%"
     WRITE_LONG  0x70  "%cont_offset%"
   END
   PATCH_IF ("%vert_offset%">="%items_offset%") BEGIN
     "vert_offset"="%vert_offset%"+"%info_ext%"
     WRITE_LONG  0x7c  "%vert_offset%"
   END
   PATCH_IF ("%infotrig_offset%">="%items_offset%") BEGIN
     "infotrig_offset"="%infotrig_offset%"+"%info_ext%"
     WRITE_LONG  0x5c  "%infotrig_offset%"
   END
   PATCH_IF ("%amb_offset%">="%items_offset%") BEGIN
     "amb_offset"="%amb_offset%"+"%info_ext%"
     WRITE_LONG  0x84  "%amb_offset%"
   END
   PATCH_IF ("%vars_offset%">="%items_offset%") BEGIN
     "vars_offset"="%vars_offset%"+"%info_ext%"
     WRITE_LONG  0x88  "%vars_offset%"
   END
   PATCH_IF ("%expbmp_offset%">="%items_offset%") BEGIN
     "expbmp_offset"="%expbmp_offset%"+"%info_ext%"
     WRITE_LONG  0xa0  "%expbmp_offset%"
   END
   PATCH_IF ("%doors_offset%">="%items_offset%") BEGIN
     "doors_offset"="%doors_offset%"+"%info_ext%"
     WRITE_LONG  0xa8  "%doors_offset%"
   END
   PATCH_IF ("%anim_offset%">="%items_offset%") BEGIN
     "anim_offset"="%anim_offset%"+"%info_ext%"
     WRITE_LONG  0xb0  "%anim_offset%"
   END
   PATCH_IF ("%tiled_offset%">="%items_offset%") BEGIN
     "tiled_offset"="%tiled_offset%"+"%info_ext%"
     WRITE_LONG  0xb8  "%tiled_offset%"
   END
   PATCH_IF ("%songs_offset%">="%items_offset%") BEGIN
     "songs_offset"="%songs_offset%"+"%info_ext%"
     WRITE_LONG  0xbc  "%songs_offset%"
   END
   PATCH_IF ("%rest_spawns_offset%">="%items_offset%") BEGIN
     "rest_spawns_offset"="%rest_spawns_offset%"+"%info_ext%"
     WRITE_LONG  0xc0  "%rest_spawns_offset%"
   END
   PATCH_IF ("%automap_offset%">="%items_offset%") BEGIN
     "automap_offset"="%automap_offset%"+"%info_ext%"
     WRITE_LONG  0xc4  "%automap_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES  //********************************************************  ~AR1904.are~


COPY_EXISTING ~AR2204.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 SET "first_item2"=0
 SET "items2"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 4")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item2"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items2"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE02")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "SCRX54" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
 PATCH_IF ("%items2%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items2%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE02")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item2%"))     "SPINETAP" #8//replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item2%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2204.are~


COPY_EXISTING ~AR2205.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Shelf 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE02")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "SCRX63" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2205.are~


COPY_EXISTING ~AR2210.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"  (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "MISC36")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "BLOODMAL" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2210.are~


COPY_EXISTING ~AR2401.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"  (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 3")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE03")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "DROWWARS" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2401.are~


COPY_EXISTING ~AR2402.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Shelf 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE02")=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "SHLDRED" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2402.are~


COPY_EXISTING ~AR2801.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name"
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Table 1")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 SET "done"=0
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "AROW02")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "SCRX47" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
       SET "done"=1
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2801.are~


COPY_EXISTING ~AR2802.ARE~  ~override~
 READ_LONG  0x70  "cont_offset"
 READ_SHORT 0x74  "cont_num"
 READ_SHORT 0x76  "items_num"
 READ_LONG  0x78  "items_offset"
 SET "first_item1"=0
 SET "items1"=0
 FOR( cnt=0; cnt<"%cont_num%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%cont_offset%"+0xc0*cnt)       "cont_name" (11)
   PATCH_IF (("%cont_name%" STRING_COMPARE_CASE "Container 2")=0) BEGIN
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x40)  "first_item1"
     READ_LONG ("%cont_offset%"+0xc0*cnt+0x44)  "items1"
   END
 END
 SET "done"=0
 PATCH_IF ("%items1%">0 ) BEGIN
   FOR( cnt=0; cnt<"%items1%"; cnt=cnt+1 ) BEGIN       //items loop
     READ_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%")) "name"
     PATCH_IF ( ("%name%" STRING_COMPARE_CASE "RNDTRE03")=0 AND "%done%"=0 ) BEGIN
       WRITE_ASCII ("%items_offset%"+0x14*(cnt+"%first_item1%"))     "STAFDRAG" #8 //replacing item
       WRITE_SHORT ("%items_offset%"+0x14*(cnt+"%first_item1%")+0xa) 0
       SET "done"=1
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES //********************************************************  ~AR2802.are~


//******************************************************************
//  CREATURES
//******************************************************************
PRINT @20088

//ACTION_IF NOT FILE_EXISTS ~data/BG1ARE.BIF~  //if there's BGT-WeiDU NPCs will be continous
//THEN BEGIN
 COPY ~TDD/CRE/KAGAIN11.cre~         ~override~   //override - to catch immediate Kit Pack installation
  SAY NAME1 @20089
  SAY NAME2 @20089
  SAY 0x1cc @20090
  WRITE_LONG 0x244 0  //no kit by default

 COPY ~TDD/CRE/KIVAN10.cre~          ~override~
      ~TDD/CRE/KIVAN12.cre~          ~override~
      ~TDD/CRE/KIVAN13.cre~          ~override~
  SAY NAME1 @20091
  SAY NAME2 @20091
  SAY 0x1cc @20092

 COPY ~TDD/CRE/MONTAR13.cre~         ~override~
  SAY NAME1 @20093
  SAY NAME2 @20093
  SAY 0x1cc @20094

 COPY ~TDD/CRE/SHARTE12.cre~         ~override~ //override - to catch immediate Kit Pack installation
  SAY NAME1 @20095
  SAY NAME2 @20095
  SAY 0x1cc @20096
  WRITE_LONG 0x244 0  //no kit by default

 COPY ~TDD/CRE/YESLIC9.cre~          ~override~
  SAY NAME1 @20097
  SAY NAME2 @20097
  SAY 0x1cc @20098

 COPY ~TDD/CRE/XZAR13.cre~           ~override~
  SAY NAME1 @20099
  SAY NAME2 @20099
  SAY 0x1cc @20100
//END


//*****************************************************
// Patching BG2 creatures
//*****************************************************
PRINT @20101

COPY_EXISTING ~ARAN.cre~            ~override~
              ~ARAN02.cre~          ~override~
 WRITE_ASCII 0x34 ~ARANS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~BERNARD.cre~         ~override~
 WRITE_ASCII 0x34 ~GM110S~ #8   //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~DRAGBLAC.cre~        ~override~
 WRITE_ASCII 0x34 ~DRAGBLS~ #8  //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~DRAGRED.cre~         ~override~
              ~FIRKRA02.cre~        ~override~
 WRITE_ASCII 0x34 ~FIRKS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~DRAGSHAD.cre~        ~override~
 WRITE_ASCII 0x34 ~SHADS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~DRAGSILV.cre~        ~override~
              ~UDSILVER.cre~        ~override~
 WRITE_ASCII 0x34 ~DRAGWS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~DRUIDAD.cre~         ~override~
 WRITE_ASCII 0x248 ~DRUIDAD~ #8    //OVERRIDE script
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~LAVOK02.cre~         ~override~
 READ_LONG 0x2bc "itm_offset"
 READ_LONG 0x2c0 "itm_cnt"
 FOR( cnt=0; cnt<"%itm_cnt%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%itm_offset%"+0x14*cnt)       "itm_name"
   PATCH_IF (("%itm_name%" STRING_COMPARE_CASE "STAF01")=0) BEGIN
     WRITE_ASCII ("%itm_offset%"+0x14*cnt)    "MINTGOH"  #8   //replacing item
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MAEVAR.cre~          ~override~
 WRITE_ASCII 0x34 ~MAEVARS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~ORC01.cre~           ~override~
 WRITE_SHORT 0x24  55
 WRITE_SHORT 0x26  55     //new HP - was 35
 WRITE_BYTE  0x52  13     //THAC0 - was 17
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~ORC02.cre~           ~override~
 WRITE_SHORT 0x24  55
 WRITE_SHORT 0x26  55     //new HP - was 35
 WRITE_BYTE  0x52  12     //THAC0 - was 18
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~ORC03.cre~           ~override~
 WRITE_BYTE  0x52  14     //THAC0 - was 19
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~ORC04.cre~           ~override~
 WRITE_SHORT 0x24  45
 WRITE_SHORT 0x26  45     //new HP - was 30
 WRITE_SHORT 0x48  1      //effective AC - was 5
 WRITE_BYTE  0x52  15     //THAC0 - was 19
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~RENAL.cre~           ~override~
 WRITE_ASCII 0x34 ~RENALS~ #8    //small portrait
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~SHADRA01.cre~        ~override~
 WRITE_ASCII 0x34 ~SHADS~ #8    //small portrait
 READ_LONG 0x2bc "itm_offset"
 READ_LONG 0x2c0 "itm_cnt"
 SET "done"=0
 FOR( cnt=0; cnt<"%itm_cnt%"; cnt=cnt+1 ) BEGIN  //containers loop
   READ_ASCII ("%itm_offset%"+0x14*cnt)       "itm_name"
   PATCH_IF (("%itm_name%" STRING_COMPARE_CASE "MISC39")=0 AND "%done%"=0) BEGIN
     WRITE_ASCII ("%itm_offset%"+0x14*cnt)    "MINTRANM"  #8   //replacing item
     SET "done"=1
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~SPY406.cre~          ~override~
 WRITE_ASCII 0x248 ~SPY406~ #8   //OVERRIDE script
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~XZAR.cre~            ~override~
 WRITE_ASCII 0x34 ~XZARS~ #8       //small portrait
BUT_ONLY_IF_IT_CHANGES


//*****************************************************
// Installing new creatures
//*****************************************************
PRINT @20103

//missed stuff - taken from BP v1.6 ************
COPY ~TDD/CRE/HOBARC03.CRE~    ~TDD-CRE~
  SAY NAME1 @20104
  SAY NAME2 @20104

COPY ~TDD/CRE/HOBWIZ02.CRE~    ~TDD-CRE~
  SAY NAME1 @20105
  SAY NAME2 @20105

COPY ~TDD/CRE/KOBCAP02.CRE~    ~TDD-CRE~
  SAY NAME1 @20106
  SAY NAME2 @20106

COPY ~TDD/CRE/KOBCOM02.CRE~    ~TDD-CRE~
  SAY NAME1 @20107
  SAY NAME2 @20107

COPY ~TDD/CRE/KOBSHA02.CRE~    ~TDD-CRE~
  SAY NAME1 @20108
  SAY NAME2 @20108

COPY ~TDD/CRE/KOBWIT02.CRE~    ~TDD-CRE~
  SAY NAME1 @20109
  SAY NAME2 @20109
//**********************************************

COPY ~TDD/CRE/3303GRD1.cre~         ~TDD-CRE~
     ~TDD/CRE/3303GRD2.cre~         ~TDD-CRE~
  SAY NAME1 @20110
  SAY NAME2 @20110

COPY ~TDD/CRE/3303PRST.cre~         ~TDD-CRE~
  SAY NAME1 @20111
  SAY NAME2 @20111

COPY ~TDD/CRE/3305PES1.cre~         ~TDD-CRE~
     ~TDD/CRE/3305PES2.cre~         ~TDD-CRE~
     ~TDD/CRE/3310COM.cre~          ~TDD-CRE~
     ~TDD/CRE/3312PES1.cre~         ~TDD-CRE~
     ~TDD/CRE/3312PES2.cre~         ~TDD-CRE~
     ~TDD/CRE/3320PES.cre~          ~TDD-CRE~
  SAY NAME1 @20112
  SAY NAME2 @20112

COPY ~TDD/CRE/3306PES.cre~          ~TDD-CRE~
  SAY NAME1 @20113
  SAY NAME2 @20113

COPY ~TDD/CRE/3307WIZ.cre~          ~TDD-CRE~
     ~TDD/CRE/AVBATT02.cre~         ~TDD-CRE~
     ~TDD/CRE/AVRABATT.cre~         ~TDD-CRE~
     ~TDD/CRE/AVRACUT1.cre~         ~TDD-CRE~
  SAY NAME1 @20114
  SAY NAME2 @20114

COPY ~TDD/CRE/3308GRD1.cre~         ~TDD-CRE~
     ~TDD/CRE/3308GRD2.cre~         ~TDD-CRE~
     ~TDD/CRE/3308GRD3.cre~         ~TDD-CRE~
  SAY NAME1 @20115
  SAY NAME2 @20115

COPY ~TDD/CRE/3314FRGE.cre~         ~TDD-CRE~
  SAY NAME1 @20116
  SAY NAME2 @20116

COPY ~TDD/CRE/3314STH1.cre~         ~TDD-CRE~
  SAY NAME1 @20117
  SAY NAME2 @20117

COPY ~TDD/CRE/3314STH2.cre~         ~TDD-CRE~
  SAY NAME1 @20118
  SAY NAME2 @20118

COPY ~TDD/CRE/3316NOB1.cre~         ~TDD-CRE~
     ~TDD/CRE/3324NOB1.cre~         ~TDD-CRE~
  SAY NAME1 @20119
  SAY NAME2 @20119

COPY ~TDD/CRE/3316NOB2.cre~         ~TDD-CRE~
     ~TDD/CRE/3324NOB2.cre~         ~TDD-CRE~
     ~TDD/CRE/3324NOB3.cre~         ~TDD-CRE~
  SAY NAME1 @20120
  SAY NAME2 @20120 

COPY ~TDD/CRE/3334TAV.cre~          ~TDD-CRE~
  SAY NAME1 @20121
  SAY NAME2 @20121

COPY ~TDD/CRE/3336TAV.cre~          ~TDD-CRE~
  SAY NAME1 @20122 
  SAY NAME2 @20122

COPY ~TDD/CRE/ACIDELE1.cre~         ~TDD-CRE~
  SAY NAME1 @20123
  SAY NAME2 @20123

COPY ~TDD/CRE/ADADOP1A.cre~         ~TDD-CRE~
  SAY NAME1 @20124
  SAY NAME2 @20124

COPY ~TDD/CRE/ADADOP1B.cre~         ~TDD-CRE~

COPY ~TDD/CRE/ADARIO12.cre~         ~TDD-CRE~
  SAY NAME1 @20125 
  SAY NAME2 @20125 
  SAY 0x1cc @20126

COPY ~TDD/CRE/AIRELE1.cre~          ~TDD-CRE~
  SAY NAME1 @20127
  SAY NAME2 @20127

COPY ~TDD/CRE/ALAGAR.cre~           ~TDD-CRE~
  SAY NAME1 @20128
  SAY NAME2 @20128

COPY ~TDD/CRE/ALUST01.cre~          ~TDD-CRE~
     ~TDD/CRE/ALUST02.cre~          ~TDD-CRE~
     ~TDD/CRE/ALUST03.cre~          ~TDD-CRE~
  SAY NAME1 @20129
  SAY NAME2 @20129

COPY ~TDD/CRE/AMX.cre~              ~TDD-CRE~

COPY ~TDD/CRE/ANGOL01.cre~          ~TDD-CRE~
     ~TDD/CRE/ANGOL02.cre~          ~TDD-CRE~
     ~TDD/CRE/ANGOL03.cre~          ~TDD-CRE~
     ~TDD/CRE/ANGOL04.cre~          ~TDD-CRE~
  SAY NAME1 @20130
  SAY NAME2 @20130

COPY ~TDD/CRE/AQUA.cre~             ~TDD-CRE~
  SAY NAME1 @20131 
  SAY NAME2 @20131

COPY ~TDD/CRE/ARAMIR.cre~           ~TDD-CRE~
  SAY NAME1 @20132
  SAY NAME2 @20132

COPY ~TDD/CRE/ARMY1.cre~            ~TDD-CRE~
     ~TDD/CRE/ARMY2.cre~            ~TDD-CRE~
     ~TDD/CRE/ARMY3.cre~            ~TDD-CRE~
     ~TDD/CRE/ARMY4.cre~            ~TDD-CRE~
  SAY NAME1 @20133
  SAY NAME2 @20133

COPY ~TDD/CRE/ARTCAVE4.cre~         ~TDD-CRE~
     ~TDD/CRE/ARTCUTX1.cre~         ~TDD-CRE~
     ~TDD/CRE/DDARTEM1.cre~         ~TDD-CRE~
  SAY NAME1 @20134
  SAY NAME2 @20134 

COPY ~TDD/CRE/ASSAGRD1.cre~         ~TDD-CRE~
     ~TDD/CRE/ASSAGRD2.cre~         ~TDD-CRE~
     ~TDD/CRE/ASSAGRD3.cre~         ~TDD-CRE~
     ~TDD/CRE/ASSAGRD4.cre~         ~TDD-CRE~
     ~TDD/CRE/ASSAGRD5.cre~         ~TDD-CRE~
     ~TDD/CRE/ASSAGRD6.cre~         ~TDD-CRE~
  SAY NAME1 @20135 
  SAY NAME2 @20135 

COPY ~TDD/CRE/AVAUN9.cre~           ~override~   //override - to catch immediate Kit Pack installation
     ~TDD/CRE/AVAUN11.cre~          ~override~
     ~TDD/CRE/AVAUN13.cre~          ~override~
  SAY NAME1 @20136 
  SAY NAME2 @20136 
  SAY 0xa8 @20137 
  SAY 0xbc @20138  
  SAY 0xc0 @20139 
  SAY 0xc4 @20140 
  SAY 0xc8 @20141 
  SAY 0xcc @20142 
  SAY 0xd0 @20143  
  SAY 0xd4 @20144  
  SAY 0xd8 @20145  
  SAY 0xec ~~ [HMTW036]
  SAY 0xf0 ~~ [HMTW038]
  SAY 0xf4 @20148  
  SAY 0x10c @20149 
  SAY 0x110 @20150 
  SAY 0x114 @20151 
  SAY 0x118 @20152  
  SAY 0x11c @20153  
  SAY 0x120 @20154 
  SAY 0x124 @20155  
  SAY 0x128 @20156 
  SAY 0x12c @20157 
  SAY 0x130 @20158 
  SAY 0x134 @20159  
  SAY 0x138 @20160 
  SAY 0x13c @20161 
  SAY 0x1a0 @20162 
  SAY 0x1a4 @20163 
  SAY 0x1ac ~~ [HMTW034]
  SAY 0x1cc @20165

COPY ~TDD/CRE/BANINVI.cre~          ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166

COPY ~TDD/CRE/BANSHEE1.cre~         ~TDD-CRE~
  SAY NAME1 @20167 
  SAY NAME2 @20167 

COPY ~TDD/CRE/BANSUMON.cre~         ~TDD-CRE~
  SAY NAME1 @20168 
  SAY NAME2 @20168

COPY ~TDD/CRE/BARB1.cre~            ~TDD-CRE~
     ~TDD/CRE/BARB2.cre~            ~TDD-CRE~
     ~TDD/CRE/BARBGRD.cre~          ~TDD-CRE~
     ~TDD/CRE/BARBGRD2.cre~         ~TDD-CRE~
     ~TDD/CRE/BARBMESS.cre~         ~TDD-CRE~
  SAY NAME1 @20169
  SAY NAME2 @20169

COPY ~TDD/CRE/BARB3.cre~            ~TDD-CRE~
     ~TDD/CRE/BARB4.cre~            ~TDD-CRE~
     ~TDD/CRE/BARBORN.cre~          ~TDD-CRE~
  SAY NAME1 @20170
  SAY NAME2 @20170

COPY ~TDD/CRE/BARBGOOD.cre~         ~TDD-CRE~
     ~TDD/CRE/BARGOOD.cre~          ~TDD-CRE~
  SAY NAME1 @20171
  SAY NAME2 @20171

COPY ~TDD/CRE/BARBHEAL.cre~         ~TDD-CRE~
     ~TDD/CRE/BARHEAL.cre~          ~TDD-CRE~
  SAY NAME1 @20172
  SAY NAME2 @20172

COPY ~TDD/CRE/BARBKIN2.cre~         ~TDD-CRE~
     ~TDD/CRE/BARBKING.cre~         ~TDD-CRE~
  SAY NAME1 @20173
  SAY NAME2 @20173

COPY ~TDD/CRE/BAURIAN.cre~          ~TDD-CRE~
     ~TDD/CRE/BAURIAN2.cre~         ~TDD-CRE~
  SAY NAME1 @20174
  SAY NAME2 @20174

COPY ~TDD/CRE/BENDALIS.cre~         ~TDD-CRE~
  SAY NAME1 @20175
  SAY NAME2 @20175 

COPY ~TDD/CRE/BGBOY1.cre~           ~TDD-CRE~
  SAY NAME1 @20176
  SAY NAME2 @20176

COPY ~TDD/CRE/BGCOM1.cre~           ~TDD-CRE~
  SAY NAME1 @20112
  SAY NAME2 @20112 

COPY ~TDD/CRE/BGCOM2.cre~           ~TDD-CRE~
  SAY NAME1 @20177
  SAY NAME2 @20177

COPY ~TDD/CRE/BGCTBOSS.cre~         ~TDD-CRE~
  SAY NAME1 @20178
  SAY NAME2 @20178

COPY ~TDD/CRE/BGGARD1.cre~          ~TDD-CRE~
  SAY NAME1 @20179 
  SAY NAME2 @20179

COPY ~TDD/CRE/BGGREET.cre~          ~TDD-CRE~
  SAY NAME1 @20180
  SAY NAME2 @20180

COPY ~TDD/CRE/BGHQ1.cre~            ~TDD-CRE~
  SAY NAME1 @20181
  SAY NAME2 @20181 

COPY ~TDD/CRE/BGHQ2.cre~            ~TDD-CRE~
  SAY NAME1 @20182 
  SAY NAME2 @20182 

COPY ~TDD/CRE/BGHQ3.cre~            ~TDD-CRE~
  SAY NAME1 @20183 
  SAY NAME2 @20183

COPY ~TDD/CRE/BGINFO1.cre~          ~TDD-CRE~
  SAY NAME1 @20184 
  SAY NAME2 @20184 

COPY ~TDD/CRE/BGINFO2.cre~          ~TDD-CRE~
  SAY NAME1 @20185 
  SAY NAME2 @20185

COPY ~TDD/CRE/BGRAPE01.cre~         ~TDD-CRE~
     ~TDD/CRE/BGRAPE02.cre~         ~TDD-CRE~
  SAY NAME1 @20186 
  SAY NAME2 @20186 

COPY ~TDD/CRE/BGSAVIOR.cre~         ~TDD-CRE~
  SAY NAME1 @20187
  SAY NAME2 @20187

COPY ~TDD/CRE/BGSELL1.cre~          ~TDD-CRE~
     ~TDD/CRE/BGSELL2.cre~          ~TDD-CRE~
  SAY NAME1 @20188 
  SAY NAME2 @20188

COPY ~TDD/CRE/BGSH01.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSH02.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSH03.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSH04.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSH06.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSH07.cre~           ~TDD-CRE~
     ~TDD/CRE/BGSHBAD1.cre~         ~TDD-CRE~
     ~TDD/CRE/BGSHBAD2.cre~         ~TDD-CRE~
     ~TDD/CRE/BGSHBAD3.cre~         ~TDD-CRE~
     ~TDD/CRE/BGSHBAD4.cre~         ~TDD-CRE~
     ~TDD/CRE/BGSHBAD5.cre~         ~TDD-CRE~
     ~TDD/CRE/BGSHBAD6.cre~         ~TDD-CRE~
  SAY NAME1 @20189
  SAY NAME2 @20189

COPY ~TDD/CRE/BGSH05.cre~           ~TDD-CRE~
  SAY NAME1 @20190
  SAY NAME2 @20190

COPY ~TDD/CRE/BGSHBOSS.cre~         ~TDD-CRE~
  SAY NAME1 @20178
  SAY NAME2 @20178

COPY ~TDD/CRE/BGSTAB1.cre~          ~TDD-CRE~
     ~TDD/CRE/BGSTAB1B.cre~         ~TDD-CRE~
  SAY NAME1 @20191 
  SAY NAME2 @20191 

COPY ~TDD/CRE/BGTAV1A.cre~          ~TDD-CRE~
  SAY NAME1 @20192 
  SAY NAME2 @20192

COPY ~TDD/CRE/BGTAV1B.cre~          ~TDD-CRE~
  SAY NAME1 @20193 
  SAY NAME2 @20193 

COPY ~TDD/CRE/BGTAVST1.cre~         ~TDD-CRE~
     ~TDD/CRE/BGTAVST3.cre~         ~TDD-CRE~
  SAY NAME1 @20194
  SAY NAME2 @20194

COPY ~TDD/CRE/BGTAVST2.cre~         ~TDD-CRE~
     ~TDD/CRE/BGTAVST4.cre~         ~TDD-CRE~
  SAY NAME1 @20195
  SAY NAME2 @20195 

COPY ~TDD/CRE/BGWIT1.cre~           ~TDD-CRE~
  SAY NAME1 @20112 
  SAY NAME2 @20112 

COPY ~TDD/CRE/BGWIT2.cre~           ~TDD-CRE~
     ~TDD/CRE/BGWIT3.cre~           ~TDD-CRE~
  SAY NAME1 @20177 
  SAY NAME2 @20177

COPY ~TDD/CRE/BLOOD01.cre~          ~TDD-CRE~
     ~TDD/CRE/BLOOD01X.cre~         ~TDD-CRE~
  SAY NAME1 @20196 
  SAY NAME2 @20196

COPY ~TDD/CRE/BLOOD02.cre~          ~TDD-CRE~
     ~TDD/CRE/BLOOD02X.cre~         ~TDD-CRE~
  SAY NAME1 @20197
  SAY NAME2 @20197 

COPY ~TDD/CRE/BUGARCH.cre~          ~TDD-CRE~
     ~TDD/CRE/BUGBEAR.cre~          ~TDD-CRE~
  SAY NAME1 @20198
  SAY NAME2 @20198 

COPY ~TDD/CRE/CALICOM1.cre~         ~TDD-CRE~
  SAY NAME1 @20112 
  SAY NAME2 @20112

COPY ~TDD/CRE/CALICOM2.cre~         ~TDD-CRE~
  SAY NAME1 @20177
  SAY NAME2 @20177 

COPY ~TDD/CRE/CALIGEN1.cre~         ~TDD-CRE~
  SAY NAME1 @20199
  SAY NAME2 @20199

COPY ~TDD/CRE/CALIGEN2.cre~         ~TDD-CRE~
  SAY NAME1 @20200
  SAY NAME2 @20200

COPY ~TDD/CRE/CALIGEN3.cre~         ~TDD-CRE~
  SAY NAME1 @20201
  SAY NAME2 @20201

COPY ~TDD/CRE/CALIHEAL.cre~         ~TDD-CRE~
  SAY NAME1 @20202
  SAY NAME2 @20202

COPY ~TDD/CRE/CALIMART.cre~         ~TDD-CRE~       
  SAY NAME1 @20203
  SAY NAME2 @20203 

COPY ~TDD/CRE/CALIPES1.cre~         ~TDD-CRE~
  SAY NAME1 @20204
  SAY NAME2 @20204

COPY ~TDD/CRE/CALIPRIG.cre~         ~TDD-CRE~
  SAY NAME1 @20205 
  SAY NAME2 @20205

COPY ~TDD/CRE/CALISTEL.cre~         ~TDD-CRE~
  SAY NAME1 @20206 
  SAY NAME2 @20206

COPY ~TDD/CRE/CALITEMP.cre~         ~TDD-CRE~       
  SAY NAME1 @20207
  SAY NAME2 @20207 

COPY ~TDD/CRE/CALITHUG.cre~         ~TDD-CRE~
  SAY NAME1 @20205
  SAY NAME2 @20205 

COPY ~TDD/CRE/CALIWOLF.cre~         ~TDD-CRE~       
  SAY NAME1 @20208
  SAY NAME2 @20208

COPY ~TDD/CRE/CALMEET1.cre~         ~TDD-CRE~       
  SAY NAME1 @20209 
  SAY NAME2 @20209 

COPY ~TDD/CRE/CALSHOP1.cre~         ~TDD-CRE~
     ~TDD/CRE/CALSHOP2.cre~         ~TDD-CRE~
  SAY NAME1 @20210 
  SAY NAME2 @20210 

COPY ~TDD/CRE/CALWERE1.cre~         ~TDD-CRE~
  SAY NAME1 @20211 
  SAY NAME2 @20211

COPY ~TDD/CRE/CALWERE2.cre~         ~TDD-CRE~
  SAY NAME1 @20212 
  SAY NAME2 @20212 

COPY ~TDD/CRE/CANDX01.cre~          ~TDD-CRE~
  SAY NAME1 @20213
  SAY NAME2 @20213 

COPY ~TDD/CRE/CANDX02.cre~          ~TDD-CRE~
  SAY NAME1 @20214
  SAY NAME2 @20214 

COPY ~TDD/CRE/CANDX03.cre~          ~TDD-CRE~
  SAY NAME1 @20215 
  SAY NAME2 @20215 

COPY ~TDD/CRE/CANDX04.cre~          ~TDD-CRE~
  SAY NAME1 @20216
  SAY NAME2 @20216

COPY ~TDD/CRE/CANDX05.cre~          ~TDD-CRE~        
  SAY NAME1 @20217
  SAY NAME2 @20217 

COPY ~TDD/CRE/CANDX06.cre~          ~TDD-CRE~        
  SAY NAME1 @20218
  SAY NAME2 @20218 

COPY ~TDD/CRE/CANDX07.cre~          ~TDD-CRE~
  SAY NAME1 @20219 
  SAY NAME2 @20219 

COPY ~TDD/CRE/CAVDROW1.CRE~         ~TDD-CRE~
COPY ~TDD/CRE/CAVDROW2.CRE~         ~TDD-CRE~
COPY ~TDD/CRE/CAVDROW3.CRE~         ~TDD-CRE~

COPY ~TDD/CRE/CGAMES.cre~           ~TDD-CRE~
     ~TDD/CRE/CGAMES2.cre~          ~TDD-CRE~
     ~TDD/CRE/CGAMES3.cre~          ~TDD-CRE~
     ~TDD/CRE/CGAMES4.cre~          ~TDD-CRE~
     ~TDD/CRE/CGAMES5.cre~          ~TDD-CRE~
  SAY NAME1 @20220
  SAY NAME2 @20220

COPY ~TDD/CRE/CHETAH1.cre~          ~TDD-CRE~
COPY ~TDD/CRE/CHETAH2.cre~          ~TDD-CRE~

COPY ~TDD/CRE/CORPMINI.cre~         ~TDD-CRE~
  SAY NAME1 @20221 
  SAY NAME2 @20221


COPY ~TDD/CRE/DARIOGR1.cre~         ~TDD-CRE~       
  SAY NAME1 @20223
  SAY NAME2 @20223

COPY ~TDD/CRE/DARIOGR2.cre~         ~TDD-CRE~       
     ~TDD/CRE/DARIOGR3.cre~         ~TDD-CRE~
     ~TDD/CRE/DARIOGR4.cre~         ~TDD-CRE~
     ~TDD/CRE/DARIOGR5.cre~         ~TDD-CRE~
  SAY NAME1 @20224
  SAY NAME2 @20224 

COPY ~TDD/CRE/DARIOMS2.cre~         ~TDD-CRE~
     ~TDD/CRE/DARIOMSG.cre~         ~TDD-CRE~
  SAY NAME1 @20225 
  SAY NAME2 @20225

COPY ~TDD/CRE/DARKMIST.cre~         ~TDD-CRE~
  SAY NAME1 @20226 
  SAY NAME2 @20226

COPY ~TDD/CRE/DD0334SH.cre~         ~TDD-CRE~
  SAY NAME1 @20118
  SAY NAME2 @20118

COPY ~TDD/CRE/DD1004C1.cre~         ~TDD-CRE~
     ~TDD/CRE/DD1004C2.cre~         ~TDD-CRE~
  SAY NAME1 @20112
  SAY NAME2 @20112

COPY ~TDD/CRE/DD1700CL.cre~         ~TDD-CRE~
  SAY NAME1 @20227 
  SAY NAME2 @20227 

COPY ~TDD/CRE/DD1700FI.cre~         ~TDD-CRE~       
  SAY NAME1 @20228
  SAY NAME2 @20228

COPY ~TDD/CRE/DD1700RA.cre~         ~TDD-CRE~       
  SAY NAME1 @20229
  SAY NAME2 @20229

COPY ~TDD/CRE/DD1700WI.cre~         ~TDD-CRE~
  SAY NAME1 @20230
  SAY NAME2 @20230

COPY ~TDD/CRE/DDARNIE.cre~          ~TDD-CRE~
  SAY NAME1 @20231 
  SAY NAME2 @20231 

COPY ~TDD/CRE/DDASSA01.cre~         ~TDD-CRE~
     ~TDD/CRE/DDASSA02.cre~         ~TDD-CRE~
  SAY NAME1 @20232
  SAY NAME2 @20232 

COPY ~TDD/CRE/DDASSI01.cre~         ~TDD-CRE~
  SAY NAME1 @20233 
  SAY NAME2 @20233

COPY ~TDD/CRE/DDBANDI1.cre~         ~TDD-CRE~
     ~TDD/CRE/DDBANDI2.cre~         ~TDD-CRE~
     ~TDD/CRE/DDBANDI3.cre~         ~TDD-CRE~
  SAY NAME1 @20189
  SAY NAME2 @20189 

COPY ~TDD/CRE/DDBLBL01.cre~         ~TDD-CRE~       
     ~TDD/CRE/DDBLBL02.cre~         ~TDD-CRE~
  SAY NAME1 @20234
  SAY NAME2 @20234 

COPY ~TDD/CRE/DDCAPT01.cre~         ~TDD-CRE~
  SAY NAME1 @20235 
  SAY NAME2 @20235 

COPY ~TDD/CRE/DDCITI01.cre~         ~TDD-CRE~
  SAY NAME1 @20236 
  SAY NAME2 @20236 

COPY ~TDD/CRE/DDCRAZY1.cre~         ~TDD-CRE~
  SAY NAME1 @20237 
  SAY NAME2 @20237 

COPY ~TDD/CRE/DDCYRIC1.cre~         ~TDD-CRE~       
     ~TDD/CRE/DDCYRIC2.cre~         ~TDD-CRE~
     ~TDD/CRE/DDCYRIC3.cre~         ~TDD-CRE~
     ~TDD/CRE/DDCYRIC4.cre~         ~TDD-CRE~
  SAY NAME1 @20238
  SAY NAME2 @20238

COPY ~TDD/CRE/DDFARM01.cre~         ~TDD-CRE~
  SAY NAME1 @20239
  SAY NAME2 @20239 

COPY ~TDD/CRE/DDGAME01.cre~         ~TDD-CRE~
  SAY NAME1 @20241
  SAY NAME2 @20241

COPY ~TDD/CRE/DDGAME03.cre~         ~TDD-CRE~  //???
  SAY NAME1 @20242
  SAY NAME2 @20243

COPY ~TDD/CRE/DDGENERA.cre~         ~TDD-CRE~
  SAY NAME1 @20244 
  SAY NAME2 @20244 

COPY ~TDD/CRE/DDGUAR01.cre~         ~TDD-CRE~
  SAY NAME1 @20245 
  SAY NAME2 @20245

COPY ~TDD/CRE/DDGULL01.cre~         ~TDD-CRE~
  SAY NAME1 @20246
  SAY NAME2 @20246

COPY ~TDD/CRE/DDHALL01.cre~         ~TDD-CRE~       
  SAY NAME1 @20247
  SAY NAME2 @20247 

COPY ~TDD/CRE/DDHUSBAN.cre~         ~TDD-CRE~
  SAY NAME1 @20248
  SAY NAME2 @20248

COPY ~TDD/CRE/DDINN01.cre~          ~TDD-CRE~
  SAY NAME1 @20249
  SAY NAME2 @20249

COPY ~TDD/CRE/DDJARLAX.cre~         ~TDD-CRE~
  SAY NAME1 @20250
  SAY NAME2 @20250 

COPY ~TDD/CRE/DDKEND01.cre~         ~TDD-CRE~
  SAY NAME1 @20251
  SAY NAME2 @20251

COPY ~TDD/CRE/DDKID02.cre~          ~TDD-CRE~
  SAY NAME1 @20252 
  SAY NAME2 @20252 

COPY ~TDD/CRE/DDKID03.cre~          ~TDD-CRE~
  SAY NAME1 @20176
  SAY NAME2 @20176 

COPY ~TDD/CRE/DDLARAL2.cre~         ~TDD-CRE~
     ~TDD/CRE/DDLARALA.cre~         ~TDD-CRE~
  SAY NAME1 @20238
  SAY NAME2 @20238

COPY ~TDD/CRE/DDMAN01.cre~          ~TDD-CRE~
  SAY NAME1 @20241 
  SAY NAME2 @20241 

COPY ~TDD/CRE/DDMANARC.cre~         ~TDD-CRE~
  SAY NAME1 @20253 
  SAY NAME2 @20253

COPY ~TDD/CRE/DDMANPEA.cre~         ~TDD-CRE~
  SAY NAME1 @20254 
  SAY NAME2 @20254 

COPY ~TDD/CRE/DDMANSHA.cre~         ~TDD-CRE~
  SAY NAME1 @20255
  SAY NAME2 @20255 

COPY ~TDD/CRE/DDMARY.cre~           ~TDD-CRE~
  SAY NAME1 @20256
  SAY NAME2 @20256

COPY ~TDD/CRE/DDMAYO01.cre~         ~TDD-CRE~
  SAY NAME1 @20257 
  SAY NAME2 @20257 

COPY ~TDD/CRE/DDMERC01.cre~         ~TDD-CRE~       
  SAY NAME1 @20258 
  SAY NAME2 @20258 

COPY ~TDD/CRE/DDMERC02.cre~         ~TDD-CRE~
  SAY NAME1 @20259 
  SAY NAME2 @20259

COPY ~TDD/CRE/DDOGRE01.cre~         ~TDD-CRE~
  SAY NAME1 @20260
  SAY NAME2 @20260

COPY ~TDD/CRE/DDPKMAP.cre~          ~TDD-CRE~
  SAY NAME1 @20261
  SAY NAME2 @20261

COPY ~TDD/CRE/DDPLOTA1.cre~         ~TDD-CRE~
  SAY NAME1 @20258
  SAY NAME2 @20258

COPY ~TDD/CRE/DDPLOTA2.cre~         ~TDD-CRE~
  SAY NAME1 @20262
  SAY NAME2 @20262

COPY ~TDD/CRE/DDPLOTA4.cre~         ~TDD-CRE~
  SAY NAME1 @20255 
  SAY NAME2 @20255 

COPY ~TDD/CRE/DDPLOTA5.cre~         ~TDD-CRE~
  SAY NAME1 @20263 
  SAY NAME2 @20263

COPY ~TDD/CRE/DDPO05AA.cre~         ~TDD-CRE~       
  SAY NAME1 @20264 
  SAY NAME2 @20264

COPY ~TDD/CRE/DDPO05AB.cre~         ~TDD-CRE~       

COPY ~TDD/CRE/DDPOTEN1.cre~         ~TDD-CRE~
  SAY NAME1 @20265
  SAY NAME2 @20265

COPY ~TDD/CRE/DDRAGBRW.cre~         ~TDD-CRE~
  SAY NAME1 @20266
  SAY NAME2 @20266

COPY ~TDD/CRE/DDSHEINA.cre~         ~TDD-CRE~
  SAY NAME1 @20267
  SAY NAME2 @20267

COPY ~TDD/CRE/DDSICK01.cre~         ~TDD-CRE~
  SAY NAME1 @20268 
  SAY NAME2 @20268

COPY ~TDD/CRE/DDSICK02.cre~         ~TDD-CRE~       
  SAY NAME1 @20269
  SAY NAME2 @20269 

COPY ~TDD/CRE/DDSOLD01.cre~         ~TDD-CRE~       
     ~TDD/CRE/DDSOLD02.cre~         ~TDD-CRE~
     ~TDD/CRE/DDSOLD03.cre~         ~TDD-CRE~
     ~TDD/CRE/DDSOLD04.cre~         ~TDD-CRE~
     ~TDD/CRE/DDSOLD10.cre~         ~TDD-CRE~
     ~TDD/CRE/DDSOLD11.cre~         ~TDD-CRE~
  SAY NAME1 @20189
  SAY NAME2 @20189

COPY ~TDD/CRE/DDSOLD06.cre~         ~TDD-CRE~
  SAY NAME1 @20270
  SAY NAME2 @20270

COPY ~TDD/CRE/DDSPECTR.cre~         ~TDD-CRE~
  SAY NAME1 @20271
  SAY NAME2 @20271

COPY ~TDD/CRE/DDSTAB01.cre~         ~TDD-CRE~
  SAY NAME1 @20272
  SAY NAME2 @20272 

COPY ~TDD/CRE/DDTEMPL1.cre~         ~TDD-CRE~
  SAY NAME1 @20273 
  SAY NAME2 @20273 

COPY ~TDD/CRE/DDTERO01.cre~         ~TDD-CRE~       
  SAY NAME1 @20274 
  SAY NAME2 @20274

COPY ~TDD/CRE/DDTRAV03.cre~         ~TDD-CRE~
  SAY NAME1 @20258
  SAY NAME2 @20258 

COPY ~TDD/CRE/DDTROLL1.cre~         ~TDD-CRE~       
COPY ~TDD/CRE/DDTROLL2.cre~         ~TDD-CRE~

COPY ~TDD/CRE/DDVAGABO.cre~         ~TDD-CRE~
  SAY NAME1 @20275
  SAY NAME2 @20275 

COPY ~TDD/CRE/DDVOICE.cre~          ~TDD-CRE~  //invisible spy-creature

COPY ~TDD/CRE/DDWARP01.cre~         ~TDD-CRE~
  SAY NAME1 @20276 
  SAY NAME2 @20276

COPY ~TDD/CRE/DDWMAN01.cre~         ~TDD-CRE~
     ~TDD/CRE/DDWMAN02.cre~         ~TDD-CRE~
  SAY NAME1 @20277
  SAY NAME2 @20277

COPY ~TDD/CRE/DDYOLKUM.cre~         ~TDD-CRE~       
  SAY NAME1 @20278 
  SAY NAME2 @20278 

COPY ~TDD/CRE/DDYUAN01.cre~         ~TDD-CRE~
COPY ~TDD/CRE/DDYUAN02.cre~         ~TDD-CRE~
COPY ~TDD/CRE/DDYUAN03.cre~         ~TDD-CRE~

COPY ~TDD/CRE/DEADMAN1.cre~         ~TDD-CRE~
     ~TDD/CRE/DEADMAN2.cre~         ~TDD-CRE~
     ~TDD/CRE/DEADMAN3.cre~         ~TDD-CRE~
     ~TDD/CRE/DEADMAN4.cre~         ~TDD-CRE~
     ~TDD/CRE/DEADMAN5.cre~         ~TDD-CRE~
     ~TDD/CRE/DEADMAN6.cre~         ~TDD-CRE~
  SAY NAME1 @20264
  SAY NAME2 @20264 

COPY ~TDD/CRE/DEMBALR1.cre~         ~TDD-CRE~
  SAY NAME1 @20279
  SAY NAME2 @20279

COPY ~TDD/CRE/DEMGRDR1.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMGRDR2.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMGRDR3.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMGRDR4.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMGRDRX.cre~         ~TDD-CRE~
  SAY NAME1 @20280
  SAY NAME2 @20280

COPY ~TDD/CRE/DEMNABR1.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMNABR2.cre~         ~TDD-CRE~
  SAY NAME1 @20281
  SAY NAME2 @20281 

COPY ~TDD/CRE/DEMNINV2.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMNINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166

COPY ~TDD/CRE/DEMPITR1.cre~         ~TDD-CRE~
     ~TDD/CRE/DEMPITR2.cre~         ~TDD-CRE~
  SAY NAME1 @20282
  SAY NAME2 @20282

COPY ~TDD/CRE/DINAN.cre~            ~TDD-CRE~
     ~TDD/CRE/DINAN2.cre~           ~TDD-CRE~
     ~TDD/CRE/DINAN3.cre~           ~TDD-CRE~
  SAY NAME1 @20283
  SAY NAME2 @20283 

COPY ~TDD/CRE/DINANMUM.cre~         ~TDD-CRE~
     ~TDD/CRE/DINMUM2.cre~          ~TDD-CRE~
  SAY NAME1 @20284
  SAY NAME2 @20284

COPY ~TDD/CRE/DOCKHLP1.cre~         ~TDD-CRE~
     ~TDD/CRE/DOCKHLP2.cre~         ~TDD-CRE~
     ~TDD/CRE/DOCKPRIZ.cre~         ~TDD-CRE~
  SAY NAME1 @20285
  SAY NAME2 @20285

COPY ~TDD/CRE/DOCKHLP3.cre~         ~TDD-CRE~
     ~TDD/CRE/DOCKHLP4.cre~         ~TDD-CRE~
  SAY NAME1 @20286
  SAY NAME2 @20286

COPY ~TDD/CRE/DOCKMEET.cre~         ~TDD-CRE~
  SAY NAME1 @20287
  SAY NAME2 @20287

COPY ~TDD/CRE/DRAGBR1.cre~          ~TDD-CRE~
  SAY NAME1 @20288
  SAY NAME2 @20288

COPY ~TDD/CRE/DRAGBR2.cre~          ~TDD-CRE~
  SAY NAME1 @20289
  SAY NAME2 @20289

COPY ~TDD/CRE/DRAGBR3.cre~          ~TDD-CRE~
  SAY NAME1 @20290
  SAY NAME2 @20290

COPY ~TDD/CRE/DRAGGOLD.cre~         ~TDD-CRE~
  SAY NAME1 @20291
  SAY NAME2 @20291

COPY ~TDD/CRE/DRAGGREN.cre~         ~TDD-CRE~
  SAY NAME1 @20292
  SAY NAME2 @20292

COPY ~TDD/CRE/DRAGINVG.cre~         ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166

COPY ~TDD/CRE/DRAGTOPE.cre~         ~TDD-CRE~
  SAY NAME1 @20293
  SAY NAME2 @20293

COPY ~TDD/CRE/DRAGUND.cre~          ~TDD-CRE~
  SAY NAME1 @20294 
  SAY NAME2 @20294 

COPY ~TDD/CRE/DREADX.cre~           ~TDD-CRE~
  SAY NAME1 @20295
  SAY NAME2 @20295 

COPY ~TDD/CRE/DROWBD01.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD02.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD03.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD04.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD05.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD06.cre~         ~TDD-CRE~
  SAY NAME1 @20296
  SAY NAME2 @20296 

COPY ~TDD/CRE/DROWBD07.cre~         ~TDD-CRE~       
     ~TDD/CRE/DROWBD08.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD11.cre~         ~TDD-CRE~
  SAY NAME1 @20297
  SAY NAME2 @20297

COPY ~TDD/CRE/DROWBD09.cre~         ~TDD-CRE~
     ~TDD/CRE/DROWBD10.cre~         ~TDD-CRE~
  SAY NAME1 @20298
  SAY NAME2 @20298

COPY ~TDD/CRE/DROWINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166 
  SAY NAME2 @20166

COPY ~TDD/CRE/DUEGABIS.cre~         ~TDD-CRE~
  SAY NAME1 @20299
  SAY NAME2 @20299 

COPY ~TDD/CRE/DUEGEXIT.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGMIN1.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGMIN3.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGRUNE.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGSAL1.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGSAL2.cre~         ~TDD-CRE~
     ~TDD/CRE/DUEGSAL3.cre~         ~TDD-CRE~
  SAY NAME1 @20300
  SAY NAME2 @20300

COPY ~TDD/CRE/DUEGMIN2.cre~         ~TDD-CRE~
  SAY NAME1 @20301
  SAY NAME2 @20301

COPY ~TDD/CRE/DUEGSKE1.cre~         ~TDD-CRE~
  SAY NAME1 @20302
  SAY NAME2 @20302

COPY ~TDD/CRE/DUNGETTN.cre~         ~TDD-CRE~
  SAY NAME1 @20303
  SAY NAME2 @20303

COPY ~TDD/CRE/DWBRG01.cre~          ~TDD-CRE~
     ~TDD/CRE/DWBRG02.cre~          ~TDD-CRE~
     ~TDD/CRE/DWGARD01.cre~         ~TDD-CRE~
     ~TDD/CRE/DWGARD02.cre~         ~TDD-CRE~
     ~TDD/CRE/DWGARD03.cre~         ~TDD-CRE~
     ~TDD/CRE/DWGARD04.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND01.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND02.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND03.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND04.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND07.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND09.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND10.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND11.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND12.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND15.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND17.cre~         ~TDD-CRE~
  SAY NAME1 @20296
  SAY NAME2 @20296

COPY ~TDD/CRE/DWWOND05.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND13.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND16.cre~         ~TDD-CRE~
  SAY NAME1 @20297
  SAY NAME2 @20297

COPY ~TDD/CRE/DWWOND06.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND08.cre~         ~TDD-CRE~
     ~TDD/CRE/DWWOND14.cre~         ~TDD-CRE~
  SAY NAME1 @20298
  SAY NAME2 @20298

COPY ~TDD/CRE/EASTBAR.cre~          ~TDD-CRE~
     ~TDD/CRE/EASTMEET.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTNOB1.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTNOB2.cre~         ~TDD-CRE~
  SAY NAME1 @20112
  SAY NAME2 @20112

COPY ~TDD/CRE/EASTDEM1.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM3.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM5.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM6.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM8.cre~         ~TDD-CRE~
  SAY NAME1 @20304
  SAY NAME2 @20304

COPY ~TDD/CRE/EASTDEM2.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM4.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM7.cre~         ~TDD-CRE~
     ~TDD/CRE/EASTDEM9.cre~         ~TDD-CRE~
  SAY NAME1 @20305
  SAY NAME2 @20305

COPY ~TDD/CRE/EASTFORG.cre~         ~TDD-CRE~
  SAY NAME1 @20306
  SAY NAME2 @20306

COPY ~TDD/CRE/EASTKID1.cre~         ~TDD-CRE~
  SAY NAME1 @20176
  SAY NAME2 @20176

COPY ~TDD/CRE/EASTKID2.cre~         ~TDD-CRE~
  SAY NAME1 @20252
  SAY NAME2 @20252

COPY ~TDD/CRE/EASTMAGE.cre~         ~TDD-CRE~
  SAY NAME1 @20308
  SAY NAME2 @20308

COPY ~TDD/CRE/EASTPRS1.cre~         ~TDD-CRE~
  SAY NAME1 @20309 
  SAY NAME2 @20309 

COPY ~TDD/CRE/EASTWAR1.cre~         ~TDD-CRE~       
  SAY NAME1 @20310
  SAY NAME2 @20310

COPY ~TDD/CRE/EASTWIZ1.cre~         ~TDD-CRE~       
  SAY NAME1 @20311
  SAY NAME2 @20311

COPY ~TDD/CRE/ELECALI1.cre~         ~TDD-CRE~
     ~TDD/CRE/ELECALI3.cre~         ~TDD-CRE~
     ~TDD/CRE/ELECALI5.cre~         ~TDD-CRE~
  SAY NAME1 @20312
  SAY NAME2 @20312

COPY ~TDD/CRE/ELECALI2.cre~         ~TDD-CRE~
     ~TDD/CRE/ELECALI4.cre~         ~TDD-CRE~
  SAY NAME1 @20313
  SAY NAME2 @20313

COPY ~TDD/CRE/ELMIN01.cre~          ~TDD-CRE~
     ~TDD/CRE/ELMIN02.cre~          ~TDD-CRE~
  SAY NAME1 @20314 
  SAY NAME2 @20314

COPY ~TDD/CRE/ENTERI01.cre~         ~TDD-CRE~
  SAY NAME1 @20134
  SAY NAME2 @20134

COPY ~TDD/CRE/ERRTU01.cre~          ~TDD-CRE~
     ~TDD/CRE/ERRTU02.cre~          ~TDD-CRE~
     ~TDD/CRE/ERRTU03.cre~          ~TDD-CRE~
  SAY NAME1 @20315
  SAY NAME2 @20315 

COPY ~TDD/CRE/FIREBEAD.cre~         ~TDD-CRE~
  SAY NAME1 @20316 
  SAY NAME2 @20316

COPY ~TDD/CRE/FLEEINV1.cre~         ~TDD-CRE~
     ~TDD/CRE/FLEEINV2.cre~         ~TDD-CRE~
     ~TDD/CRE/FLEEINV3.cre~         ~TDD-CRE~
     ~TDD/CRE/FROSINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166

COPY ~TDD/CRE/FLEEQUES.cre~         ~TDD-CRE~
  SAY NAME1 @20258
  SAY NAME2 @20258

COPY ~TDD/CRE/FWORM.cre~            ~TDD-CRE~
     ~TDD/CRE/FWORMM.cre~           ~TDD-CRE~
     ~TDD/CRE/FWORMX.cre~           ~TDD-CRE~
  SAY NAME1 @20317 
  SAY NAME2 @20317

COPY ~TDD/CRE/GANDAR.cre~           ~TDD-CRE~
     ~TDD/CRE/GANDAR02.cre~         ~TDD-CRE~
  SAY NAME1 @20318
  SAY NAME2 @20318

COPY ~TDD/CRE/GELUGON1.cre~         ~TDD-CRE~
  SAY NAME1 @20319
  SAY NAME2 @20319 

COPY ~TDD/CRE/GENCALI1.cre~         ~TDD-CRE~
     ~TDD/CRE/GENCALI2.cre~         ~TDD-CRE~
     ~TDD/CRE/GENIETRV.cre~         ~TDD-CRE~
     ~TDD/CRE/GENOGENI.cre~         ~TDD-CRE~
  SAY NAME1 @20320 
  SAY NAME2 @20320

COPY ~TDD/CRE/GRAZINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166 

COPY ~TDD/CRE/GRAZZT01.cre~         ~TDD-CRE~       
     ~TDD/CRE/GRAZZT02.cre~         ~TDD-CRE~
  SAY NAME1 @20321
  SAY NAME2 @20321

COPY ~TDD/CRE/GRENABI1.cre~         ~TDD-CRE~
  SAY NAME1 @20322
  SAY NAME2 @20322 

COPY ~TDD/CRE/GRIZZ1.cre~           ~TDD-CRE~
COPY ~TDD/CRE/GRIZZ2.cre~           ~TDD-CRE~

COPY ~TDD/CRE/HAMMER.cre~           ~TDD-CRE~
  SAY NAME1 @20323 
  SAY NAME2 @20323 

COPY ~TDD/CRE/HARPASS2.cre~         ~TDD-CRE~

COPY ~TDD/CRE/HARPATT1.cre~         ~TDD-CRE~
     ~TDD/CRE/HARPATT2.cre~         ~TDD-CRE~
     ~TDD/CRE/HARPATT3.cre~         ~TDD-CRE~
  SAY NAME1 @20324
  SAY NAME2 @20324

COPY ~TDD/CRE/HORSECAL.cre~         ~TDD-CRE~
  SAY NAME1 @20325
  SAY NAME2 @20325 

COPY ~TDD/CRE/ICEELE.cre~           ~TDD-CRE~
  SAY NAME1 @20326
  SAY NAME2 @20326

COPY ~TDD/CRE/ICEGOLEM.cre~         ~TDD-CRE~
  SAY NAME1 @20327 
  SAY NAME2 @20327 

COPY ~TDD/CRE/ICETROLX.cre~         ~TDD-CRE~       
     ~TDD/CRE/ICETROLZ.cre~         ~TDD-CRE~
  SAY NAME1 @20328
  SAY NAME2 @20328

COPY ~TDD/CRE/JAG1.cre~             ~TDD-CRE~
COPY ~TDD/CRE/JAG2.cre~             ~TDD-CRE~

COPY ~TDD/CRE/JARCUTX1.cre~         ~TDD-CRE~
     ~TDD/CRE/JARLAXE1.cre~         ~TDD-CRE~
     ~TDD/CRE/JARLAXE2.cre~         ~TDD-CRE~
     ~TDD/CRE/JARLCAVE.cre~         ~TDD-CRE~
  SAY NAME1 @20250
  SAY NAME2 @20250

COPY ~TDD/CRE/JARLBOY.cre~          ~TDD-CRE~
  SAY NAME1 @20330
  SAY NAME2 @20330

COPY ~TDD/CRE/KALVASSA.cre~         ~TDD-CRE~
  SAY NAME1 @20331
  SAY NAME2 @20331

COPY ~TDD/CRE/KARAN01.cre~          ~TDD-CRE~
     ~TDD/CRE/KARAN02.cre~          ~TDD-CRE~
  SAY NAME1 @20332
  SAY NAME2 @20332 

COPY ~TDD/CRE/KERIS2.cre~           ~TDD-CRE~
  SAY NAME1 @20333
  SAY NAME2 @20333 

COPY ~TDD/CRE/KHELB01.cre~          ~TDD-CRE~
     ~TDD/CRE/KHELB02.cre~          ~TDD-CRE~
  SAY NAME1 @20334
  SAY NAME2 @20334 

COPY ~TDD/CRE/KIVOGRE.cre~          ~TDD-CRE~
  SAY NAME1 @20260
  SAY NAME2 @20260 

COPY ~TDD/CRE/LADY3301.cre~         ~TDD-CRE~
  SAY NAME1 @20113
  SAY NAME2 @20113

COPY ~TDD/CRE/LAVAELE.cre~          ~TDD-CRE~
     ~TDD/CRE/LAVAELE1.cre~         ~TDD-CRE~
  SAY NAME1 @20336
  SAY NAME2 @20336

COPY ~TDD/CRE/LEOPARD1.cre~         ~TDD-CRE~
COPY ~TDD/CRE/LEOPARD2.cre~         ~TDD-CRE~

COPY ~TDD/CRE/LIGHTELE.cre~         ~TDD-CRE~
  SAY NAME1 @20337
  SAY NAME2 @20337

COPY ~TDD/CRE/LION1.cre~            ~TDD-CRE~
COPY ~TDD/CRE/LION2.cre~            ~TDD-CRE~

COPY ~TDD/CRE/LV16ROB1.cre~         ~TDD-CRE~
     ~TDD/CRE/LV16ROB2.cre~         ~TDD-CRE~
     ~TDD/CRE/LV16ROB3.cre~         ~TDD-CRE~
     ~TDD/CRE/LV16ROB4.cre~         ~TDD-CRE~
  SAY NAME1 @20338 
  SAY NAME2 @20338

COPY ~TDD/CRE/MADEEL.cre~           ~TDD-CRE~
  SAY NAME1 @20339 
  SAY NAME2 @20339 

COPY ~TDD/CRE/MAPRINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166 

COPY ~TDD/CRE/MINAT.cre~            ~TDD-CRE~
  SAY NAME1 @20340 
  SAY NAME2 @20340 

COPY ~TDD/CRE/MINTELEC.cre~         ~TDD-CRE~
  SAY NAME1 @20341
  SAY NAME2 @20341 

COPY ~TDD/CRE/MINTGOLC.cre~         ~TDD-CRE~       
  SAY NAME1 @20342 
  SAY NAME2 @20342 

COPY ~TDD/CRE/MINTRANC.cre~         ~TDD-CRE~
  SAY NAME1 @20343
  SAY NAME2 @20343

COPY ~TDD/CRE/MINTSKEL.cre~         ~TDD-CRE~
  SAY NAME1 @20344
  SAY NAME2 @20344

COPY ~TDD/CRE/MINTTROG.cre~         ~TDD-CRE~
  SAY NAME1 @20345
  SAY NAME2 @20345

COPY ~TDD/CRE/MUMMYX1.cre~          ~TDD-CRE~
  SAY NAME1 @20346 
  SAY NAME2 @20346 

COPY ~TDD/CRE/MUMX1.cre~            ~TDD-CRE~

COPY ~TDD/CRE/MYKAKOL.cre~          ~TDD-CRE~
  SAY NAME1 @20347
  SAY NAME2 @20347 

COPY ~TDD/CRE/NAMELESS.cre~         ~TDD-CRE~
  SAY NAME1 @20348
  SAY NAME2 @20348 

COPY ~TDD/CRE/NIGHTHAG.cre~         ~TDD-CRE~
  SAY NAME1 @20349 
  SAY NAME2 @20349

COPY ~TDD/CRE/NIGHTWLK.cre~         ~TDD-CRE~
  SAY NAME1 @20350 
  SAY NAME2 @20350

COPY ~TDD/CRE/OGREDD1.cre~          ~TDD-CRE~
  SAY NAME1 @20260
  SAY NAME2 @20260

COPY ~TDD/CRE/ORCKIV01.cre~         ~TDD-CRE~
  SAY NAME1 @20351
  SAY NAME2 @20351

COPY ~TDD/CRE/ORCSUM.cre~           ~TDD-CRE~
COPY ~TDD/CRE/ORCSUM2.cre~          ~TDD-CRE~

COPY ~TDD/CRE/ORGO01.cre~           ~TDD-CRE~
  SAY NAME1 @20352 
  SAY NAME2 @20352 

COPY ~TDD/CRE/ORGOINVI.cre~         ~TDD-CRE~
  SAY NAME1 @20166 
  SAY NAME2 @20166

COPY ~TDD/CRE/ORGOTH01.cre~         ~TDD-CRE~       
     ~TDD/CRE/ORGOTH02.cre~         ~TDD-CRE~
  SAY NAME1 @20353 
  SAY NAME2 @20353

COPY ~TDD/CRE/OVERGOLD.cre~         ~TDD-CRE~
  SAY NAME1 @20354
  SAY NAME2 @20354 

COPY ~TDD/CRE/PASHTRAV.cre~         ~TDD-CRE~
  SAY NAME1 @20355
  SAY NAME2 @20355 

COPY ~TDD/CRE/PAULCAT.cre~          ~TDD-CRE~
  SAY NAME1 @20356 
  SAY NAME2 @20356 

COPY ~TDD/CRE/PHANTOMA.cre~         ~TDD-CRE~
  SAY NAME1 @20357 
  SAY NAME2 @20357 

COPY ~TDD/CRE/PHLYDIA.cre~          ~TDD-CRE~
  SAY NAME1 @20358 
  SAY NAME2 @20358

COPY ~TDD/CRE/PIBBLE.cre~           ~TDD-CRE~
     ~TDD/CRE/PIBBLE2.cre~          ~TDD-CRE~
  SAY NAME1 @20359 
  SAY NAME2 @20359

COPY ~TDD/CRE/PIREBD01.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD02.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD03.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD04.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD05.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD06.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD07.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD08.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD09.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD10.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD11.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD12.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD13.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD14.cre~         ~TDD-CRE~
     ~TDD/CRE/PIREBD15.cre~         ~TDD-CRE~
  SAY NAME1 @20360
  SAY NAME2 @20360

COPY ~TDD/CRE/PIREBD16.cre~         ~TDD-CRE~       
  SAY NAME1 @20361 
  SAY NAME2 @20361

COPY ~TDD/CRE/PIREBD17.cre~         ~TDD-CRE~
  SAY NAME1 @20362 
  SAY NAME2 @20362

COPY ~TDD/CRE/PKAGAL.cre~           ~TDD-CRE~
     ~TDD/CRE/PKAGALB.cre~          ~TDD-CRE~
  SAY NAME1 @20363
  SAY NAME2 @20363 

COPY ~TDD/CRE/PKBIRD.cre~           ~TDD-CRE~
  SAY NAME1 @20364 
  SAY NAME2 @20364 

COPY ~TDD/CRE/PKBOY1.cre~           ~TDD-CRE~
  SAY NAME1 @20365
  SAY NAME2 @20365

COPY ~TDD/CRE/PKCHAT1.cre~          ~TDD-CRE~
  SAY NAME1 @20366 
  SAY NAME2 @20366

COPY ~TDD/CRE/PKCHAT2.cre~          ~TDD-CRE~        
  SAY NAME1 @20367 
  SAY NAME2 @20367

COPY ~TDD/CRE/PKCHAT3.cre~          ~TDD-CRE~
  SAY NAME1 @20368 
  SAY NAME2 @20368 

COPY ~TDD/CRE/PKDEAD1.cre~          ~TDD-CRE~
     ~TDD/CRE/PKDEAD1A.cre~         ~TDD-CRE~
  SAY NAME1 @20369 
  SAY NAME2 @20369 

COPY ~TDD/CRE/PKDOG.cre~            ~TDD-CRE~
  SAY NAME1 @20370 
  SAY NAME2 @20370 

COPY ~TDD/CRE/PKFATTY1.cre~         ~TDD-CRE~
  SAY NAME1 @20371 
  SAY NAME2 @20371 

COPY ~TDD/CRE/PKFATTY2.cre~         ~TDD-CRE~
     ~TDD/CRE/PKFATXY2.cre~         ~TDD-CRE~
  SAY NAME1 @20372 
  SAY NAME2 @20372 

COPY ~TDD/CRE/PKGARD1.cre~          ~TDD-CRE~
  SAY NAME1 @20373 
  SAY NAME2 @20373 

COPY ~TDD/CRE/PKGARD2.cre~          ~TDD-CRE~
  SAY NAME1 @20245 
  SAY NAME2 @20245 

COPY ~TDD/CRE/PKGHOST1.cre~         ~TDD-CRE~
     ~TDD/CRE/PKGHOST2.cre~         ~TDD-CRE~
  SAY NAME1 @20374 
  SAY NAME2 @20374

COPY ~TDD/CRE/PKGHOST3.cre~         ~TDD-CRE~
  SAY NAME1 @20375
  SAY NAME2 @20375

COPY ~TDD/CRE/PKGHOST4.cre~         ~TDD-CRE~       
  SAY NAME1 @20376 
  SAY NAME2 @20376 

COPY ~TDD/CRE/PKHOHOM1.cre~         ~TDD-CRE~       
  SAY NAME1 @20377 
  SAY NAME2 @20377 

COPY ~TDD/CRE/PKHOHOM2.cre~         ~TDD-CRE~       
  SAY NAME1 @20378 
  SAY NAME2 @20378 

COPY ~TDD/CRE/PKHOHOM3.cre~         ~TDD-CRE~
  SAY NAME1 @20379
  SAY NAME2 @20379

COPY ~TDD/CRE/PKLADDY.cre~          ~TDD-CRE~
  SAY NAME1 @20380 
  SAY NAME2 @20380 

COPY ~TDD/CRE/PKLICH1.cre~          ~TDD-CRE~
  SAY NAME1 @20381
  SAY NAME2 @20381 

COPY ~TDD/CRE/PKLOTH1.cre~          ~TDD-CRE~        
     ~TDD/CRE/PKLOTH2.cre~          ~TDD-CRE~
  SAY NAME1 @20382
  SAY NAME2 @20382 

COPY ~TDD/CRE/PKMARCUS.cre~         ~TDD-CRE~
  SAY NAME1 @20383
  SAY NAME2 @20383

COPY ~TDD/CRE/PKMESS.cre~           ~TDD-CRE~
     ~TDD/CRE/PKMESS2.cre~          ~TDD-CRE~
  SAY NAME1 @20384
  SAY NAME2 @20384

COPY ~TDD/CRE/PKNOBW1.cre~          ~TDD-CRE~
  SAY NAME1 @20385
  SAY NAME2 @20385

COPY ~TDD/CRE/PKNOBW2.cre~          ~TDD-CRE~
  SAY NAME1 @20386
  SAY NAME2 @20386 

COPY ~TDD/CRE/PKORFA.cre~           ~TDD-CRE~
  SAY NAME1 @20387 
  SAY NAME2 @20387 

COPY ~TDD/CRE/PKSTORE1.cre~         ~TDD-CRE~
  SAY NAME1 @20388 
  SAY NAME2 @20388 

COPY ~TDD/CRE/PKSTORE2.cre~         ~TDD-CRE~
  SAY NAME1 @20389 
  SAY NAME2 @20389

COPY ~TDD/CRE/PKSUM1.cre~           ~TDD-CRE~
     ~TDD/CRE/PKSUM2.cre~           ~TDD-CRE~
     ~TDD/CRE/PKSUM3.cre~           ~TDD-CRE~
  SAY NAME1 @20390 
  SAY NAME2 @20390 

COPY ~TDD/CRE/PKTENT1.cre~          ~TDD-CRE~
  SAY NAME1 @20391 
  SAY NAME2 @20391

COPY ~TDD/CRE/PKTENT2.cre~          ~TDD-CRE~        
  SAY NAME1 @20392 
  SAY NAME2 @20392 

COPY ~TDD/CRE/PKTENT3.cre~          ~TDD-CRE~
  SAY NAME1 @20393 
  SAY NAME2 @20393

COPY ~TDD/CRE/PKTENT4.cre~          ~TDD-CRE~
  SAY NAME1 @20394
  SAY NAME2 @20394

COPY ~TDD/CRE/PKTENT5.cre~          ~TDD-CRE~
  SAY NAME1 @20395
  SAY NAME2 @20395

COPY ~TDD/CRE/POCRE001.cre~         ~TDD-CRE~
  SAY NAME1 @20396
  SAY NAME2 @20396

COPY ~TDD/CRE/PODESE01.cre~         ~TDD-CRE~
     ~TDD/CRE/PODESE02.cre~         ~TDD-CRE~
     ~TDD/CRE/PODESE03.cre~         ~TDD-CRE~
  SAY NAME1 @20036
  SAY NAME2 @20036

COPY ~TDD/CRE/POLITE01.cre~         ~TDD-CRE~
  SAY NAME1 @20397
  SAY NAME2 @20397

COPY ~TDD/CRE/PONITE01.cre~         ~TDD-CRE~
     ~TDD/CRE/PONITE02.cre~         ~TDD-CRE~
  SAY NAME1 @20398
  SAY NAME2 @20398

COPY ~TDD/CRE/PORAIN01.cre~         ~TDD-CRE~
     ~TDD/CRE/PORAIN02.cre~         ~TDD-CRE~
  SAY NAME1 @20040 
  SAY NAME2 @20040

COPY ~TDD/CRE/PORAISE1.cre~         ~TDD-CRE~
  SAY NAME1 @20242 
  SAY NAME2 @20243 

COPY ~TDD/CRE/POREST4.cre~          ~TDD-CRE~
  SAY NAME1 @20242 
  SAY NAME2 @20243 

COPY ~TDD/CRE/POSNOW01.cre~         ~TDD-CRE~  //was OVR-RETURN
     ~TDD/CRE/POSNOW02.cre~         ~TDD-CRE~
  SAY NAME1 @20039 
  SAY NAME2 @20039

COPY ~TDD/CRE/PRISCALI.cre~         ~TDD-CRE~
  SAY NAME1 @20399 
  SAY NAME2 @20399

COPY ~TDD/CRE/PSICERE.cre~          ~TDD-CRE~
  SAY NAME1 @20400 
  SAY NAME2 @20400

COPY ~TDD/CRE/PSIDARK1.cre~         ~TDD-CRE~
  SAY NAME1 @20401
  SAY NAME2 @20401 

COPY ~TDD/CRE/PSIDARK2.cre~         ~TDD-CRE~
     ~TDD/CRE/PSIDARK3.cre~         ~TDD-CRE~
  SAY NAME1 @20402 
  SAY NAME2 @20402 

COPY ~TDD/CRE/PSION1.cre~           ~TDD-CRE~
     ~TDD/CRE/PSION2.cre~           ~TDD-CRE~
  SAY NAME1 @20403
  SAY NAME2 @20403

COPY ~TDD/CRE/PSION3.cre~           ~TDD-CRE~
     ~TDD/CRE/PSION4.cre~           ~TDD-CRE~
  SAY NAME1 @20404 
  SAY NAME2 @20404 

COPY ~TDD/CRE/PSIWAR1.cre~          ~TDD-CRE~
     ~TDD/CRE/PSIWAR2.cre~          ~TDD-CRE~
     ~TDD/CRE/PSIWAR3.cre~          ~TDD-CRE~
  SAY NAME1 @20405
  SAY NAME2 @20405 

COPY ~TDD/CRE/QCAPTAIN.cre~         ~TDD-CRE~
  SAY NAME1 @20406 
  SAY NAME2 @20406 

COPY ~TDD/CRE/QLOOT1.cre~           ~TDD-CRE~
  SAY NAME1 @20407
  SAY NAME2 @20407 

COPY ~TDD/CRE/QLOOT2.cre~           ~TDD-CRE~         
  SAY NAME1 @20408 
  SAY NAME2 @20408

COPY ~TDD/CRE/QLOOT3.cre~           ~TDD-CRE~
  SAY NAME1 @20409 
  SAY NAME2 @20409

COPY ~TDD/CRE/QLOOT4.cre~           ~TDD-CRE~
  SAY NAME1 @20410
  SAY NAME2 @20410

COPY ~TDD/CRE/QUADKID1.cre~         ~TDD-CRE~
  SAY NAME1 @20411
  SAY NAME2 @20411 

COPY ~TDD/CRE/QUADKID2.cre~         ~TDD-CRE~
  SAY NAME1 @20412 
  SAY NAME2 @20412 

COPY ~TDD/CRE/QUADKID3.cre~         ~TDD-CRE~
  SAY NAME1 @20333 
  SAY NAME2 @20333 

COPY ~TDD/CRE/QUADTOL1.cre~         ~TDD-CRE~
  SAY NAME1 @20413 
  SAY NAME2 @20413 

COPY ~TDD/CRE/R800001.cre~          ~TDD-CRE~
  SAY NAME1 @20414
  SAY NAME2 @20414

COPY ~TDD/CRE/R800002.cre~          ~TDD-CRE~
  SAY NAME1 @20415 
  SAY NAME2 @20415 

COPY ~TDD/CRE/R800003.cre~          ~TDD-CRE~
  SAY NAME1 @20416
  SAY NAME2 @20416

COPY ~TDD/CRE/R800004.cre~          ~TDD-CRE~        
  SAY NAME1 @20417 
  SAY NAME2 @20417 

COPY ~TDD/CRE/R800005.cre~          ~TDD-CRE~
  SAY NAME1 @20418 
  SAY NAME2 @20418 

COPY ~TDD/CRE/RADIENT1.cre~          ~TDD-CRE~
     ~TDD/CRE/RADIENT2.cre~          ~TDD-CRE~
     ~TDD/CRE/RADIENT3.cre~          ~TDD-CRE~
     ~TDD/CRE/RADIENT4.cre~          ~TDD-CRE~
  SAY NAME1 @20419
  SAY NAME2 @20419

COPY ~TDD/CRE/RAZAK01.cre~          ~TDD-CRE~
  SAY NAME1 @20420
  SAY NAME2 @20420

COPY ~TDD/CRE/REDABI01.cre~         ~TDD-CRE~
  SAY NAME1 @20421
  SAY NAME2 @20421

COPY ~TDD/CRE/RIAT01.cre~           ~TDD-CRE~
     ~TDD/CRE/RIAT02.cre~           ~TDD-CRE~
     ~TDD/CRE/RIAT03.cre~           ~TDD-CRE~
     ~TDD/CRE/RIAT04.cre~           ~TDD-CRE~
     ~TDD/CRE/RIAT05.cre~           ~TDD-CRE~
  SAY NAME1 @20422 
  SAY NAME2 @20422 

COPY ~TDD/CRE/RIATAMNE.cre~         ~TDD-CRE~
  SAY NAME1 @20423 
  SAY NAME2 @20423 

COPY ~TDD/CRE/RIATGATE.cre~         ~TDD-CRE~
  SAY NAME1 @20424 
  SAY NAME2 @20424 

COPY ~TDD/CRE/RIATJAIL.cre~         ~TDD-CRE~
  SAY NAME1 @20425 
  SAY NAME2 @20425

COPY ~TDD/CRE/RIATMOV1.cre~         ~TDD-CRE~
     ~TDD/CRE/RIATMOV2.cre~         ~TDD-CRE~
     ~TDD/CRE/RIATMOV3.cre~         ~TDD-CRE~
  SAY NAME1 @20426
  SAY NAME2 @20426

COPY ~TDD/CRE/RIATMOV4.cre~         ~TDD-CRE~
     ~TDD/CRE/RIATMOV5.cre~         ~TDD-CRE~
  SAY NAME1 @20427
  SAY NAME2 @20427

COPY ~TDD/CRE/RIATTAN1.cre~         ~TDD-CRE~
     ~TDD/CRE/RIATTAN2.cre~         ~TDD-CRE~
     ~TDD/CRE/RIATTAN3.cre~         ~TDD-CRE~
  SAY NAME1 @20305
  SAY NAME2 @20305

COPY ~TDD/CRE/ROBEND01.cre~         ~TDD-CRE~       
     ~TDD/CRE/ROBEND02.cre~         ~TDD-CRE~
  SAY NAME1 @20428
  SAY NAME2 @20428

COPY ~TDD/CRE/ROBILARD.cre~         ~TDD-CRE~
  SAY NAME1 @20429
  SAY NAME2 @20429
  SAY 0x1cc @20430

COPY ~TDD/CRE/ROBORB01.cre~         ~TDD-CRE~
  SAY NAME1 @20431 
  SAY NAME2 @20431

COPY ~TDD/CRE/ROCKGOL1.cre~         ~TDD-CRE~
  SAY NAME1 @20432 
  SAY NAME2 @20432

COPY ~TDD/CRE/SACORC01.cre~         ~TDD-CRE~       
  SAY NAME1 @20433 
  SAY NAME2 @20433 

COPY ~TDD/CRE/SACORC02.cre~         ~TDD-CRE~       
  SAY NAME1 @20434
  SAY NAME2 @20434 

COPY ~TDD/CRE/SACORC03.cre~         ~TDD-CRE~       
  SAY NAME1 @20351 
  SAY NAME2 @20351 

COPY ~TDD/CRE/SACORC04.cre~         ~TDD-CRE~       
  SAY NAME1 @20435
  SAY NAME2 @20435

COPY ~TDD/CRE/SACORC05.cre~         ~TDD-CRE~       
  SAY NAME1 @20436 
  SAY NAME2 @20436 

COPY ~TDD/CRE/SACORC06.cre~         ~TDD-CRE~
  SAY NAME1 @20434
  SAY NAME2 @20434 

COPY ~TDD/CRE/SACORC07.cre~         ~TDD-CRE~       
  SAY NAME1 @20351 
  SAY NAME2 @20351

COPY ~TDD/CRE/SACORC08.cre~         ~TDD-CRE~
  SAY NAME1 @20435 
  SAY NAME2 @20435 

COPY ~TDD/CRE/SACORC10.cre~         ~TDD-CRE~
  SAY NAME1 @20436 
  SAY NAME2 @20436 

COPY ~TDD/CRE/SACORC9.cre~          ~TDD-CRE~
  SAY NAME1 @20434
  SAY NAME2 @20434

COPY ~TDD/CRE/SALAM01.cre~          ~TDD-CRE~        
     ~TDD/CRE/SALAM02.cre~          ~TDD-CRE~
     ~TDD/CRE/SALAM03.cre~          ~TDD-CRE~
     ~TDD/CRE/SALAM04.cre~          ~TDD-CRE~
     ~TDD/CRE/SALAM05.cre~          ~TDD-CRE~
     ~TDD/CRE/SALAM06.cre~          ~TDD-CRE~
  SAY NAME1 @20437 
  SAY NAME2 @20437

COPY ~TDD/CRE/SANDRAIN.cre~         ~TDD-CRE~
  SAY NAME1 @20438
  SAY NAME2 @20438

COPY ~TDD/CRE/SCRY.cre~             ~TDD-CRE~
  SAY NAME1 @20439
  SAY NAME2 @20439

COPY ~TDD/CRE/SENTIENT.cre~         ~TDD-CRE~
  SAY NAME1 @20440
  SAY NAME2 @20440

COPY ~TDD/CRE/SHADEXX.cre~          ~TDD-CRE~
  SAY NAME1 @20441
  SAY NAME2 @20441

COPY ~TDD/CRE/SHADFX1.cre~          ~TDD-CRE~
  SAY NAME1 @20442
  SAY NAME2 @20442

COPY ~TDD/CRE/SHARFIT1.cre~         ~TDD-CRE~
     ~TDD/CRE/SHARFIT3.cre~         ~TDD-CRE~
  SAY NAME1 @20443
  SAY NAME2 @20443

COPY ~TDD/CRE/SHARFIT2.cre~         ~TDD-CRE~
  SAY NAME1 @20444
  SAY NAME2 @20444

COPY ~TDD/CRE/SHARFIT4.cre~         ~TDD-CRE~
  SAY NAME1 @20445 
  SAY NAME2 @20445

COPY ~TDD/CRE/SHARTHUG.cre~         ~TDD-CRE~
  SAY NAME1 @20446
  SAY NAME2 @20446 

COPY ~TDD/CRE/SILVERSH.cre~         ~TDD-CRE~       
  SAY NAME1 @20447
  SAY NAME2 @20447

COPY ~TDD/CRE/SKELWAX2.cre~         ~TDD-CRE~
     ~TDD/CRE/SKELWAX3.cre~         ~TDD-CRE~
  SAY NAME1 @20448
  SAY NAME2 @20448

COPY ~TDD/CRE/SNAKSW1.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW11.cre~         ~TDD-CRE~
     ~TDD/CRE/SNAKSW12.cre~         ~TDD-CRE~
     ~TDD/CRE/SNAKSW4.cre~          ~TDD-CRE~
  SAY NAME1 @20449
  SAY NAME2 @20449

COPY ~TDD/CRE/SNAKSW10.cre~         ~TDD-CRE~
     ~TDD/CRE/SNAKSW2.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW3.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW5.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW6.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW7.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW8.cre~          ~TDD-CRE~
     ~TDD/CRE/SNAKSW9.cre~          ~TDD-CRE~
  SAY NAME1 @20450
  SAY NAME2 @20450

COPY ~TDD/CRE/SOROVIN.cre~          ~TDD-CRE~        
  SAY NAME1 @20451
  SAY NAME2 @20451

COPY ~TDD/CRE/SPECX1.cre~           ~TDD-CRE~

COPY ~TDD/CRE/STONESER.cre~         ~TDD-CRE~
  SAY NAME1 @20452
  SAY NAME2 @20452

COPY ~TDD/CRE/TANARIX1.cre~         ~TDD-CRE~
     ~TDD/CRE/TANARIXA.cre~         ~TDD-CRE~
     ~TDD/CRE/TANARIXB.cre~         ~TDD-CRE~
  SAY NAME1 @20453
  SAY NAME2 @20453

COPY ~TDD/CRE/TARTAR01.cre~         ~TDD-CRE~       
     ~TDD/CRE/TARTARUS.cre~         ~TDD-CRE~
  SAY NAME1 @20454 
  SAY NAME2 @20454 

COPY ~TDD/CRE/TETHTORI.cre~         ~TDD-CRE~
  SAY NAME1 @20455 
  SAY NAME2 @20455 

COPY ~TDD/CRE/THORK1.cre~           ~TDD-CRE~
     ~TDD/CRE/THORK2.cre~           ~TDD-CRE~
     ~TDD/CRE/THORK3.cre~           ~TDD-CRE~
     ~TDD/CRE/THORK4.cre~           ~TDD-CRE~
  SAY NAME1 @20456
  SAY NAME2 @20456

COPY ~TDD/CRE/THORKD1.cre~          ~TDD-CRE~
     ~TDD/CRE/THORKD2.cre~          ~TDD-CRE~
     ~TDD/CRE/THORKD3.cre~          ~TDD-CRE~
     ~TDD/CRE/THORKD4.cre~          ~TDD-CRE~
  SAY NAME1 @20366
  SAY NAME2 @20366 

COPY ~TDD/CRE/TIGER1.cre~           ~TDD-CRE~
COPY ~TDD/CRE/TIGER2.cre~           ~TDD-CRE~

COPY ~TDD/CRE/TOPESLAV.cre~         ~TDD-CRE~
  SAY NAME1 @20457
  SAY NAME2 @20457

COPY ~TDD/CRE/TORMENT.cre~          ~TDD-CRE~
  SAY NAME1 @20458
  SAY NAME2 @20458 

COPY ~TDD/CRE/TRAVGRD1.cre~         ~TDD-CRE~
     ~TDD/CRE/TRAVGRD2.cre~         ~TDD-CRE~
     ~TDD/CRE/TRAVGRD3.cre~         ~TDD-CRE~
     ~TDD/CRE/TRAVGRD4.cre~         ~TDD-CRE~
     ~TDD/CRE/TRAVGRD5.cre~         ~TDD-CRE~
  SAY NAME1 @20459
  SAY NAME2 @20459

COPY ~TDD/CRE/TRAVMAG2.cre~         ~TDD-CRE~
  SAY NAME1 @20460 
  SAY NAME2 @20460 

COPY ~TDD/CRE/TRAVMAGE.cre~         ~TDD-CRE~       
  SAY NAME1 @20461
  SAY NAME2 @20461

COPY ~TDD/CRE/TROLICDD.cre~         ~TDD-CRE~
  SAY NAME1 @20462
  SAY NAME2 @20462 

COPY ~TDD/CRE/UMBCALI1.cre~         ~TDD-CRE~
     ~TDD/CRE/UMBCALI2.cre~         ~TDD-CRE~
     ~TDD/CRE/UMBCALI3.cre~         ~TDD-CRE~
     ~TDD/CRE/UMBCALI4.cre~         ~TDD-CRE~
     ~TDD/CRE/UMBCALI5.cre~         ~TDD-CRE~
  SAY NAME1 @20463
  SAY NAME2 @20463

COPY ~TDD/CRE/VAMQ1.cre~            ~TDD-CRE~

COPY ~TDD/CRE/VESINE8.cre~          ~override~   //override - to catch immediate Kit Pack installation
     ~TDD/CRE/VESINE11.cre~         ~override~
     ~TDD/CRE/VESINE13.cre~         ~override~
  SAY NAME1 @20464
  SAY NAME2 @20464
  SAY 0x1cc @20465         //yet incomplete biography!!!!!!!!!!!!!

COPY ~TDD/CRE/VICYBOAT.cre~         ~TDD-CRE~
  SAY NAME1 @20466
  SAY NAME2 @20466

COPY ~TDD/CRE/WARDABI1.cre~         ~TDD-CRE~
     ~TDD/CRE/WARDABI2.cre~         ~TDD-CRE~
  SAY NAME1 @20467
  SAY NAME2 @20467

COPY ~TDD/CRE/WARDMAGA.cre~         ~TDD-CRE~
  SAY NAME1 @20468
  SAY NAME2 @20468

COPY ~TDD/CRE/WARDMAGB.cre~         ~TDD-CRE~
  SAY NAME1 @20469
  SAY NAME2 @20469

COPY ~TDD/CRE/WARDMAGC.cre~         ~TDD-CRE~
  SAY NAME1 @20468
  SAY NAME2 @20468

COPY ~TDD/CRE/WARDNOB1.cre~         ~TDD-CRE~
  SAY NAME1 @20470
  SAY NAME2 @20470

COPY ~TDD/CRE/WARDTIEF.cre~         ~TDD-CRE~
  SAY NAME1 @20471
  SAY NAME2 @20471

COPY ~TDD/CRE/WARDWIZ1.cre~         ~TDD-CRE~
     ~TDD/CRE/WARDWIZ2.cre~         ~TDD-CRE~
     ~TDD/CRE/WARDWIZ3.cre~         ~TDD-CRE~
     ~TDD/CRE/WARDWIZ4.cre~         ~TDD-CRE~
     ~TDD/CRE/WARDWIZ5.cre~         ~TDD-CRE~
  SAY NAME1 @20472
  SAY NAME2 @20472

COPY ~TDD/CRE/WARDWIZS.cre~         ~TDD-CRE~
  SAY NAME1 @20473 
  SAY NAME2 @20473

COPY ~TDD/CRE/WOLFEXIT.cre~         ~TDD-CRE~
     ~TDD/CRE/WOLFGET.cre~          ~TDD-CRE~
     ~TDD/CRE/WOLFWWDD.cre~         ~TDD-CRE~
  SAY NAME1 @20474
  SAY NAME2 @20474

COPY ~TDD/CRE/WTTHORK5.cre~         ~TDD-CRE~
     ~TDD/CRE/WTTHORK6.cre~         ~TDD-CRE~
  SAY NAME1 @20456
  SAY NAME2 @20456 

COPY ~TDD/CRE/XCAPTAIN.cre~         ~TDD-CRE~
  SAY NAME1 @20406 
  SAY NAME2 @20406 

COPY ~TDD/CRE/XCREW01.cre~          ~TDD-CRE~
     ~TDD/CRE/XCREW02.cre~          ~TDD-CRE~
     ~TDD/CRE/XCREW03.cre~          ~TDD-CRE~
     ~TDD/CRE/XCREW04.cre~          ~TDD-CRE~
  SAY NAME1 @20475
  SAY NAME2 @20475

COPY ~TDD/CRE/YACHOL.cre~           ~TDD-CRE~
  SAY NAME1 @20476 
  SAY NAME2 @20476

COPY ~TDD/CRE/YUXBOSSA.cre~         ~TDD-CRE~
  SAY NAME1 @20477
  SAY NAME2 @20477

COPY ~TDD/CRE/YUXINVI.cre~          ~TDD-CRE~
  SAY NAME1 @20166
  SAY NAME2 @20166

COPY ~TDD/CRE/ZCAPTAIN.cre~         ~TDD-CRE~
  SAY NAME1 @20406
  SAY NAME2 @20406

COPY ~TDD/CRE/ZOMBSEXX.cre~         ~TDD-CRE~
  SAY NAME1 @20478
  SAY NAME2 @20478

COPY ~TDD/CRE/ZOMBX1.cre~           ~TDD-CRE~

COPY ~TDD/CRE/ZPRIZE1.cre~          ~TDD-CRE~
     ~TDD/CRE/ZPRIZE2.cre~          ~TDD-CRE~
     ~TDD/CRE/ZPRIZE3.cre~          ~TDD-CRE~
     ~TDD/CRE/ZPRIZE4.cre~          ~TDD-CRE~
  SAY NAME1 @20285
  SAY NAME2 @20285

COPY ~TDD/CRE/RIATENCH.cre~           ~TDD-CRE~
  SAY NAME1 @21781
  SAY NAME2 @21781

//******************************************************************
//  SPELLS
//******************************************************************
PRINT @20479

//*****************************************************
// Patching BG2 spells
//*****************************************************
PRINT @20480

COPY_EXISTING ~SPIN123.spl~          ~override~
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 READ_SHORT 0x70  "glob_eff_cnt"
 SET found = 0
 SET already_there = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF( found=1 ) THEN BEGIN    //shift effects indexes for all possible abilities after Melee
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx+6
   END
   PATCH_IF("%type%"=1) BEGIN        //Melee
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
       PATCH_IF( "%eff_type%"=17 ) THEN BEGIN
         SET already_there = 1
       END
     END
     PATCH_IF( already_there=0 ) THEN BEGIN
       WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt+6
       SET found = 1
     END
   END
 END
 PATCH_IF( already_there=0 ) THEN BEGIN
   SET offset = ("%eff_offset%"+0x30*(eff_idx+"%glob_eff_cnt%"+eff_cnt))
   INSERT_BYTES offset    0x30*6
   WRITE_SHORT  offset    17    //Current HP bonus
   WRITE_BYTE   offset+2  2     //TargetPresetTarget
   WRITE_BYTE   offset+3  3     //Power
   WRITE_LONG   offset+4  11    //Value
   WRITE_LONG   offset+8  2     //Set % Of
   WRITE_BYTE   offset+12 1     //Instant/Permanent
   WRITE_BYTE   offset+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   offset+14 0     //Time
   WRITE_BYTE   offset+18 10    //Probability 1
   WRITE_BYTE   offset+19 0     //Probability 2
   WRITE_LONG   offset+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30)+3  3     //Power
   WRITE_LONG   (offset+0x30)+4  12    //Value
   WRITE_LONG   (offset+0x30)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30)+14 0     //Time
   WRITE_BYTE   (offset+0x30)+18 25    //Probability 1
   WRITE_BYTE   (offset+0x30)+19 11    //Probability 2
   WRITE_LONG   (offset+0x30)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*2)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*2)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*2)+3  3     //Power
   WRITE_LONG   (offset+0x30*2)+4  13    //Value
   WRITE_LONG   (offset+0x30*2)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*2)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*2)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*2)+14 0     //Time
   WRITE_BYTE   (offset+0x30*2)+18 50    //Probability 1
   WRITE_BYTE   (offset+0x30*2)+19 26    //Probability 2
   WRITE_LONG   (offset+0x30*2)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*3)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*3)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*3)+3  3     //Power
   WRITE_LONG   (offset+0x30*3)+4  14    //Value
   WRITE_LONG   (offset+0x30*3)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*3)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*3)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*3)+14 0     //Time
   WRITE_BYTE   (offset+0x30*3)+18 75    //Probability 1
   WRITE_BYTE   (offset+0x30*3)+19 51    //Probability 2
   WRITE_LONG   (offset+0x30*3)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*4)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*4)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*4)+3  3     //Power
   WRITE_LONG   (offset+0x30*4)+4  15    //Value
   WRITE_LONG   (offset+0x30*4)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*4)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*4)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*4)+14 0     //Time
   WRITE_BYTE   (offset+0x30*4)+18 90    //Probability 1
   WRITE_BYTE   (offset+0x30*4)+19 76    //Probability 2
   WRITE_LONG   (offset+0x30*4)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*5)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*5)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*5)+3  3     //Power
   WRITE_LONG   (offset+0x30*5)+4  16    //Value
   WRITE_LONG   (offset+0x30*5)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*5)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*5)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*5)+14 0     //Time
   WRITE_BYTE   (offset+0x30*5)+18 100   //Probability 1
   WRITE_BYTE   (offset+0x30*5)+19 91    //Probability 2
   WRITE_LONG   (offset+0x30*5)+32 8     //Dice size/Min level
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SPIN124.spl~          ~override~
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 READ_SHORT 0x70  "glob_eff_cnt"
 SET found = 0
 SET already_there = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF( found=1 ) THEN BEGIN    //shift effects indexes for all possible abilities after Melee
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx+6
   END
   PATCH_IF("%type%"=1) BEGIN        //Melee
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
       PATCH_IF( "%eff_type%"=17 ) THEN BEGIN
         SET already_there = 1
       END
     END
     PATCH_IF( already_there=0 ) THEN BEGIN
       WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt+6
       SET found = 1
     END
   END
 END
 PATCH_IF( already_there=0 ) THEN BEGIN
   SET offset = ("%eff_offset%"+0x30*(eff_idx+"%glob_eff_cnt%"+eff_cnt))
   INSERT_BYTES offset    0x30*6
   WRITE_SHORT  offset    17    //Current HP bonus
   WRITE_BYTE   offset+2  2     //TargetPresetTarget
   WRITE_BYTE   offset+3  3     //Power
   WRITE_LONG   offset+4  10    //Value
   WRITE_LONG   offset+8  2     //Set % Of
   WRITE_BYTE   offset+12 1     //Instant/Permanent
   WRITE_BYTE   offset+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   offset+14 0     //Time
   WRITE_BYTE   offset+18 10    //Probability 1
   WRITE_BYTE   offset+19 0     //Probability 2
   WRITE_LONG   offset+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30)+3  3     //Power
   WRITE_LONG   (offset+0x30)+4  20    //Value
   WRITE_LONG   (offset+0x30)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30)+14 0     //Time
   WRITE_BYTE   (offset+0x30)+18 30    //Probability 1
   WRITE_BYTE   (offset+0x30)+19 11    //Probability 2
   WRITE_LONG   (offset+0x30)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*2)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*2)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*2)+3  3     //Power
   WRITE_LONG   (offset+0x30*2)+4  30    //Value
   WRITE_LONG   (offset+0x30*2)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*2)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*2)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*2)+14 0     //Time
   WRITE_BYTE   (offset+0x30*2)+18 65    //Probability 1
   WRITE_BYTE   (offset+0x30*2)+19 31    //Probability 2
   WRITE_LONG   (offset+0x30*2)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*3)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*3)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*3)+3  3     //Power
   WRITE_LONG   (offset+0x30*3)+4  40    //Value
   WRITE_LONG   (offset+0x30*3)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*3)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*3)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*3)+14 0     //Time
   WRITE_BYTE   (offset+0x30*3)+18 85    //Probability 1
   WRITE_BYTE   (offset+0x30*3)+19 66    //Probability 2
   WRITE_LONG   (offset+0x30*3)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*4)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*4)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*4)+3  3     //Power
   WRITE_LONG   (offset+0x30*4)+4  50    //Value
   WRITE_LONG   (offset+0x30*4)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*4)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*4)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*4)+14 0     //Time
   WRITE_BYTE   (offset+0x30*4)+18 95    //Probability 1
   WRITE_BYTE   (offset+0x30*4)+19 86    //Probability 2
   WRITE_LONG   (offset+0x30*4)+32 8     //Dice size/Min level
   WRITE_SHORT  (offset+0x30*5)    17    //Current HP bonus
   WRITE_BYTE   (offset+0x30*5)+2  2     //TargetPresetTarget
   WRITE_BYTE   (offset+0x30*5)+3  3     //Power
   WRITE_LONG   (offset+0x30*5)+4  60    //Value
   WRITE_LONG   (offset+0x30*5)+8  2     //Set % Of
   WRITE_BYTE   (offset+0x30*5)+12 1     //Instant/Permanent
   WRITE_BYTE   (offset+0x30*5)+13 0     //No dispell/Bypass Resistance
   WRITE_LONG   (offset+0x30*5)+14 0     //Time
   WRITE_BYTE   (offset+0x30*5)+18 100   //Probability 1
   WRITE_BYTE   (offset+0x30*5)+19 96    //Probability 2
   WRITE_LONG   (offset+0x30*5)+32 8     //Dice size/Min level
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SPIN890.spl~          ~override~
 WRITE_LONG 0x34  1                  //spell level - why 1 instead of 9?
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a "eff_offset"
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF("%type%"=1) BEGIN        //Melee
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       WRITE_LONG ("%eff_offset%"+0x30*cnt2+0x28)  0xfffffffc   //-4 save bonus for every effect - was 0
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SPWI954.spl~          ~override~
 WRITE_ASCII 0x3a ~SPPR101C~                       //spell icon
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a "eff_offset"
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF("%type%"=1) BEGIN        //Melee
     WRITE_ASCII ("%ability_offset%"+0x28*cnt+4)  ~SPPR101B~ //spell icon
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SPIN678.SPL~ ~override~    //BDash, but adds different value
 READ_LONG  0x64 "ability_offset"
 READ_SHORT 0x68 "abil_cnt"
 READ_LONG  0x6a "eff_offset"
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF("%type%"=1) BEGIN                                      //Melee
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
       PATCH_IF( "%eff_type%" = 49 ) BEGIN                        //wisdom bonus
         WRITE_BYTE ("%eff_offset%"+0x30*(cnt2+eff_idx)+4) 18     //Value
       END
     END
   END
 END
BUT_ONLY_IF_IT_CHANGES

//************************************************************************
// Dispel/Remove magic Workaround - see BDashed Spells fixes, SPWI302.SPL
//************************************************************************
PRINT @20481

COPY_EXISTING ~SPWI302.SPL~ ~override~   //Remove Magic
 READ_LONG  0x64 "ability_offset"
 READ_SHORT 0x68 "abil_cnt"
 READ_LONG  0x6a "eff_offset"
 SET found = 0
 SET extra_effects = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF( found>0 ) THEN BEGIN    //shift effects indexes for all possible abilities after 1st effect entry
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x20) eff_idx+extra_effects
   END
   PATCH_IF("%type%"=1) BEGIN        //Melee
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+0x28*cnt+0x20)  eff_idx

     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt+9
     SET offset = ("%eff_offset%"+0x30*(eff_idx+eff_cnt))
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "SSCEPT"    //from SPAMAUN3.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "AURHAND"   //from SPAUR6.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "BCLAW"     //from SPMAL6.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "KELBHAND"  //from SPMI120.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "PSHARD"    //from SPMI128.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "IRONKN"    //from SPPR327.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "MOONBLA"   //from SPPR330.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "GONDFIST"  //from SPPR432.SPL
     INSERT_BYTES offset    0x30        //1 new effect
     WRITE_SHORT  offset    112         //Remove item
     WRITE_BYTE   offset+2  2           //TargetPreset
     WRITE_BYTE   offset+12 1           //Instant/Permanent
     WRITE_BYTE   offset+13 0           //Not Dispell/Bypass Resistance
     WRITE_BYTE   offset+18 100         //Probability 1
     WRITE_ASCII  offset+20 "VITALD"    //from SPPR622.SPL
     SET extra_effects = extra_effects + 9
     SET found = 1
   END
 END
BUT_ONLY_IF_IT_CHANGES


//************************************************************************
// Haste/Improved Haste Workaround - see BDashed Spells fixes
//************************************************************************
PRINT @20481

COPY_EXISTING ~SPWI305.spl~          ~override~    //Haste
              ~SPWI613.spl~          ~override~    //Improved Haste
              ~SPIN572.spl~          ~override~    //Haste
              ~SPIN655.spl~          ~override~    //Improved Haste
              ~SPIN828.spl~          ~override~    //Haste
              ~SPRA301.spl~          ~override~    //Haste
              ~SPWISH36.spl~         ~override~    //Improved Haste
              ~SPWISH37.spl~         ~override~    //Improved Haste
              ~SPWISH40.spl~         ~override~    //Improved Haste
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 READ_LONG  0x34  level
 PATCH_IF( level<3 ) BEGIN
   SET level = 3
 END
 SET found = 0
 SET extra_effects = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF( found>0 ) THEN BEGIN    //shift effects indexes for all possible abilities after 1st effect entry
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x20) eff_idx+extra_effects
   END

   PATCH_IF("%type%" = 1) BEGIN                          //Melee ability
     SET time=0
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
       PATCH_IF( "%eff_type%"=16 ) BEGIN                          //Haste
         READ_BYTE ("%eff_offset%"+0x30*(cnt2+eff_idx)+2)  target //loading necessary effect's target value
         READ_LONG ("%eff_offset%"+0x30*(cnt2+eff_idx)+14) time   //loading necessary effect's time
       END
     END

     SET offset = ("%eff_offset%"+0x30*(eff_idx+eff_cnt))
     SET added_effects = 0
       INSERT_BYTES offset    0x30        //1 new effect
       WRITE_SHORT  offset    206         //Protection from spell
       WRITE_BYTE   offset+2  target      //TargetPreset
       WRITE_BYTE   offset+3  level       //Power
       WRITE_BYTE   offset+12 0           //Instant/Limited
       WRITE_BYTE   offset+13 3           //Not Dispell/Bypass Resistance
       WRITE_LONG   offset+14 time        //Time
       WRITE_BYTE   offset+18 100         //Probability 1
       WRITE_ASCII  offset+20 "SPSE305"   //from spell
       SET offset += 0x30
       SET added_effects += 1
       INSERT_BYTES offset    0x30        //1 new effect
       WRITE_SHORT  offset    206         //Protection from spell
       WRITE_BYTE   offset+2  target      //TargetPreset
       WRITE_BYTE   offset+3  level       //Power
       WRITE_BYTE   offset+12 0           //Instant/Limited
       WRITE_BYTE   offset+13 3           //Not Dispell/Bypass Resistance
       WRITE_LONG   offset+14 time        //Time
       WRITE_BYTE   offset+18 100         //Probability 1
       WRITE_ASCII  offset+20 "SPSWIND1"   //from spell
       SET offset += 0x30
       SET added_effects += 1
     SET extra_effects = extra_effects + added_effects
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  (eff_cnt + added_effects)
     SET found = 1
   END //PATCH_IF("%type%" = 1)
 END //FOR - ability loop
BUT_ONLY_IF_IT_CHANGES





//*****************************************************
// Installing new spells
//*****************************************************
PRINT @20482

COPY ~TDD/SPL/MMCHAL1.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL2.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL3.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL4.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL5.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL6.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL7.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL8.spl~          ~TDD-SPL~
     ~TDD/SPL/MMCHAL9.spl~          ~TDD-SPL~

COPY ~TDD/SPL/MMPRCONV.spl~         ~TDD-SPL~
     ~TDD/SPL/MMWICONV.spl~         ~TDD-SPL~
  SAY NAME1 @20483
  SAY UNIDENTIFIED_DESC @20484

COPY ~TDD/SPL/PODESE01.spl~         ~TDD-SPL~
  SAY NAME1 @20036

COPY ~TDD/SPL/POFAKE.spl~         ~TDD-SPL~

COPY ~TDD/SPL/POLITE01.spl~         ~TDD-SPL~
  SAY NAME1 @20485

COPY ~TDD/SPL/PONITE01.spl~         ~TDD-SPL~
  SAY NAME1 @20486

COPY ~TDD/SPL/PORAIN01.spl~         ~TDD-SPL~
  SAY NAME1 @20487

COPY ~TDD/SPL/POSNOW01.spl~         ~TDD-SPL~
  SAY NAME1 @20488

COPY ~TDD/SPL/SGINVIS.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPBM1.spl~            ~TDD-SPL~

COPY ~TDD/SPL/SPBM2.spl~            ~TDD-SPL~
  SAY NAME1 @20489
  SAY 0x12e @20490

COPY ~TDD/SPL/SPMI101.spl~          ~TDD-SPL~
  SAY NAME1 @20491
  SAY UNIDENTIFIED_DESC @20492
  SAY 0x2de @20493 

COPY ~TDD/SPL/SPMI102.spl~          ~TDD-SPL~
  SAY NAME1 @20494
  SAY UNIDENTIFIED_DESC @20495 
  SAY 0x21e @20496
  SAY 0x24e @20497 
  SAY 0x27e @20498

COPY ~TDD/SPL/SPMI103.spl~          ~TDD-SPL~
  SAY NAME1 @20499
  SAY UNIDENTIFIED_DESC @20500
  SAY 0x21e @20501



COPY ~TDD/SPL/SPMI104.spl~          ~TDD-SPL~
  SAY NAME1 @20502
  SAY UNIDENTIFIED_DESC @20503

COPY ~TDD/SPL/SPPR960.spl~          ~TDD-SPL~
  SAY NAME1 @20502



COPY ~TDD/SPL/SPMI106.spl~          ~TDD-SPL~
  SAY NAME1 @20504
  SAY UNIDENTIFIED_DESC @20505

COPY ~TDD/SPL/SPMI107.spl~          ~TDD-SPL~
  SAY NAME1 @20506
  SAY UNIDENTIFIED_DESC @20507
  SAY 0x15e @20508

COPY ~TDD/SPL/SPMI108.spl~          ~TDD-SPL~
  SAY NAME1 @20509
  SAY UNIDENTIFIED_DESC @20510
  SAY 0x1a6 @20511
  SAY 0x596 @20511
  SAY 0x9b6 @20511
  SAY 0xe06 @20511

COPY ~TDD/SPL/SPMI109.spl~          ~TDD-SPL~
  SAY NAME1 @20512
  SAY UNIDENTIFIED_DESC @20513
  SAY 0xfe @20514

COPY ~TDD/SPL/SPMI110.spl~          ~TDD-SPL~
  SAY NAME1 @20515
  SAY UNIDENTIFIED_DESC @20516

COPY ~TDD/SPL/SPMI111.spl~          ~TDD-SPL~
  SAY NAME1 @20517
  SAY UNIDENTIFIED_DESC @20518



COPY ~TDD/SPL/SPMI112.spl~          ~TDD-SPL~
  SAY NAME1 @20519
  SAY UNIDENTIFIED_DESC @20520

COPY ~TDD/SPL/SPPR966.spl~          ~TDD-SPL~
  SAY NAME1 @20521


COPY ~TDD/SPL/SPMI113.spl~          ~TDD-SPL~
  SAY NAME1 @20522
  SAY UNIDENTIFIED_DESC @20523

COPY ~TDD/SPL/SPMI115.spl~          ~TDD-SPL~
  SAY NAME1 @20524
  SAY UNIDENTIFIED_DESC @20525 

COPY ~TDD/SPL/SPMI116.spl~          ~TDD-SPL~
  SAY NAME1 @20526
  SAY UNIDENTIFIED_DESC @20527 

COPY ~TDD/SPL/SPMI117.spl~          ~TDD-SPL~
  SAY NAME1 @20528
  SAY UNIDENTIFIED_DESC @20529 

COPY ~TDD/SPL/SPMI119.spl~          ~TDD-SPL~
  SAY NAME1 @20530
  SAY UNIDENTIFIED_DESC @20531

COPY ~TDD/SPL/SPMI120.spl~          ~TDD-SPL~
  SAY NAME1 @20532
  SAY UNIDENTIFIED_DESC @20533

COPY ~TDD/SPL/SPMI121.spl~          ~TDD-SPL~
  SAY NAME1 @20534
  SAY UNIDENTIFIED_DESC @20535

COPY ~TDD/SPL/SPMI122.spl~          ~TDD-SPL~
  SAY NAME1 @20536
  SAY UNIDENTIFIED_DESC @20537 

COPY ~TDD/SPL/SPMI123.spl~          ~TDD-SPL~
  SAY NAME1 @20538
  SAY UNIDENTIFIED_DESC @20539 

COPY ~TDD/SPL/SPMI124.spl~          ~TDD-SPL~
  SAY NAME1 @20540
  SAY UNIDENTIFIED_DESC @20541

COPY ~TDD/SPL/SPMI125.spl~          ~TDD-SPL~        
  SAY NAME1 @20542
  SAY UNIDENTIFIED_DESC @20543

COPY ~TDD/SPL/SPMI126.spl~          ~TDD-SPL~
  SAY NAME1 @20544
  SAY UNIDENTIFIED_DESC @20545

COPY ~TDD/SPL/SPMI127.spl~          ~TDD-SPL~
  SAY NAME1 @20546
  SAY UNIDENTIFIED_DESC @20547

COPY ~TDD/SPL/SPMI128.spl~          ~TDD-SPL~
  SAY NAME1 @20548
  SAY UNIDENTIFIED_DESC @20549

COPY ~TDD/SPL/SPMI129.spl~          ~TDD-SPL~
  SAY NAME1 @20550
  SAY UNIDENTIFIED_DESC @20551 

COPY ~TDD/SPL/SPMI130.spl~          ~TDD-SPL~
  SAY NAME1 @20552
  SAY UNIDENTIFIED_DESC @20553

COPY ~TDD/SPL/SPMI131.spl~          ~TDD-SPL~
  SAY NAME1 @20554
  SAY UNIDENTIFIED_DESC @20555

COPY ~TDD/SPL/SPMI131B.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI131C.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI131D.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI131E.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI131F.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI131G.spl~         ~TDD-SPL~
  SAY NAME1 @20554

COPY ~TDD/SPL/SPMI132.spl~          ~TDD-SPL~
  SAY NAME1 @20556
  SAY UNIDENTIFIED_DESC @20557

COPY ~TDD/SPL/SPMI133.spl~          ~TDD-SPL~
  SAY NAME1 @20558
  SAY UNIDENTIFIED_DESC @20559

COPY ~TDD/SPL/SPMI134.spl~          ~TDD-SPL~
  SAY NAME1 @20560
  SAY UNIDENTIFIED_DESC @20561
  READ_LONG  0x64  "abil_offset"
  READ_SHORT 0x68  "abil_cnt"
  FOR(cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1) BEGIN
    WRITE_SHORT ("%abil_offset%" + cnt*0x28 + 0x26) (1 + IDS_OF_SYMBOL(~PROJECTL~ ~STEAMCLD~))
  END

COPY ~TDD/SPL/SPMI135.spl~          ~TDD-SPL~
  SAY NAME1 @20562
  SAY UNIDENTIFIED_DESC @20563

COPY ~TDD/SPL/SPMI136.spl~          ~TDD-SPL~
     ~TDD/SPL/SPMI136A.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI136B.spl~         ~TDD-SPL~
  SAY NAME1 @20564
  SAY UNIDENTIFIED_DESC @20565 

COPY ~TDD/SPL/SPMI137.spl~          ~TDD-SPL~
     ~TDD/SPL/SPMI137A.spl~          ~TDD-SPL~
     ~TDD/SPL/SPMI137B.spl~          ~TDD-SPL~
  SAY NAME1 @20566
  SAY UNIDENTIFIED_DESC @20567

COPY ~TDD/SPL/SPMI138.spl~          ~TDD-SPL~
     ~TDD/SPL/SPMI139.spl~          ~TDD-SPL~
  READ_LONG  0x64  "abil_offset"
  READ_SHORT 0x68  "abil_cnt"
  FOR(cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1) BEGIN
    WRITE_SHORT ("%abil_offset%" + cnt*0x28 + 0x26) (1 + IDS_OF_SYMBOL(~PROJECTL~ ~PREASURE~))
  END

COPY ~TDD/SPL/SPMI142.spl~          ~TDD-SPL~
  SAY NAME1 @20568
  SAY UNIDENTIFIED_DESC @20569

COPY ~TDD/SPL/SPMI143.spl~          ~TDD-SPL~
  SAY NAME1 @20570
  SAY UNIDENTIFIED_DESC @20571

COPY ~TDD/SPL/SPMI142D.spl~         ~TDD-SPL~
     ~TDD/SPL/SPMI143D.spl~         ~TDD-SPL~
  SAY NAME1 @20572

COPY ~TDD/SPL/SPMINTD.spl~          ~TDD-SPL~
  SAY NAME1 @20573
  SAY UNIDENTIFIED_DESC @20574


COPY ~TDD/SPL/SPPR114.spl~          ~TDD-SPL~
  SAY NAME1 @20575
  SAY UNIDENTIFIED_DESC @20576

COPY ~TDD/SPL/SPPR115.spl~          ~TDD-SPL~
  SAY NAME1 @20577
  SAY UNIDENTIFIED_DESC @20578
  SAY 0x12e @20579

COPY ~TDD/SPL/SPPR116.spl~          ~TDD-SPL~
  SAY NAME1 @20580
  SAY UNIDENTIFIED_DESC @20581

COPY ~TDD/SPL/SPPR117.spl~          ~TDD-SPL~
  SAY NAME1 @20582 
  SAY UNIDENTIFIED_DESC @20583

COPY ~TDD/SPL/SPPR118.spl~          ~TDD-SPL~
  SAY NAME1 @20584
  SAY UNIDENTIFIED_DESC @20585 

COPY ~TDD/SPL/SPPR119.spl~          ~TDD-SPL~
  SAY NAME1 @20586
  SAY UNIDENTIFIED_DESC @20587 

COPY ~TDD/SPL/SPPR120.spl~          ~TDD-SPL~
  SAY NAME1 @20588
  SAY UNIDENTIFIED_DESC @20589
  SAY 0x1c6 @20590
  SAY 0x286 @20590
  SAY 0x346 @20590
  SAY 0x406 @20590
  SAY 0x4c6 @20590
  SAY 0x586 @20590

COPY ~TDD/SPL/SPPR121.spl~          ~TDD-SPL~
  SAY NAME1 @20591 
  SAY UNIDENTIFIED_DESC @20592 

COPY ~TDD/SPL/SPPR122.spl~          ~TDD-SPL~
  SAY NAME1 @20593 
  SAY UNIDENTIFIED_DESC @20594 

COPY ~TDD/SPL/SPPR123.spl~          ~TDD-SPL~        
  SAY NAME1 @20595 
  SAY UNIDENTIFIED_DESC @20596

COPY ~TDD/SPL/SPPR124.spl~          ~TDD-SPL~
  SAY NAME1 @20597 
  SAY UNIDENTIFIED_DESC @20598 

COPY ~TDD/SPL/SPPR215.spl~          ~TDD-SPL~
  SAY NAME1 @20599 
  SAY UNIDENTIFIED_DESC @20600

COPY ~TDD/SPL/SPPR216.spl~          ~TDD-SPL~
  SAY NAME1 @20601
  SAY UNIDENTIFIED_DESC @20602

COPY ~TDD/SPL/SPPR217.spl~          ~TDD-SPL~
  SAY NAME1 @20603
  SAY UNIDENTIFIED_DESC @20604 

COPY ~TDD/SPL/SPPR320.spl~          ~TDD-SPL~
  SAY NAME1 @20605 
  SAY UNIDENTIFIED_DESC @20606

COPY ~TDD/SPL/SPPR321.spl~          ~TDD-SPL~
  SAY NAME1 @20607
  SAY UNIDENTIFIED_DESC @20608 
  SAY 0x2de @20609
  SAY 0x30e @20610 
  SAY 0x33e @20611 
  SAY 0x36e @20612
  SAY 0x39e @20613
  SAY 0x3ce @20614
  SAY 0x3fe @20615

COPY ~TDD/SPL/SPPR322.spl~          ~TDD-SPL~
  SAY NAME1 @20616 
  SAY UNIDENTIFIED_DESC @20617

COPY ~TDD/SPL/SPPR323.spl~          ~TDD-SPL~
  SAY NAME1 @20618
  SAY UNIDENTIFIED_DESC @20619 

COPY ~TDD/SPL/SPPR324.spl~          ~TDD-SPL~
  SAY NAME1 @20620 
  SAY UNIDENTIFIED_DESC @20621 

COPY ~TDD/SPL/SPPR325.spl~          ~TDD-SPL~
  SAY NAME1 @20622 
  SAY UNIDENTIFIED_DESC @20623
  SAY 0x12e @20624

COPY ~TDD/SPL/SPPR326.spl~          ~TDD-SPL~
  SAY NAME1 @20625
  SAY UNIDENTIFIED_DESC @20626

COPY ~TDD/SPL/SPPR327.spl~          ~TDD-SPL~
  SAY NAME1 @20627
  SAY UNIDENTIFIED_DESC @20628
  SAY 0xce @20629

COPY ~TDD/SPL/SPPR328.spl~          ~TDD-SPL~
  SAY NAME1 @20630 
  SAY UNIDENTIFIED_DESC @20631
  SAY 0x12e @20632

COPY ~TDD/SPL/SPPR329.spl~          ~TDD-SPL~
  SAY NAME1 @20633
  SAY UNIDENTIFIED_DESC @20634 

COPY ~TDD/SPL/SPPR330.spl~          ~TDD-SPL~
  SAY NAME1 @20635 
  SAY UNIDENTIFIED_DESC @20636 

COPY ~TDD/SPL/SPPR331.spl~          ~TDD-SPL~
  SAY NAME1 @20637
  SAY UNIDENTIFIED_DESC @20638 

COPY ~TDD/SPL/SPPR332.spl~          ~TDD-SPL~
  SAY NAME1 @20639
  SAY UNIDENTIFIED_DESC @20640 

COPY ~TDD/SPL/SPPR333.spl~          ~TDD-SPL~
  SAY NAME1 @20641
  SAY UNIDENTIFIED_DESC @20642 

COPY ~TDD/SPL/SPPR417A.spl~         ~TDD-SPL~

COPY ~TDD/SPL/SPPR418.spl~          ~TDD-SPL~
  SAY NAME1 @20643 
  SAY UNIDENTIFIED_DESC @20644

COPY ~TDD/SPL/SPPR419.spl~          ~TDD-SPL~
  SAY NAME1 @20645 
  SAY UNIDENTIFIED_DESC @20646

COPY ~TDD/SPL/SPPR420.spl~          ~TDD-SPL~
  SAY NAME1 @20647 
  SAY UNIDENTIFIED_DESC @20648

COPY ~TDD/SPL/SPPR421.spl~          ~TDD-SPL~
  SAY NAME1 @20649
  SAY UNIDENTIFIED_DESC @20650 

COPY ~TDD/SPL/SPPR422.spl~          ~TDD-SPL~
  SAY NAME1 @20651 
  SAY UNIDENTIFIED_DESC @20652

COPY ~TDD/SPL/SPPR423.spl~          ~TDD-SPL~
  SAY NAME1 @20653
  SAY UNIDENTIFIED_DESC @20654

COPY ~TDD/SPL/SPPR424.spl~          ~TDD-SPL~
  SAY NAME1 @20655
  SAY UNIDENTIFIED_DESC @20656
  SAY 0x1ce @20657
  SAY 0x28e @20657
  SAY 0x34e @20657
  SAY 0x40e @20657
  SAY 0x4ce @20657

COPY ~TDD/SPL/SPPR425.spl~          ~TDD-SPL~
  SAY NAME1 @20658
  SAY UNIDENTIFIED_DESC @20659

COPY ~TDD/SPL/SPPR426.spl~          ~TDD-SPL~
  SAY NAME1 @20660
  SAY UNIDENTIFIED_DESC @20661 

COPY ~TDD/SPL/SPPR427.spl~          ~TDD-SPL~        
  SAY NAME1 @20662 
  SAY UNIDENTIFIED_DESC @20663

COPY ~TDD/SPL/SPPR428.spl~          ~TDD-SPL~
  SAY NAME1 @20664
  SAY UNIDENTIFIED_DESC @20665 

COPY ~TDD/SPL/SPPR429.spl~          ~TDD-SPL~
  SAY NAME1 @20666 
  SAY UNIDENTIFIED_DESC @20667

COPY ~TDD/SPL/SPPR430.spl~          ~TDD-SPL~
  SAY NAME1 @20668
  SAY UNIDENTIFIED_DESC @20669 

COPY ~TDD/SPL/SPPR431.spl~          ~TDD-SPL~
  SAY NAME1 @20670
  SAY UNIDENTIFIED_DESC @20671

COPY ~TDD/SPL/SPPR432.spl~          ~TDD-SPL~        
  SAY NAME1 @20672 
  SAY UNIDENTIFIED_DESC @20673 

COPY ~TDD/SPL/SPPR518.spl~          ~TDD-SPL~
  SAY NAME1 @20674 
  SAY UNIDENTIFIED_DESC @20675

COPY ~TDD/SPL/SPPR519.spl~          ~TDD-SPL~
  SAY NAME1 @20676
  SAY UNIDENTIFIED_DESC @20677

COPY ~TDD/SPL/SPPR520.spl~          ~TDD-SPL~
  SAY NAME1 @20678
  SAY UNIDENTIFIED_DESC @20679 

COPY ~TDD/SPL/SPPR521.spl~          ~TDD-SPL~
  SAY NAME1 @20680 
  SAY UNIDENTIFIED_DESC @20681

COPY ~TDD/SPL/SPPR522.spl~          ~TDD-SPL~
  SAY NAME1 @20682
  SAY UNIDENTIFIED_DESC @20683

COPY ~TDD/SPL/SPPR523.spl~          ~TDD-SPL~
  SAY NAME1 @20684
  SAY UNIDENTIFIED_DESC @20685 

COPY ~TDD/SPL/SPPR524.spl~          ~TDD-SPL~
  SAY NAME1 @20058
  SAY UNIDENTIFIED_DESC @20686

COPY ~TDD/SPL/SPPR525.spl~          ~TDD-SPL~
  SAY NAME1 @20687
  SAY UNIDENTIFIED_DESC @20688

COPY ~TDD/SPL/SPPR526.spl~          ~TDD-SPL~        
  SAY NAME1 @20689
  SAY UNIDENTIFIED_DESC @20690
  SAY 0x36e @20691

COPY ~TDD/SPL/SPPR527.spl~          ~TDD-SPL~
  SAY NAME1 @20692
  SAY UNIDENTIFIED_DESC @20693

COPY ~TDD/SPL/SPPR527D.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPPR528.spl~          ~TDD-SPL~
  SAY NAME1 @20694
  SAY UNIDENTIFIED_DESC @20695 

COPY ~TDD/SPL/SPPR529.spl~          ~TDD-SPL~
  SAY NAME1 @20696
  SAY UNIDENTIFIED_DESC @20697 

COPY ~TDD/SPL/SPPR530.spl~          ~TDD-SPL~
  SAY NAME1 @20698 
  SAY UNIDENTIFIED_DESC @20699

COPY ~TDD/SPL/SPPR615.spl~          ~TDD-SPL~
  SAY NAME1 @20700
  SAY UNIDENTIFIED_DESC @20701

COPY ~TDD/SPL/SPPR616.spl~          ~TDD-SPL~
  SAY NAME1 @20702 
  SAY UNIDENTIFIED_DESC @20703

COPY ~TDD/SPL/SPPR617.spl~          ~TDD-SPL~
  SAY NAME1 @20704 
  SAY UNIDENTIFIED_DESC @20705

COPY ~TDD/SPL/SPPR618.spl~          ~TDD-SPL~
  SAY NAME1 @20706
  SAY UNIDENTIFIED_DESC @20707
  SAY 0xce @20708

COPY ~TDD/SPL/SPPR620.spl~          ~TDD-SPL~
  SAY NAME1 @20709 
  SAY UNIDENTIFIED_DESC @20710

COPY ~TDD/SPL/SPPR621.spl~          ~TDD-SPL~
  SAY NAME1 @20711
  SAY UNIDENTIFIED_DESC @20712
  SAY 0x24e @20713

COPY ~TDD/SPL/SPPR622.spl~          ~TDD-SPL~
  SAY NAME1 @20714
  SAY UNIDENTIFIED_DESC @20715 

COPY ~TDD/SPL/SPPR623.spl~          ~TDD-SPL~
  SAY NAME1 @20716
  SAY UNIDENTIFIED_DESC @20717 

COPY ~TDD/SPL/SPPR624.spl~          ~TDD-SPL~
  SAY NAME1 @20718 
  SAY UNIDENTIFIED_DESC @20719

COPY ~TDD/SPL/SPPR625.spl~          ~TDD-SPL~
  SAY NAME1 @20720
  SAY UNIDENTIFIED_DESC @20721
  SAY 0x15e @20722

COPY ~TDD/SPL/SPPR626.spl~          ~TDD-SPL/SPPR626.spl~        
  SAY NAME1 @20723 
  SAY UNIDENTIFIED_DESC @20724 

COPY ~TDD/SPL/SPPR627.spl~          ~TDD-SPL~
  SAY NAME1 @20725 
  SAY UNIDENTIFIED_DESC @20726

COPY ~TDD/SPL/SPPR628.spl~          ~TDD-SPL~
  SAY NAME1 @20727
  SAY UNIDENTIFIED_DESC @20728 

COPY ~TDD/SPL/SPPR629.spl~          ~TDD-SPL~
  SAY NAME1 @20729 
  SAY UNIDENTIFIED_DESC @20730

COPY ~TDD/SPL/SPPR630.spl~          ~TDD-SPL~
  SAY NAME1 @20731 
  SAY UNIDENTIFIED_DESC @20732

COPY ~TDD/SPL/SPPR733.spl~          ~TDD-SPL~
  SAY NAME1 @20733
  SAY UNIDENTIFIED_DESC @20734 

COPY ~TDD/SPL/SPPR734.spl~          ~TDD-SPL~
  SAY NAME1 @20735
  SAY UNIDENTIFIED_DESC @20736

COPY ~TDD/SPL/SPPR735.spl~          ~TDD-SPL~
  SAY NAME1 @20737 
  SAY UNIDENTIFIED_DESC @20738 

COPY ~TDD/SPL/SPPR736.spl~          ~TDD-SPL~        
  SAY NAME1 @20739 
  SAY UNIDENTIFIED_DESC @20740 

COPY ~TDD/SPL/SPPR737.spl~          ~TDD-SPL~
  SAY NAME1 @20066 
  SAY UNIDENTIFIED_DESC @20741 

COPY ~TDD/SPL/SPPR741.spl~          ~TDD-SPL~
  SAY NAME1 @20742
  SAY UNIDENTIFIED_DESC @20743
  SAY 0xce @20744
  SAY 0x12e @20745
  SAY 0x18e @20746
  SAY 0x1ee @20747
  SAY 0x21e @20748
  SAY 0x24e @20748
  SAY 0x2ae @20749
  SAY 0x30e @20750
  SAY 0x36e @20751
  SAY 0x3ce @20752
  SAY 0x3fe @20748
  SAY 0x42e @20753

COPY ~TDD/SPL/SPPR742.spl~          ~TDD-SPL~
  SAY NAME1 @20754
  SAY UNIDENTIFIED_DESC @20755

COPY ~TDD/SPL/SPPR743.spl~          ~TDD-SPL~
  SAY NAME1 @20756
  SAY UNIDENTIFIED_DESC @20757 
  SAY 0x3fe @20758 

COPY ~TDD/SPL/SPPR744.spl~          ~TDD-SPL~
  SAY NAME1 @20759 
  SAY UNIDENTIFIED_DESC @20760 

COPY ~TDD/SPL/SPPR745.spl~          ~TDD-SPL~
  SAY NAME1 @20761 
  SAY UNIDENTIFIED_DESC @20762
  SAY 0x27e @20763 
  SAY 0x3ce @20764 
  SAY 0x51e @20765 
  SAY 0x54e @20766 

COPY ~TDD/SPL/SPPR746.spl~          ~TDD-SPL~
  SAY NAME1 @20767
  SAY UNIDENTIFIED_DESC @20768
  SAY 0x2de @20769
  SAY 0x30e @20770
  SAY 0x33e @20771
  SAY 0x36e @20772
  SAY 0x39e @20773
  SAY 0x3ce @20774
  SAY 0x3fe @20775
  SAY 0x42e @20776
  SAY 0x45e @20777
  SAY 0x48e @20778

COPY ~TDD/SPL/SPPR747.spl~          ~TDD-SPL~
  SAY NAME1 @20779
  SAY UNIDENTIFIED_DESC @20780 
  SAY 0x12e @20781

COPY ~TDD/SPL/SPPR748.spl~          ~TDD-SPL~
  SAY NAME1 @20782 
  SAY UNIDENTIFIED_DESC @20783

COPY ~TDD/SPL/SPPR749.spl~          ~TDD-SPL~
  SAY NAME1 @20784
  SAY UNIDENTIFIED_DESC @20785
  SAY 0xce @20786
  SAY 0x12e @20787
  SAY 0x18e @20788
  SAY 0x1be @20789

COPY ~TDD/SPL/SPPR750.spl~          ~TDD-SPL~
  SAY NAME1 @20790
  SAY UNIDENTIFIED_DESC @20791
  SAY 0x18e @20792
  SAY 0x27e @20793
  SAY 0x42e @20794
  SAY 0x51e @20795
  SAY 0x63e @20796
  SAY 0x7be @20797
  SAY 0x8ae @20798

COPY ~TDD/SPL/SPPR751.spl~          ~TDD-SPL~
  SAY NAME1 @20799
  SAY UNIDENTIFIED_DESC @20800
  SAY 0x2ae @20801

COPY ~TDD/SPL/SPPR752.spl~          ~TDD-SPL~        
  SAY NAME1 @20802 
  SAY UNIDENTIFIED_DESC @20803


COPY ~TDD/SPL/SPMINTI.spl~          ~TDD-SPL~
     ~TDD/SPL/SPMINTID.spl~         ~TDD-SPL~
  SAY NAME1 @20804
  SAY UNIDENTIFIED_DESC @20805

COPY ~TDD/SPL/SPPR953.spl~          ~TDD-SPL~
  SAY NAME1 @20806

COPY ~TDD/SPL/SPPR954.spl~          ~TDD-SPL~   
  SAY NAME1 @20807

COPY ~TDD/SPL/SPPR955.spl~          ~TDD-SPL~   
  SAY NAME1 @20808

COPY ~TDD/SPL/SPPR956.spl~          ~TDD-SPL~   
  SAY NAME1 @20809

COPY ~TDD/SPL/SPPR957.spl~          ~TDD-SPL~   
  SAY NAME1 @20810

COPY ~TDD/SPL/SPPR958.spl~          ~TDD-SPL~
  SAY NAME1 @20811

COPY ~TDD/SPL/SPPR959.spl~          ~TDD-SPL~
  SAY NAME1 @20812

COPY ~TDD/SPL/SPPR961.spl~          ~TDD-SPL~  //FLAMPLAT.BAF, ITM

COPY ~TDD/SPL/SPPR962.spl~          ~TDD-SPL~
  SAY NAME1 @20813

COPY ~TDD/SPL/SPPR963.spl~          ~TDD-SPL~ //PKGHOST1,2.BAF
  SAY NAME1 @20814



COPY ~TDD/SPL/SPRB801.spl~          ~TDD-SPL~
  SAY NAME1 @20815
  SAY UNIDENTIFIED_DESC @20816 

COPY ~TDD/SPL/SPRB999.spl~          ~TDD-SPL~
  SAY NAME1 @20817
  SAY UNIDENTIFIED_DESC @20818

COPY ~TDD/SPL/SPSPERE.spl~          ~TDD-SPL~
  SAY NAME1 @20819
  SAY UNIDENTIFIED_DESC @20820



COPY ~TDD/SPL/SPWI126.spl~          ~TDD-SPL~
  SAY NAME1 @20821
  SAY UNIDENTIFIED_DESC @20822

COPY ~TDD/SPL/SPWI127.spl~          ~TDD-SPL~
  SAY NAME1 @20823
  SAY UNIDENTIFIED_DESC @20824 

COPY ~TDD/SPL/SPWI128.spl~          ~TDD-SPL~
  SAY NAME1 @20825
  SAY UNIDENTIFIED_DESC @20826

COPY ~TDD/SPL/SPWI225.spl~          ~TDD-SPL~
  SAY NAME1 @20827
  SAY UNIDENTIFIED_DESC @20828

COPY ~TDD/SPL/SPWI226.spl~          ~TDD-SPL~
  SAY NAME1 @20829
  SAY UNIDENTIFIED_DESC @20830

COPY ~TDD/SPL/SPWI228.spl~          ~TDD-SPL~
  SAY NAME1 @20831
  SAY UNIDENTIFIED_DESC @20832

COPY ~TDD/SPL/SPWI229.spl~          ~TDD-SPL~
  SAY NAME1 @20833
  SAY UNIDENTIFIED_DESC @20834

COPY ~TDD/SPL/SPWI327.spl~          ~TDD-SPL~
  SAY NAME1 @20835
  SAY UNIDENTIFIED_DESC @20836 

COPY ~TDD/SPL/SPWI328.spl~          ~TDD-SPL~
  SAY NAME1 @20837
  SAY UNIDENTIFIED_DESC @20838 

COPY ~TDD/SPL/SPWI329.spl~          ~TDD-SPL~
  SAY NAME1 @20839
  SAY UNIDENTIFIED_DESC @20840

COPY ~TDD/SPL/SPWI427.spl~          ~TDD-SPL~
  SAY NAME1 @20841
  SAY UNIDENTIFIED_DESC @20842

COPY ~TDD/SPL/SPWI428.spl~          ~TDD-SPL~
  SAY NAME1 @20843
  SAY UNIDENTIFIED_DESC @20844

COPY ~TDD/SPL/SPWI429.spl~          ~TDD-SPL~
  SAY NAME1 @20845
  SAY UNIDENTIFIED_DESC @20846

COPY ~TDD/SPL/SPWI430.spl~          ~TDD-SPL~
  SAY NAME1 @20847
  SAY UNIDENTIFIED_DESC @20848

COPY ~TDD/SPL/SPWI528.spl~          ~TDD-SPL~
     ~TDD/SPL/SPWI528A.spl~          ~TDD-SPL~
  SAY NAME1 @20053
  SAY UNIDENTIFIED_DESC @20849

COPY ~TDD/SPL/SPWI626.spl~          ~TDD-SPL~
  SAY NAME1 @20850
  SAY UNIDENTIFIED_DESC @20851 

COPY ~TDD/SPL/SPWI730.spl~          ~TDD-SPL~
  SAY NAME1 @20767
  SAY UNIDENTIFIED_DESC @20852
  SAY 0x2de @20853
  SAY 0x30e @20854
  SAY 0x33e @20771 
  SAY 0x36e @20855 
  SAY 0x39e @20773 
  SAY 0x3ce @20774 
  SAY 0x3fe @20856
  SAY 0x42e @20857 
  SAY 0x45e @20858 
  SAY 0x48e @20859 

COPY ~TDD/SPL/SPWI725.spl~          ~TDD-SPL~
  SAY NAME1 @20069
  SAY UNIDENTIFIED_DESC @20860 

COPY ~TDD/SPL/SPWI726.spl~          ~TDD-SPL~
  SAY NAME1 @20861
  SAY UNIDENTIFIED_DESC @20862 

COPY ~TDD/SPL/SPWI727.spl~          ~TDD-SPL~
  SAY NAME1 @20863
  SAY UNIDENTIFIED_DESC @20864 

COPY ~TDD/SPL/SPWI728.spl~          ~TDD-SPL~
  SAY NAME1 @20865
  SAY UNIDENTIFIED_DESC @20866
  SAY 0x1ee @20867
  SAY 0x21e @20868

COPY ~TDD/SPL/SPWI729.spl~          ~TDD-SPL~
  SAY NAME1 @20869
  SAY UNIDENTIFIED_DESC @20870

COPY ~TDD/SPL/SPWI819.spl~          ~TDD-SPL~
  SAY NAME1 @20873
  SAY UNIDENTIFIED_DESC @20874 

COPY ~TDD/SPL/SPWI820.spl~          ~TDD-SPL~
  SAY NAME1 @20875
  SAY UNIDENTIFIED_DESC @20876 

COPY ~TDD/SPL/SPWI821.spl~          ~TDD-SPL~
  SAY NAME1 @20877
  SAY UNIDENTIFIED_DESC @20878

COPY ~TDD/SPL/SPWI822.spl~          ~TDD-SPL~
  SAY NAME1 @20879
  SAY UNIDENTIFIED_DESC @20880
  SAY 0x12e @20881
  SAY 0x1ee @20882
  SAY 0x24e @20883
  SAY 0x2ae @20884
  SAY 0x33e @20885

COPY ~TDD/SPL/SPWI825.spl~          ~TDD-SPL~
  SAY NAME1 @20886
  SAY UNIDENTIFIED_DESC @20887

COPY ~TDD/SPL/SPWI826.spl~          ~TDD-SPL~
  SAY NAME1 @20888
  SAY UNIDENTIFIED_DESC @20889 

COPY ~TDD/SPL/SPWI827.spl~          ~TDD-SPL~
  SAY NAME1 @20890
  SAY UNIDENTIFIED_DESC @20891

COPY ~TDD/SPL/SPMI145.spl~          ~TDD-SPL~ //Restores QUICK_TELEPORT to Spell.ids and was messing things up with the Wierd spell
  SAY NAME1 @20894
  SAY UNIDENTIFIED_DESC @20895

COPY ~TDD/SPL/SPMI144.spl~          ~TDD-SPL~ //Restores BGT lightning strikes in BGmain
  SAY NAME1 @20896
  SAY UNIDENTIFIED_DESC @20897

COPY ~TDD/SPL/SPWI969.spl~          ~TDD-SPL~
  SAY NAME1 @20900
  SAY UNIDENTIFIED_DESC @20901 

COPY ~TDD/SPL/SPWI970.spl~          ~TDD-SPL~
  SAY NAME1 @20902
  SAY UNIDENTIFIED_DESC @20903
  SAY 0x15e @20904
  SAY 0x1ee @20905
  SAY 0x2de @20906

COPY ~TDD/SPL/SPWI971.spl~          ~TDD-SPL~
  SAY NAME1 @20907
  SAY UNIDENTIFIED_DESC @20908

COPY ~TDD/SPL/SPWI972.spl~          ~TDD-SPL~
  SAY NAME1 @20909
  SAY UNIDENTIFIED_DESC @20910 
  SAY 0xce @20911 
  SAY 0x12e @20912 
  SAY 0x18e @20913 
  SAY 0x1ee @20914 
  SAY 0x24e @20915
  SAY 0x2ae @20916 
  SAY 0x30e @20913 
  SAY 0x36e @20917 
  SAY 0x3ce @20918
  SAY 0x42e @20919 
  SAY 0x48e @20920 

COPY ~TDD/SPL/SPWI973.spl~          ~TDD-SPL~        
  SAY NAME1 @20921
  SAY UNIDENTIFIED_DESC @20922 

COPY ~TDD/SPL/SPWI974.spl~          ~TDD-SPL~
  SAY NAME1 @20923
  SAY UNIDENTIFIED_DESC @20924
  SAY 0x27e @20925
  SAY 0x2ae @20926
  SAY 0x2de @20927
  SAY 0x30e @20928
  SAY 0x33e @20929
  SAY 0x36e @20930
  SAY 0x39e @20931
  SAY 0x3ce @20932
  SAY 0x3fe @20933
  SAY 0x42e @20934

COPY ~TDD/SPL/SPWI975.spl~          ~TDD-SPL~
  SAY NAME1 @20935
  SAY UNIDENTIFIED_DESC @20936
  SAY 0x12e @20937
  SAY 0x1ee @20938
  SAY 0x24e @20939
  SAY 0x2ae @20940
  SAY 0x33e @20941



ACTION_IF NOT FILE_EXISTS ~data/CTB-RULE.BIF~     //CtB compatibility
THEN BEGIN
COPY ~TDD/Compat/CtB/SPWI227.spl~          ~TDD-SPL~
  SAY NAME1 @20942
  SAY UNIDENTIFIED_DESC @20943

COPY ~TDD/Compat/CtB/SPWI440.spl~          ~TDD-SPL~   //was SPMI118
  SAY NAME1 @20944
  SAY UNIDENTIFIED_DESC @20945

COPY ~TDD/Compat/CtB/SPWI627.spl~          ~TDD-SPL~
  SAY NAME1 @20946
  SAY UNIDENTIFIED_DESC @20947

COPY ~TDD/Compat/CtB/SPWI823.spl~          ~TDD-SPL~
  SAY NAME1 @20948
  SAY UNIDENTIFIED_DESC @20949

COPY ~TDD/Compat/CtB/SPWI824.spl~          ~TDD-SPL~
  SAY NAME1 @20950
  SAY UNIDENTIFIED_DESC @20951
END


ACTION_IF NOT FILE_EXISTS ~data/ROT-RULE.BIF~     //RoT compatibility
THEN BEGIN
  COPY ~TDD/Compat/RoT/SPWI733.spl~          ~TDD-SPL~
    SAY NAME1 @20871
    SAY UNIDENTIFIED_DESC @20872

  COPY ~TDD/Compat/RoT/SPWI828.spl~          ~TDD-SPL~
    SAY NAME1 @20892
    SAY UNIDENTIFIED_DESC @20893

  COPY ~TDD/Compat/RoT/SPWI968.spl~          ~TDD-SPL~
    SAY NAME1 @20898
    SAY UNIDENTIFIED_DESC @20899

  COPY ~TDD/Compat/RoT/BAM~ ~override~

  COPY ~TDD/Compat/RoT/SCRX17.itm~           ~TDD-ITM~
    SAY NAME2 @20871
    SAY DESC @20872

  COPY ~TDD/Compat/RoT/SCRX24.itm~           ~TDD-ITM~
    SAY NAME2 @20892
    SAY DESC @20893

  COPY ~TDD/Compat/RoT/SCRX34.itm~           ~TDD-ITM~
    SAY NAME2 @20898
    SAY DESC @20899
END



//******************************************************************
//  ITEMS
//******************************************************************
// Patching BG2 items
//******************************************************************
PRINT @20952

COPY_EXISTING ~DWSPER01.ITM~         ~override~
 READ_LONG   0x64 "ability_offset"
 READ_SHORT  0x68 "ability_cnt"
 FOR( cnt=0; cnt<"%ability_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+0x38*cnt) "type"
   PATCH_IF ("%type%"=1) BEGIN      //Melee
     WRITE_SHORT ("%ability_offset%"+0x38*cnt+0xe)  3    //Range
     WRITE_SHORT ("%ability_offset%"+0x38*cnt+0x12) 8    //Speed
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~HALB11.ITM~         ~override~
 READ_LONG   0x64 "ability_offset"
 READ_SHORT  0x68 "ability_cnt"
 FOR( cnt=0; cnt<"%ability_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+0x38*cnt) "type"
   PATCH_IF ("%type%"=1) BEGIN      //Melee
     WRITE_SHORT ("%ability_offset%"+0x38*cnt+0xe)  3    //Range
     WRITE_SHORT ("%ability_offset%"+0x38*cnt+0x12) 5    //Speed
   END
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~MISC9Y.ITM~           ~override~
 READ_LONG  0x64  "ability_offset"
 READ_SHORT 0x68  "abil_cnt"
 READ_LONG  0x6a  "eff_offset"
 READ_SHORT 0x70  "glob_eff_cnt"
 SET found = 0
 FOR( cnt=0; cnt<"%abil_cnt%"; cnt=cnt+1 ) BEGIN
   READ_BYTE ("%ability_offset%"+cnt*0x28)  "type"
   PATCH_IF( found=1 ) THEN BEGIN    //shift effects indexes for all possible abilities after Magical
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x20) eff_idx+5
   END
   PATCH_IF("%type%"=3) BEGIN        //Magical
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt
     READ_SHORT ("%ability_offset%"+cnt*0x28+0x20)  eff_idx
     FOR( cnt2=0; cnt2<eff_cnt; cnt2=cnt2+1 ) BEGIN
       READ_SHORT ("%eff_offset%"+0x30*(cnt2+eff_idx))  "eff_type"
     END
     WRITE_SHORT ("%ability_offset%"+cnt*0x28+0x1e)  eff_cnt+5
     SET found = 1
   END
 END
 PATCH_IF( found=1 ) THEN BEGIN
   SET offset = ("%eff_offset%"+0x30*(eff_idx+"%glob_eff_cnt%"+eff_cnt))
   INSERT_BYTES offset    0x30*5
   WRITE_SHORT  offset    206   //Protection From Spell
   WRITE_BYTE   offset+2  1     //TargetSelf
   WRITE_BYTE   offset+3  8     //Power
   WRITE_BYTE   offset+12 0     //Instant/Limited
   WRITE_BYTE   offset+13 1     //Dispell/Not Bypass Resistance
   WRITE_LONG   offset+14 60    //Time
   WRITE_BYTE   offset+18 100   //Probability 1
   WRITE_ASCII  offset+20 ~SPIN542~ //spell name
   WRITE_SHORT  (offset+0x30)    206   //Protection From Spell
   WRITE_BYTE   (offset+0x30)+2  1     //TargetSelf
   WRITE_BYTE   (offset+0x30)+3  8     //Power
   WRITE_BYTE   (offset+0x30)+12 0     //Instant/Limited
   WRITE_BYTE   (offset+0x30)+13 1     //Dispell/Not Bypass Resistance
   WRITE_LONG   (offset+0x30)+14 60    //Time
   WRITE_BYTE   (offset+0x30)+18 100   //Probability 1
   WRITE_ASCII  (offset+0x30)+20 ~SPIN543~ //spell name
   WRITE_SHORT  (offset+0x30*2)    206   //Protection From Spell
   WRITE_BYTE   (offset+0x30*2)+2  1     //TargetSelf
   WRITE_BYTE   (offset+0x30*2)+3  8     //Power
   WRITE_BYTE   (offset+0x30*2)+12 0     //Instant/Limited
   WRITE_BYTE   (offset+0x30*2)+13 1     //Dispell/Not Bypass Resistance
   WRITE_LONG   (offset+0x30*2)+14 60    //Time
   WRITE_BYTE   (offset+0x30*2)+18 100   //Probability 1
   WRITE_ASCII  (offset+0x30*2)+20 ~SPIN804~ //spell name
   WRITE_SHORT  (offset+0x30*3)    206   //Protection From Spell
   WRITE_BYTE   (offset+0x30*3)+2  1     //TargetSelf
   WRITE_BYTE   (offset+0x30*3)+3  8     //Power
   WRITE_BYTE   (offset+0x30*3)+12 0     //Instant/Limited
   WRITE_BYTE   (offset+0x30*3)+13 1     //Dispell/Not Bypass Resistance
   WRITE_LONG   (offset+0x30*3)+14 60    //Time
   WRITE_BYTE   (offset+0x30*3)+18 100   //Probability 1
   WRITE_ASCII  (offset+0x30*3)+20 ~SPIN545~ //spell name
   WRITE_SHORT  (offset+0x30*4)    206   //Protection From Spell
   WRITE_BYTE   (offset+0x30*4)+2  1     //TargetSelf
   WRITE_BYTE   (offset+0x30*4)+3  8     //Power
   WRITE_BYTE   (offset+0x30*4)+12 0     //Instant/Limited
   WRITE_BYTE   (offset+0x30*4)+13 1     //Dispell/Not Bypass Resistance
   WRITE_LONG   (offset+0x30*4)+14 60    //Time
   WRITE_BYTE   (offset+0x30*4)+18 100   //Probability 1
   WRITE_ASCII  (offset+0x30*4)+20 ~SPIN547~ //spell name
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~RINGLOUP.itm~         ~override~
 READ_LONG  0x6a  "eff_offset"
 READ_SHORT 0x70  "glob_eff_cnt"
 SET found=0
 FOR( cnt=0; cnt<"%glob_eff_cnt%"; cnt=cnt+1 ) BEGIN
   READ_SHORT ("%eff_offset%"+cnt*0x30)    "type"
   READ_LONG  ("%eff_offset%"+cnt*0x30+8)  "wpn"
   PATCH_IF("%type%"=120 AND "%wpn%"=11) BEGIN        //Immunity to weapons
     WRITE_LONG  ("%eff_offset%"+cnt*0x30+8)  2       //non-magical
     WRITE_SHORT 0x70  "%glob_eff_cnt%"+2
     SET found = 1
   END
 END
 PATCH_IF( found=1 ) THEN BEGIN
   SET offset = ("%eff_offset%"+0x30*"%glob_eff_cnt%")
   INSERT_BYTES offset    0x30*2
   WRITE_SHORT  offset    120   //Immunity to weapons
   WRITE_BYTE   offset+2  1     //TargetSelf
   WRITE_BYTE   offset+3  7     //Power
   WRITE_LONG   offset+4  1     //Enchantment level
   WRITE_LONG   offset+8  0     //Enchantment weapon
   WRITE_BYTE   offset+12 2     //Instant/While equipped
   WRITE_BYTE   offset+13 0     //not Dispell/Not Bypass Resistance
   WRITE_BYTE   offset+18 100   //Probability 1
   WRITE_SHORT  offset+0x30    120   //Immunity to weapons
   WRITE_BYTE   offset+0x30+2  1     //TargetSelf
   WRITE_BYTE   offset+0x30+3  7     //Power
   WRITE_LONG   offset+0x30+4  2     //Enchantment level
   WRITE_LONG   offset+0x30+8  0     //Enchantment weapon
   WRITE_BYTE   offset+0x30+12 2     //Instant/While equipped
   WRITE_BYTE   offset+0x30+13 0     //not Dispell/Not Bypass Resistance
   WRITE_BYTE   offset+0x30+18 100   //Probability 1
 END
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~ROSSRING.itm~         ~override~
 WRITE_LONG 0x18 0x00000060   //undroppable
BUT_ONLY_IF_IT_CHANGES

COPY_EXISTING ~SW1H47.itm~         ~override~
 WRITE_LONG 0x18 0x0000006c   //magical
 WRITE_LONG 0x1e 0x4004d780   //usability
BUT_ONLY_IF_IT_CHANGES


//******************************************************************
// New items
//******************************************************************
PRINT @20953

COPY ~TDD/ITM/ABLEEDER.itm~         ~TDD-ITM~
  SAY NAME2 @20954
  SAY DESC @20955

COPY ~TDD/ITM/ACIDHAND.itm~         ~TDD-ITM~
  SAY NAME2 @20956

COPY ~TDD/ITM/ACIDRASP.itm~         ~TDD-ITM~
  SAY NAME2 @20957
  SAY DESC @20958

COPY ~TDD/ITM/ADARIOBC.itm~         ~TDD-ITM~
  SAY NAME2 @20959
  SAY DESC @20960

COPY ~TDD/ITM/ADARIOSW.itm~         ~TDD-ITM~
  SAY NAME2 @20961
  SAY DESC @20962
  SAY 0x1fe @20963

COPY ~TDD/ITM/AEGISRNG.itm~         ~TDD-ITM~
  SAY NAME2 @20964
  SAY DESC @20965

COPY ~TDD/ITM/AFIRE.itm~            ~TDD-ITM~
     ~TDD/ITM/AFWORM.itm~           ~TDD-ITM~
     ~TDD/ITM/AICE.itm~             ~TDD-ITM~
     ~TDD/ITM/ALAVA.itm~            ~TDD-ITM~
  SAY NAME2 @20966

COPY ~TDD/ITM/AMAROS.itm~           ~TDD-ITM~
  SAY NAME1 @20967
  SAY NAME2 @20968 
  SAY UNIDENTIFIED_DESC @20969
  SAY DESC @20970

COPY ~TDD/ITM/AMAUNMAC.itm~         ~TDD-ITM~
  SAY NAME2 @20971
  SAY DESC @20972

COPY ~TDD/ITM/AMF.itm~              ~TDD-ITM~
  SAY NAME2 @20956

COPY ~TDD/ITM/AMULRAT.itm~          ~TDD-ITM~
  SAY NAME2 @20966

COPY ~TDD/ITM/AQATICSC.itm~         ~TDD-ITM~
  SAY NAME2 @20973
  SAY DESC @20974

COPY ~TDD/ITM/ARAMIS.itm~           ~TDD-ITM~
  SAY NAME2 @20975
  SAY DESC @20976

COPY ~TDD/ITM/ARAVORNX.itm~         ~TDD-ITM~
  SAY NAME2 @20977
  SAY DESC @20978

COPY ~TDD/ITM/ARDEADX.itm~          ~TDD-ITM~
  SAY NAME2 @20979
  SAY DESC @20980

COPY ~TDD/ITM/AROWVEN.itm~          ~TDD-ITM~
  SAY NAME2 @20981
  SAY DESC @20982

COPY ~TDD/ITM/ARQUINXX.itm~         ~TDD-ITM~
  SAY NAME2 @20983
  SAY DESC @20984

COPY ~TDD/ITM/AURILMAL.itm~         ~TDD-ITM~
  SAY NAME2 @20985
  SAY DESC @20986

COPY ~TDD/ITM/B3-24X.itm~           ~TDD-ITM~
     ~TDD/ITM/B3-18.itm~            ~TDD-ITM~
     ~TDD/ITM/BABIHND.itm~          ~TDD-ITM~
  SAY NAME2 @20956

COPY ~TDD/ITM/BABI.itm~             ~TDD-ITM~
     ~TDD/ITM/BANSNECK.itm~         ~TDD-ITM~
  SAY NAME2 @20966

COPY ~TDD/ITM/BEARKNFX.itm~         ~TDD-ITM~
  SAY NAME2 @20987
  SAY DESC @20988

COPY ~TDD/ITM/BELTXX.itm~           ~TDD-ITM~
  SAY NAME2 @20989
  SAY DESC @20990

COPY ~TDD/ITM/BLADETRM.itm~         ~TDD-ITM~
  SAY NAME2 @20991
  SAY DESC @20992 

COPY ~TDD/ITM/BLOOD.itm~            ~TDD-ITM~
  SAY NAME2 @20993
  SAY DESC @20994

COPY ~TDD/ITM/BLOODMAL.itm~         ~TDD-ITM~
  SAY NAME2 @20995
  SAY DESC @20996

COPY ~TDD/ITM/BLUNSILV.itm~         ~TDD-ITM~

COPY ~TDD/ITM/BMASTAMU.itm~         ~TDD-ITM~
  SAY NAME2 @20997
  SAY DESC @20998

COPY ~TDD/ITM/BMASTSW1.itm~         ~TDD-ITM~
  SAY NAME2 @20999
  SAY DESC @21000

COPY ~TDD/ITM/BONEMASK.itm~         ~TDD-ITM~
  SAY NAME2 @21001
  SAY DESC @21002

COPY ~TDD/ITM/BOOT01X.itm~          ~TDD-ITM~

COPY ~TDD/ITM/BOTABODE.itm~         ~TDD-ITM~
  SAY NAME2 @21003
  SAY DESC @21004

COPY ~TDD/ITM/BOULDER.itm~         ~TDD-ITM~
  SAY NAME1 @21005
  SAY NAME2 @21005
  SAY UNIDENTIFIED_DESC @21006
  SAY DESC @21006

COPY ~TDD/ITM/BRAC04X.itm~          ~TDD-ITM~

COPY ~TDD/ITM/BREACHAM.itm~         ~TDD-ITM~
  SAY NAME2 @21007
  SAY DESC @21008
  SAY 0x22e @21009

COPY ~TDD/ITM/BREATHXZ.itm~         ~TDD-ITM~
  SAY NAME2 @21010
  SAY DESC @21011

COPY ~TDD/ITM/BSINGCHN.itm~         ~TDD-ITM~
  SAY NAME2 @21012
  SAY DESC @21013

COPY ~TDD/ITM/BUCCEPIE.itm~         ~TDD-ITM~
  SAY NAME2 @21014
  SAY DESC @21015

COPY ~TDD/ITM/BUDGIE.itm~           ~TDD-ITM~
  SAY NAME1 @21016
  SAY NAME2 @21016
  SAY DESC @21017

COPY ~TDD/ITM/BWTALIS.itm~          ~TDD-ITM~
  SAY NAME1 @21018
  SAY NAME2 @21019 
  SAY UNIDENTIFIED_DESC @21020 
  SAY DESC @21021

COPY ~TDD/ITM/CAIRN.itm~            ~TDD-ITM~
  SAY NAME2 @21022
  SAY DESC @21023

COPY ~TDD/ITM/CALHEART.itm~         ~TDD-ITM~
  SAY NAME1 @21024
  SAY NAME2 @21024
  SAY UNIDENTIFIED_DESC @21024
  SAY DESC @21024

COPY ~TDD/ITM/CALIWOLF.itm~         ~TDD-ITM~

COPY ~TDD/ITM/CELEBRA.itm~          ~TDD-ITM~
  SAY NAME2 @21026
  SAY DESC @21027

COPY ~TDD/ITM/CELEBROS.itm~         ~TDD-ITM~
  SAY NAME2 @21028
  SAY DESC @21029

COPY ~TDD/ITM/CERBSW2H.itm~         ~TDD-ITM~
  SAY NAME2 @21030
  SAY DESC @21031

COPY ~TDD/ITM/CEREHAND.itm~         ~TDD-ITM~       
  SAY NAME2 @20956
  SAY 0xde @21032

COPY ~TDD/ITM/CHANTHRN.itm~         ~TDD-ITM~
  SAY NAME2 @21033
  SAY DESC @21034

COPY ~TDD/ITM/CITTERNZ.itm~         ~TDD-ITM~
  SAY NAME2 @21035
  SAY UNIDENTIFIED_DESC @21036
  SAY DESC @21037

COPY ~TDD/ITM/CLCKBS.itm~           ~TDD-ITM~
  SAY NAME2 @21038
  SAY DESC @21039

COPY ~TDD/ITM/CONTAGON.itm~         ~TDD-ITM~
  SAY NAME2 @21040
  SAY DESC @21041

COPY ~TDD/ITM/CREATE.itm~           ~TDD-ITM~
  SAY NAME2 @21042
  SAY DESC @21043

COPY ~TDD/ITM/CRYPTXX.itm~          ~TDD-ITM~
  SAY NAME2 @21044
  SAY DESC @21045
  SAY 0x10e @21046

COPY ~TDD/ITM/DAGGASP.itm~          ~TDD-ITM~
  SAY NAME2 @21047
  SAY DESC @21048

COPY ~TDD/ITM/DARKHAND.itm~         ~TDD-ITM~

COPY ~TDD/ITM/DARKKNHM.itm~         ~TDD-ITM~
  SAY NAME2 @21049
  SAY DESC @21050

COPY ~TDD/ITM/DARKLITE.itm~         ~TDD-ITM~
  SAY NAME2 @21051
  SAY DESC @21052

COPY ~TDD/ITM/DDCOLDPT.itm~         ~TDD-ITM~
  SAY NAME1 @21053
  SAY NAME2 @21053
  SAY DESC @21053

COPY ~TDD/ITM/DDCYRIC1.itm~         ~TDD-ITM~
  SAY NAME2 @21054

COPY ~TDD/ITM/DDCYRIC2.itm~         ~TDD-ITM~
  SAY NAME2 @21055

COPY ~TDD/ITM/DDDDBOOK.itm~         ~TDD-ITM~
  SAY NAME1 @21056
  SAY NAME2 @21056
  SAY DESC @21057

COPY ~TDD/ITM/DDELECPT.itm~         ~TDD-ITM~
  SAY NAME1 @21058
  SAY NAME2 @21058
  SAY DESC @21058

COPY ~TDD/ITM/DDFIREPT.itm~         ~TDD-ITM~
  SAY NAME1 @21059
  SAY NAME2 @21059
  SAY DESC @21059

COPY ~TDD/ITM/DDGAME01.itm~         ~TDD-ITM~
  SAY DESC @21060

COPY ~TDD/ITM/DDGAME02.itm~         ~TDD-ITM~
  SAY DESC @21061

COPY ~TDD/ITM/DDGAME03.itm~         ~TDD-ITM~
  SAY DESC @21062 

COPY ~TDD/ITM/DDGAMECO.itm~         ~TDD-ITM~
  SAY NAME1 @21063
  SAY NAME2 @21063
  SAY DESC @21063

COPY ~TDD/ITM/DDGAMEEL.itm~         ~TDD-ITM~
  SAY NAME1 @21064
  SAY NAME2 @21064
  SAY DESC @21064

COPY ~TDD/ITM/DDGAMEFI.itm~         ~TDD-ITM~
  SAY NAME1 @21065
  SAY NAME2 @21065
  SAY DESC @21065

COPY ~TDD/ITM/DDGAMEMA.itm~         ~TDD-ITM~
  SAY NAME1 @21066
  SAY NAME2 @21066
  SAY DESC @21066

COPY ~TDD/ITM/DDLETT01.itm~         ~TDD-ITM~
  SAY NAME1 @21067 
  SAY NAME2 @21067 
  SAY UNIDENTIFIED_DESC @21067 
  SAY DESC @21067

COPY ~TDD/ITM/DDMAGIPT.itm~         ~TDD-ITM~
  SAY NAME1 @21068
  SAY NAME2 @21068
  SAY DESC @21068

COPY ~TDD/ITM/DDMANPEA.itm~         ~TDD-ITM~
  SAY NAME2 @21069

COPY ~TDD/ITM/DDMANSH2.itm~         ~TDD-ITM~
  SAY NAME2 @21070

COPY ~TDD/ITM/DDMANSHA.itm~         ~TDD-ITM~
  SAY NAME2 @21069

COPY ~TDD/ITM/DDMAP01.itm~          ~TDD-ITM~
  SAY NAME1 @21071
  SAY NAME2 @21071
  SAY UNIDENTIFIED_DESC @21071
  SAY DESC @21072

COPY ~TDD/ITM/DDMARY01.itm~         ~TDD-ITM~

COPY ~TDD/ITM/DDNAMCH1.itm~         ~TDD-ITM~   //This is for male title change for some languages
  SAY NAME2 @21073
  SAY 0xae @21782

COPY ~TDD/ITM/DDNAMCH2.itm~         ~TDD-ITM~   //This is for female title change for some languages-POCT1B
  SAY NAME2 @21073
  SAY 0xae @21783

COPY ~TDD/ITM/DDNOIMPR.itm~         ~TDD-ITM~

COPY ~TDD/ITM/DDPKMAP.itm~          ~TDD-ITM~
  SAY NAME1 @21071
  SAY NAME2 @21071
  SAY UNIDENTIFIED_DESC @21071 
  SAY DESC @21074

COPY ~TDD/ITM/DDPLOTA1.itm~         ~TDD-ITM~
  SAY NAME1 @21067 
  SAY NAME2 @21067 
  SAY UNIDENTIFIED_DESC @21067 
  SAY DESC @21075

COPY ~TDD/ITM/DDPLOTA2.itm~         ~TDD-ITM~
  SAY NAME1 @21076
  SAY NAME2 @21076 
  SAY UNIDENTIFIED_DESC @21067
  SAY DESC @21077

COPY ~TDD/ITM/DDPOTNP1.itm~         ~TDD-ITM~
  SAY NAME2 @21078 
  SAY DESC @21079 

COPY ~TDD/ITM/DDPOTNP2.itm~         ~TDD-ITM~
  SAY NAME2 @21080
  SAY DESC @21081 

COPY ~TDD/ITM/DDPOTNP3.itm~         ~TDD-ITM~
  SAY NAME1 @21082
  SAY NAME2 @21083 
  SAY DESC @21084 

COPY ~TDD/ITM/DDRAVE01.itm~         ~TDD-ITM~
     ~TDD/ITM/DDRAVE03.itm~         ~TDD-ITM~
     ~TDD/ITM/DDRAVE04.itm~         ~TDD-ITM~
     ~TDD/ITM/DDRAVE05.itm~         ~TDD-ITM~
  SAY NAME2 @21085

COPY ~TDD/ITM/DDRAVE02.itm~         ~TDD-ITM~
  SAY NAME2 @21085
  SAY 0x13e @21086

COPY ~TDD/ITM/DDRAVE06.itm~         ~TDD-ITM~
  SAY NAME2 @21085
  SAY DESC @21087

COPY ~TDD/ITM/DDRELIC1.itm~         ~TDD-ITM~
  SAY NAME2 @21088 
  SAY DESC @21089

COPY ~TDD/ITM/DDRING01.itm~         ~TDD-ITM~
  SAY NAME2 @21090 
  SAY DESC @21091

COPY ~TDD/ITM/DDSCR229.itm~         ~TDD-ITM~
  SAY NAME2 @20833
  SAY DESC @20834 

COPY ~TDD/ITM/DDSPECTR.itm~         ~TDD-ITM~
  SAY NAME2 @21085

COPY ~TDD/ITM/DDSTAFFL.itm~         ~TDD-ITM~
  SAY NAME2 @21092 
  SAY DESC @21093

COPY ~TDD/ITM/DDSTUN.itm~           ~TDD-ITM~
  SAY NAME2 @21073

COPY ~TDD/ITM/DDVES01.itm~          ~TDD-ITM~
  SAY NAME2 @21094
  SAY DESC @21095

COPY ~TDD/ITM/DDVESRN1.itm~         ~TDD-ITM~

COPY ~TDD/ITM/DDVESRNG.itm~         ~TDD-ITM~
  SAY NAME2 @21096 
  SAY DESC @21097

COPY ~TDD/ITM/DEADBKX.itm~          ~TDD-ITM~
  SAY NAME1 @21098
  SAY NAME2 @21099
  SAY DESC @21100
  SAY 0xae @21101

COPY ~TDD/ITM/DEATHREB.itm~         ~TDD-ITM~
  SAY NAME2 @21102
  SAY DESC @21103

COPY ~TDD/ITM/DELVSCUE.itm~         ~TDD-ITM~
  SAY NAME2 @21104
  SAY DESC @21105

COPY ~TDD/ITM/DEMCLAWZ.itm~         ~TDD-ITM~
  SAY NAME2 @21106
  SAY DESC @21107

COPY ~TDD/ITM/DEMONCHM.itm~         ~TDD-ITM~
  SAY NAME2 @21108
  SAY DESC @21109

COPY ~TDD/ITM/DETHSTFZ.itm~         ~TDD-ITM~
  SAY NAME1 @21110 
  SAY NAME2 @21110 
  SAY DESC @21111 

COPY ~TDD/ITM/DHORNX.itm~           ~TDD-ITM~
  SAY NAME2 @21112
  SAY DESC @21113

COPY ~TDD/ITM/DIVER.itm~            ~TDD-ITM~
  SAY NAME2 @21114
  SAY DESC @21115

COPY ~TDD/ITM/DORATH.itm~           ~TDD-ITM~
  SAY NAME2 @21116
  SAY DESC @21117

COPY ~TDD/ITM/DOVES.itm~            ~TDD-ITM~
  SAY NAME2 @21118
  SAY DESC @21119

COPY ~TDD/ITM/DRAGBRCX.itm~         ~TDD-ITM~
  SAY NAME2 @21120
  SAY DESC @21121

COPY ~TDD/ITM/DRAGUND.itm~          ~TDD-ITM~

COPY ~TDD/ITM/DRAWER.itm~           ~TDD-ITM~
  SAY NAME2 @21122
  SAY DESC @21123
  SAY 0x19e @21124

COPY ~TDD/ITM/DREADW.itm~           ~TDD-ITM~         

COPY ~TDD/ITM/DREAMNEC.itm~         ~TDD-ITM~
  SAY NAME2 @21125
  SAY DESC @21126

COPY ~TDD/ITM/DROWBMSC.itm~         ~TDD-ITM~
  SAY NAME2 @21127
  SAY DESC @21128

COPY ~TDD/ITM/DROWCFLA.itm~         ~TDD-ITM~
  SAY NAME2 @21129
  SAY DESC @21130

COPY ~TDD/ITM/DROWDAGX.itm~         ~TDD-ITM~
  SAY NAME2 @21131
  SAY DESC @21132

COPY ~TDD/ITM/DROWWARS.itm~         ~TDD-ITM~
  SAY NAME2 @21133
  SAY DESC @21134

COPY ~TDD/ITM/DUERGAXX.itm~         ~TDD-ITM~
  SAY NAME2 @21135
  SAY DESC @21136

COPY ~TDD/ITM/DWELLAXE.itm~         ~TDD-ITM~
  SAY NAME2 @21137
  SAY DESC @21138

COPY ~TDD/ITM/ELEHAND.itm~          ~TDD-ITM~

COPY ~TDD/ITM/ELSHUKAR.itm~         ~TDD-ITM~       
  SAY NAME2 @21139
  SAY DESC @21140

COPY ~TDD/ITM/ELVHUNTB.itm~         ~TDD-ITM~
  SAY NAME2 @21141
  SAY DESC @21142 

COPY ~TDD/ITM/ENTERI1.itm~          ~TDD-ITM~
  SAY NAME2 @21143

COPY ~TDD/ITM/ENTERI2.itm~          ~TDD-ITM~
  SAY NAME2 @21144

COPY ~TDD/ITM/ENTROBE.itm~          ~TDD-ITM~
  SAY NAME2 @21145
  SAY DESC @21146

COPY ~TDD/ITM/EREBOS.itm~           ~TDD-ITM~
  SAY NAME2 @20042
  SAY DESC @21147
  SAY 0x2c6 @21148 

COPY ~TDD/ITM/ERTURING.itm~         ~TDD-ITM~
  SAY NAME2 @21149
  SAY DESC @21150

COPY ~TDD/ITM/FAITHMCE.itm~         ~TDD-ITM~
  SAY NAME2 @21151 
  SAY DESC @21152

COPY ~TDD/ITM/FIGMIST.itm~          ~TDD-ITM~
  SAY NAME1 @21153
  SAY NAME2 @21153
  SAY DESC @21154
  SAY 0x10e @21155

COPY ~TDD/ITM/FIGSENT.itm~          ~TDD-ITM~
  SAY NAME1 @21156
  SAY NAME2 @21156
  SAY DESC @21157
  SAY 0x10e @21158

COPY ~TDD/ITM/FIGSILV.itm~          ~TDD-ITM~
  SAY NAME1 @21159
  SAY NAME2 @21159
  SAY DESC @21160
  SAY 0x10e @21161

COPY ~TDD/ITM/FLAMPLAT.itm~         ~TDD-ITM~
  SAY NAME2 @21162
  SAY DESC @21163

COPY ~TDD/ITM/FORESTHM.itm~         ~TDD-ITM~
  SAY NAME2 @21164
  SAY DESC @21165

COPY ~TDD/ITM/FWORMHND.itm~         ~TDD-ITM~

COPY ~TDD/ITM/GHARBOOT.itm~         ~TDD-ITM~
  SAY NAME2 @21166
  SAY DESC @21167
  SAY 0x16e @20579

COPY ~TDD/ITM/GHARSW.itm~           ~TDD-ITM~
  SAY NAME2 @21168
  SAY DESC @21169

COPY ~TDD/ITM/GHHAND.itm~           ~TDD-ITM~

COPY ~TDD/ITM/GIANTGRC.itm~         ~TDD-ITM~
  SAY NAME2 @21170
  SAY DESC @21171

COPY ~TDD/ITM/GLORY.itm~            ~TDD-ITM~
  SAY NAME2 @21172
  SAY DESC @21173

COPY ~TDD/ITM/GOLBOOK.itm~          ~TDD-ITM~
  SAY NAME1 @21174
  SAY NAME2 @21174
  SAY DESC @21175 

COPY ~TDD/ITM/GONDFIST.itm~         ~TDD-ITM~

COPY ~TDD/ITM/GRUNTSWX.itm~         ~TDD-ITM~
  SAY NAME2 @21176
  SAY DESC @21177

COPY ~TDD/ITM/GUARDSHZ.itm~         ~TDD-ITM~
  SAY NAME2 @21178
  SAY DESC @21179

COPY ~TDD/ITM/HAGHND.itm~           ~TDD-ITM~

COPY ~TDD/ITM/HAMFORCE.itm~         ~TDD-ITM~
  SAY NAME2 @21180
  SAY DESC @21181

COPY ~TDD/ITM/HAMMSWOR.itm~         ~TDD-ITM~

COPY ~TDD/ITM/HEAFNALL.itm~         ~TDD-ITM~
  SAY NAME1 @21182
  SAY NAME2 @21182
  SAY DESC @21183

COPY ~TDD/ITM/HEALCLCK.itm~         ~TDD-ITM~       
  SAY NAME2 @21184 
  SAY DESC @21185

COPY ~TDD/ITM/HEAVENST.itm~         ~TDD-ITM~
  SAY NAME2 @20045
  SAY DESC @21186 

COPY ~TDD/ITM/HELLPIK.itm~          ~TDD-ITM~
  SAY NAME2 @21187
  SAY DESC @21188

COPY ~TDD/ITM/HELMDED.itm~          ~TDD-ITM~
  SAY NAME2 @21189
  SAY DESC @21190

COPY ~TDD/ITM/HELMDEF.itm~          ~TDD-ITM~
  SAY NAME2 @21191
  SAY DESC @21192

COPY ~TDD/ITM/HELMPHAN.itm~         ~TDD-ITM~
     ~TDD/ITM/HELMRAD1.itm~         ~TDD-ITM~
     ~TDD/ITM/HELMRAD2.itm~         ~TDD-ITM~
     ~TDD/ITM/HELMRAD3.itm~         ~TDD-ITM~
     ~TDD/ITM/HELMRAD4.itm~         ~TDD-ITM~
     ~TDD/ITM/HELMRAT.itm~          ~TDD-ITM~

COPY ~TDD/ITM/ICEHND.itm~           ~TDD-ITM~

COPY ~TDD/ITM/ICEPLAT.itm~          ~TDD-ITM~
  SAY NAME2 @21193
  SAY DESC @21194

COPY ~TDD/ITM/IOUNX3.itm~           ~TDD-ITM~
  SAY NAME2 @21195
  SAY DESC @21196

COPY ~TDD/ITM/IOUNX7.itm~           ~TDD-ITM~
  SAY NAME2 @21197
  SAY DESC @21198

COPY ~TDD/ITM/IOUNX8.itm~           ~TDD-ITM~         
  SAY NAME2 @21199
  SAY DESC @21200

COPY ~TDD/ITM/IOUNX9.itm~           ~TDD-ITM~
  SAY NAME2 @21201
  SAY DESC @21202

COPY ~TDD/ITM/IRONKN.itm~           ~TDD-ITM~

COPY ~TDD/ITM/JUSTSPER.itm~         ~TDD-ITM~
  SAY NAME2 @21203 
  SAY DESC @21204

COPY ~TDD/ITM/KATANACR.itm~         ~TDD-ITM~

COPY ~TDD/ITM/KELBHAND.itm~         ~TDD-ITM~

COPY ~TDD/ITM/KERISBOD.itm~         ~TDD-ITM~
  SAY NAME1 @21205
  SAY NAME2 @21205
  SAY DESC @21206

COPY ~TDD/ITM/KEYKIDDY.itm~         ~TDD-ITM~
  SAY NAME1 @21207
  SAY NAME2 @21207 
  SAY UNIDENTIFIED_DESC @21208
  SAY DESC @21208

COPY ~TDD/ITM/KEYOR.itm~            ~TDD-ITM~
  SAY NAME1 @21076
  SAY NAME2 @21209 
  SAY UNIDENTIFIED_DESC @21210 
  SAY DESC @21211 

COPY ~TDD/ITM/KEYOR2.itm~           ~TDD-ITM~
  SAY NAME1 @21076 
  SAY NAME2 @21209 
  SAY UNIDENTIFIED_DESC @21210 
  SAY DESC @21212 

COPY ~TDD/ITM/KIBADAY.itm~          ~TDD-ITM~
     ~TDD/ITM/KIBAXX.itm~           ~TDD-ITM~
  SAY NAME2 @20047
  SAY DESC @21213

COPY ~TDD/ITM/KING.itm~             ~TDD-ITM~
  SAY NAME1 @21214
  SAY NAME2 @21214
  SAY UNIDENTIFIED_DESC @21215
  SAY DESC @21216

COPY ~TDD/ITM/LAVAHND.itm~          ~TDD-ITM~

COPY ~TDD/ITM/LEATRAT.itm~          ~TDD-ITM~

COPY ~TDD/ITM/LIFELESS.itm~         ~TDD-ITM~
  SAY NAME2 @21217
  SAY DESC @21218

COPY ~TDD/ITM/LIGHTHND.itm~         ~TDD-ITM~

COPY ~TDD/ITM/LOHVAR.itm~           ~TDD-ITM~
  SAY NAME2 @21219
  SAY DESC @21220

COPY ~TDD/ITM/LORDSW2H.itm~         ~TDD-ITM~
  SAY NAME2 @21221
  SAY DESC @21222

COPY ~TDD/ITM/LOTUS.itm~            ~TDD-ITM~
  SAY NAME1 @21223
  SAY NAME2 @21223
  SAY UNIDENTIFIED_DESC @21224
  SAY DESC @21224

COPY ~TDD/ITM/LV16ROB.itm~          ~TDD-ITM~
  SAY NAME2 @21225
  SAY DESC @21226

COPY ~TDD/ITM/MAGBOTXX.itm~         ~TDD-ITM~
  SAY NAME1 @21227
  SAY NAME2 @21227
  SAY DESC @21228

COPY ~TDD/ITM/MALICE.itm~           ~TDD-ITM~
  SAY NAME2 @21229
  SAY DESC @21230

COPY ~TDD/ITM/MARKBOWX.itm~         ~TDD-ITM~
  SAY NAME2 @21231
  SAY DESC @21232

COPY ~TDD/ITM/MIELIKKI.itm~         ~TDD-ITM~
  SAY NAME2 @21233
  SAY DESC @21234

COPY ~TDD/ITM/MINTANX.itm~          ~TDD-ITM~

COPY ~TDD/ITM/MINTELEF.itm~         ~TDD-ITM~
  SAY NAME1 @21235
  SAY NAME2 @21235
  SAY DESC @21236

COPY ~TDD/ITM/MINTGOH.itm~          ~TDD-ITM~
  SAY NAME1 @21024
  SAY NAME2 @21024
  SAY DESC @21237

COPY ~TDD/ITM/MINTGOLA.itm~         ~TDD-ITM~
  SAY NAME1 @21238
  SAY NAME2 @21238
  SAY DESC @21239

COPY ~TDD/ITM/MINTGOLB.itm~         ~TDD-ITM~
  SAY NAME1 @21240
  SAY NAME2 @21240
  SAY DESC @21241

COPY ~TDD/ITM/MINTGOLF.itm~         ~TDD-ITM~
  SAY NAME1 @21242
  SAY NAME2 @21242
  SAY DESC @21243

COPY ~TDD/ITM/MINTGOLR.itm~         ~TDD-ITM~
  SAY NAME1 @21244
  SAY NAME2 @21244
  SAY DESC @21245

COPY ~TDD/ITM/MINTGOLS.itm~         ~TDD-ITM~
  SAY NAME1 @21246
  SAY NAME2 @21246
  SAY DESC @21247

COPY ~TDD/ITM/MINTRANC.itm~         ~TDD-ITM~

COPY ~TDD/ITM/MINTRANM.itm~         ~TDD-ITM~
  SAY NAME2 @21248
  SAY DESC @21249

COPY ~TDD/ITM/MISERY.itm~           ~TDD-ITM~
  SAY NAME2 @21250
  SAY DESC @21251

COPY ~TDD/ITM/MISTY.itm~            ~TDD-ITM~
  SAY NAME2 @21252
  SAY DESC @21253

COPY ~TDD/ITM/MITALBRE.itm~         ~TDD-ITM~
  SAY NAME2 @20055
  SAY DESC @21254 

COPY ~TDD/ITM/MMCHAL.itm~           ~TDD-ITM~
  SAY NAME2 @20483
  SAY UNIDENTIFIED_DESC @21255
  SAY DESC @21255

COPY ~TDD/ITM/MMPLAT.itm~           ~TDD-ITM~

COPY ~TDD/ITM/MONGOVIA.itm~         ~TDD-ITM~
  SAY NAME2 @21256
  SAY DESC @21257

COPY ~TDD/ITM/MOONBLA.itm~          ~TDD-ITM~
  SAY NAME1 @21258
  SAY NAME2 @21258

COPY ~TDD/ITM/MOONLITE.itm~         ~TDD-ITM~
  SAY NAME2 @20059
  SAY DESC @21259

COPY ~TDD/ITM/MOORSX.itm~           ~TDD-ITM~
  SAY NAME2 @20061
  SAY DESC @21260

COPY ~TDD/ITM/NIGHTHND.itm~         ~TDD-ITM~
     ~TDD/ITM/NIGHTRNG.itm~         ~TDD-ITM~

COPY ~TDD/ITM/NINJSHRK.itm~         ~TDD-ITM~
  SAY NAME2 @21261
  SAY DESC @21262

COPY ~TDD/ITM/ORFALOG.itm~          ~TDD-ITM~
  SAY NAME1 @21263
  SAY NAME2 @21263
  SAY DESC @21264 

COPY ~TDD/ITM/ORGOBODY.itm~         ~TDD-ITM~
  SAY NAME1 @21265
  SAY NAME2 @21265
  SAY DESC @21266

COPY ~TDD/ITM/ORGOHEAL.itm~         ~TDD-ITM~
  SAY NAME1 @21267
  SAY NAME2 @21267
  SAY UNIDENTIFIED_DESC @21268
  SAY DESC @21268

COPY ~TDD/ITM/ORRSHLD.itm~          ~TDD-ITM~
  SAY NAME2 @21269
  SAY DESC @21270

COPY ~TDD/ITM/PITGLOVX.itm~         ~TDD-ITM~

COPY ~TDD/ITM/PITGLOVZ.itm~         ~TDD-ITM~
  SAY NAME2 @21271
  SAY DESC @21272

COPY ~TDD/ITM/PLANDAGG.itm~         ~TDD-ITM~
  SAY NAME2 @21273
  SAY DESC @21274

COPY ~TDD/ITM/PLANGARD.itm~         ~TDD-ITM~
  SAY NAME2 @21275
  SAY DESC @21276

COPY ~TDD/ITM/PLATBLUE.itm~         ~TDD-ITM~
  SAY NAME2 @21277
  SAY DESC @21278

COPY ~TDD/ITM/PO29KEY.itm~          ~TDD-ITM~
  SAY NAME1 @21279 
  SAY NAME2 @21279
  SAY UNIDENTIFIED_DESC @21279

COPY ~TDD/ITM/POAMUL01.itm~         ~TDD-ITM~
     ~TDD/ITM/POAMUL02.itm~         ~TDD-ITM~

COPY ~TDD/ITM/POISONZZ.itm~         ~TDD-ITM~
  SAY NAME2 @21280
  SAY DESC @21281 

COPY ~TDD/ITM/POLAW4A.itm~          ~TDD-ITM~
  SAY NAME2 @20035
  SAY UNIDENTIFIED_DESC @21282 
  SAY DESC @21283

COPY ~TDD/ITM/POSC229A.itm~         ~TDD-ITM~
  SAY NAME2 @20833 
  SAY DESC @20834 

COPY ~TDD/ITM/POWEATH1.itm~         ~TDD-ITM~

COPY ~TDD/ITM/PSHARD.itm~           ~TDD-ITM~
  SAY NAME1 @21284 
  SAY NAME2 @21284 
  SAY UNIDENTIFIED_DESC @21285
  SAY DESC @21285 

COPY ~TDD/ITM/QUAKEHAM.itm~         ~TDD-ITM~
  SAY NAME2 @20063
  SAY DESC @21286

COPY ~TDD/ITM/QUOST.itm~            ~TDD-ITM~
  SAY NAME2 @21287
  SAY DESC @21288

COPY ~TDD/ITM/RHYTHMSD.itm~         ~TDD-ITM~
  SAY NAME2 @21289
  SAY DESC @21290

COPY ~TDD/ITM/RING97X.itm~          ~TDD-ITM~
     ~TDD/ITM/RING97Y.itm~          ~TDD-ITM~
     ~TDD/ITM/RING97Z.itm~          ~TDD-ITM~
     ~TDD/ITM/RING99X.itm~          ~TDD-ITM~

COPY ~TDD/ITM/RINGDUND.itm~         ~TDD-ITM~

COPY ~TDD/ITM/RINGMZ.itm~           ~TDD-ITM~

COPY ~TDD/ITM/RINGPSI.itm~          ~TDD-ITM~

COPY ~TDD/ITM/RINGROB.itm~          ~TDD-ITM~
  SAY NAME2 @21291
  SAY DESC @21292

COPY ~TDD/ITM/RINGTART.itm~         ~TDD-ITM~

COPY ~TDD/ITM/RINGWWW.itm~          ~TDD-ITM~
  SAY NAME2 @21293
  SAY DESC @21294 

COPY ~TDD/ITM/RINGX1.itm~           ~TDD-ITM~         
     ~TDD/ITM/RINGX2.itm~           ~TDD-ITM~

COPY ~TDD/ITM/ROBE2.itm~            ~TDD-ITM~
  SAY NAME1 @21295 
  SAY NAME2 @21296 
  SAY DESC @21297

COPY ~TDD/ITM/ROCKGOL.itm~          ~TDD-ITM~

COPY ~TDD/ITM/ROGUE.itm~            ~TDD-ITM~
  SAY NAME1 @21298 
  SAY NAME2 @21299 
  SAY UNIDENTIFIED_DESC @21300 
  SAY DESC @21301

COPY ~TDD/ITM/RUNEZ1.itm~           ~TDD-ITM~
  SAY NAME2 @21302
  SAY DESC @21303 

COPY ~TDD/ITM/RUNEZ10.itm~          ~TDD-ITM~
  SAY NAME2 @21304
  SAY DESC @21305

COPY ~TDD/ITM/RUNEZ2.itm~           ~TDD-ITM~
  SAY NAME2 @21306
  SAY DESC @21307 

COPY ~TDD/ITM/RUNEZ3.itm~           ~TDD-ITM~
  SAY NAME2 @21308
  SAY DESC @21309 

COPY ~TDD/ITM/RUNEZ4.itm~           ~TDD-ITM~
  SAY NAME2 @21310
  SAY DESC @21311

COPY ~TDD/ITM/RUNEZ5.itm~           ~TDD-ITM~
  SAY NAME2 @21312
  SAY DESC @21313 

COPY ~TDD/ITM/RUNEZ6.itm~           ~TDD-ITM~
  SAY NAME2 @21312
  SAY DESC @21314 

COPY ~TDD/ITM/RUNEZ7.itm~           ~TDD-ITM~
  SAY NAME2 @21315
  SAY DESC @21316 

COPY ~TDD/ITM/RUNEZ8.itm~           ~TDD-ITM~
  SAY NAME2 @21317
  SAY DESC @21318 

COPY ~TDD/ITM/RUNEZ9.itm~           ~TDD-ITM~
  SAY NAME2 @21319 
  SAY DESC @21320 

COPY ~TDD/ITM/S2-16X.itm~           ~TDD-ITM~

COPY ~TDD/ITM/SAMARMX1.itm~         ~TDD-ITM~
  SAY NAME2 @21321 
  SAY DESC @21322

COPY ~TDD/ITM/SAMBRACX.itm~         ~TDD-ITM~
  SAY NAME2 @21323 
  SAY DESC @21324

COPY ~TDD/ITM/SAMHELMX.itm~         ~TDD-ITM~
  SAY NAME2 @21325 
  SAY DESC @21326

COPY ~TDD/ITM/SAPHIREX.itm~         ~TDD-ITM~
  SAY NAME2 @21327
  SAY DESC @21328

COPY ~TDD/ITM/SASH.itm~             ~TDD-ITM~
  SAY NAME2 @21329
  SAY DESC @21330

COPY ~TDD/ITM/SCALBLUE.itm~         ~TDD-ITM~
  SAY NAME1 @21331
  SAY NAME2 @21331
  SAY DESC @21332

COPY ~TDD/ITM/SCIMFLAM.itm~         ~TDD-ITM~
  SAY NAME2 @21333
  SAY DESC @21334

COPY ~TDD/ITM/SCRM104.itm~          ~TDD-ITM~
  SAY NAME2 @20502
  SAY DESC @20503

COPY ~TDD/ITM/SCRX1.itm~            ~TDD-ITM~
  SAY NAME2 @20821
  SAY DESC @20822

COPY ~TDD/ITM/SCRX10.itm~           ~TDD-ITM~
  SAY NAME2 @20839
  SAY DESC @20840

COPY ~TDD/ITM/SCRX11.itm~           ~TDD-ITM~
  SAY NAME2 @20847
  SAY DESC @20848

COPY ~TDD/ITM/SCRX12.itm~           ~TDD-ITM~
  SAY NAME2 @20841
  SAY DESC @20842

COPY ~TDD/ITM/SCRX13.itm~           ~TDD-ITM~
  SAY NAME2 @20843
  SAY DESC @20844

COPY ~TDD/ITM/SCRX14.itm~           ~TDD-ITM~
  SAY NAME2 @20053
  SAY DESC @20849

COPY ~TDD/ITM/SCRX15.itm~           ~TDD-ITM~
  SAY NAME2 @20850
  SAY DESC @20851

COPY ~TDD/ITM/SCRX16.itm~           ~TDD-ITM~
  SAY NAME2 @20946
  SAY DESC @20947

COPY ~TDD/ITM/SCRX18.itm~           ~TDD-ITM~
  SAY NAME2 @20767
  SAY DESC @20768

COPY ~TDD/ITM/SCRX19.itm~           ~TDD-ITM~
  SAY NAME2 @20069
  SAY DESC @20860

COPY ~TDD/ITM/SCRX2.itm~            ~TDD-ITM~
  SAY NAME2 @20823
  SAY DESC @20824

COPY ~TDD/ITM/SCRX20.itm~           ~TDD-ITM~
  SAY NAME2 @20861
  SAY DESC @20862

COPY ~TDD/ITM/SCRX21.itm~           ~TDD-ITM~
  SAY NAME2 @20863
  SAY DESC @20864

COPY ~TDD/ITM/SCRX22.itm~           ~TDD-ITM~
  SAY NAME2 @20865
  SAY DESC @20866

COPY ~TDD/ITM/SCRX23.itm~           ~TDD-ITM~
  SAY NAME2 @20869
  SAY DESC @20870


COPY ~TDD/ITM/SCRX25.itm~           ~TDD-ITM~
  SAY NAME2 @20873
  SAY DESC @20874

COPY ~TDD/ITM/SCRX26.itm~           ~TDD-ITM~
  SAY NAME2 @20875
  SAY DESC @21336

COPY ~TDD/ITM/SCRX27.itm~           ~TDD-ITM~
  SAY NAME2 @20877
  SAY DESC @20878

COPY ~TDD/ITM/SCRX28.itm~           ~TDD-ITM~
  SAY NAME2 @20879
  SAY DESC @20880

COPY ~TDD/ITM/SCRX29.itm~           ~TDD-ITM~
  SAY NAME2 @20948
  SAY DESC @20949

COPY ~TDD/ITM/SCRX3.itm~            ~TDD-ITM~
  SAY NAME2 @20825
  SAY DESC @20826

COPY ~TDD/ITM/SCRX31.itm~           ~TDD-ITM~
  SAY NAME2 @20886
  SAY DESC @20887

COPY ~TDD/ITM/SCRX32.itm~           ~TDD-ITM~
  SAY NAME2 @20888
  SAY DESC @20889

COPY ~TDD/ITM/SCRX33.itm~           ~TDD-ITM~
  SAY NAME2 @20890
  SAY DESC @20891

COPY ~TDD/ITM/SCRX35.itm~           ~TDD-ITM/SCRX35.itm~
  SAY NAME2 @20900
  SAY DESC @20901

COPY ~TDD/ITM/SCRX36.itm~           ~TDD-ITM~
  SAY NAME2 @20902
  SAY DESC @20903

COPY ~TDD/ITM/SCRX37.itm~           ~TDD-ITM~
  SAY NAME2 @20907
  SAY DESC @20908

COPY ~TDD/ITM/SCRX38.itm~           ~TDD-ITM~
  SAY NAME2 @20909
  SAY DESC @20910

COPY ~TDD/ITM/SCRX39.itm~           ~TDD-ITM~
  SAY NAME2 @20921
  SAY DESC @20922

COPY ~TDD/ITM/SCRX4.itm~            ~TDD-ITM~
  SAY NAME2 @20827
  SAY DESC @20828

COPY ~TDD/ITM/SCRX40.itm~           ~TDD-ITM~
  SAY NAME2 @20923
  SAY DESC @20924

COPY ~TDD/ITM/SCRX41.itm~           ~TDD-ITM~
  SAY NAME2 @20935
  SAY DESC @21337

COPY ~TDD/ITM/SCRX42.itm~           ~TDD-ITM~
  SAY NAME2 @20894
  SAY DESC @20895

COPY ~TDD/ITM/SCRX43.itm~           ~TDD-ITM~
  SAY NAME2 @20896
  SAY DESC @20897

COPY ~TDD/ITM/SCRX46.itm~           ~TDD-ITM~
  SAY NAME2 @20817
  SAY DESC @20818

COPY ~TDD/ITM/SCRX47.itm~           ~TDD-ITM~
  SAY NAME2 @20815
  SAY DESC @20816

COPY ~TDD/ITM/SCRX48.itm~           ~TDD-ITM~
  SAY NAME2 @20491
  SAY DESC @20492

COPY ~TDD/ITM/SCRX49.itm~           ~TDD-ITM~
  SAY NAME2 @20494
  SAY DESC @20495

COPY ~TDD/ITM/SCRX5.itm~            ~TDD-ITM~
  SAY NAME2 @20829
  SAY DESC @20830

COPY ~TDD/ITM/SCRX50.itm~           ~TDD-ITM~
  SAY NAME2 @20499
  SAY DESC @20500

COPY ~TDD/ITM/SCRX51.itm~           ~TDD-ITM~
  SAY NAME2 @20804
  SAY DESC @20805

COPY ~TDD/ITM/SCRX52.itm~           ~TDD-ITM~
  SAY NAME2 @20573
  SAY DESC @20574

COPY ~TDD/ITM/SCRX53.itm~           ~TDD-ITM~
  SAY NAME2 @20504
  SAY DESC @20505

COPY ~TDD/ITM/SCRX54.itm~           ~TDD-ITM~
  SAY NAME2 @20506
  SAY DESC @21338

COPY ~TDD/ITM/SCRX55.itm~           ~TDD-ITM~
  SAY NAME2 @20509
  SAY DESC @21339

COPY ~TDD/ITM/SCRX56.itm~           ~TDD-ITM~
  SAY NAME2 @20512
  SAY DESC @20513

COPY ~TDD/ITM/SCRX57.itm~           ~TDD-ITM~
  SAY NAME2 @20515
  SAY DESC @20516

COPY ~TDD/ITM/SCRX58.itm~           ~TDD-ITM~
  SAY NAME2 @20517
  SAY DESC @20518

COPY ~TDD/ITM/SCRX59.itm~           ~TDD-ITM~
  SAY NAME2 @20519
  SAY DESC @20520

COPY ~TDD/ITM/SCRX6.itm~            ~TDD-ITM~
  SAY NAME2 @20942
  SAY DESC @20943

COPY ~TDD/ITM/SCRX60.itm~           ~TDD-ITM~
  SAY NAME2 @20522
  SAY DESC @20523

COPY ~TDD/ITM/SCRX61.itm~           ~TDD-ITM~
  SAY NAME2 @20524
  SAY DESC @20525

COPY ~TDD/ITM/SCRX62.itm~           ~TDD-ITM~
  SAY NAME2 @20526
  SAY DESC @20527

COPY ~TDD/ITM/SCRX63.itm~           ~TDD-ITM~
  SAY NAME2 @20528
  SAY DESC @20529

COPY ~TDD/ITM/SCRX64.itm~           ~TDD-ITM~
  SAY NAME2 @20944
  SAY DESC @20945

COPY ~TDD/ITM/SCRX65.itm~           ~TDD-ITM~
  SAY NAME2 @20530
  SAY DESC @21340

COPY ~TDD/ITM/SCRX66.itm~           ~TDD-ITM~
  SAY NAME2 @20532
  SAY DESC @20533

COPY ~TDD/ITM/SCRX67.itm~           ~TDD-ITM~
  SAY NAME2 @20534
  SAY DESC @20535

COPY ~TDD/ITM/SCRX68.itm~           ~TDD-ITM~
  SAY NAME2 @20536
  SAY DESC @20537

COPY ~TDD/ITM/SCRX69.itm~           ~TDD-ITM~
  SAY NAME2 @20538
  SAY DESC @20539

COPY ~TDD/ITM/SCRX7.itm~            ~TDD-ITM~
  SAY NAME2 @20831
  SAY DESC @20832

COPY ~TDD/ITM/SCRX70.itm~           ~TDD-ITM~
  SAY NAME2 @20540
  SAY DESC @20541

COPY ~TDD/ITM/SCRX71.itm~           ~TDD-ITM~
  SAY NAME2 @20542
  SAY DESC @20543

COPY ~TDD/ITM/SCRX72.itm~           ~TDD-ITM~
  SAY NAME2 @20544
  SAY DESC @20545

COPY ~TDD/ITM/SCRX73.itm~           ~TDD-ITM~
  SAY NAME2 @20546
  SAY DESC @20547

COPY ~TDD/ITM/SCRX74.itm~           ~TDD-ITM~
  SAY NAME2 @20548
  SAY DESC @20549

COPY ~TDD/ITM/SCRX76.itm~           ~TDD-ITM~
  SAY NAME2 @20552
  SAY DESC @20553

COPY ~TDD/ITM/SCRX77.itm~           ~TDD-ITM~
  SAY NAME2 @20554
  SAY DESC @20555

COPY ~TDD/ITM/SCRX8.itm~            ~TDD-ITM~
  SAY NAME2 @20835
  SAY DESC @20836

COPY ~TDD/ITM/SCRX81.itm~           ~TDD-ITM~
  SAY NAME2 @20562
  SAY DESC @20563

COPY ~TDD/ITM/SCRX88.itm~           ~TDD-ITM~
  SAY NAME2 @20568
  SAY DESC @20569

COPY ~TDD/ITM/SCRX89.itm~           ~TDD-ITM~
  SAY NAME2 @20570
  SAY DESC @20571

COPY ~TDD/ITM/SCRX9.itm~            ~TDD-ITM~
  SAY NAME2 @20837
  SAY DESC @20838

COPY ~TDD/ITM/SENTMIST.itm~         ~TDD-ITM~
     ~TDD/ITM/SENTXZ.itm~           ~TDD-ITM~

COPY ~TDD/ITM/SHADCANE.itm~         ~TDD-ITM~
  SAY NAME2 @21341
  SAY DESC @21342

COPY ~TDD/ITM/SHAR20.itm~           ~TDD-ITM~
  SAY NAME2 @21343
  SAY DESC @21344

COPY ~TDD/ITM/SHARFLAL.itm~         ~TDD-ITM~
  SAY NAME2 @21345 
  SAY DESC @21346

COPY ~TDD/ITM/SHLDGRAZ.itm~         ~TDD-ITM~

COPY ~TDD/ITM/SHLDRED.itm~          ~TDD-ITM~
  SAY NAME2 @21347
  SAY DESC @21348

COPY ~TDD/ITM/SHOON.itm~            ~TDD-ITM~
  SAY NAME2 @21349
  SAY DESC @21350

COPY ~TDD/ITM/SILBLADE.itm~         ~TDD-ITM~
  SAY NAME2 @21351
  SAY DESC @21352

COPY ~TDD/ITM/SILVHELX.itm~         ~TDD-ITM~

COPY ~TDD/ITM/SINKER.itm~           ~TDD-ITM~
  SAY NAME2 @21353
  SAY DESC @21354

COPY ~TDD/ITM/SLINGB1.itm~          ~TDD-ITM~
  SAY NAME2 @21355 
  SAY DESC @21356

COPY ~TDD/ITM/SLINGB2.itm~          ~TDD-ITM~
  SAY NAME2 @21357 
  SAY DESC @21358 

COPY ~TDD/ITM/SLINGB3.itm~          ~TDD-ITM~
  SAY NAME2 @21359 
  SAY DESC @21360

COPY ~TDD/ITM/SLINGSLG.itm~         ~TDD-ITM~
  SAY NAME2 @21361
  SAY DESC @21362

COPY ~TDD/ITM/SNAKSCR.itm~          ~TDD-ITM~
  SAY NAME1 @21363
  SAY NAME2 @21363
  SAY DESC @21364 

COPY ~TDD/ITM/SNIPPRED.itm~         ~TDD-ITM~
  SAY NAME2 @21365
  SAY DESC @21366

COPY ~TDD/ITM/SPINETAP.itm~         ~TDD-ITM~
  SAY NAME2 @21367
  SAY DESC @21368

COPY ~TDD/ITM/SPIRIT.itm~           ~TDD-ITM~
  SAY NAME2 @21369
  SAY DESC @21370
  SAY 0xde @21371

COPY ~TDD/ITM/STAFDRAG.itm~         ~TDD-ITM~
  SAY NAME2 @20070
  SAY DESC @21372

COPY ~TDD/ITM/STAFFBES.itm~         ~TDD-ITM~
  SAY NAME2 @20074
  SAY DESC @21373

COPY ~TDD/ITM/STARYM.itm~           ~TDD-ITM~
  SAY NAME2 @21374
  SAY DESC @21375

COPY ~TDD/ITM/SUCX1.itm~            ~TDD-ITM~
  SAY NAME2 @21376
  SAY DESC @21377 

COPY ~TDD/ITM/SUCX2.itm~            ~TDD-ITM~
  SAY NAME2 @21376
  SAY DESC @21378

COPY ~TDD/ITM/SUCX3.itm~            ~TDD-ITM~
  SAY NAME2 @21376
  SAY DESC @21379

COPY ~TDD/ITM/SVIAN.itm~            ~TDD-ITM~
  SAY NAME2 @21380
  SAY DESC @21381

COPY ~TDD/ITM/SW1HBUG.itm~          ~TDD-ITM~
     ~TDD/ITM/SW1HGRAZ.itm~         ~TDD-ITM~
     ~TDD/ITM/SW1HMIST.itm~         ~TDD-ITM~

COPY ~TDD/ITM/SWANARM.itm~          ~TDD-ITM~
  SAY NAME2 @21382
  SAY DESC @21383

COPY ~TDD/ITM/SWINDBLR.itm~         ~TDD-ITM~
  SAY NAME2 @21384
  SAY DESC @21385

COPY ~TDD/ITM/SWORDHAM.itm~         ~TDD-ITM~

COPY ~TDD/ITM/SWZZZ1.itm~           ~TDD-ITM~
  SAY NAME2 @21386
  SAY DESC @21387
  SAY 0x45e @21124
  SAY 0x5de @20579

COPY ~TDD/ITM/SWZZZ2.itm~           ~TDD-ITM~
  SAY NAME2 @21388
  SAY DESC @21389

COPY ~TDD/ITM/SYLVCLUB.itm~         ~TDD-ITM~
  SAY NAME2 @21390
  SAY DESC @21391 
  SAY 0x19e @21392
  SAY 0x28e @21393

COPY ~TDD/ITM/THUGBJAK.itm~         ~TDD-ITM~
  SAY NAME2 @21394
  SAY DESC @21395

COPY ~TDD/ITM/THUGJACK.itm~         ~TDD-ITM~

COPY ~TDD/ITM/TOMB.itm~             ~TDD-ITM~
  SAY NAME2 @21396
  SAY DESC @21397

COPY ~TDD/ITM/TOOTHA1.itm~          ~TDD-ITM~
  SAY NAME1 @21398
  SAY NAME2 @21398 
  SAY DESC @21399 

COPY ~TDD/ITM/TOOTHA2.itm~          ~TDD-ITM~
  SAY NAME1 @21400
  SAY NAME2 @21400 
  SAY DESC @21401 

COPY ~TDD/ITM/TOOTHA3.itm~          ~TDD-ITM~
  SAY NAME1 @21402
  SAY NAME2 @21402 
  SAY DESC @21403 

COPY ~TDD/ITM/TOPAZEYE.itm~         ~TDD-ITM~
  SAY NAME1 @21404
  SAY NAME2 @21404 
  SAY DESC @21404

COPY ~TDD/ITM/TROGSW1H.itm~         ~TDD-ITM~

COPY ~TDD/ITM/TROLLARM.itm~         ~TDD-ITM~       
  SAY NAME2 @21405
  SAY DESC @21406

COPY ~TDD/ITM/TROLSIND.itm~         ~TDD-ITM~
  SAY NAME2 @21407
  SAY DESC @21408

COPY ~TDD/ITM/TROUBRAP.itm~         ~TDD-ITM~
  SAY NAME2 @21409 
  SAY DESC @21410

COPY ~TDD/ITM/TYBBMACE.itm~         ~TDD-ITM~
  SAY NAME2 @21411
  SAY DESC @21412 

COPY ~TDD/ITM/TYRANT.itm~           ~TDD-ITM~
  SAY NAME2 @20076
  SAY DESC @21413

COPY ~TDD/ITM/U1HAX3A.itm~          ~TDD-ITM~
  SAY NAME2 @21414
  SAY DESC @21415

COPY ~TDD/ITM/U2HAX4B.itm~          ~TDD-ITM~
  SAY NAME1 @21416
  SAY NAME2 @21417
  SAY UNIDENTIFIED_DESC @21418
  SAY DESC @21419

COPY ~TDD/ITM/UDAGG5A.itm~          ~TDD-ITM~
  SAY NAME2 @21420
  SAY DESC @21421 

COPY ~TDD/ITM/UHALB5A.itm~          ~TDD-ITM~
  SAY NAME2 @21422
  SAY DESC @21423

COPY ~TDD/ITM/UMSTR4B.itm~          ~TDD-ITM~
  SAY NAME2 @21424
  SAY DESC @21425

COPY ~TDD/ITM/UMSTR5A.itm~          ~TDD-ITM~
  SAY NAME2 @21426
  SAY DESC @21427

COPY ~TDD/ITM/USHLD3B.itm~          ~TDD-ITM~
  SAY NAME2 @21428
  SAY DESC @21429

COPY ~TDD/ITM/VALIANT.itm~          ~TDD-ITM~
  SAY NAME2 @21430
  SAY DESC @21431

COPY ~TDD/ITM/VIOLAX.itm~           ~TDD-ITM~
  SAY NAME2 @21432
  SAY DESC @21433

COPY ~TDD/ITM/VITALD.itm~           ~TDD-ITM~
  SAY NAME1 @21434
  SAY NAME2 @21434 

COPY ~TDD/ITM/WATBLOOD.itm~         ~TDD-ITM~
  SAY NAME1 @21435 
  SAY NAME2 @21435 
  SAY UNIDENTIFIED_DESC @21436
  SAY DESC @21436 

COPY ~TDD/ITM/WAUKEEN.itm~          ~TDD-ITM~
  SAY NAME2 @21437
  SAY DESC @21438

COPY ~TDD/ITM/WEAVER.itm~           ~TDD-ITM~
  SAY NAME2 @21439
  SAY DESC @21440

COPY ~TDD/ITM/WYVCROWN.itm~         ~TDD-ITM~
  SAY NAME2 @21441
  SAY DESC @21442

COPY ~TDD/ITM/YOUNG.itm~            ~TDD-ITM~
  SAY NAME2 @21443
  SAY DESC @21444

COPY ~TDD/ITM/ZGORGET.itm~          ~TDD-ITM~
  SAY NAME2 @21445
  SAY DESC @21446

COPY ~TDD/ITM/ZZ14IN.itm~           ~TDD-ITM~
  SAY NAME2 @21447
  SAY DESC @21448

COPY ~TDD/ITM/ZZG7TS.itm~           ~TDD-ITM~
  SAY NAME2 @21449
  SAY DESC @21450

COPY ~TDD/ITM/ZZN6GC.itm~           ~TDD-ITM~
  SAY NAME2 @21451
  SAY DESC @21452

COPY ~TDD/ITM/ZZSCRL01.itm~         ~TDD-ITM~
  SAY NAME2 @20804
  SAY DESC @20805

COPY ~TDD/ITM/ZZSCRL02.itm~         ~TDD-ITM~
  SAY NAME2 @20566
  SAY DESC @21453

COPY ~TDD/ITM/ZZSCRL03.itm~         ~TDD-ITM~
  SAY NAME2 @20502
  SAY DESC @20503

COPY ~TDD/ITM/ZZU6CS.itm~           ~TDD-ITM~         
  SAY NAME2 @21454
  SAY DESC @21455
  

//******************************************************************
//  STORES
//******************************************************************
PRINT @21456

COPY_EXISTING ~BDBART01.sto~         ~override~
 WRITE_LONG 0x10 0x00000441                   //flags - can buy
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "HELMDEF")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~HELMDEF~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~BERNARD2.sto~         ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "ABLEEDER")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*3
   WRITE_ASCII offset ~ABLEEDER~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~PITGLOVZ~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c*2 ~VALIANT~
   WRITE_SHORT (offset+0x1c*2+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c*2+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c*2+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+3
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*3
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~HELMPR.sto~           ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "TOMB")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~TOMB~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~JAYES.sto~            ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "ZZU6CS")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~ZZU6CS~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~RIBALD.sto~           ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "ARAVORNX")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*2
   WRITE_ASCII offset ~ARAVORNX~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~PLANGARD~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+2
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*2
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~RIBALD3.sto~          ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "ZZ14IN")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*3
   WRITE_ASCII offset ~ZZ14IN~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~BWTALIS~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c*2 ~YOUNG~
   WRITE_SHORT (offset+0x1c*2+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c*2+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c*2+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+3
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*3
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~ROGER.sto~            ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "DELVSCUE")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*2
   WRITE_ASCII offset ~DELVSCUE~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~ZZG7TS~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+2
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*2
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~SCROLLS.sto~          ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "MMCHAL")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~MMCHAL~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 0         //in stock
   WRITE_LONG  (offset+0x18) 1         //infinite flag
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~TEMLATH.sto~          ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "SHADCANE")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~SHADCANE~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~TEMPLE.sto~           ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "WAUKEEN")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~WAUKEEN~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~TEMTALOS.sto~         ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "STAFFBES")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~STAFFBES~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~THUMB.sto~            ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "DRAWER")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~DRAWER~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~TRMER02.sto~          ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "QUOST")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*3
   WRITE_ASCII offset ~QUOST~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~UMSTR4B~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c*2 ~SPIRIT~
   WRITE_SHORT (offset+0x1c*2+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c*2+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c*2+0x14) 5         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+3
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*3
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~UDDROW23.sto~         ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "CONTAGON")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*2
   WRITE_ASCII offset ~CONTAGON~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~SCRX38~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+2
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*2
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~UDDUER01.sto~         ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "LIFELESS")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~LIFELESS~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~UDDUER02.sto~         ~override~
 WRITE_LONG 0x10 0x00000447                   //flags - can't steal
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "SWANARM")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*2
   WRITE_ASCII offset ~SWANARM~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~CAIRN~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+2
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*2
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~UDSVIR04.sto~         ~override~
 WRITE_LONG 0x10 0x00000403                   //flags - can buy, can sell
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "HELLPIK")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~HELLPIK~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~WILMAT.sto~           ~override~
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "MISTY")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding new item-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c
   WRITE_ASCII offset ~MISTY~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   SET "items_4sale_cnt"="%items_4sale_cnt%"+1
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


COPY_EXISTING ~WMART2.sto~           ~override~
 WRITE_LONG 0x10 0x00000607                   //flags - can't steal
 WRITE_LONG 0x14 100                          //sell markup
 WRITE_LONG 0x18 40                           //buy markup
 READ_LONG 0x2c "items_purchd_offset"
 READ_LONG 0x30 "items_purchd_cnt"
 READ_LONG 0x34 "items_4sale_offset"
 READ_LONG 0x38 "items_4sale_cnt"
 READ_LONG 0x4c "drinks_offset"
 READ_LONG 0x50 "drinks_cnt"
 READ_LONG 0x70 "cures_offset"
 READ_LONG 0x74 "cures_cnt"

 SET info_1=1
 FOR( cnt=0; cnt<"%items_4sale_cnt%"; cnt=cnt+1 ) BEGIN  //items-4-sale loop
   READ_ASCII ("%items_4sale_offset%"+0x1c*cnt)    "name"
   PATCH_IF (("%name%" STRING_COMPARE_CASE "BELT06")=0) BEGIN  //if already exists
     info_1=0
   END
 END
 PATCH_IF (info_1=1) BEGIN             //adding 3 new items-4-sale *******************************
   SET offset = ("%items_4sale_offset%"+0x1c*"%items_4sale_cnt%")
   INSERT_BYTES offset 0x1c*4
   WRITE_ASCII offset ~BELT06~
   WRITE_SHORT (offset+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x10) 1         //identified
   WRITE_LONG  (offset+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c ~BRAC10~
   WRITE_SHORT (offset+0x1c+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c+0x14) 1         //in stock
   WRITE_ASCII offset+0x1c*2 ~POTN47~
   WRITE_SHORT (offset+0x1c*2+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c*2+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c*2+0x14) 5         //in stock
   WRITE_ASCII offset+0x1c*3 ~POTN52~
   WRITE_SHORT (offset+0x1c*3+0x0a) 1         //quantity
   WRITE_LONG  (offset+0x1c*3+0x10) 1         //identified
   WRITE_LONG  (offset+0x1c*3+0x14) 0         //in stock
   WRITE_LONG  (offset+0x1c*3+0x18) 1         //infinite flag
   SET "items_4sale_cnt"="%items_4sale_cnt%"+4
   WRITE_SHORT 0x38  "%items_4sale_cnt%"

   SET "item_ext"=0x1c*4
   PATCH_IF ("%items_purchd_offset%">="%items_4sale_offset%") BEGIN
     "items_purchd_offset"="%items_purchd_offset%"+"%item_ext%"
     WRITE_LONG  0x2c "%items_purchd_offset%"
   END
   PATCH_IF ("%drinks_offset%">="%items_4sale_offset%") BEGIN
     "drinks_offset"="%drinks_offset%"+"%item_ext%"
     WRITE_LONG  0x4c  "%drinks_offset%"
   END
   PATCH_IF ("%cures_offset%">="%items_4sale_offset%") BEGIN
     "cures_offset"="%cures_offset%"+"%item_ext%"
     WRITE_LONG  0x70  "%cures_offset%"
   END
 END
BUT_ONLY_IF_IT_CHANGES


//********************************************
PRINT @21457

COPY ~TDD/STO/3307WIZ.sto~          ~override~
  SAY NAME2 @21458

COPY ~TDD/STO/DD0334.sto~           ~override~
  SAY NAME2 @20118

COPY ~TDD/STO/DDBERNAR.sto~         ~override~
  SAY NAME2 @21459

COPY ~TDD/STO/DDPLOTA2.sto~         ~override~
  SAY NAME2 @20262

COPY ~TDD/STO/DDPOTEN1.sto~         ~override~
  SAY NAME2 @21460

COPY ~TDD/STO/DDTEMPL1.sto~         ~override~
  SAY NAME2 @21461

COPY ~TDD/STO/MADEEL.sto~           ~override~
  SAY NAME2 @21462

COPY ~TDD/STO/3314FRGE.sto~         ~override~
     ~TDD/STO/3334TAV.sto~          ~override~
     ~TDD/STO/BARGOOD.sto~          ~override~
     ~TDD/STO/BARHEAL.sto~          ~override~
     ~TDD/STO/BGSELL1B.sto~         ~override~
     ~TDD/STO/BGTAV1B.sto~          ~override~
     ~TDD/STO/CALIMART.sto~         ~override~
     ~TDD/STO/CALITEMP.sto~         ~override~
     ~TDD/STO/CALSHOP1.sto~         ~override~
     ~TDD/STO/CALSHOP2.sto~         ~override~
     ~TDD/STO/DDINN01.sto~          ~override~
     ~TDD/STO/DRINKS.sto~           ~override~
     ~TDD/STO/EASTBAR.sto~          ~override~
     ~TDD/STO/PKSTORE1.sto~         ~override~
     ~TDD/STO/PKSTORE2.sto~         ~override~
     ~TDD/STO/SGBAG04.sto~          ~override~
     ~TDD/STO/WARDWIZS.sto~         ~override~

COPY ~TDD/STO/OVERGOLD.sto~         ~override~
  SAY NAME2 @21463

COPY ~TDD/STO/TOPESLAV.sto~         ~override~
  SAY NAME2 @21464

COPY ~TDD/STO/DUEGSAL3.sto~         ~override~
     ~TDD/STO/RAZAK01.sto~          ~override~
  SAY NAME2 @21465

COPY ~TDD/STO/SANDRAIN.sto~         ~override~
  SAY NAME2 @21466



AT_INTERACTIVE_EXIT      ~TDD/TDD-TISBIFF.bat~
AT_INTERACTIVE_UNINSTALL ~TDD/TDD-UNINSTALL.bat~

//*********************************************************************************************
//
//TDD Character Kits Pack Component
//
//*********************************************************************************************
BEGIN @21467
REQUIRE_COMPONENT "Setup-TDD.tp2"      "0"  @21468
FORBID_COMPONENT  "Setup-RoT.tp2"      "1"  @214680


COPY_EXISTING + ~LAYHANDS.2DA~ ~override~  //to be sure that the originals will come to backup folder, even if everything is or will be biffed
                ~K_B_D.2DA~    ~override~
                ~K_B_E.2DA~    ~override~
                ~K_B_G.2DA~    ~override~
                ~K_B_H.2DA~    ~override~
                ~K_B_HE.2DA~   ~override~
                ~K_B_HL.2DA~   ~override~
                ~K_B_HO.2DA~   ~override~
                ~K_C_D.2DA~    ~override~
                ~K_C_E.2DA~    ~override~
                ~K_C_G.2DA~    ~override~
                ~K_C_H.2DA~    ~override~
                ~K_C_HE.2DA~   ~override~
                ~K_C_HL.2DA~   ~override~
                ~K_C_HO.2DA~   ~override~
                ~K_D_D.2DA~    ~override~
                ~K_D_E.2DA~    ~override~
                ~K_D_G.2DA~    ~override~
                ~K_D_H.2DA~    ~override~
                ~K_D_HE.2DA~   ~override~
                ~K_D_HL.2DA~   ~override~
                ~K_D_HO.2DA~   ~override~
                ~K_F_D.2DA~    ~override~
                ~K_F_E.2DA~    ~override~
                ~K_F_G.2DA~    ~override~
                ~K_F_H.2DA~    ~override~
                ~K_F_HE.2DA~   ~override~
                ~K_F_HL.2DA~   ~override~
                ~K_F_HO.2DA~   ~override~
                ~K_P_D.2DA~    ~override~
                ~K_P_E.2DA~    ~override~
                ~K_P_G.2DA~    ~override~
                ~K_P_H.2DA~    ~override~
                ~K_P_HE.2DA~   ~override~
                ~K_P_HL.2DA~   ~override~
                ~K_P_HO.2DA~   ~override~
                ~K_R_D.2DA~    ~override~
                ~K_R_E.2DA~    ~override~
                ~K_R_G.2DA~    ~override~
                ~K_R_H.2DA~    ~override~
                ~K_R_HE.2DA~   ~override~
                ~K_R_HL.2DA~   ~override~
                ~K_R_HO.2DA~   ~override~
                ~K_T_D.2DA~    ~override~
                ~K_T_E.2DA~    ~override~
                ~K_T_G.2DA~    ~override~
                ~K_T_H.2DA~    ~override~
                ~K_T_HE.2DA~   ~override~
                ~K_T_HL.2DA~   ~override~
                ~K_T_HO.2DA~   ~override~
                ~KITLIST.2DA~   ~override~
                ~ABCLASRQ.2da~   ~override~
                ~ABCLSMOD.2DA~   ~override~
                ~ABDCDSRQ.2DA~   ~override~
                ~ABDCSCRQ.2DA~   ~override~
                ~ALIGNMNT.2DA~   ~override~
                ~CLASWEAP.2DA~   ~override~
                ~DUALCLAS.2DA~   ~override~
                ~LUABBR.2DA~   ~override~
                ~WEAPPROF.2DA~   ~override~
                ~25STWEAP.2da~   ~override~
                ~KIT.IDS~       ~override~
                ~DPLAYER.BCS~   ~override~
                ~DPLAYER2.BCS~  ~override~
                ~DPLAYER3.BCS~  ~override~

ADD_KIT ~Mage_Hunter~
~Mage_Hunter             1           1           1           1           1           1           1           1~
~Mage_Hunter 5  5  0  5  5  5  5  0  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  0  0  0  0  0  2  2  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Mage_Hunter             9       12      0       0       9       9~
~Mage_Hunter             1      -1       0       0       0       0       ~
~Mage_Hunter             17      0       0       0       17      0~
~Mage_Hunter             15      0       0       0       15      0~
~Mage_Hunter             1       0       0       1       0       0       1       0       0  ~
~Mage_Hunter             0       1       0       1       1       1     ~
~TDD/KITS/CLABFI06.2DA~
~ K_F_H ~
~0x00000002 2~
~Pa0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~

SAY @21469
SAY @214690
SAY @21470


APPEND ~LAYHANDS.2DA~
~Mage_Hunter             2   4   6   8   10  12  14  16  18  20  22  24  26  28  30  32  34  36  38  40  42  44  46  48  50  52  54  56  58  60  62  64  66  68  70  72  74  76  78  80 82 84 86 88 90 92 94 96 98 100~
UNLESS ~Mage_Hunter~

COPY ~TDD/SPL/SPCLMH1.spl~          ~TDD-SPL~
     ~TDD/SPL/SPCLMH2.spl~          ~TDD-SPL~
     ~TDD/SPL/SPCLMH3.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPMH701.spl~          ~TDD-SPL~
  SAY NAME1 @21471
  SAY 0x24e @21472

COPY ~TDD/ITM/MHSWD.itm~            ~TDD-ITM~
  SAY NAME2 @20051
  SAY DESC @21473

/**************************************************************************/

ADD_KIT ~BladeSinger~
~BladeSinger           1           1           0           0           0           0           1           1~
~BladeSinger 5  5  0  0  0  0  5  0  5  5  5  5  0  5  5  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  2  0  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~BladeSinger           13      15      13      15      0       0~
~BladeSinger           0       0       0       0       0       0~
~BladeSinger           17      17      0       17      0       0~
~BladeSinger           15      15      0       15      0      0~
~BladeSinger           1       1       1       1       1       1       1       1       1  ~
~BladeSinger           0       0       0       0       0       0     ~
~TDD/KITS/CLABFI07.2DA~
~ K_F_E ~
~0x40000000 2~
~FM0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~

SAY @21474
SAY @214740
SAY @21475


COMPILE ~TDD/KITSNIP/bsinger.baf~

COPY ~TDD/SPL/SPBSAL.spl~           ~TDD-SPL~  //XP bonus 200%
     ~TDD/SPL/SPBSBL.spl~           ~TDD-SPL~  //XP bonus 50%
  SAY NAME1 @21474
  SAY 0xce @21474
  SAY 0xfe @21474

COPY ~TDD/SPL/SPBS6.spl~            ~TDD-SPL~   //Parry move
  SAY NAME1 @21476

COPY ~TDD/SPL/SPBS14.spl~           ~TDD-SPL~  //THAC0 -5 + casts spell SPSB15
  SAY NAME1 @21477

COPY ~TDD/SPL/SPBS15.spl~           ~TDD-SPL~
  SAY NAME1 @21478

COPY ~TDD/SPL/SPBS11.spl~           ~TDD-SPL~  //casting speed -2

COPY ~TDD/SPL/SPBS7.spl~            ~TDD-SPL~  //attack damage +1,  max HP -14, THAC0 +1 - switching to FIGHTER_MAGE at lvl 8
  SAY 0x15e @21474
  SAY 0x18e @21474

//*******************************************
//following spells used by numerous kits
//*******************************************
COPY ~TDD/SPL/SPBS1.spl~            ~TDD-SPL~    //bonus to THAC0 +2
COPY ~TDD/SPL/SPBS3.spl~            ~TDD-SPL~    //create shadows spell
COPY ~TDD/SPL/SPBS4.spl~            ~TDD-SPL~    //magic missile spell

/**************************************************************************/

ADD_KIT ~Frost_Dweller~
~Frost_Dweller           0           0           1           0           0           1           1           1~
~Frost_Dweller 0  0  0  5  5  5  5  0  0  0  0  5  0  0  0  5  5  5  5  0  5  5  5  0  0  0  0  0  2  2  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Frost_Dweller           16      0       16      0       0       0~
~Frost_Dweller           0       0       1      -1       0      -13~
~Frost_Dweller           17      0       17      0       0       0~
~Frost_Dweller           15      0       15      0       0       0~
~Frost_Dweller           0       0       0       0       0       0       1       1       1  ~
~Frost_Dweller           0       1       1       1       1       0     ~
~TDD/KITS/CLABFI08.2DA~
~ K_F_HO  K_F_D  K_F_H ~
~0x00004000 2~
~Fi0~
~ CHAN09  *  HELM07  BAG21  *  *  *  *  *  *  *  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21479
SAY @214790
SAY @21480


COPY ~TDD/SPL/SPFR1.spl~            ~TDD-SPL~
     ~TDD/SPL/SPFR4.spl~            ~TDD-SPL~
     ~TDD/SPL/SPFR5.spl~            ~TDD-SPL~

COPY ~TDD/SPL/SPFR2.spl~            ~TDD-SPL~
  SAY NAME1 @20863

COPY ~TDD/SPL/SPFR3.spl~            ~TDD-SPL~
  SAY NAME1 @20819

/**************************************************************************/

ADD_KIT ~VampireHunter~
~VampireHunter           1           1           1           1           1           1           1           1~
~VampireHunter 3  3  5  5  3  3  3  5  3  3  5  3  3  3  3  5  3  3  5  3  3  3  3  5  5  5  5  3  2  2  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~VampireHunter           17      0       17      0       0       0~
~VampireHunter           0       0       1       0       0       0~
~VampireHunter           17      0       17      0       0       0~
~VampireHunter           15      0       15      0       0       0~
~VampireHunter           1       0       0       1       0       0       1       0       0  ~
~VampireHunter           0       0       0       0       0       0     ~
~TDD/KITS/CLABFI09.2DA~
~ K_F_HO  K_F_HL  K_F_HE  K_F_E  K_F_G  K_F_D  K_F_H ~
~0x00000001 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21481
SAY @214810
SAY @21482


COPY ~TDD/SPL/SPVAMH1.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPVAMH2.spl~          ~TDD-SPL~
  SAY NAME1 @21483


COPY ~TDD/ITM/VHUNTZ1.itm~          ~TDD-ITM~
  SAY NAME2 @21483
  SAY DESC @21484

/**************************************************************************/

ADD_KIT ~Marksman~
~Marksman                1           1           1           1           1           1           1           1~
~Marksman 2  2  5  2  2  2  2  5  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  5  5  5  2  2  0  0  2  0  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Marksman                15      19      0       0       0       0~
~Marksman                0       1       0       0       0       0~
~Marksman                15      19      0       0       0       0~
~Marksman                13      17      0       0       0       0~
~Marksman                1       1       1       1       1       1       1       1       1  ~
~Marksman                0       0       0       0       0       0     ~
~TDD/KITS/CLABFI10.2DA~
~ K_F_E ~
~0x10000000 2~
~Fi0~
~ LEAT14  *  HELM07  BAG25  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  BOW18  XBOW09  STAF08 ~
SAY @21485
SAY @214850
SAY @21486


COPY ~TDD/SPL/SPMARK1.spl~          ~TDD-SPL~
  SAY NAME1 @21487

COPY ~TDD/SPL/SPMARK2.spl~          ~TDD-SPL~
  SAY NAME1 @20981

COPY ~TDD/SPL/SPMARK3.spl~          ~TDD-SPL~
  SAY NAME1 @21488

COPY ~TDD/ITM/ARMARK1.itm~          ~TDD-ITM~
  SAY NAME1 @21489
  SAY NAME2 @21487
  SAY DESC @21490

COPY ~TDD/ITM/ARMARK2.itm~          ~TDD-ITM~
  SAY NAME1 @21489
  SAY NAME2 @20981
  SAY DESC @21491

COPY ~TDD/ITM/ARMARK3.itm~          ~TDD-ITM~
  SAY NAME1 @21489
  SAY NAME2 @21488
  SAY DESC @21492

/**************************************************************************/

ADD_KIT ~Sellsword~
~Sellsword               1           1           1           0           0           1           1           1~
~Sellsword 5  0  5  5  5  0  0  5  0  0  0  0  5  0  0  0  0  0  5  5  0  0  5  5  5  5  0  0  2  0  0  0  5  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3 ~
~Sellsword               18      0       17      0       0       0~
~Sellsword               1      -3       0       0       0       0 ~
~Sellsword               18      0       17      0       0       0 ~
~Sellsword               16      0       15      0       0       0~
~Sellsword               1       1       1       1       1       1       1       1       1  ~
~Sellsword               0       1       1       1       1       0     ~
~TDD/KITS/CLABFI11.2DA~
~ K_F_HO  K_F_H ~
~0x00004000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21493
SAY @214930
SAY @21494


COPY ~TDD/SPL/SPSELL2.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Grunt~
~Grunt                   1           1           1           1           1           1           1           1~
~Grunt 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Grunt                   9       0       0       0       0       0 ~
~Grunt                   1      -1       1       0       0      -10~
~Grunt                   17      0       0       0       0       0~
~Grunt                   15      0       0       0       0       0~
~Grunt                   0       0       0       0       0       0       1       1       1  ~
~Grunt                   0       0       0       0       0       0     ~
~TDD/KITS/CLABFI12.2DA~
~ K_F_HO ~
~0x40000000 2~
~Fi0~
~ CHAN09  *  HELM07  BAG21  *  *  *  *  *  *  *  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21495
SAY @214950
SAY @21496

/**************************************************************************/

ADD_KIT ~Pit~
~Pit                     1           1           1           0           0           1           1           1~
~Pit 3  3  0  3  3  3  3  0  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  0  0  0  0  0  0  2  0  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Pit                     16      16      16      0       0       0~
~Pit                     0       0       0       0       0       0~
~Pit                     17      0       17      0       0       0~
~Pit                     15      0       15      0       0       0~
~Pit                     0       1       1       1       1       1       1       1       1  ~
~Pit                     0       1       1       1       1       0     ~
~TDD/KITS/CLABFI13.2DA~
~ K_F_HO  K_F_D  K_F_H ~
~0x40000000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21497
SAY @214970
SAY @21498


COPY ~TDD/SPL/SPPIT1.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Duergar~
~Duergar                 0           0           1           1           1           0           1           0~
~Duergar 0  0  1  0  5  0  5  1  0  0  0  5  0  0  0  0  5  0  0  0  0  5  0  1  1  1  1  1  0  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Duergar                 9       0       0       0       0       0~
~Duergar                 0       0       1       0       0      -6~
~Duergar                 17      0       17      0       0       0~
~Duergar                 15      0       15      0       0       0~
~Duergar                 0       0       1       0       0       1       0       0       1  ~
~Duergar                 0       0       0       0       0       0     ~
~TDD/KITS/CLABFI14.2DA~
~ K_F_D ~
~0X00004000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21499
SAY @214990
SAY @21500


COPY ~TDD/SPL/SPDUER1.spl~          ~TDD-SPL~
  SAY NAME1 @21501

/**************************************************************************/

ADD_KIT ~Guardian~
~Guardian                1           1           1           1           1           1           1           1~
~Guardian 5  5  5  0  5  5  5  5  5  5  5  5  0  5  5  5  5  5  0  0  5  5  0  5  0  0  0  0  0  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Guardian                9       0       0       0       0       0~
~Guardian                0       0       0       0      -2       0~
~Guardian                17      0       0       0       0       0~
~Guardian                15      0       0       0       0       0~
~Guardian                1       1       1       1       1       1       0       0       0  ~
~Guardian                0       1       1       1       1       0     ~
~TDD/KITS/CLABFI15.2DA~
~ K_F_D ~
~0X00004000 2~
~Fi0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21502
SAY @215020
SAY @21503


COPY ~TDD/SPL/SPGUAR1.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Ravager~
~Ravager                 0           0           1           0           0           0           0           0~
~Ravager 0  0  0  0  5  0  0  0  0  0  0  0  0  0  0  0  5  5  0  0  5  5  5  0  0  0  0  0  2  2  2  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Ravager                 9       0       0       0       0       0~
~Ravager                 0       0       1      -1       0       0~
~Ravager                 17      0       0       0       0       0~
~Ravager                 15      0       0       0       0       0~
~Ravager                 1       0       1       1       0       1       1       0       1  ~
~Ravager                 0       0       0       0       0       0     ~
~TDD/KITS/CLABFI16.2DA~
~ K_F_G ~
~0X00000008 2~
~Fi0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21504
SAY @215040
SAY @21505

/**************************************************************************/

ADD_KIT ~Drowf~
~Drowf                   1           1           1           1           1           1           1           1~
~Drowf 4  4  0  4  4  4  4  0  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Drowf                   16      0       0       10      0       0~
~Drowf                   0       0       0       0       0      -10~
~Drowf                   17      0       0       0       0       0~
~Drowf                   15      0       0       8       0       0~
~Drowf                   0       0       1       0       0       1       0       0       1  ~
~Drowf                   0       0       0       0       0       0     ~
~TDD/KITS/CLABFI17.2DA~
~ K_F_E ~
~0X00004000 2~
~Fi0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @215050
SAY @215051
SAY @21506

/**************************************************************************/

ADD_KIT ~Drowb~
~Drowb                   1           1           1           1           1           1           1           0~
~Drowb 5  5  0  0  5  5  5  5  5  5  5  5  0  5  5  5  5  5  0  0  5  5  0  5  0  0  0  0  0  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Drowb                   14      0       0       0       0       0~
~Drowb                   0       1       0      -2       0      -10~
~Drowb                   17      0       0       0       0       0~
~Drowb                   15      0       0       0       0       0~
~Drowb                   0       0       0       0       0       0       0       0       1  ~
~Drowb                   0       0       0       0       0       0     ~
~TDD/KITS/CLABFI18.2DA~
~ K_F_E ~
~0X00000004 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21507
SAY @215070
SAY @21508

/**************************************************************************/

ADD_KIT ~Troll~
~Troll                   0           0           1           0           0           1           1           1~
~Troll 0  0  0  5  5  5  5  0  0  0  0  5  0  0  0  0  5  5  5  5  5  5  5  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Troll                   9       0       0       0       0       0~
~Troll                   0       0       0       0       0       0~
~Troll                   17      0       0       0       0       0~
~Troll                   15      0       0       0       0       0~
~Troll                   0       0       0       0       0       0       1       1       1  ~
~Troll                   0       0       0       0       0       0     ~
~TDD/KITS/CLABFI19.2DA~
~ K_F_D ~
~0X00004000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21509
SAY @215090
SAY @21510


COPY ~TDD/SPL/TROLLSL1.spl~         ~TDD-SPL~

COPY ~TDD/ITM/TROLLSL.itm~          ~TDD-ITM~
  SAY NAME2 @21509
  SAY DESC @21511

/**************************************************************************/

ADD_KIT ~Fgnome~
~Fgnome                  1           1           1           1           1           1           1           1~
~Fgnome 4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  4  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Fgnome                  9       0       0       0       0       0~
~Fgnome                 -1       1       0      -1       1       0~
~Fgnome                  17      0       0       0       0       0~
~Fgnome                  15      0       0       0       0       0~
~Fgnome                  1       1       1       1       1       1       1       1       1  ~
~Fgnome                  0       0       0       0       0       0     ~
~TDD/KITS/CLABFI20.2DA~
~ K_F_G ~
~0X00004000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21512
SAY @215120
SAY @21513


COPY ~TDD/SPL/SPFG1.spl~            ~TDD-SPL~
  SAY NAME1 @21514

/**************************************************************************/

ADD_KIT ~Breach~
~Breach                  0           0           1           0           0           1           1           1~
~Breach 0  0  0  3  3  3  3  0  0  0  0  3  0  0  0  3  3  3  3  3  3  3  3  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Breach                  16      0       0       0       0       0~
~Breach                  0       0       0       0       0       0~
~Breach                  17      0       0       0       0       0~
~Breach                  15      0       0       0       0       0~
~Breach                  1       0       1       1       0       1       1       0       1  ~
~Breach                  0       0       0       0       0       0     ~
~TDD/KITS/CLABFI21.2DA~
~ K_F_G ~
~0X00004000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21515
SAY @215150
SAY @21516

COPY ~TDD/SPL/SPBRE1.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBRE2.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBRE3.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Harch~
~Harch                   1           1           1           1           1           1           1           1~
~Harch 3  3  5  3  3  3  3  5  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  5  5  5  5  5  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Harch                   9       14      0       0       0       0~
~Harch                   0       0       0       0       0       0~
~Harch                   17      0       0       0       0       0~
~Harch                   15      0       0       0       0       0~
~Harch                   1       1       1       1       1       1       1       1       1  ~
~Harch                   0       0       0       0       0       0     ~
~TDD/KITS/CLABFI22.2DA~
~ K_F_HL ~
~0X40000000 2~
~Fi0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21517
SAY @215170
SAY @21518

/**************************************************************************/

ADD_KIT ~Tact~
~Tact                    1           1           1           1           1           1           1           1~
~Tact 3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Tact                    9       0       0       12      0       0~
~Tact                    0       0       0       0       0       0~
~Tact                    17      0       0       0       15      0~
~Tact                    15      0       0       0       0       0~
~Tact                    1       1       1       1       1       1       1       1       1  ~
~Tact                    0       0       0       0       0       0     ~
~TDD/KITS/CLABFI23.2DA~
~ K_F_HL  K_F_G ~
~0X40000000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21519
SAY @215190
SAY @21520


COPY ~TDD/SPL/SPTACT1.spl~          ~TDD-SPL~
     ~TDD/SPL/SPTACT2.spl~          ~TDD-SPL~
     ~TDD/SPL/SPTACT3.spl~          ~TDD-SPL~
     ~TDD/SPL/SPTACT4.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Blademast~
~Blademast               1           1           1           1           1           1           1           1~
~Blademast 5  0  5  5  5  5  0  5  5  5  0  0  5  0  0  5  0  0  5  0  0  0  5  0  5  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Blademast               12      15      0       9       0       0~
~Blademast              -1       1       0       0       0       0~
~Blademast               17      0       0       0       0       0~
~Blademast               15      0       0       0       0       0~
~Blademast               1       1       1       1       1       1       1       1       1  ~
~Blademast               0       1       1       1       1       0     ~
~TDD/KITS/CLABFI24.2DA~
~ K_F_HL  K_F_HE  K_F_H ~
~0X00010000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21521
SAY @215210
SAY @21522

/**************************************************************************/

ADD_KIT ~Rhythm~
~Rhythm                  1           1           1           1           1           1           1           1~
~Rhythm 0  5  0  5  5  5  0  5  0  0  5  0  0  0  0  5  0  0  5  0  0  0  5  0  0  0  5  5  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Rhythm                  10      14      12      0       0       0~
~Rhythm                  0       1       0       0       0       0~
~Rhythm                  17      0       0       0       0       0~
~Rhythm                  15      0       0       0       0       0~
~Rhythm                  1       1       1       0       0       0       0       0       0  ~
~Rhythm                  0       0       0       0       0       0     ~
~TDD/KITS/CLABFI25.2DA~
~ K_F_HL  K_F_HE  K_F_E ~
~0X00000004 2~
~Fi0~
~ *  *  HELM19  BAG22  RING06  RING29  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  *  *  *  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21523
SAY @215230
SAY @21524


COPY ~TDD/SPL/SPRHYTH2.spl~         ~TDD-SPL~
     ~TDD/SPL/SPRHYTH3.spl~         ~TDD-SPL~
     ~TDD/SPL/SPRHYTH4.spl~         ~TDD-SPL~
     ~TDD/SPL/SPRHYTH5.spl~         ~TDD-SPL~
     ~TDD/SPL/SPRHYTH6.spl~         ~TDD-SPL~
     ~TDD/SPL/SPRHYTH7.spl~         ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Vind~
~Vind                    1           1           1           1           1           1           1           1~
~Vind 5  0  0  0  5  5  0  5  0  5  0  0  0  0  5  5  0  0  0  0  0  0  5  5  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Vind                    13      13      14      0       14      0~
~Vind                    0       0       0       0       0       0~
~Vind                    17      0       0       0       0       0~
~Vind                    15      0       0       0       0       0~
~Vind                    1       0       0       1       0       0       1       0       0  ~
~Vind                    0       0       0       0       0       0     ~
~TDD/KITS/CLABFI26.2DA~
~ K_F_HL  K_F_HE  K_F_G ~
~0X00000020 2~
~Fi0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21525
SAY @215250
SAY @21526


COPY ~TDD/SPL/SPVIND1.spl~          ~TDD-SPL~
     ~TDD/SPL/SPVIND2.spl~          ~TDD-SPL~
     ~TDD/SPL/SPVIND3.spl~          ~TDD-SPL~

COPY ~TDD/ITM/UNDSLAY.itm~          ~TDD-ITM~
  SAY NAME2 @21527
  SAY DESC @21528

/**************************************************************************/

ADD_KIT ~Holy~
~Holy                    1           1           1           1           1           1           1           1~
~Holy 0  0  0  0  5  5  0  5  0  0  0  0  0  0  0  0  5  5  0  0  5  5  5  0  0  0  0  5  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Holy                    17      0       14      0       14      0~
~Holy                    0       0       0       0       0       0~
~Holy                    17      0       0       0       0       0~
~Holy                    15      0       0       0       0       0~
~Holy                    1       1       1       0       0       0       0       0       0  ~
~Holy                    0       0       0       0       0       0     ~
~TDD/KITS/CLABFI27.2DA~
~ K_F_HO ~
~0X40000000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21529
SAY @215290
SAY @21530


COPY ~TDD/SPL/SPHOL1.spl~           ~TDD-SPL~
  SAY NAME1 @20618 

COPY ~TDD/SPL/SPHOL2.spl~           ~TDD-SPL~
  SAY NAME1 @21531
  SAY 0xfe @21124

/**************************************************************************/

ADD_KIT ~Tief~
~Tief                    1           1           1           1           1           1           1           1~
~Tief 5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Tief                    9       0       0       0       0       0~
~Tief                    2       0      -1      -1      -1       2~
~Tief                    17      0       0       0       0       0~
~Tief                    15      0       0       0       0       0~
~Tief                    1       0       0       1       0       0       1       0       1  ~
~Tief                    0       0       0       0       0       0     ~
~TDD/KITS/CLABFI28.2DA~
~ K_F_HE ~
~0X40000000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21532
SAY @215320
SAY @21533


COPY ~TDD/SPL/SPTIEF1.spl~          ~TDD-SPL~
  SAY NAME1 @21534
  SAY 0xce @21535

COPY ~TDD/SPL/SPTIEF2.spl~          ~TDD-SPL~
     ~TDD/SPL/SPTIEF5.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPTIEF3.spl~          ~TDD-SPL~
  SAY NAME1 @21536
  SAY 0x1ee @21537
  SAY 0x21e @21538
  SAY 0x24e @21539

COPY ~TDD/SPL/SPTIEF4.spl~          ~TDD-SPL~
  SAY NAME1 @21540
  SAY 0x12e @21541
  SAY 0x1be @21542
  SAY 0x24e @21543

COPY ~TDD/SPL/SPTIEF6.spl~          ~TDD-SPL~
  SAY NAME1 @21544
  SAY 0x12e @21545
  SAY 0x1be @21546
  SAY 0x24e @21547

/**************************************************************************/

ADD_KIT ~Amazon~
~Amazon                  1           1           1           1           1           1           1           1~
~Amazon 2  2  2  5  2  0  2  0  2  2  2  2  2  2  2  0  0  2  5  0  0  0  0  2  5  2  2  2  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Amazon                  13      0       0       0       0       0~
~Amazon                  0       0       0       0       0       0~
~Amazon                  17      0       0       0       0       0~
~Amazon                  15      0       0       0       0       0~
~Amazon                  0       0       0       1       1       1       1       1       1  ~
~Amazon                  0       1       1       1       1       0     ~
~TDD/KITS/CLABFI29.2DA~
~ K_F_HE ~
~0X40000000 2~
~Fi0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21548
SAY @215480
SAY @21549


COPY ~TDD/SPL/SPAMAZ01.spl~         ~TDD-SPL~
  SAY NAME1 @21550

/**************************************************************************/

ADD_KIT ~DDChanter~
~DDChanter                 1           1           1           0           0           1           1           1~
~DDChanter 1  1  1  1  1  1  1  1  1  1  0  1  1  0  0  0  1  1  1  0  1  1  0  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~DDChanter                 15      12      0       13      0       15~
~DDChanter                 0       0       0       0       0       0~
~DDChanter                 15      17      0       0       0       17~
~DDChanter                 13      15      0       0       0       15~
~DDChanter                 1       1       1       1       1       1       1       1       1  ~
~DDChanter                 0       0       0       0       0       0     ~
~TDD/KITS/CLABBA05.2DA~
~ K_B_HE  K_B_H ~
~0x00400000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21551
SAY @215510
SAY @21552


COPY ~TDD/SPL/SPBAX3.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBAX3A.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Cronicler~
~Cronicler               1           1           1           0           0           1           1           1~
~Cronicler 2  2  0  1  1  1  2  0  2  2  2  2  2  2  2  2  1  1  1  1  1  1  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Cronicler               15      12      15      13      0       15~
~Cronicler               0      -1       1       0       0       0~
~Cronicler               0       17      0       0       0       17~
~Cronicler               0       15      0       0       0       15~
~Cronicler               0       0       0       0       0       0       1       1       1  ~
~Cronicler               0       0       0       0       0       0     ~
~TDD/KITS/CLABBA06.2DA~
~ K_B_HE  K_B_D  K_B_H ~
~0x00800000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21553
SAY @215530
SAY @21554

COPY ~TDD/SPL/SPBAX1.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBAX1A.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPCRON1.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Minstrel~
~Minstrel                1           1           1           1           1           1           1           1~
~Minstrel 1  1  1  0  1  1  1  1  1  1  1  1  0  1  1  1  1  1  0  0  1  1  0  1  1  1  1  1  0  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Minstrel                16      12      0       13      0       17~
~Minstrel               -1       0       0       0       0       4~
~Minstrel                0       17      0       0       0       17~
~Minstrel                0       15      0       0       0       15~
~Minstrel                1       0       0       1       0       0       1       0       0  ~
~Minstrel                0       0       0       0       0       0     ~
~TDD/KITS/CLABBA07.2DA~
~ K_B_HE  K_B_H ~
~0X00400000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21555
SAY @215550
SAY @21556


COPY ~TDD/SPL/SPMIN1.spl~           ~TDD-SPL~
  SAY NAME1 @21557 

COPY ~TDD/SPL/SPMIN2.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Troubador~
~Troubador               1           1           1           0           0           1           1           1~
~Troubador 1  3  0  1  1  1  1  0  3  3  3  3  1  3  3  3  3  3  1  1  3  3  1  0  0  0  0  0  1  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Troubador               0       12      0       13      0       15~
~Troubador               0       0       0       0       0       0~
~Troubador               0       17      0       0       0       17~
~Troubador               0       15      0       0       0       15~
~Troubador               0       0       0       1       1       0       1       1       0  ~
~Troubador               0       0       0       0       0       0     ~
~TDD/KITS/CLABBA08.2DA~
~ K_B_HE  K_B_H ~
~0X00800000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21558
SAY @215580
SAY @21559

COPY ~TDD/SPL/SPBAX4.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBAX4A.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Buccaneer~
~Buccaneer                    1           1           1           1           1           1           1           0~
~Buccaneer 2  2  1  0  0  1  1  1  1  3  3  1  0  1  1  1  0  0  0  0  0  0  0  1  1  2  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Buccaneer                    0       12      0       13      0       15~
~Buccaneer                    0       0       0       0       0       0~
~Buccaneer                    0       17      0       0       0       17~
~Buccaneer                    0       15      0       0       0       15~
~Buccaneer                    1       0       0       1       0       0       1       0       0  ~
~Buccaneer                    0       0       0       0       0       0     ~
~TDD/KITS/CLABBA09.2DA~
~ K_B_HE  K_B_H ~
~0X00800000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21560
SAY @215600
SAY @21561

/**************************************************************************/

ADD_KIT ~Musician~
~Musician                1           1           1           1           1           1           1           1~
~Musician 1  1  0  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Musician                0       12      0       13      0       15~
~Musician                0       0       0       0       0       0~
~Musician                0       17      0       0       0       17~
~Musician                0       15      0       0       0       15~
~Musician                1       1       1       1       1       1       1       1       1  ~
~Musician                0       0       0       0       0       0     ~
~TDD/KITS/CLABBA10.2DA~
~ K_B_HE  K_B_H ~
~0X00200000 5~
~Ba0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21562
SAY @215620
SAY @21563


COPY ~TDD/SPL/SPBAX2.spl~           ~TDD-SPL~
     ~TDD/SPL/SPBAX2A.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPMUS1.spl~           ~TDD-SPL~
  SAY NAME1 @21564

COPY ~TDD/SPL/SPMUS2.spl~           ~TDD-SPL~
  SAY NAME1 @21565

COPY ~TDD/SPL/SPMUS3.spl~           ~TDD-SPL~
  SAY NAME1 @21566

/**************************************************************************/

ADD_KIT ~Shamen~
~Shamen                  1           0           1           0           0           0           0           1~
~Shamen 0  1  0  1  1  0  0  0  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Shamen                  0       0       0       0       17      16~
~Shamen                 -5       0       0       0       0       0~
~Shamen                  0       0       0       0       17      17~
~Shamen                  0       0       0       0       15      15~
~Shamen                  0       0       0       0       1       0       0       0       0  ~
~Shamen                  1       0       0       0       0       0     ~
~TDD/KITS/CLABDR05.2DA~
~ K_D_HO  K_D_HL  K_D_HE  K_D_E  K_D_G  K_D_H ~
~0X10000000 11~
~Dr0~
~ LEAT20  *  HELM19  BAG27  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~

SAY @21567
SAY @215670
SAY @21568


COPY ~TDD/SPL/SPSHAM1.spl~          ~TDD-SPL~
  SAY NAME1 @21569

COPY ~TDD/SPL/SPSHAM2.spl~          ~TDD-SPL~
  SAY NAME1 @20067

COPY ~TDD/SPL/SPSHAM3.spl~          ~TDD-SPL~
     ~TDD/SPL/SPSHAM4.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Shadow~
~Shadow                  1           0           1           1           1           1           1           1~
~Shadow 0  0  0  0  1  1  0  1  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Shadow                  0       17      17      0       12      15~
~Shadow                  0       0       0       0       0       0~
~Shadow                  0       0       0       0       17      17~
~Shadow                  0       0       0       0       15      15~
~Shadow                  0       0       0       1       1       1       0       0       0  ~
~Shadow                  1       0       0       0       0       0     ~
~TDD/KITS/CLABDR06.2DA~
~ K_D_HE  K_D_H ~
~0X08000000 11~
~Dr0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21570
SAY @215700
SAY @21571


COPY ~TDD/SPL/SPSHAD1.spl~          ~TDD-SPL~
  SAY NAME1 @21572

COPY ~TDD/SPL/SPSHAD2.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPSHAD3.spl~          ~TDD-SPL~
  SAY NAME1 @21573
  SAY 0xce @21574

/**************************************************************************/

ADD_KIT ~Aerial~
~Aerial                  1           0           1           1           0           0           0           1~
~Aerial 0  0  0  0  1  1  0  1  0  0  0  0  0  0  0  1  0  1  1  0  0  0  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Aerial                  0       0       0       0       12      15~
~Aerial                  0       0       0       0       0       0 ~
~Aerial                  0       0       0       0       17      17~
~Aerial                  0       0       0       0       15      15~
~Aerial                  0       0       0       0       1       0       0       0       0  ~
~Aerial                  1       0       0       0       0       0     ~
~TDD/KITS/CLABDR07.2DA~
~ K_D_HE  K_D_H ~
~0x10000000 11~
~Dr0~
~ LEAT20  *  HELM19  BAG27  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21575
SAY @215750
SAY @21576


COPY ~TDD/SPL/SPAER1.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPAER2.spl~           ~TDD-SPL~
  SAY NAME1 @21577

/**************************************************************************/

ADD_KIT ~Aquatic~
~Aquatic                 1           0           1           0           0           1           0           1~
~Aquatic 0  0  0  0  1  1  0  0  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Aquatic                 0       0       0       0       12      15~
~Aquatic                 0       0       0       0       0       0~
~Aquatic                 0       0       0       0       17      17~
~Aquatic                 0       0       0       0       15      15~
~Aquatic                 0       0       0       0       1       0       0       0       0  ~
~Aquatic                 1       0       0       0       0       0     ~
~TDD/KITS/CLABDR08.2DA~
~ K_D_HE  K_D_H ~
~0X10000000 11~
~Dr0~
~ LEAT20  *  HELM19  BAG27  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21578
SAY @215780
SAY @21579


COPY ~TDD/SPL/SPAQUA2.spl~          ~TDD-SPL~
  SAY NAME1 @21580

COPY ~TDD/SPL/SPAQUQ3.spl~          ~TDD-SPL~

COPY ~TDD/ITM/SEAHAND.itm~          ~TDD-ITM~

/**************************************************************************/

ADD_KIT ~Just~
~Just                    0           0           1           1           0           0           0           1~
~Just 0  0  0  1  1  0  0  1  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  1  3  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Just                    0       0       0       0       12      15~
~Just                   -1       2      -2       0       0       0~
~Just                    0       0       0       0       17      17~
~Just                    0       0       0       0       15      15~
~Just                    0       0       0       1       1       1       0       0       0  ~
~Just                    1       0       0       0       0       0     ~
~TDD/KITS/CLABDR09.2DA~
~ K_D_HE  K_D_H ~
~0X20000000 11~
~Dr0~
~ LEAT20  *  HELM19  BAG27  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21581
SAY @215810
SAY @21582

/**************************************************************************/

ADD_KIT ~Dream~
~Dream                   0           0           1           1           0           0           0           1~
~Dream 0  0  0  1  1  0  0  1  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Dream                   0       0       0       0       12      15~
~Dream                  -1       0       0       0       0       1~
~Dream                   0       0       0       0       17      17~
~Dream                   0       0       0       0       15      15~
~Dream                   0       0       0       0       1       0       0       0       0  ~
~Dream                   1       0       0       0       0       0     ~
~TDD/KITS/CLABDR10.2DA~
~ K_D_HE ~
~0X08000000 11~
~Dr0~
~ LEAT20  *  HELM19  BAG27  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC14  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21583
SAY @215830
SAY @21584


COPY ~TDD/SPL/SPDREAM1.spl~         ~TDD-SPL~

COPY ~TDD/SPL/SPDREAM2.spl~         ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Anti_Paladin~
~Anti_Paladin            1           1           0           0           0           0           0           0~
~Anti_Paladin 2  2  0  0  0  0  0  0  2  2  2  0  2  2  2  2  0  0  0  0  0  0  0  0  0  0  0  0  2  0  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Anti_Paladin            16      0       9       14      15      0~
~Anti_Paladin            0       0       0       0       0      -15~
~Anti_Paladin            17      0       0       0       0       0 ~
~Anti_Paladin            15      0       0       0       0       0~
~Anti_Paladin            0       0       0       0       0       0       0       0       1  ~
~Anti_Paladin            0       0       0       0       0       0     ~
~TDD/KITS/CLABPA06.2DA~
~ K_P_H ~
~0x00000008 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~

SAY @21585
SAY @215850
SAY @21586


COPY ~TDD/SPL/PALREP.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPPAL1.spl~           ~TDD-SPL~
  SAY NAME1 @21587

COPY ~TDD/SPL/SPPAL10.spl~          ~TDD-SPL~
     ~TDD/SPL/SPPAL11.spl~          ~TDD-SPL~
     ~TDD/SPL/SPPAL14.spl~          ~TDD-SPL~
     ~TDD/SPL/SPPAL9.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPPAL13.spl~          ~TDD-SPL~
  SAY NAME1 @21588
  SAY 0x64e @21589
  SAY 0x6de @21589
  SAY 0x76e @21589
  SAY 0x7fe @21589
  SAY 0x88e @21589
  SAY 0x91e @21589
  SAY 0x9ae @21589
  SAY 0xa3e @21589
  SAY 0xace @21589
  SAY 0xb5e @21589
  SAY 0xbee @21589
  SAY 0xc7e @21589
  SAY 0xd0e @21589
  SAY 0xd9e @21589
  SAY 0xe2e @21589
  SAY 0xebe @21589
  SAY 0xf4e @21589
  SAY 0xfde @21589
  SAY 0x106e @21589
  SAY 0x10fe @21589
  SAY 0x118e @21589
  SAY 0x121e @21589
  SAY 0x12ae @21589
  SAY 0x133e @21589
  SAY 0x13ce @21589
  SAY 0x145e @21589
  SAY 0x14ee @21589
  SAY 0x157e @21589
  SAY 0x160e @21589
  SAY 0x169e @21589
  SAY 0x172e @21589
  SAY 0x17be @21589
  SAY 0x184e @21589
  SAY 0x18de @21589

COPY ~TDD/SPL/SPPAL2.spl~           ~TDD-SPL~
  SAY NAME1 @21590

COPY ~TDD/SPL/SPPAL3.spl~           ~TDD-SPL~
  SAY NAME1 @21591
  SAY 0x15e @20508

COPY ~TDD/SPL/SPPAL4.spl~           ~TDD-SPL~
  SAY NAME1 @21592
  SAY 0x15e @20508

COPY ~TDD/SPL/SPPAL5.spl~           ~TDD-SPL~
  SAY NAME1 @21593
  SAY 0x6be @20077
  SAY 0x7de @21594
  SAY 0xa1e @21594
  SAY 0xb3e @21595

COPY ~TDD/SPL/SPPAL6.spl~           ~TDD-SPL~
  SAY NAME1 @21596
  SAY 0xce @21597

COPY ~TDD/SPL/SPPAL7.spl~           ~TDD-SPL~
  SAY NAME1 @21598

COPY ~TDD/SPL/SPPAL8.spl~           ~TDD-SPL~
  SAY NAME1 @21599

COPY ~TDD/ITM/ANTISW.itm~           ~TDD-ITM~
  SAY NAME1 @21600
  SAY NAME2 @21601
  SAY DESC @21602

/**************************************************************************/

ADD_KIT ~Cerebral~
~Cerebral                1           1           0           1           1           0           0           0~
~Cerebral 2  2  0  0  0  0  0  2  2  2  2  0  2  2  2  2  0  0  0  0  0  0  0  0  0  0  0  0  2  2  2  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Cerebral                13      0       13      12      15      10~
~Cerebral                0       0       0       0       0       0~
~Cerebral                17      0       0       0       0       17~
~Cerebral                15      0       0       0       0       15~
~Cerebral                1       0       0       0       0       0       0       0       0  ~
~Cerebral                0       0       0       0       0       0     ~
~TDD/KITS/CLABPA07.2DA~
~ K_P_H ~
~0x00000008 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21603
SAY @216030
SAY @21604

COPY ~TDD/SPL/SPCERB1.spl~          ~TDD-SPL~
     ~TDD/SPL/SPCERB2.spl~          ~TDD-SPL~
     ~TDD/SPL/SPCERB3.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPCERB4.spl~          ~TDD-SPL~
  SAY NAME1 @21605

/**************************************************************************/

ADD_KIT ~Lord~
~Lord                    0           1           1           1           1           0           0           1~
~Lord 0  0  2  2  2  0  0  2  0  0  0  0  5  0  0  0  0  0  2  2  0  0  2  5  2  2  2  2  2  0  0  0  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Lord                    17      0       9       0       13      17~
~Lord                    0      -2       0       0       0       1~
~Lord                    17      0       0       0       0       17~
~Lord                    15      0       0       0       0       15~
~Lord                    1       0       0       0       0       0       0       0       0  ~
~Lord                    0       0       0       0       0       0     ~
~TDD/KITS/CLABPA08.2DA~
~ K_P_H ~
~0X00004000 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21606
SAY @216060
SAY @21607

/**************************************************************************/

ADD_KIT ~Dragon~
~Dragon                  0           1           1           1           1           0           0           1~
~Dragon 0  0  2  2  2  0  0  2  0  0  0  0  5  0  0  0  0  0  5  5  0  0  5  2  2  2  2  2  2  0  0  0  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Dragon                  17      0       15      0       13      17~
~Dragon                  0       0       0       0       0       0~
~Dragon                  17      0       0       0       0       17~
~Dragon                  15      0       17      0       0       15~
~Dragon                  1       0       0       0       0       0       0       0       0  ~
~Dragon                  0       0       0       0       0       0     ~
~TDD/KITS/CLABPA09.2DA~
~ K_P_H ~
~0X00000020 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21608
SAY @216080
SAY @21609


COPY ~TDD/SPL/SPDRAG.spl~           ~TDD-SPL~
     ~TDD/SPL/SPDRAG2.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPDRAG1.spl~          ~TDD-SPL~
  SAY NAME1 @21610

COPY ~TDD/ITM/ARWDRAG.itm~          ~TDD-ITM~
  SAY NAME1 @21489
  SAY NAME2 @21611
  SAY DESC @21612

COPY ~TDD/ITM/SWDRAGX.itm~          ~TDD-ITM~
  SAY NAME2 @21613
  SAY DESC @21614

/**************************************************************************/

ADD_KIT ~Demon~
~Demon                   1           1           1           0           0           1           1           1~
~Demon 3  3  0  3  3  3  3  0  3  3  3  3  3  3  3  3  3  3  3  3  3  3  3  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Demon                   12      0       9       0       13      17~
~Demon                   0       1       0       0       0      -1~
~Demon                   17      0       0       0       0       17~
~Demon                   15      0       0       0       0       15~
~Demon                   1       0       0       0       0       0       0       0       0  ~
~Demon                   0       0       0       0       0       0     ~
~TDD/KITS/CLABPA10.2DA~
~ K_P_H ~
~0X00000008 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21615
SAY @216150
SAY @21616


COPY ~TDD/SPL/SPDEM1.spl~           ~TDD-SPL~
     ~TDD/SPL/SPDEM2.spl~           ~TDD-SPL~
     ~TDD/SPL/SPDEM3.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Saurial~
~Saurial                 1           1           1           1           1           1           1           1~
~Saurial 3  3  1  2  3  3  3  1  3  3  3  3  2  3  3  3  3  3  2  2  3  3  2  1  1  1  1  1  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Saurial                 12      0       9       0       13      17~
~Saurial                 0       0       0       0       0       0~
~Saurial                 17      0       0       0       0       17~
~Saurial                 15      0       0       0       0       15~
~Saurial                 1       0       0       0       0       0       0       0       0  ~
~Saurial                 0       0       0       0       0       0     ~
~TDD/KITS/CLABPA11.2DA~
~ K_P_H ~
~0X00004000 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21617
SAY @216170
SAY @21618

/**************************************************************************/

ADD_KIT ~Dark~
~Dark                    1           1           1           1           1           1           1           1~
~Dark 0  0  0  0  2  2  0  0  0  0  0  0  0  0  0  0  2  2  0  0  2  2  2  2  2  2  2  2  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Dark                    13      0       9       0       12      0~
~Dark                    0       0       0       0       0       0~
~Dark                    17      0       0       0       0       0~
~Dark                    0       0       0       0       0       0~
~Dark                    0       0       1       0       0       1       0       0       0  ~
~Dark                    0       0       0       0       0       0     ~
~TDD/KITS/CLABPA12.2DA~
~ K_P_H ~
~0X00004000 6~
~Pa0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21619
SAY @216190
SAY @21620


COPY ~TDD/SPL/SPDARKK1.spl~         ~TDD-SPL~
  SAY NAME1 @20584

COPY ~TDD/SPL/SPDARKK2.spl~         ~TDD-SPL~
  SAY NAME1 @20588
  SAY 0x1c6 @20590
  SAY 0x286 @20590
  SAY 0x346 @20590
  SAY 0x406 @20590
  SAY 0x4c6 @20590
  SAY 0x586 @20590

COPY ~TDD/SPL/SPDARKK3.spl~         ~TDD-SPL~
  SAY NAME1 @20630
  SAY 0x12e @21621

COPY ~TDD/SPL/SPDARKK5.spl~         ~TDD-SPL~
  SAY NAME1 @20058

/**************************************************************************/

ADD_KIT ~Healer~
~Healer                  0           0           1           1           0           1           0           0~
~Healer 0  0  0  0  1  1  0  1  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Healer                  0       0       16      0       17      0~
~Healer                 -3      -3       0       0       0       0~
~Healer                  0       0       0       0       17      0~
~Healer                  0       0       0       0       15      0~
~Healer                  1       0       0       0       0       0       0       0       0  ~
~Healer                  0       0       0       0       0       0     ~
~TDD/KITS/CLABPR05.2DA~
~ K_C_HO  K_C_HE  K_C_G  K_C_D ~
~0x04000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21622
SAY @216220
SAY @21623

/**************************************************************************/

ADD_KIT ~Selune~
~Selune                  0           0           0           0           0           1           0           0~
~Selune 0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Selune                  0       0       0       15      17      0~
~Selune                  0       0       0       0       0       0~
~Selune                  0       0       0       0       17      0~
~Selune                  0       0       0       13      15      0~
~Selune                  0       0       0       0       0       0       1       0       0  ~
~Selune                  1       0       1       1       0       1     ~
~TDD/KITS/CLABPR06.2DA~
~ K_C_HL  K_C_HE  K_C_E  K_C_H ~
~0x00008000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21624
SAY @216240
SAY @21625

                 
COPY ~TDD/SPL/SPSE201.spl~          ~TDD-SPL~
  SAY NAME1 @21626

COPY ~TDD/SPL/SPSE212.spl~          ~TDD-SPL~
  SAY NAME1 @21627

COPY ~TDD/SPL/SPSE305.spl~          ~TDD-SPL~
  SAY NAME1 @21628

COPY ~TDD/SPL/SPSE307.spl~          ~TDD-SPL~
  SAY NAME1 @21629 

COPY ~TDD/SPL/SPSE408.spl~          ~TDD-SPL~
  SAY NAME1 @21630

COPY ~TDD/SPL/SPSEL1.spl~           ~TDD-SPL~
     ~TDD/SPL/SPSEL2.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPSEL3.spl~           ~TDD-SPL~
  SAY NAME1 @21631
  SAY 0x196 @21632
  SAY 0x1f6 @21632
  SAY 0x256 @21632
  SAY 0x2b6 @21632
  SAY 0x316 @21632
  SAY 0x376 @21632

COPY ~TDD/SPL/SPSEL4.spl~           ~TDD-SPL~
  SAY NAME1 @21633

COPY ~TDD/SPL/SPSEL5.spl~           ~TDD-SPL~
  SAY NAME1 @21634

COPY ~TDD/ITM/MOONBS.itm~           ~TDD-ITM~
  SAY DESC @21635 

/**************************************************************************/

ADD_KIT ~Malar~
~Malar                   0           0           1           1           0           0           0           0~
~Malar 0  0  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Malar                   0       0       0       15      17      0~
~Malar                   0       0       0       0       0       0~
~Malar                   0       0       0       0       17      0~
~Malar                   0       0       0       13      15      0~
~Malar                   0       0       0       0       0       0       0       0       1  ~
~Malar                   1       0       1       1       0       1     ~
~TDD/KITS/CLABPR07.2DA~
~ K_C_HO  K_C_HL  K_C_E  K_C_G  K_C_D  K_C_H ~
~0X01000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21636
SAY @216360
SAY @21637


COPY ~TDD/SPL/SPMAL1.spl~           ~TDD-SPL~
  SAY NAME1 @21638

COPY ~TDD/SPL/SPMAL2.spl~           ~TDD-SPL~
  SAY NAME1 @21639

COPY ~TDD/SPL/SPMAL3.spl~           ~TDD-SPL~
  SAY NAME1 @21640
  SAY 0x15e @21641

COPY ~TDD/SPL/SPMAL4.spl~           ~TDD-SPL~
  SAY NAME1 @21642

COPY ~TDD/SPL/SPMAL5.spl~           ~TDD-SPL~
  SAY NAME1 @21643
  SAY 0x15e @20508

COPY ~TDD/SPL/SPMAL6.spl~           ~TDD-SPL~
  SAY NAME1 @21644

COPY ~TDD/SPL/SPMAL7.spl~           ~TDD-SPL~
  SAY NAME1 @21645

COPY ~TDD/SPL/SPMAL8.spl~           ~TDD-SPL~
  SAY NAME1 @21646

COPY ~TDD/ITM/BCLAW.itm~            ~TDD-ITM~

/**************************************************************************/

ADD_KIT ~Auril~
~Auril                   1           1           1           1           0           1           1           1~
~Auril 0  0  0  0  1  1  0  1  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Auril                   0       0       13      0       12      0~
~Auril                   0       0       0       0       0       0 ~
~Auril                   0       0       0       0       17      0~
~Auril                   0       0       0       0       15      0~
~Auril                   0       0       0       0       0       1       0       0       0  ~
~Auril                   1       0       1       1       0       1     ~
~TDD/KITS/CLABPR08.2DA~
~ K_C_HE  K_C_H ~
~0X00008000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21647
SAY @216470
SAY @21648


COPY ~TDD/SPL/SPAUR1.spl~           ~TDD-SPL~
     ~TDD/SPL/SPAUR2.spl~           ~TDD-SPL~
     ~TDD/SPL/SPAUR3.spl~           ~TDD-SPL~
     ~TDD/SPL/SPAUR7.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPAUR4.spl~           ~TDD-SPL~
  SAY NAME1 @20591

COPY ~TDD/SPL/SPAUR6.spl~           ~TDD-SPL~
  SAY NAME1 @21649
  SAY 0xce @21650


COPY ~TDD/ITM/AURHAND.itm~          ~TDD-ITM~
  SAY 0x13e @21651

/**************************************************************************/

ADD_KIT ~Warlock~
~Warlock                 0           0           0           0           0           1           0           0~
~Warlock 0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  3  0  0  0  0  0  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Warlock                 0       0       0       16      9       0~
~Warlock                -5       0      -1       0       0       0~
~Warlock                 0       0       0       0       17      0~
~Warlock                 0       0       0       0       15      0~
~Warlock                 0       0       1       0       0       1       0       0       1  ~
~Warlock                 1       0       1       1       1       0     ~
~TDD/KITS/CLABPR09.2DA~
~ K_C_H ~
~0X01000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21652
SAY @216520
SAY @21653


COPY ~TDD/SPL/SPWAR1.spl~           ~TDD-SPL~         
  SAY NAME1 @21654

COPY ~TDD/SPL/SPWAR2.spl~           ~TDD-SPL~
  SAY NAME1 @21655
  SAY 0x18e @21656

COPY ~TDD/SPL/SPWAR3.spl~           ~TDD-SPL~
  SAY NAME1 @20875

COPY ~TDD/SPL/SPWAR4.spl~           ~TDD-SPL~
  SAY NAME1 @21657

COPY ~TDD/SPL/SPWAR5.spl~           ~TDD-SPL~
  SAY NAME1 @20069

COPY ~TDD/SPL/SPWAR6.spl~           ~TDD-SPL~
  SAY NAME1 @21658

COPY ~TDD/SPL/SPWAR7.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Faith~
~Faith                   0           0           1           1           0           1           0           0~
~Faith 0  0  0  0  3  0  0  1  0  0  0  0  0  0  0  0  3  1  0  0  3  3  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Faith                   0       0       0       0       9       0~
~Faith                   0       0       0       0      -5       0~
~Faith                   0       0       0       0       17      0~
~Faith                   0       0       0       0       15      0~
~Faith                   1       0       0       1       0       0       1       0       0  ~
~Faith                   0       0       0       0       0       0     ~
~TDD/KITS/CLABPR10.2DA~
~ K_C_HO  K_C_HL  K_C_G  K_C_D ~
~0X01000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21659
SAY @216590
SAY @21660

/**************************************************************************/

ADD_KIT ~Drowc~
~Drowc                   0           0           1           0           0           1           0           0~
~Drowc 0  0  0  0  3  0  0  0  0  0  0  0  0  0  0  0  1  1  0  0  3  1  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Drowc                   0       0       0       0       9       0~
~Drowc                  -1       0       0       1       0      -10~
~Drowc                   0       0       0       0       17      0~
~Drowc                   0       0       0       0       15      0~
~Drowc                   0       0       1       0       0       1       0       0       1  ~
~Drowc                   0       0       0       0       0       0     ~
~TDD/KITS/CLABPR11.2DA~
~ K_C_E ~
~0X00008000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21661
SAY @216610
SAY @21662

/**************************************************************************/

ADD_KIT ~Silvan~
~Silvan                  1           0           1           1           0           1           0           1~
~Silvan 0  0  0  0  2  2  0  2  0  0  0  0  0  0  1  1  0  1  1  0  0  0  1  0  0  0  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Silvan                  0       0       0       0       12      15~
~Silvan                 -1       0      -1       0       0       0~
~Silvan                  0       0       0       0       17      17~
~Silvan                  0       0       0       0       15     15~
~Silvan                  0       0       0       0       1       0       0       0       0  ~
~Silvan                  1       0       0       0       0       0     ~
~TDD/KITS/CLABDR11.2DA~
~ K_D_H ~
~0X00004000 11~
~Dr0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21663
SAY @216630
SAY @21664


COPY ~TDD/SPL/SPSYLV1.spl~          ~TDD-SPL~
  SAY NAME1 @21665

COPY ~TDD/SPL/SPSYLV2.spl~          ~TDD-SPL~
  SAY NAME1 @21666

COPY ~TDD/SPL/SPSYLV3.spl~          ~TDD-SPL~
  SAY NAME1 @21667

COPY ~TDD/SPL/SPSYLV4.spl~          ~TDD-SPL~
  SAY NAME1 @21668

COPY ~TDD/SPL/SPSYLV5.spl~          ~TDD-SPL~
  SAY NAME1 @21669

COPY ~TDD/SPL/SPSYLV6.spl~          ~TDD-SPL~
  SAY NAME1 @21670

COPY ~TDD/SPL/SPSYLV7.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Tybboch~
~Tybboch                 0           0           1           1           0           1           0           0~
~Tybboch 0  0  0  0  1  1  0  1  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Tybboch                 0       0       0       0       9       0~
~Tybboch                 0       0       0       0      -1       0~
~Tybboch                 0       0       0       0       17      0~
~Tybboch                 0       0       0       0       15      0~
~Tybboch                 0       0       1       0       0       1       0       0       0  ~
~Tybboch                 1       0       1       1       0       1     ~
~TDD/KITS/CLABPR13.2DA~
~ K_C_HO  K_C_D  K_C_H ~
~0X00004000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21671
SAY @216710
SAY @21672


COPY ~TDD/SPL/SPTYB1.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPTYB2.spl~           ~TDD-SPL~
  SAY NAME1 @21673
  SAY 0x12e @20508

COPY ~TDD/SPL/SPTYB4.spl~           ~TDD-SPL~
  SAY NAME1 @21590

/**************************************************************************/

ADD_KIT ~Tempus~
~Tempus                  0           0           1           1           0           1           0           0~
~Tempus 0  0  0  0  1  1  0  0  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  0  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Tempus                  14      0       0       0       12      0~
~Tempus                  0      -1       0       0       0       0~
~Tempus                  0       0       0       0       17      0~
~Tempus                  0       0       0       0       15      0~
~Tempus                  0       0       0       0       0       0       0       1       0  ~
~Tempus                  0       0       0       0       0       0     ~
~TDD/KITS/CLABPR14.2DA~
~ K_C_HO  K_C_HL  K_C_HE  K_C_E  K_C_G  K_C_D ~
~0X00000008 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21674
SAY @216740
SAY @21675


COPY ~TDD/SPL/SPTPUS1.spl~          ~TDD-SPL~
  SAY NAME1 @20689 
  SAY 0x1be @20691

COPY ~TDD/SPL/SPTPUS2.spl~          ~TDD-SPL~
  SAY NAME1 @21676

COPY ~TDD/SPL/SPTPUS3.spl~          ~TDD-SPL~
  SAY NAME1 @21677

COPY ~TDD/SPL/SPTPUS4.spl~          ~TDD-SPL~
  SAY NAME1 @21678


COPY ~TDD/ITM/TFLAIL1.itm~          ~TDD-ITM~
     ~TDD/ITM/TFLAIL2.itm~          ~TDD-ITM~
     ~TDD/ITM/TFLAIL3.itm~          ~TDD-ITM~
     ~TDD/ITM/TFLAIL4.itm~          ~TDD-ITM~
     ~TDD/ITM/TFLAIL5.itm~          ~TDD-ITM~
  SAY NAME2 @21679

/**************************************************************************/

ADD_KIT ~Amaunator~
~Amaunator               0           0           1           1           0           1           0           0~
~Amaunator 0  0  0  0  1  1  0  0  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Amaunator               0       0       0       10      9       0~
~Amaunator               0       0      -1       0      -2       0~
~Amaunator               0       0       0       0       17      0~
~Amaunator               0       0       0       0       15      0~
~Amaunator               0       0       0       0       0       0       1       1       0  ~
~Amaunator               0       0       0       0       0       0     ~
~TDD/KITS/CLABPR15.2DA~
~ K_C_HO  K_C_HL  K_C_G  K_C_D ~
~0X40000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21680
SAY @216800
SAY @21681


COPY ~TDD/SPL/SPAMAUN1.spl~         ~TDD-SPL~
  SAY NAME1 @21682

COPY ~TDD/SPL/SPAMAUN2.spl~         ~TDD-SPL~

COPY ~TDD/SPL/SPAMAUN3.spl~         ~TDD-SPL~
  SAY NAME1 @21683

COPY ~TDD/SPL/SPAMAUN4.spl~         ~TDD-SPL~
  SAY NAME1 @21684
  SAY 0xfe @21685


COPY ~TDD/ITM/SSCEPT.itm~           ~TDD-ITM~
  SAY NAME2 @21683
  SAY DESC ~~

/**************************************************************************/

ADD_KIT ~Shar~
~Shar                    0           0           1           1           0           1           0           0~
~Shar 0  0  0  0  1  1  0  0  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Shar                    12      0       0       0       12      0~
~Shar                    0       0       0       0       0      -5~
~Shar                    0       0       0       0       17      0~
~Shar                    0       0       0       0       15      0~
~Shar                    0       0       0       0       0       1       0       0       0  ~
~Shar                    0       0       0       0       0       0     ~
~TDD/KITS/CLABPR16.2DA~
~ K_C_HE  K_C_E ~
~0X00008000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21686
SAY @216860
SAY @21687


COPY ~TDD/SPL/SPSHAR1.spl~          ~TDD-SPL~
  SAY NAME1 @21688

COPY ~TDD/SPL/SPSHAR2.spl~          ~TDD-SPL~
  SAY NAME1 @21689

COPY ~TDD/SPL/SPSHAR3.spl~          ~TDD-SPL~
     ~TDD/SPL/SPSHAR5.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPSHAR4.spl~          ~TDD-SPL~
  SAY NAME1 @21690

/**************************************************************************/

ADD_KIT ~Tyr~
~Tyr                     0           0           1           1           0           1           0           0~
~Tyr 0  0  0  0  1  1  0  0  0  0  0  0  0  0  0  0  2  1  0  0  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Tyr                     14      0       0       0       16      0~
~Tyr                     0       0       0       0       0       0~
~Tyr                     0       0       0       0       17      0~
~Tyr                     0       0       0       0       15      0~
~Tyr                     1       0       0       0       0       0       0       0       0  ~
~Tyr                     0       0       0       0       0       0     ~
~TDD/KITS/CLABPR17.2DA~
~ K_C_HL  K_C_G ~
~0X00004000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21691
SAY @216910
SAY @21692


COPY ~TDD/SPL/TYR1.spl~             ~TDD-SPL~
  SAY NAME1 @21693 

COPY ~TDD/SPL/TYR2.spl~             ~TDD-SPL~
  SAY NAME1 @21694

/**************************************************************************/

ADD_KIT ~Mystra~
~Mystra                  0           0           1           0           0           1           0           0~
~Mystra 0  0  0  0  2  2  0  0  0  0  0  0  0  0  0  0  1  1  0  0  1  1  1  0  0  0  0  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Mystra                  0       0       0       14      12      0~
~Mystra                  0       0       0       0       0       0~
~Mystra                  0       0       0       0       17      0~
~Mystra                  0       0       0       0       15      0~
~Mystra                  0       0       0       1       0       0       0       0       0  ~
~Mystra                  1       0       1       1       0       1     ~
~TDD/KITS/CLABPR18.2DA~
~ K_C_HE  K_C_E  K_C_H ~
~0X40000000 3~
~CL0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21695
SAY @216950
SAY @21696


COPY ~TDD/SPL/SPMYST14.spl~         ~TDD-SPL~

COPY ~TDD/SPL/MYST1.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST2.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST3.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST5.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST6.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST8.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST9.spl~            ~TDD-SPL~
     ~TDD/SPL/MYST10.spl~           ~TDD-SPL~
     ~TDD/SPL/MYST11.spl~           ~TDD-SPL~
     ~TDD/SPL/MYST12.spl~           ~TDD-SPL~
     ~TDD/SPL/MYST13.spl~           ~TDD-SPL~

COPY ~TDD/SPL/MYST4.spl~            ~TDD-SPL~
  SAY NAME1 @20829
  SAY UNIDENTIFIED_DESC @20830

COPY ~TDD/SPL/MYST7.spl~            ~TDD-SPL~
  SAY NAME1 @20837
  SAY UNIDENTIFIED_DESC @21697

/**************************************************************************/

ADD_KIT ~Wilderness~
~Wilderness              0           0           1           1           1           0           1           1~
~Wilderness 0  0  1  1  1  0  1  1  0  0  0  1  0  0  0  0  0  1  1  0  0  0  1  2  2  2  2  2  2  2  2  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Wilderness              13      13      14      0       14      0~
~Wilderness              0       0       0       0       0      -6~
~Wilderness              17      17      0       0       17      0~
~Wilderness              15      15      0       0       15      0~
~Wilderness              1       0       0       1       0       0       1       0       0  ~
~Wilderness              0       1       0       0       0       0     ~
~TDD/KITS/CLABRN06.2DA~
~ K_R_HE  K_R_E  K_R_H ~
~0X00010000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG25  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  BOW18  XBOW09  STAF08 ~
SAY @21698
SAY @216980
SAY @21699


COPY ~TDD/SPL/SPWILD1.spl~          ~TDD-SPL~        
  SAY NAME1 @21700 

COPY ~TDD/SPL/SPWILD2.spl~          ~TDD-SPL~
  SAY NAME1 @20871

COPY ~TDD/SPL/SPWILD3.spl~          ~TDD-SPL~
  SAY NAME1 @20892

COPY ~TDD/SPL/SPWILD4.spl~          ~TDD-SPL~
  SAY NAME1 @20898

/**************************************************************************/

ADD_KIT ~Samurai~
~Samurai                 0           1           0           0           0           0           0           0~
~Samurai 0  0  0  0  0  0  0  0  0  0  0  0  0  5  5  0  0  0  0  0  0  0  0  0  0  0  0  0  0  2  2  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Samurai                 13      17      14      0       14      0~
~Samurai                 0       2      -1       0      -1       0~
~Samurai                 17      17      0       0       17      0~
~Samurai                 15      15      0       0       15      0~
~Samurai                 1       1       1       0       0       0       0       0       0  ~
~Samurai                 0       1       0       0       0       0     ~
~TDD/KITS/CLABRN07.2DA~
~ K_R_H ~
~0X00010000 12~
~Ra0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21701
SAY @217010
SAY @21702


COPY ~TDD/SPL/SPSAM1.spl~           ~TDD-SPL~

COPY ~TDD/SPL/SPSAM3.spl~           ~TDD-SPL~
  SAY NAME1 @21703

/**************************************************************************/

ADD_KIT ~ShadElf~
~ShadElf                 1           1           1           0           0           1           1           1~
~ShadElf 2  2  0  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~ShadElf                 13       13       14       15       14       0~
~Shadelf                 0        0        0        0        0        0~
~ShadElf                 17       17       0        0        17       0~
~ShadElf                 15       15       0        0        15       0~
~ShadElf                 0        0        0        0        0        0~
~ShadElf~
~TDD/KITS/CLABRN08.2DA~
~ K_R_E ~
~0X00010000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG25  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  BOW18  XBOW09  STAF08 ~
SAY @21704
SAY @217040
SAY @21705


COPY ~TDD/SPL/SPSELF4.spl~          ~TDD-SPL~
  SAY NAME1 @21706

COPY ~TDD/SPL/SPSELF5.spl~          ~TDD-SPL~
  SAY NAME1 @21707

COPY ~TDD/SPL/SPSELF6.spl~          ~TDD-SPL~
  SAY NAME1 @21708

/**************************************************************************/

ADD_KIT ~Drowr~
~Drowr                   1           1           1           1           1           1           1           1~
~Drowr 3  3  2  2  2  2  2  2  3  3  3  2  3  3  3  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Drowr                   13      13      14      0       14      0~
~Drowr                   0       1       0       0       0      -8~
~Drowr                   17      17      0       0       17      0~
~Drowr                   15      15      0       0       15      0~
~Drowr                   0       0       1       0       0       1       0       0       1  ~
~Drowr                   0       0       0       0       0       0     ~
~TDD/KITS/CLABRN09.2DA~
~ K_R_E ~
~0X00008000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG25  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  BOW18  XBOW09  STAF08 ~
SAY @21709
SAY @217090
SAY @21710

/**************************************************************************/

ADD_KIT ~Tracker~
~Tracker                 0           0           1           1           1           1           1           0~
~Tracker 0  0  3  0  2  2  3  3  0  0  0  3  0  0  0  0  2  2  0  0  2  2  0  3  3  3  3  3  0  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Tracker                 13      13      14      0       14      0~
~Tracker                 0       0       0       0       0       0~
~Tracker                 17      17      0       0       17      0~
~Tracker                 15      15      0       0       15      0~
~Tracker                 0       0       0       1       1       1       0       0       0  ~
~Tracker                 0       1       0       0       0       0     ~
~TDD/KITS/CLABRN10.2DA~
~ K_R_HE  K_R_E  K_R_H ~
~0X00010000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG25  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  BOW18  XBOW09  STAF08 ~
SAY @21711
SAY @217110
SAY @21712


COPY ~TDD/SPL/SPTRACK1.spl~         ~TDD-SPL~
  SAY NAME1 @21713

COPY ~TDD/SPL/SPTRACK2.spl~         ~TDD-SPL~
  SAY NAME1 @21714

COPY ~TDD/SPL/SPTRACK3.spl~         ~TDD-SPL~
  SAY NAME1 @21715

COPY ~TDD/SPL/SPTRACK4.spl~         ~TDD-SPL~
  SAY NAME1 @21716


COPY ~TDD/ITM/STUNNER.itm~          ~TDD-ITM~        
  SAY NAME2 @21716
  SAY DESC @21717

/**************************************************************************/

ADD_KIT ~Giant~
~Giant                   1           1           1           1           1           1           1           1~
~Giant 2  2  1  2  2  2  2  1  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  1  1  1  1  1  2  0  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Giant                   13      13      14      0       14      0~
~Giant                   0      -1       0       0       0       0~
~Giant                   14      13      14      0       14      0~
~Giant                   15      15      0       0       15      0~
~Giant                   1       0       0       1       0       0       1       0       0  ~
~Giant                   0       1       0       0       0       0     ~
~TDD/KITS/CLABRN11.2DA~
~ K_R_HE  K_R_E  K_R_H ~
~0X40000000 12~
~Ra0~
~CHAN09 * HELM07 BAG20 RING06 RING31 * BOOT01 AMUL19 BRAC16 BELT06 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 HAMM07 SW1H27 STAF08~
SAY @21718
SAY @217180
SAY @21719


COPY ~TDD/SPL/SPGIANT1.spl~         ~TDD-SPL~
     ~TDD/SPL/SPGIANT2.spl~         ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Eye~
~Eye                     1           1           1           0           0           1           1           1~
~Eye 4  2  0  2  2  2  2  0  2  4  2  2  2  2  4  2  2  2  2  2  2  2  2  0  0  0  0  0  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Eye                     13      13      14      0       14      0~
~Eye                     0       0       0       0       0       0~
~Eye                     17      17      0       0       17      0 ~
~Eye                     15      15      0       0       15      0~
~Eye                     1       0       0       1       0       0       1       0       0  ~
~Eye                     0       1       0       0       0       0     ~
~TDD/KITS/CLABRN12.2DA~
~ K_R_HE  K_R_H ~
~0X40000000 12~
~Ra0~
~ CHAN09  *  HELM07  BAG26  RING06  RING31  *  BOOT01  AMUL20  BRAC10  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H27  STAF08 ~
SAY @21720
SAY @217200
SAY @21721


COPY ~TDD/SPL/SPEYE1.spl~           ~TDD-SPL~
  SAY NAME1 @21722

COPY ~TDD/SPL/SPEYE2.spl~           ~TDD-SPL~
     ~TDD/SPL/SPEYE3.spl~           ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Forest~
~Forest                  1           1           1           1           1           1           1           1~
~Forest 0  0  2  2  2  2  2  2  0  0  0  2  0  2  0  0  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Forest                  13      13      14      0       14      0~
~Forest                  0       0       0       0       0       0~
~Forest                  17      17      0       0       17      0~
~Forest                  15      15      0       0       15      0~
~Forest                  1       1       0       1       1       0       1       1       0  ~
~Forest                  0       0       0       0       0       0     ~
~TDD/KITS/CLABRN13.2DA~
~ K_R_HE  K_R_E ~
~0X00010000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG24  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H39  STAF08 ~
SAY @21723
SAY @217230
SAY @21724


COPY ~TDD/SPL/SPFOR1.spl~           ~TDD-SPL~
  SAY NAME1 @21725 

COPY ~TDD/SPL/SPFOR2.spl~           ~TDD-SPL~
  SAY NAME1 @21726

COPY ~TDD/SPL/SPFOR3.spl~           ~TDD-SPL~         
  SAY NAME1 @21727 

COPY ~TDD/SPL/SPFOR4.spl~           ~TDD-SPL~         
  SAY NAME1 @21728

COPY ~TDD/SPL/SPFOR5.spl~           ~TDD-SPL~         
  SAY NAME1 @21729 

COPY ~TDD/SPL/SPFOR6.spl~           ~TDD-SPL~         
  SAY NAME1 @21730 

COPY ~TDD/SPL/SPFOR7.spl~           ~TDD-SPL~
  SAY NAME1 @21731

/**************************************************************************/

ADD_KIT ~Slinger~
~Slinger                 1           1           1           1           0           1           1           1~
~Slinger 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  0  0  0  0  5  2  2  2  3  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5  5 ~
~Slinger                 13      13      14      0       14      0~
~Slinger                 0       0       0       0       0       0~
~Slinger                 17      17      0       0       17      0~
~Slinger                 15      15      0       0       15      0~
~Slinger                 1       1       0       1       1       0       1       1       0  ~
~Slinger                 0       1       0       0       0       0     ~
~TDD/KITS/CLABRN14.2DA~
~ K_R_HE  K_R_H ~
~0X00010000 12~
~Ra0~
~ LEAT14  *  HELM07  BAG24  RING06  RING31  CLCK02  BOOT01  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  HAMM07  SW1H39  STAF08 ~
SAY @21732
SAY @217320
SAY @21733


COPY ~TDD/SPL/SPSLING1.spl~         ~TDD-SPL~
  SAY NAME1 @21734

/**************************************************************************/

ADD_KIT ~Ninja~
~Ninja                   1           1           1           0           0           1           0           1~
~Ninja 0  5  0  5  1  0  0  5  0  5  5  0  0  5  5  5  0  1  0  0  0  0  1  0  0  0  1  0  1  1  1  1  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 ~
~Ninja                   12      16      14      8       0       0~
~Ninja                  -2       2      -1       0       0       0~
~Ninja                   16      17      14      8       0       0~
~Ninja                   15      15      0       0       0      0~
~Ninja                   0       1       1       0       1       1       0       1       1  ~
~Ninja                   1       1       1       0       0       0     ~
~TDD/KITS/CLABTH05.2DA~
~ K_T_HO  K_T_HL  K_T_HE  K_T_E  K_T_G  K_T_D  K_T_H ~
~0X00040000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~

SAY @21735
SAY @217350
SAY @21736


COPY ~TDD/SPL/SPNINJ1.spl~          ~TDD-SPL~
  SAY NAME1 @21737

COPY ~TDD/SPL/SPNINJ4.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Knife~
~Knife                   1           0           0           1           1           0           0           0~
~Knife 0  5  0  0  0  0  0  5  0  0  1  0  0  0  0  5  0  0  0  0  0  0  0  0  0  0  0  0  1  2  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Knife                   0       18      0       0       0       0~
~Knife                   0       1       0       0       0       0~
~Knife                   0       18      0       0       0       0~
~Knife                   0       16      0       0       0       0~
~Knife                   1       1       1       1       1       1       1       1       1  ~
~Knife                   0       0       0       0       0       0     ~
~TDD/KITS/CLABTH06.2DA~
~ K_T_HL ~
~0X00004000 4~
~Th0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21738
SAY @217380
SAY @21739

/**************************************************************************/

ADD_KIT ~Sniper~
~Sniper                  1           0           1           1           1           0           0           0~
~Sniper 0  0  5  0  0  0  0  5  0  0  5  0  0  0  0  5  0  0  0  0  0  0  0  5  0  5  0  0  1  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Sniper                  0       9       0       0       0       0~
~Sniper                  0       0       0       0       0       0~
~Sniper                  0       17      0       0       0       0~
~Sniper                  0       15      0       0       0       0~
~Sniper                  0       1       1       0       1       1       0       1       1  ~
~Sniper                  0       0       0       0       0       0     ~
~TDD/KITS/CLABTH07.2DA~
~ K_T_HL  K_T_E ~
~0X00100000 4~
~Th0~
~* * * BAG29 RING06 RING40 * BOOT01 AMUL21 BRAC15 BELT10 AROW11,40 BULL03,40 BOLT06,40 POTN52,5 POTN04,2 POTN14,5 SLING05 DAGG05,40 STAF20~
SAY @21740
SAY @217400
SAY @21741


COPY ~TDD/SPL/SPSNIP1.spl~          ~TDD-SPL~
  SAY NAME1 @20981

/**************************************************************************/

ADD_KIT ~Svirf~
~Svirf                   1           0           0           1           1           0           0           0~
~Svirf 0  1  1  0  0  0  0  1  0  1  1  0  0  1  1  5  0  1  0  0  0  0  1  1  0  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Svirf                   0       15      0       0       0       0~
~Svirf                   0       1       0      -1       1      -1~
~Svirf                   0       17      0       0       0       0~
~Svirf                   0       15      0       0       0       0~
~Svirf                   1       1       0       1       1       0       1       1       0  ~
~Svirf                   0       0       0       0       0       0     ~
~TDD/KITS/CLABTH08.2DA~
~ K_T_G ~
~0X00080000 4~
~Th0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21742
SAY @217420
SAY @21743


COPY ~TDD/SPL/SPSVIRF2.spl~         ~TDD-SPL~
  SAY NAME1 @21744

COPY ~TDD/SPL/SPSVIRF3.spl~         ~TDD-SPL~

COPY ~TDD/SPL/SPSVIRF5.spl~         ~TDD-SPL~
  SAY NAME1 @20077

/**************************************************************************/

ADD_KIT ~Drowa~
~Drowa                   1           0           0           1           1           0           0           0~
~Drowa 0  1  1  0  0  0  0  1  0  1  1  0  0  1  1  1  0  1  0  0  0  0  1  1  0  1  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Drowa                   0       9       0       0       0       0~
~Drowa                  -2       2      -1       1       0      -10~
~Drowa                   0       17      0       0       0       0~
~Drowa                   0       15      0       0       0       0~
~Drowa                   0       0       1       0       0       1       0       0       1  ~
~Drowa                   0       0       0       0       0       0     ~
~TDD/KITS/CLABTH09.2DA~
~ K_T_E ~
~0X00040000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21745
SAY @217450
SAY @21746


COPY ~TDD/SPL/SPTHCR.spl~           ~TDD-SPL~
  SAY NAME1 @21747 
  SAY 0x12e @21748 

/**************************************************************************/

ADD_KIT ~Burglar~
~Burglar                 1           0           1           1           1           0           0           0~
~Burglar 0  1  1  0  1  0  0  1  0  1  1  0  0  1  1  1  0  1  0  0  0  0  1  1  0  1  1  1  1  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Burglar                 0       9       0       0       0       0~
~Burglar                -1       1       0       0       0       0~
~Burglar                 0       17      0       0       0       0~
~Burglar                 0       15      0       0       0       0~
~Burglar                 0       0       0       0       1       1       0       1       1  ~
~Burglar                 0       0       0       0       0       0     ~
~TDD/KITS/CLABTH10.2DA~
~ K_T_HL  K_T_HE  K_T_G ~
~0X00004000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21749
SAY @217490
SAY @21750

COPY ~TDD/SPL/SPBURG1.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPBURG2.spl~          ~TDD-SPL~
  SAY NAME1 @21751

/**************************************************************************/

ADD_KIT ~Plane~
~Plane                   1           0           1           0           0           0           0           0~
~Plane 0  1  0  0  1  0  0  0  0  0  1  0  0  0  0  2  0  0  0  0  0  0  0  0  0  0  0  0  0  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Plane                   0       9       0       0       0       12~
~Plane                   0       0       0       0       0       0~
~Plane                   0       17      0       0       0       0~
~Plane                   0       15      0       0       0       0~
~Plane                   0       1       0       0       1       0       0       1       0  ~
~Plane                   1       1       1       0       0       0     ~
~TDD/KITS/CLABTH11.2DA~
~ K_T_HL  K_T_HE  K_T_E  K_T_H ~
~0X00040000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21752
SAY @217520
SAY @21753


COPY ~TDD/SPL/SPPLAN1.spl~          ~TDD-SPL~
  SAY NAME1 @21754

/**************************************************************************/

ADD_KIT ~Thug~
~Thug                    1           0           1           1           1           0           0           0~
~Thug 0  2  2  0  2  0  0  2  0  2  2  0  0  2  2  3  0  2  0  0  0  0  2  1  1  1  1  1  2  2  2  2  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Thug                    0       9       0       0       0       0~
~Thug                    0       0       0       0       0      -6~
~Thug                    0       17      0       0       0       0~
~Thug                    0       15      0       0       0       0~
~Thug                    0       0       0       0       0       1       0       0       1  ~
~Thug                    1       1       1       0       0       0     ~
~TDD/KITS/CLABTH12.2DA~
~ K_T_HO  K_T_HL  K_T_HE  K_T_E  K_T_G  K_T_D  K_T_H ~
~0X00040000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21755
SAY @217550
SAY @21756


COPY ~TDD/SPL/SPTHUG1.spl~          ~TDD-SPL~

/**************************************************************************/

ADD_KIT ~Huntsman~
~Huntsman                    1           0           1           1           1           0           0           0~
~Huntsman 0  1  2  0  1  0  0  2  0  1  1  0  0  1  1  1  0  1  0  0  0  0  1  2  0  2  1  1  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Huntsman                    0       9       0       0       0       0~
~Huntsman                   -1       1       0       0       0      -3~
~Huntsman                    0       17      0       0       0       0~
~Huntsman                    0       15      0       0       0       0~
~Huntsman                    0       1       1       0       1       1       0       1       1  ~
~Huntsman                    0       0       0       0       0       0     ~
~TDD/KITS/CLABTH13.2DA~
~ K_T_E ~
~0X00040000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21757
SAY @217570
SAY @21758

/**************************************************************************/

ADD_KIT ~Delver~
~Delver                  1           0           1           1           1           0           0           0~
~Delver 0  3  3  0  3  0  0  3  0  3  3  0  0  3  3  3  0  3  0  0  0  0  3  3  0  3  3  3  1  1  1  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Delver                  14      9       0       9       0       0~
~Delver                  0       0       0       0       0       0~
~Delver                  0       17      0       0       0       0~
~Delver                  0       15      0       0       0       0~
~Delver                  1       1       1       1       1       1       1       1       1  ~
~Delver                  0       0       0       0       0       0     ~
~TDD/KITS/CLABTH14.2DA~
~ K_T_HO  K_T_HE  K_T_G  K_T_D  K_T_H ~
~0X00100000 4~
~Th0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21759
SAY @217590
SAY @21760


COPY ~TDD/SPL/SPDELV1.spl~          ~TDD-SPL~
     ~TDD/SPL/SPDELV5.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPDELV2.spl~          ~TDD-SPL~
  SAY NAME1 @21761

/**************************************************************************/

ADD_KIT ~Merchant~
~Merchant                1           0           1           1           1           0           0           0~
~Merchant 0  1  1  0  0  0  0  1  0  0  1  0  0  1  0  1  0  0  0  0  0  0  0  2  0  1  1  2  1  1  2  1  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Merchant                0       9       0       13      0       13~
~Merchant               -1       0       0       0       0       0~
~Merchant                0       17      0       0       0       0~
~Merchant                0       15      0       0       0       0~
~Merchant                0       1       1       0       1       1       0       1       1  ~
~Merchant                1       1       1       0       0       0     ~
~TDD/KITS/CLABTH15.2DA~
~ K_T_HO  K_T_HE  K_T_G  K_T_D  K_T_H ~
~0X00100000 4~
~Th0~
~ LEATH14  *  *  BAG30  RING06  RING34  CLCK02  BOOT01  AMUL19  BRAC16  BELT10  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @217610
SAY @217611
SAY @21762


COPY ~TDD/SPL/SPMERC1.spl~          ~TDD-SPL~
  SAY NAME1 @21763

COPY ~TDD/SPL/SPMERC2.spl~          ~TDD-SPL~
  SAY NAME1 @21764

COPY ~TDD/SPL/SPMERC3.spl~          ~TDD-SPL~

COPY ~TDD/ITM/SGBAG04.itm~          ~TDD-ITM~
  SAY NAME1 @21765
  SAY NAME2 @21765

/**************************************************************************/

ADD_KIT ~Swindler~
~Swindler                1           0           1           1           1           0           1           0~
~Swindler 0  1  1  0  1  0  1  1  0  1  1  0  0  1  1  1  0  1  0  0  0  0  1  1  0  0  1  1  1  1  1  3  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0 ~
~Swindler                0       14      0       14      0       0~
~Swindler                0       0       0       0       0       0~
~Swindler                0       17      0       0       0       0~
~Swindler                0       15      0       0       0       0~
~Swindler                1       1       1       1       1       1       1       1       1  ~
~Swindler                1       1       1       0       0       0     ~
~TDD/KITS/CLABTH16.2DA~
~ K_T_H ~
~0X00080000 4~
~Th0~
~ LEAT14  *  *  BAG28  RING06  RING05,10  *  BOOT02  AMUL19  BRAC16  BELT06  AROW11,40  BULL03,40  BOLT06,40  POTN52,5  POTN04,2  POTN14,5  DAGG12  SW1H28  STAF08 ~
SAY @21766
SAY @217660
SAY @21767


COPY ~TDD/SPL/SPSWIND1.spl~         ~TDD-SPL~
  SAY NAME1 @21628

COPY ~TDD/SPL/SPSWIND2.spl~         ~TDD-SPL~

/**************************************************************************/
/////////////END OF KITS//////////////////////////
/**************************************************************************/

  //If Kit-Pack is not installed there'll be no kit set for the following NPCs, but effects will be applied

  //Here we should determine a REAL ID of TROLLSLAYER kit and set it for KAGAIN11.CRE, but only if there's no BGT
  //'coz Kagain will be continous in that case, without a kit
  COPY_EXISTING ~KAGAIN11.CRE~ ~override~
   SET troll_idx=0xffffffff
   INNER_ACTION BEGIN
      COPY_EXISTING ~KITLIST.2DA~  ~override~
        COUNT_2DA_ROWS 9 "rows_cnt"
        FOR( cnt=0; cnt<"%rows_cnt%"; cnt=cnt+1 ) BEGIN
          READ_2DA_ENTRY cnt 1 9 "kit_name"
          PATCH_IF( ("%kit_name%" STRING_COMPARE_CASE "Troll")=0 ) BEGIN
            SET troll_idx = cnt
          END
        END
   END
   PATCH_IF( troll_idx>=0 ) BEGIN
     WRITE_LONG 0x244 ((0x4000 | troll_idx) * 0x10000)
   END
  BUT_ONLY_IF_IT_CHANGES


  //Here we should determine a REAL ID of BLADEMASTER kit and set it for SHARTE12.CRE, but only if there's no BGT
  //'coz Shar-Teel will be continous in that case, without a kit
  COPY_EXISTING ~SHARTE12.CRE~ ~override~
   SET bm_idx=0xffffffff
   INNER_ACTION BEGIN
      COPY_EXISTING ~KITLIST.2DA~  ~override~
        COUNT_2DA_ROWS 9 "rows_cnt"
        FOR( cnt=0; cnt<"%rows_cnt%"; cnt=cnt+1 ) BEGIN
          READ_2DA_ENTRY cnt 1 9 "kit_name"
          PATCH_IF( ("%kit_name%" STRING_COMPARE_CASE "Blademast")=0 ) BEGIN
            SET bm_idx = cnt
          END
        END
   END
   PATCH_IF( bm_idx>=0 ) BEGIN
     WRITE_LONG 0x244 ((0x4000 | bm_idx) * 0x10000)
   END
  BUT_ONLY_IF_IT_CHANGES


//Here we should determine a REAL ID of AQUATIC DRUID kit and set it for VESINE8,11,13.CRE
COPY ~TDD/KITS/VESINE8.CRE~  ~override~
     ~TDD/KITS/VESINE11.CRE~ ~override~
     ~TDD/KITS/VESINE13.CRE~ ~override~
   SET bm_idx=0xffffffff
   INNER_ACTION BEGIN
      COPY_EXISTING ~KITLIST.2DA~  ~override~
        COUNT_2DA_ROWS 9 "rows_cnt"
        FOR( cnt=0; cnt<"%rows_cnt%"; cnt=cnt+1 ) BEGIN
          READ_2DA_ENTRY cnt 1 9 "kit_name"
          PATCH_IF( ("%kit_name%" STRING_COMPARE_CASE "Aquatic")=0 ) BEGIN
            SET bm_idx = cnt
          END
        END
   END
   PATCH_IF( bm_idx>=0 ) BEGIN
     WRITE_LONG 0x244 ((0x4000 | bm_idx) * 0x10000)
   END
  SAY NAME1 @20464
  SAY NAME2 @20464
  SAY 0x1cc @20465         //yet incomplete biography!!!!!!!!!!!!!
BUT_ONLY_IF_IT_CHANGES

//Here we should determine a REAL ID of CEREBRAL KNIGHT kit and set it for VESINE8,11,13.CRE
COPY ~TDD/KITS/AVAUN9.cre~  ~override~
     ~TDD/KITS/AVAUN11.CRE~ ~override~
     ~TDD/KITS/AVAUN13.CRE~ ~override~
   SET bm_idx=0xffffffff
   INNER_ACTION BEGIN
      COPY_EXISTING ~KITLIST.2DA~  ~override~
        COUNT_2DA_ROWS 9 "rows_cnt"
        FOR( cnt=0; cnt<"%rows_cnt%"; cnt=cnt+1 ) BEGIN
          READ_2DA_ENTRY cnt 1 9 "kit_name"
          PATCH_IF( ("%kit_name%" STRING_COMPARE_CASE "Cerebral")=0 ) BEGIN
            SET bm_idx = cnt
          END
        END
   END
   PATCH_IF( bm_idx>=0 ) BEGIN
     WRITE_LONG 0x244 ((0x4000 | bm_idx) * 0x10000)
   END
  SAY NAME1 @20136
  SAY NAME2 @20136 
  SAY 0xa8 @20137 
  SAY 0xbc @20138  
  SAY 0xc0 @20139 
  SAY 0xc4 @20140 
  SAY 0xc8 @20141 
  SAY 0xcc @20142 
  SAY 0xd0 @20143  
  SAY 0xd4 @20144  
  SAY 0xd8 @20145  
  SAY 0xec ~~ [HMTW036]
  SAY 0xf0 ~~ [HMTW038]
  SAY 0xf4 @20148  
  SAY 0x10c @20149 
  SAY 0x110 @20150 
  SAY 0x114 @20151 
  SAY 0x118 @20152  
  SAY 0x11c @20153  
  SAY 0x120 @20154 
  SAY 0x124 @20155  
  SAY 0x128 @20156 
  SAY 0x12c @20157 
  SAY 0x130 @20158 
  SAY 0x134 @20159  
  SAY 0x138 @20160 
  SAY 0x13c @20161 
  SAY 0x1a0 @20162 
  SAY 0x1a4 @20163 
  SAY 0x1ac ~~ [HMTW034]
  SAY 0x1cc @20165
BUT_ONLY_IF_IT_CHANGES



ACTION_IF FILE_EXISTS ~script compiler/AICOMPILE.exe~
THEN BEGIN
COPY_EXISTING   ~KIT.IDS~   ~script compiler~
END



EXTEND_TOP  ~DPLAYER.BCS~  ~TDD/KITSNIP/tDPLAYER.BAF~
EXTEND_TOP  ~DPLAYER2.BCS~  ~TDD/KITSNIP/tDPLAYER.BAF~
EXTEND_TOP  ~DPLAYER3.BCS~  ~TDD/KITSNIP/tDPLAYER.BAF~


COPY ~TDD/SPL/SPDROWR1.spl~         ~TDD-SPL~
     ~TDD/SPL/SPDROWR4.spl~         ~TDD-SPL~

COPY ~TDD/SPL/SPDROWA1.spl~         ~TDD-SPL~
  SAY NAME1 @21768

COPY ~TDD/SPL/SPDROWC1.spl~         ~TDD-SPL~
  SAY NAME1 @20716

COPY ~TDD/SPL/SPDROWC2.spl~         ~TDD-SPL~
  SAY NAME1 @21769

COPY ~TDD/SPL/SPDROWC3.spl~         ~TDD-SPL~
  SAY NAME1 @21770

COPY ~TDD/SPL/SPDROWC4.spl~         ~TDD-SPL~
  SAY NAME1 @21771

COPY ~TDD/SPL/SPDROWR2.spl~         ~TDD-SPL~
  SAY NAME1 @21772

COPY ~TDD/SPL/SPDROWR3.spl~         ~TDD-SPL~
  SAY NAME1 @21773

COPY ~TDD/SPL/SPGR1.spl~            ~TDD-SPL~
COPY ~TDD/SPL/SPGR2.spl~            ~TDD-SPL~

COPY ~TDD/SPL/SPHEAL1.spl~          ~TDD-SPL~
  SAY NAME1 @21531
  SAY 0xfe @21124

COPY ~TDD/SPL/SPHEAL2.spl~          ~TDD-SPL~
  SAY NAME1 @20057
  SAY 0xfe @21774

COPY ~TDD/SPL/SPHEAL4.spl~          ~TDD-SPL~
     ~TDD/SPL/SPHEAL5.spl~          ~TDD-SPL~

COPY ~TDD/SPL/SPHEAL6.spl~          ~TDD-SPL~
  SAY NAME1 @21775
  SAY 0xfe @21124


COPY ~TDD/ITM/DARTASD.itm~          ~TDD-ITM~
  SAY NAME1 @21776 
  SAY NAME2 @21777 
  SAY DESC @21778

COPY ~TDD/ITM/DARTASP.itm~          ~TDD-ITM~
  SAY NAME1 @21776
  SAY NAME2 @21779
  SAY DESC @21780

/**************************************************************************/
/*******    End of TDD installation     ***********************************/
/**************************************************************************/
