set GameDir=
if not defined GameDir for /f "tokens=2*" %%a in (
 'REG QUERY HKLM\SOFTWARE\Wow6432Node\LucasArts\KotOR2\ /v Path 2^>NUL ^| findstr Path'
  ) do set GameDir=%%~b

cd %GameDir%

xcopy "Hard As Hell\Source\nwscript.nss" "Hard As Hell\tslpatchdata\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_switch.nss" "Hard As Hell\Source\Misc\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_debug.nss" "Hard As Hell\Source\Misc\"  /Y

xcopy "Hard As Hell\Source\AI & Bean\k_inc_utility.nss" "Hard As Hell\Source\Misc\"  /Y

xcopy "Hard As Hell\Source\Powers\jd_force_include.nss" "Hard As Hell\Source\Misc\"  /Y

"c:\program files\7-zip\7z" e "%GameDir%\Hard As Hell\Source\Powers\installer_proccessed.zip" "%GameDir%\Hard As Hell\Source\Misc\"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\a_attonspirit.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_class_get.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_class_set.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_credits.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_grenade.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_has_20k.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_has_a_crystal.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_is_jedi_npc.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_light_dark.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_local_get.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_local_get_ii.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_local_set.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_make_prestige.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_pazaak.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_saber_get.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_saber_set.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_take_20k.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_testing.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_vibro.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\k_sup_droid.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\k_sup_healing.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\on_death.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\jd_test.nss"

"Hard As Hell\tslpatchdata\nwnnsscomp.exe" "Hard As Hell\Source\Misc\to_eb.nss"

del /q "Hard As Hell\Source\Misc\jd_force_include.nss" 

del /q "Hard As Hell\Source\Misc\jd_constants.nss" 

del /q "Hard As Hell\Source\Misc\k_inc_debug.nss" 

del /q "Hard As Hell\Source\Misc\k_inc_switch.nss" 

del /q "Hard As Hell\Source\Misc\k_inc_utility.nss" 

pause
