TITLE Bloody Pulp Fiction Update to 1.2
echo off
:check1
if exist 7za.exe goto Continue
echo msgbox "7za.exe not found. Please download command line version of 7zip archiver", vbOKOnly, "Error">msg.vbs
cscript msg.vbs
del /f /q *.vbs >nul
exit
goto check1
:Continue
if not errorlevel 0 goto Continue2
:check2
if exist BARF.exe goto Continue2
echo msgbox "BARF.EXE no found!", vbOKOnly, "Error">msg.vbs
cscript msg.vbs
del /f /q *.vbs >nul
exit
goto check2
:Continue2
if not errorlevel 0 goto Continue2
:check3
if exist BLOOD.RFF goto Continue3
echo msgbox "BLOOD.RFF not found!", vbOKOnly, "Error">msg.vbs
cscript msg.vbs
del /f /q *.vbs >nul
exit
goto check3
:Continue3
if not errorlevel 0 goto Continue3
:check4
if exist RESS.BPF goto Continue4
echo msgbox "RESS.BPF not found!", vbOKOnly, "Error">msg.vbs
cscript msg.vbs
del /f /q *.vbs >nul
exit
goto check4
:Continue4
if not errorlevel 0 goto Continue4
echo Updating RESS.BPF...
7za d -tzip RESS.BPF INSTBPF.BAT RUNBPF.BAT BLOOD.CFG *.DLL
if exist UPto12\*.* 7za a -tzip RESS.BPF .\UPto12\*.*
if exist UPto12\*.* 7za a -tzip RESS.BPF .\UPto12\*.dll
echo wscript.sleep wscript.arguments(0)>pause.vbs
if exist *.RAW rename *.RAW *.WAR
if exist *.KVX rename *.KVX *.XVK
if exist *.mid rename *.mid *.idm
copy BLOOD.RFF BPF.RFF
copy SOUNDS.RFF BPFSND.RFF
start /w /b 7za e -y RESS.BPF *.KVX *.RFS *.RAW *.MID
cscript pause.vbs 3000 > nul
start /w /b BARF.EXE BPFSND.RFF @SOUNDS.RFS
cscript pause.vbs 3000 > nul
start /w /b barf.exe BPF.RFF @voxels.rfs
cscript pause.vbs 3000 > nul
start /w /b BARF.EXE BPFSND.RFF @SOUNDS.RFS -a *.RAW
cscript pause.vbs 3000 > nul
start /w /b BARF.EXE BPFSND.rff -a *.mid
cscript pause.vbs 3000 > nul
del /f /q *.kvx
del /f /q *.BAK
del /f /q *.RAW
del /f /q *.mid
del /f /q *.vbs
del /f /q *.rfs
if exist *.WAR rename *.WAR *.RAW
if exist *.XVK rename *.XVK *.KVX
if exist *.idm rename *.idm *.mid
cls
echo msgbox "Successfully Patched! Please read about updating before you start game.", vbOKOnly, "Bloody Pulp Fiction">msg.vbs
cscript msg.vbs > nul
start Upto12\NOTES.TXT
7za a -tzip Upto12_back.zip .\UPto12\
if exist UPto12\*.* del /f /q UPto12\*.*
rmdir Upto12 
del /f /q *.vbs
exit
