Advertisement
iKurdo

Iniciar servidor con BEC

Jun 20th, 2020 (edited)
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.63 KB | None | 0 0
  1. @echo off
  2. TITLE DayZ SA Server - Status
  3. COLOR 0A
  4.     :: DEFINE las siguientes variables cuando corresponda a su instalación
  5.     SET DayZServerPath="C:\DZServer"
  6.     SET BECPath="C:\BEC"
  7.     :: _______________________________________________________________
  8.  
  9. goto checkServer
  10. pause
  11.  
  12. :checkServer
  13. tasklist /fi "imagename eq DayZServer_x64.exe" 2>NUL | find /i /n "DayZServer_x64.exe">NUL
  14. if "%ERRORLEVEL%"=="0" goto checkBEC
  15. cls
  16. echo El servidor no se está ejecutando, chekeando...
  17. goto killServer
  18.  
  19. :checkBEC
  20. tasklist /fi "imagename eq BEC.exe" 2>NUL | find /i /n "BEC.exe">NUL
  21. if "%ERRORLEVEL%"=="0" goto loopServer
  22. cls
  23. echo Bec no se está ejecutando, chekeando...
  24. goto startBEC
  25.  
  26. :loopServer
  27. FOR /L %%s IN (30,-1,0) DO (
  28.     cls
  29.     echo Servidor activo, chekeando en %%s segundos..
  30.     timeout 1 >nul
  31. )
  32. goto checkServer
  33.  
  34. :killServer
  35. taskkill /f /im Bec.exe
  36. taskkill /f /im DayZServer_x64.exe
  37. taskkill /f /im DZSALModServer.exe
  38. goto startServer
  39.  
  40. :startServer
  41. cls
  42. echo Iniciando Servidor.
  43. timeout 1 >nul
  44. cls
  45. echo Iniciando Servidor..
  46. timeout 1 >nul
  47. cls
  48. echo Iniciando Servidor...
  49. cd "%DayZServerPath%"
  50. start DZSALModServer.exe -instanceId=1 -config=serverDZ.cfg -profiles=ServerProfiles -port=2302 -mod=@CF;@CommunityOnlineTools -cpuCount=8 -noFilePatching -dologs -adminlog -freezecheck
  51. FOR /l %%s IN (45,-1,0) DO (
  52.     cls
  53.     echo Iniciando Servidor, espere %%s segundos para iniciar BEC..  
  54.     timeout 1 >nul
  55. )
  56. goto startBEC
  57.  
  58. :startBEC
  59. cls
  60. echo Iniciando BEC.
  61. timeout 1 >nul
  62. cls
  63. echo Iniciando BEC..
  64. timeout 1 >nul
  65. cls
  66. echo Iniciando BEC...
  67. timeout 1 >nul
  68. cd "%BECPath%"
  69. start Bec.exe -f Config.cfg --dsc
  70. goto checkServer
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement