dgibbs

SteamCMD Guardian 1.2 Windows

Sep 7th, 2013
47,306
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ::=======================::
  2. :: SteamCMD Guardian 1.2 ::
  3. :: ckynick254 ::
  4. ::=======================::
  5. set programname=SteamCMD Guardian 1.1
  6. ::=======================::
  7. :: SET YOUR VARIABLES! ::
  8. ::=======================::
  9. set servername=
  10. set username=
  11. set password=
  12. ::=======================::
  13. :: Your folder ::
  14. :: Replace after = ::
  15. ::=======================::
  16. set runcmd=E:\Games\
  17.  
  18. ::=======================::
  19. :: End of variables ::
  20. ::=======================::
  21.  
  22. :: This will keep the window clean and easy to read
  23. @ECHO off
  24.  
  25. :: Sets the title of the window
  26. title %programname% - %servername%
  27.  
  28. :: Clears the window incase there is anything there
  29. cls
  30. COLOR 1f
  31. CD %runcmd%
  32.  
  33. :: Prints to the window what we are doing
  34. ECHO %programname% has been started!
  35. :start
  36. ECHO.
  37. ECHO.
  38. ECHO ##############################################################
  39. ECHO # Dedicated Server #
  40. ECHO # 1 - Half-Life: Deathmatch and Counter-Strike #
  41. ECHO # 2 - Counter-Strike: Global Offensive #
  42. ECHO # 3 - Nuclear Dawn Dedicated Server #
  43. ECHO # 4 - Red Orchestra Dedicated Server #
  44. ECHO # 5 - Red Orchestra 2: Heroes of Stalingrad Dedicated Server #
  45. ECHO # 6 - Killing Floor Dedicated Server #
  46. ECHO # 7 - Team Fortress 2 Dedicated Server Beta #
  47. ECHO # 8 - HELP! #
  48. ECHO # 9 - Exit #
  49. ECHO ##############################################################
  50. ECHO.
  51. ECHO.
  52.  
  53. :: Delete variable %A%
  54. SET "A="
  55. SET /P A=Set Your Choice And Press Enter:
  56. ECHO Loading .........
  57. IF "%A%"=="1" set app=90
  58. IF "%A%"=="2" set app=740
  59. IF "%A%"=="3" set app=111710
  60. IF "%A%"=="4" set app=223240
  61. IF "%A%"=="5" set app=212542
  62. IF "%A%"=="6" set app=215350
  63. IF "%A%"=="7" set app=229830
  64. IF "%A%"=="8" ECHO.
  65. IF "%A%"=="8" ECHO https://developer.valvesoftware.com/wiki/SteamCMD
  66. IF "%A%"=="8" ECHO.
  67. IF "%A%"=="8" PAUSE
  68. IF "%A%"=="8" goto start
  69. IF "%A%"=="9" EXIT
  70.  
  71. :: This is a return point in case the server crashes or is closed
  72. :restart
  73. ECHO.
  74. ECHO (%date%)(%time%) %servername% is now ONLINE
  75. ECHO Watching %servername% for crashes...
  76. >> "%servername%.log" ECHO.
  77. >> "%servername%.log" ECHO (%date%)(%time%) %servername% is now ONLINE
  78. >> "%servername%.log" ECHO (%date%)(%time%) Watching %servername% for crashes...
  79.  
  80. ::Start the actual update window
  81. start /wait steamcmd +login %username% %password% +force_install_dir %runcmd%%app%Server\ +app_update %app% validate
  82. ECHO (%time%) WARNING: srcds closed or crashed, restarting.
  83. ECHO.
  84. ECHO (%date%)(%time%) Crash or Close detected!
  85. ECHO %servername% is now restarting...
  86. >> "%servername%.log" ECHO.
  87. >> "%servername%.log" ECHO (%date%)(%time%) Crash or Close detected!
  88. >> "%servername%.log" ECHO (%date%)(%time%) %servername% is now restarting...
  89.  
  90. ::Server crashed or closed, so we point it to the return point to start the server again
  91. GOTO restart
RAW Paste Data