Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. @ECHO OFF
  2.  
  3. CD /d %~dp0
  4. IF "%1"=="-silent" (
  5. SET loud=0
  6. ) ELSE (
  7. SET loud=1
  8. )
  9.  
  10. SET szGame=Opposing Force
  11. SET szModDir=gearbox
  12. SET "scVersion=5.0"
  13.  
  14. SET "mapList=of0a0 of1a1 of1a2 of1a3 of1a4 of1a4b of1a5 of1a5b of1a6 of2a1 of2a1b of2a4 of2a5 of2a6 of3a1 of3a4 of3a5 of3a6 of4a1 of4a2 of4a3 of4a4 of4a5 of5a1 of5a2 of5a3 of5a4 of6a1 of6a2 of6a3 of6a4 of6a4b of6a5"
  15.  
  16. CALL FindHLDirectory.bat szHLDir
  17.  
  18. IF [szHLDir] == [] (
  19. ECHO Could not find Half-Life directory
  20. ECHO Check that Half-Life is installed, and that you have ran it at least once ^(start the game and begin a new game^)
  21. GOTO BROKEN
  22. )
  23.  
  24. SET szBaseContentDir=%szHLDir%\%szModDir%
  25.  
  26. IF NOT EXIST "%szBaseContentDir%" (
  27. ECHO Could not find %szModDir% directory
  28. ECHO Check that %szGame% is installed, and that you have ran it at least once ^(start the game and begin a new game^)
  29. GOTO BROKEN
  30. )
  31.  
  32. ECHO.
  33. ECHO -= Half-Life: %szGame% map support for Sven Co-op %scVersion% =-
  34. ECHO.
  35. ECHO Warning: Around 80MB of free disk space required.
  36. ECHO Installation may take a few minutes; please be patient.
  37. ECHO.
  38.  
  39. ECHO.
  40. ECHO ----------------------------------------------------------------------------
  41. ECHO IMPORTANT: To install %szGame% support, you must own 'Half-Life:
  42. ECHO %szGame%' and have it fully downloaded and installed on Steam!
  43. ECHO ----------------------------------------------------------------------------
  44. ECHO.
  45.  
  46. IF %loud%==1 PAUSE
  47.  
  48. IF NOT EXIST "maps\Ripent.exe" (
  49. ECHO Missing Ripent.exe
  50. GOTO BROKEN
  51. )
  52.  
  53. CALL :GetFirstParam %mapList%
  54.  
  55. IF NOT EXIST "%szBaseContentDir%\maps\%firstParam%.bsp" (
  56. ECHO Missing maps
  57. GOTO BROKEN
  58. )
  59.  
  60. ECHO.
  61. ECHO Copying official maps from installed game...
  62. ECHO.
  63.  
  64. FOR %%m in (%mapList%) do (
  65. COPY "%szBaseContentDir%\maps\%%m.bsp" maps\
  66. )
  67.  
  68. COPY "%szBaseContentDir%\gfx\env\*" gfx\env\
  69.  
  70. ECHO.
  71. ECHO -= Valve's original Half-Life %szGame% maps have been copied. =-
  72. ECHO.
  73.  
  74. ECHO.
  75. ECHO Preparing...
  76. ECHO.
  77.  
  78. unzip.exe -o opfor_support.sven -d maps
  79. CD maps
  80.  
  81. ECHO.
  82. ECHO Importing entity data...
  83. ECHO.
  84.  
  85. FOR %%m in (%mapList%) do (
  86. ripent.exe -import -noinfo %%m.bsp
  87. )
  88.  
  89. ECHO.
  90. ECHO Flushing temporary data...
  91. ECHO.
  92.  
  93. DEL of?a?.ent
  94. DEL of?a?b.ent
  95.  
  96. CD ..
  97.  
  98. GOTO FINISHED
  99.  
  100.  
  101.  
  102. :FINISHED
  103.  
  104. ECHO.
  105. ECHO ----------------------------------------------------------------------------
  106. ECHO Finished!
  107. ECHO ----------------------------------------------------------------------------
  108. ECHO.
  109. ECHO (Unless a bunch of lines saying "ERROR" or "File not found" flashed up... in
  110. ECHO which case you're in trouble.
  111. ECHO.
  112. ECHO If there /aren't/ lots of error messages listed above, things went fine.
  113. ECHO Congratulations!
  114. ECHO.
  115. ECHO Use the "-sp_campaign_portal.bsp" map to play the %szGame%
  116. ECHO single-player chapters in Sven Co-op.
  117. ECHO.
  118. ECHO Close this command prompt window to complete installation.
  119. ECHO.
  120.  
  121. IF %loud%==1 PAUSE
  122. GOTO EXIT
  123.  
  124.  
  125.  
  126. :BROKEN
  127.  
  128. ECHO.
  129. ECHO ----------------------------------------------------------------------------
  130. ECHO ERROR: %szGame% support installation files not found!
  131. ECHO ----------------------------------------------------------------------------
  132. ECHO.
  133. ECHO Ensure that Sven Co-op is correctly installed, and that you are running this
  134. ECHO file from your svencoop\ folder!
  135. ECHO.
  136. ECHO.
  137. ECHO This batch file will now exit.
  138. ECHO.
  139.  
  140. IF %loud%==1 PAUSE
  141. GOTO EXIT
  142.  
  143. rem Batch files can't tokenize variables outside of for for some reason
  144. :GetFirstParam
  145. SET firstParam=%1
  146. GOTO EXIT
  147.  
  148. :EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement