@SET NCL2=C:\Program Files\NCSoft\Lineage II\system\
@SET L2DEC=.\l2encdec\l2encdec.exe
@SET L2DIS=.\l2asm-disasm\l2disasm.exe
@SET DDF=.\l2asm-disasm\DDF\CT2\

MKDIR temp 2>NUL
@rem decode.
"%L2DEC%" -g "%NCL2%\itemname-j.dat"   temp\itemname-j.dat
"%L2DEC%" -g "%NCL2%\npcname-j.dat"    temp\npcname-j.dat
"%L2DEC%" -g "%NCL2%\castlename-j.dat" temp\castlename-j.dat
"%L2DEC%" -g "%NCL2%\skillname-j.dat"  temp\skillname-j.dat
"%L2DEC%" -g "%NCL2%\questname-j.dat"  temp\questname-j.dat

touch -r "%NCL2%\itemname-j.dat"   temp\itemname-j.dat
touch -r "%NCL2%\npcname-j.dat"    temp\npcname-j.dat
touch -r "%NCL2%\castlename-j.dat" temp\castlename-j.dat
touch -r "%NCL2%\skillname-j.dat"  temp\skillname-j.dat
touch -r "%NCL2%\questname-j.dat"  temp\suestname-j.dat

@rem disasamble.
"%L2DIS%" -d "%DDF%itemname-e.ddf"   temp\itemname-j.dat   temp\itemname-j.txt
"%L2DIS%" -d "%DDF%npcname-e.ddf"    temp\npcname-j.dat    temp\npcname-j.txt
"%L2DIS%" -d "%DDF%castlename-e.ddf" temp\castlename-j.dat temp\castlename-j.txt
"%L2DIS%" -d "%DDF%skillname-e.ddf"  temp\skillname-j.dat  temp\skillname-j.txt
"%L2DIS%" -d "%DDF%questname-e.ddf"  temp\questname-j.dat  temp\questname-j.txt

touch -r temp\itemname-j.dat   temp\itemname-j.txt
touch -r temp\npcname-j.dat    temp\npcname-j.txt
touch -r temp\castlename-j.dat temp\castlename-j.txt
touch -r temp\skillname-j.dat  temp\skillname-j.txt
touch -r temp\questname-j.dat  temp\questname-j.txt

@rem formatting.
itemname_ja_sql.pl
npcname_ja_sql.pl
castlename_ja_sql.pl
skillname_ja_sql.pl
questname_ja_sql.pl

@TITLE
@PAUSE
