Jump to content
Mauricio Britto

[RELEASE]BEC for DayZ SA

Recommended Posts

Sorry for my inglish

 

Download: https://github.com/worldwidesorrow/BattlEye-Extended-Controls

Modify locations

server_start.bat

@ echo off
pushd %~dp0
cd /d %CD%
taskkill /f /im bec.exe
taskkill /f /im DayZServer_x64.exe
ping 127.0.0.1 -n 2 >NUL

rem ***if you are using a different map, then call a different batch file below.
call iniciar.bat

ping 127.0.0.1 -n 2 >NUL
cd "C:\DayZServer\BattlEye\bec"
start /min Bec.exe -f Config.cfg --dsc
ping 127.0.0.1 -n 2 >NUL
exit

servermonitor.bat

@echo off
title DayZ Standalone Brasil - Monitoramento

:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
cls
echo O servidor não esta rodando, iniciando  agora... 
start "Iniciando servidor" /wait "C:\DayZServer\start_server.bat"
echo Servidor iniciado com sucesso, trocando agora para o monitoramento
timeout 30
cls
goto started

:loop
cls
echo Servidor esta rodando, continuando com o monitoramento...
:started

taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq DayZ">NUL
C:\Windows\System32\timeout /t 20
C:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

iniciar.bat

@echo off
start /high DayZServer_x64.exe "-config=configs.cfg" -dologs -adminlog -profiles=C:\Users\plurnstyle\Documents\DayZ -netlog -freezecheck -noFilePatching -cpuCount=4 -BEpath=C:\DayZServer\BattlEye

 config

# This config file is only provided as an example file.
# Edit it to sute your needs.
# For more info on how to edit this file. use the Readme.txt file or visit http://www.ibattle.org/install-and-configure


#--------------------------------------------------------------------------------------------------------
[Bec]
#--------------------------------------------------------------------------------------------------------

# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 127.0.0.1


# Set the port to the server. default port is 2302
Port = 2302


# Set the path to the BattlEye directory that is currently in use by the server.
BePath = C:\DayZServer\BattlEye


# Set the path to your Admins.xml file containing your admins.
Admins = Admins.xml


# Set the path to your Commands.xml file.
Commands = Commands.xml


#--------------------------------------------------------------------------------------------------------
[Misc]
#--------------------------------------------------------------------------------------------------------

# Auto run loadbans when ban file(s) changes. 
# 1 or True will turn it on.
# 0 or False will turn it off. 
# If this parameter is not defined it will use False as default.

AutoLoadBans = True

# Set which type of hacks that will be added to your banlist.
# 0 = none. 1 = GameHack. 2 = Battleye Hack. 3 = both GameHack & Battleye Hack. 
# value 3 is set as default if this parameter is not defined.
Ban = 3


# Set the names of your custom ban files, Separate each file with "," (comma): file1.txt, banfile2.txt, newfile.txt
# If you do not use any custom ban files. delete this option or leave this option commented.
# This option will check ban files for changes and automatic do a loadbans file when a file gets changed
# Do not specify the default bans.txt file here.
# BeCustomBanFiles = Bans1.txt, file2.txt, file3.txt


# Set the height & width of Becs console window
ConsoleHeight	= 45
ConsoleWidth	= 165


# Only allow english chars.
AsciiNickOnly = False


# Only allow english chars to be typed on the chat. Note, Warnings must be enabled. 0 or more.
AsciiChatOnly = True


# If AsciiChatOnly is set True. you can define none english chars that will be accepted.
# You separate each char with a , "note you need to define lower and upper case of the chars."
IgnoreChatChars	= €,£,æ,Æ,ø,Ø,å,Å,ö,ä,ü,ß


# Set the amount of warnings a player will get before kicked. -1 is disabled. 0 instant kick
# 1 == one warning on a bad word. next bad word results in kick
Warnings = 3
ServerExeName = DayZServer_x64.exe


# Kick players who has listed chars in their name when they connect
DisallowPlayerNameChars	= []{}()0123456789


# Min length, kicks players who has to short name when they connect.
MinPlayerNameLength	= 3


# Max length, kicks players who has to long name when they connect.
MaxPlayerNameLength	= 16


# Set the name of your Arma3server.exe if it has been renamed from arma3server.exe to something else!
# if the exe has its original name. comment it out.
# DO NOT SET FULL PATH TO THE EXE FILE
# ServerExeName = NewArmaExeName.exe


# Set path to the file containing a list of bad words. Note, Warnings must be enabled. 0 or more.
WordFilterFile = BadWords.txt


# Set the path to the file containing whitelisted guids.
# WhiteListFile = WhiteList.txt


# Set custom whitelist kick message. Text must be in ascii letters.  MAX 58 CHARS. BE only does ascii on messages
WhiteListKickMsg = You are not whitelisted on this server.


# Kick people with offensive names
NickFilterFile = BadNames.txt


# Set the path to the Scheduler.xml file.
Scheduler = Scheduler.xml


# Kick people who are idleing in the lobby, kick will happen after given time, Min time is 90 sec. use 0 to disable this function.
KickLobbyIdlers	= 300


# If enabled. Bec will create separate chat files for each channel along with the main file.
ChatChannelFiles = true

# Set the amount of Normal players who can connect. Set it to -1 to disable it. 
# If set to 0 it means only players who are listed in the Admins.xml, (or whatever you call it) will be able to connect to the server.
# Quick Example 1: server can holed 50 players. and you want to reserve 5 slots for admins. then set SlotLimit to 45.
# Quick Example 2: server can holed 50 players. and you want to reserve 5 slots for admins and 5 slots for friends. then set SlotLimit to 40,
# AND edit your admins.xml. ADD in all your frineds guid and remaining data, put them in group example 100. or whatever you feel likt.
# by using this method you can give some of your friends some access to some commands if you like or none. 
# in general this is works like .Whitelisting X player slots for admins and friends, while leaving the remaining Y slots for public.
SlotLimit = -1

# Set the message people will get when they try to connect and is not whitelisted. Text must be in ascii letters.
SlotLimitKickMsg = O servidor está cheio


# The amount of time Bec will wait for the server to start up.
Timeout = 120


#--------------------------------------------------------------------------------------------------------
[Reporter]
#--------------------------------------------------------------------------------------------------------
# Reporter account. Fill in the username and password for your reporter account.
# GameHacks, BattlEye Hacks will be reported to a database. all players who connect will also be checked against this database.

# Set the Username for your account
#User = alfred


# Set the Password for your account
#Password = 123456


#--------------------------------------------------------------------------------------------------------
[ChatRestriction]
#--------------------------------------------------------------------------------------------------------
# Set max amount of chat lines a player is allowed to send for each channel. 
# Going passed the number will result in kick. -1 is disabled, 0 instant kick.
# If the number is higher than 0 players will be sent warnings.

Lobby = -1
Global = -1
Side = -1
Group = -1
Vehicle	= -1
Command	= -1
Commander = -1
Direct = -1


#--------------------------------------------------------------------------------------------------------
[ChatSpam]
#--------------------------------------------------------------------------------------------------------

# Set max amount of chat lines per channel allowed within given time frame.
# Set the values to 0 to disable this function(s)

# Quick Example:
# Lobby = 5
# Lobby_Time_Lower = 10
# Lobby_Time_Upper = 15

# If the time between each new chatlines from a player is less than CHANNEL_Time_Lower the spam counter increases by + 1. 
# Consider the CHANNEL (Lobby) as the spam counter.
# When a player has (CHANNEL - 1) in spam counting. a warning will be sent to whom it may concern.
# If the time between each new chatline from the player is Greater than CHANNEL_Time_Lower and Less than CHANNEL_Time_Upper the spam counter stay as it is.
# If the time since the last chatline is greater then CHANNEL_Time_Upper the spam counter is reset to 1.
# To get optimal result play around a bit with the values on your server.

Lobby = 0
Lobby_Time_Lower = 0
Lobby_Time_Upper = 0

Global = 0
Global_Time_Lower = 0
Global_Time_Upper = 0

Side = 0
Side_Time_Lower	= 0
Side_Time_Upper	= 0

Group = 2
Group_Time_Lower = 1
Group_Time_Upper = 3

Vehicle	= 0
Vehicle_Time_Lower = 0
Vehicle_Time_Upper = 0

Command = 0
Command_Time_Lower = 0
Command_Time_Upper = 0

Commander = 0
Commander_Time_Lower = 0
Commander_Time_Upper = 0

Direct = 0
Direct_Time_Lower = 0
Direct_Time_Upper = 0

Scheduler.xml for 6 hours

<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<Scheduler>
  <!-- *** Restart at 12:00:00 AM ***-->
  <job id="0">
    <day>1,2,3,4,5,6,7</day>
    <start>23:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 30 minutos</cmd>
  </job>
  <job id="1">
    <day>1,2,3,4,5,6,7</day>
    <start>23:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 15 minutos</cmd>
  </job>
  <job id="2">
    <day>1,2,3,4,5,6,7</day>
    <start>23:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 5 minutos</cmd>
  </job>
  <job id="3">
    <day>1,2,3,4,5,6,7</day>
    <start>23:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 1 minuto</cmd>
  </job>
  <job id="4">
    <day>1,2,3,4,5,6,7</day>
    <start>00:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 6:00:00 AM ***-->
  <job id="5">
    <day>1,2,3,4,5,6,7</day>
    <start>05:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 30 minutos</cmd>
  </job>
  <job id="6">
    <day>1,2,3,4,5,6,7</day>
    <start>05:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 15 minutos</cmd>
  </job>
  <job id="7">
    <day>1,2,3,4,5,6,7</day>
    <start>05:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 5 minutos</cmd>
  </job>
  <job id="8">
    <day>1,2,3,4,5,6,7</day>
    <start>05:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 1 minuto</cmd>
  </job>
  <job id="9">
    <day>1,2,3,4,5,6,7</day>
    <start>06:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 12:00:00 AM ***-->
  <job id="10">
    <day>1,2,3,4,5,6,7</day>
    <start>11:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 30 minutos</cmd>
  </job>
  <job id="11">
    <day>1,2,3,4,5,6,7</day>
    <start>11:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 15 minutos</cmd>
  </job>
  <job id="12">
    <day>1,2,3,4,5,6,7</day>
    <start>11:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 5 minutos</cmd>
  </job>
  <job id="13">
    <day>1,2,3,4,5,6,7</day>
    <start>11:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 1 minuto</cmd>
  </job>
  <job id="14">
    <day>1,2,3,4,5,6,7</day>
    <start>12:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
  <!-- *** Restart at 18:00:00 PM ***-->
  <job id="15">
    <day>1,2,3,4,5,6,7</day>
    <start>17:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 30 minutos</cmd>
  </job>
  <job id="16">
    <day>1,2,3,4,5,6,7</day>
    <start>17:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 15 minutos</cmd>
  </job>
  <job id="17">
    <day>1,2,3,4,5,6,7</day>
    <start>17:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 5 minutos</cmd>
  </job>
  <job id="18">
    <day>1,2,3,4,5,6,7</day>
    <start>17:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Reiniciando servidor em 1 minuto</cmd>
  </job>
  <job id="19">
    <day>1,2,3,4,5,6,7</day>
    <start>18:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>
</Scheduler>

 

  • Beans 1

Share this post


Link to post
Share on other sites

my question is where do we put all of this stuff i would love to use it and have my server reboot every 3 hours but i dont follow

Share this post


Link to post
Share on other sites

So these are .bat files.  They are text files that launch a program with script parameters.  In this case they work with BEC.  Unfortunately half of it is in Spanish so it's not easy to decipher.

Share this post


Link to post
Share on other sites

Ok I think I have this figured out, Thank you Mauricio!  These have been really helpful.

So this script:

@echo off
title DayZ Standalone Brasil - Monitoramento

:start
C:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
cls
echo O servidor não esta rodando, iniciando  agora... 
start "Iniciando servidor" /wait "E:\SteamLibrary\steamapps\common\DayZServer\server_restart.bat"
echo Servidor iniciado com sucesso, trocando agora para o monitoramento
timeout 30
cls
goto started

:loop
cls
echo Servidor esta rodando, continuando com o monitoramento...
:started

taskkill /f /im WerFault.exe /fi "WINDOWTITLE eq DayZ">NUL
C:\Windows\System32\timeout /t 20
C:\Windows\System32\tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | C:\Windows\System32\find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loop
goto start

Is a .bat that needs to be running all the time.  it checks every 20 seconds to see if the server is up.  if the server is not up, it runs your restarting server batch.  I kept the Portuguese in for flavor.

You also need to set up the scheduler.  I have added this to scheduler.xml:

 <!-- *** Restart at 12:00:00 AM ***-->
  <job id="0">
    <day>1,2,3,4,5,6,7</day>
    <start>23:30:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restarting server in 30 minutes!</cmd>
  </job>
  <job id="1">
    <day>1,2,3,4,5,6,7</day>
    <start>23:45:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restarting server in 15 minutes!</cmd>
  </job>
  <job id="2">
    <day>1,2,3,4,5,6,7</day>
    <start>23:55:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restarting server in 5 minutes!</cmd>
  </job>
  <job id="3">
    <day>1,2,3,4,5,6,7</day>
    <start>23:59:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>say -1 Restarting server in 1 minute!</cmd>
  </job>
  <job id="4">
    <day>1,2,3,4,5,6,7</day>
    <start>00:00:00</start>
    <runtime>000000</runtime>
    <loop>0</loop>
    <cmd>#shutdown</cmd>
  </job>

Copy paste that and change the times for every restart.

Now when the scheduler has a restart, it shuts down the server.  then the monitor restarts the server.  Note that you also need a batch that starts the server with all of your launch specs that the monitor can target.  I haven't fully tested this yet so I cant 100% guarantee it will work, but the monitor system works for me.  Anyone feel free to chime in with help!

 

.

Share this post


Link to post
Share on other sites

I made some changes. It's just one .bat file now, hopefully this is useful to someone.

 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::SteamCMD.exe path
set STEAM_CMD_LOCATION="C:\SteamCMD"
set STEAM_USERNAME="anonymous"
::DayZServer_64.exe path
set DAYZ-SA_SERVER_LOCATION="C:\steamcmd\DayZ-sa_server"
::Bec.exe path
set BEC_LOCATION="C:\steamcmd\DayZ-sa_server\Bec"
::::::::::::::

echo Agusanz
goto checksv
pause

:checksv
tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto checkbec
cls
echo Server is not running, taking care of it..
goto killsv

:checkbec
tasklist /FI "IMAGENAME eq Bec.exe" 2>NUL | find /I /N "Bec.exe">NUL
if "%ERRORLEVEL%"=="0" goto loopsv
cls
echo Bec is not running, taking care of it..
goto startbec

:loopsv
FOR /L %%s IN (30,-1,0) DO (
	cls
	echo Server is running. Checking again in %%s seconds.. 
	timeout 1 >nul
)
goto checksv

:killsv
taskkill /f /im Bec.exe
taskkill /f /im DayZServer_x64.exe
goto updatesv

:updatesv
cls
echo Updating DayZ SA Server.
timeout 1 >nul
cls
echo Updating DayZ SA Server..
timeout 1 >nul
cls
echo Updating DayZ SA Server...
cd "%STEAM_CMD_LOCATION%"
start /wait "" steamcmd.exe +login "%STEAM_USERNAME%" +force_install_dir %~dp0 +app_update 223350 validate +quit
goto startsv

:startsv
cls
echo Starting DayZ SA Server.
timeout 1 >nul
cls
echo Starting DayZ SA Server..
timeout 1 >nul
cls
echo Starting DayZ SA Server...
cd "%DAYZ-SA_SERVER_LOCATION%"
start DayZServer_x64.exe -config=serverDZ.cfg -port=2302 -profiles=C:\Users\%USER%\Documents\DayZ Server -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\steamcmd\DayZ-sa_server\battleye -cpuCount=4
FOR /L %%s IN (45,-1,0) DO (
	cls
	echo Initializing server, wait %%s seconds to initialize Bec.. 
	timeout 1 >nul
)
goto startbec

:startbec
cls
echo Starting Bec.
timeout 1 >nul
cls
echo Starting Bec..
timeout 1 >nul
cls
echo Starting Bec...
timeout 1 >nul
cd "%BEC_LOCATION%"
start Bec.exe -f Config.cfg
goto checksv

 

Edited by Agusanz
Fix

Share this post


Link to post
Share on other sites

Yeah.. it execute an auto-update via SteamCMD, DayZServer_x64.exe and Bec.exe, and then it keeps monitoring if DayZServer_x64.exe and Bec.exe are running each 30 seconds.
That should do the trick for most of us

Edited by Agusanz
typo

Share this post


Link to post
Share on other sites

its throwing me a error up about SteamCMD i dont use it how do i get it gone lol

Share this post


Link to post
Share on other sites
1 minute ago, mrwolv said:

its throwing me a error up about SteamCMD i dont use it how do i get it gone lol

This one doesnt use SteamCMD and Bec, it should work:

 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::DayZServer_64.exe path
set DAYZ-SA_SERVER_LOCATION="C:\steamcmd\DayZ-sa_server"
::::::::::::::

echo Agusanz
goto checksv
pause

:checksv
tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loopsv
cls
echo Server is not running, taking care of it..
goto killsv
goto startsv

:loopsv
FOR /L %%s IN (30,-1,0) DO (
	cls
	echo Server is running. Checking again in %%s seconds.. 
	timeout 1 >nul
)
goto checksv

:killsv
taskkill /f /im DayZServer_x64.exe

:startsv
cls
echo Starting DayZ SA Server.
timeout 1 >nul
cls
echo Starting DayZ SA Server..
timeout 1 >nul
cls
echo Starting DayZ SA Server...
cd "%DAYZ-SA_SERVER_LOCATION%"
start DayZServer_x64.exe -config=serverDZ.cfg -port=2302 -profiles=C:\Users\%USER%\Documents\DayZ Server -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\steamcmd\DayZ-sa_server\battleye -cpuCount=4
goto checksv

 

Share this post


Link to post
Share on other sites

all im after is a way to auto restart my server every 3 hours i currently use a .bat file to load my server and to check if my server has frozen or crashed and this is it below  but if someone can mod that for me so it will work with a scheduler.xml i do have battleye on just the cfg file and the be dll

 

 @echo off
    cls
    
    set version=1.0
    set wat=Dayz Standalone .63

    title %wat% Watchdog

    cd C:\DayZServer
    
    :watchdog
    echo (%time%) %wat% started.
    start "Dayz_SA" /wait /affinity FF /high "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -dologs -BEPath=C:\DayZServer\Battleye
    echo (%time%) %wat% closed or crashed, restarting.
    goto watchdog  

Share this post


Link to post
Share on other sites
1 minute ago, Agusanz said:

This one doesnt use SteamCMD and Bec, it should work:

 


@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::DayZServer_64.exe path
set DAYZ-SA_SERVER_LOCATION="C:\steamcmd\DayZ-sa_server"
::::::::::::::

echo Agusanz
goto checksv
pause

:checksv
tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto loopsv
cls
echo Server is not running, taking care of it..
goto killsv
goto startsv

:loopsv
FOR /L %%s IN (30,-1,0) DO (
	cls
	echo Server is running. Checking again in %%s seconds.. 
	timeout 1 >nul
)
goto checksv

:killsv
taskkill /f /im DayZServer_x64.exe

:startsv
cls
echo Starting DayZ SA Server.
timeout 1 >nul
cls
echo Starting DayZ SA Server..
timeout 1 >nul
cls
echo Starting DayZ SA Server...
cd "%DAYZ-SA_SERVER_LOCATION%"
start DayZServer_x64.exe -config=serverDZ.cfg -port=2302 -profiles=C:\Users\%USER%\Documents\DayZ Server -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\steamcmd\DayZ-sa_server\battleye -cpuCount=4
goto checksv

 

ok thanks so how/where do i set it to restartr my server at set time or every 3 hours

Share this post


Link to post
Share on other sites
2 minutes ago, mrwolv said:

all im after is a way to auto restart my server every 3 hours i currently use a .bat file to load my server and to check if my server has frozen or crashed and this is it below  but if someone can mod that for me so it will work with a scheduler.xml i do have battleye on just the cfg file and the be dll

 

 @echo off
    cls
    
    set version=1.0
    set wat=Dayz Standalone .63

    title %wat% Watchdog

    cd C:\DayZServer
    
    :watchdog
    echo (%time%) %wat% started.
    start "Dayz_SA" /wait /affinity FF /high "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -dologs -BEPath=C:\DayZServer\Battleye
    echo (%time%) %wat% closed or crashed, restarting.
    goto watchdog  

You're missing the point here. This is an script to prevent your server from random crashing. It keeps executing it so u can maintain it online.
if you want to play with restarts, messages and scheduler.xml, you need to configure your Bec.exe Battleye Extended Controls and use it. Bec is a tool that connects to your server as admin and execute commands at set times (scheduler.xml..)
http://ibattle.org/

Share this post


Link to post
Share on other sites
Just now, Agusanz said:

You're missing the point here. This is an script to prevent your server from random crashing. It keeps executing it so u can maintain it online.
if you want to play with restarts, messages and scheduler.xml, you need to configure your Bec.exe Battleye Extended Controls and use it. Bec is a tool that connects to your server as admin and execute commands at set times (scheduler.xml..)
http://ibattle.org/

ahhhh ok sorry my bad yeah i tryed to install Battleye Extended Controls jsut would not work for me would not find my server lol

Share this post


Link to post
Share on other sites
7 minutes ago, mrwolv said:

ahhhh ok sorry my bad yeah i tryed to install Battleye Extended Controls jsut would not work for me would not find my server lol

Try this version: http://www.mediafire.com/file/k6nf7810n4pu9si/Bec.zip
It's 1.496, latest doesnt work for me neither.

 

Use this version of the script if you want to use DayZServer_x64.exe and Bec.exe
 

@echo off
TITLE DayZ SA Server - Status
COLOR 0A
:: Variables::
::DayZServer_64.exe path
set DAYZ-SA_SERVER_LOCATION="C:\steamcmd\DayZ-sa_server"
::Bec.exe path
set BEC_LOCATION="C:\steamcmd\DayZ-sa_server\Bec"
::::::::::::::

echo Agusanz
goto checksv
pause

:checksv
tasklist /FI "IMAGENAME eq DayZServer_x64.exe" 2>NUL | find /I /N "DayZServer_x64.exe">NUL
if "%ERRORLEVEL%"=="0" goto checkbec
cls
echo Server is not running, taking care of it..
goto killsv

:checkbec
tasklist /FI "IMAGENAME eq Bec.exe" 2>NUL | find /I /N "Bec.exe">NUL
if "%ERRORLEVEL%"=="0" goto loopsv
cls
echo Bec is not running, taking care of it..
goto startbec

:loopsv
FOR /L %%s IN (30,-1,0) DO (
	cls
	echo Server is running. Checking again in %%s seconds.. 
	timeout 1 >nul
)
goto checksv

:killsv
taskkill /f /im Bec.exe
taskkill /f /im DayZServer_x64.exe
goto startsv

:startsv
cls
echo Starting DayZ SA Server.
timeout 1 >nul
cls
echo Starting DayZ SA Server..
timeout 1 >nul
cls
echo Starting DayZ SA Server...
cd "%DAYZ-SA_SERVER_LOCATION%"
start DayZServer_x64.exe -config=serverDZ.cfg -port=2302 -profiles=C:\Users\%USER%\Documents\DayZ Server -dologs -adminlog -netlog -freezecheck -noFilePatching -BEpath=C:\steamcmd\DayZ-sa_server\battleye -cpuCount=4
FOR /L %%s IN (45,-1,0) DO (
	cls
	echo Initializing server, wait %%s seconds to initialize Bec.. 
	timeout 1 >nul
)
goto startbec

:startbec
cls
echo Starting Bec.
timeout 1 >nul
cls
echo Starting Bec..
timeout 1 >nul
cls
echo Starting Bec...
timeout 1 >nul
cd "%BEC_LOCATION%"
start Bec.exe -f Config.cfg
goto checksv

 

Edited by Agusanz
Script added

Share this post


Link to post
Share on other sites

Here is a simple .Bat file i am using for BEC. 

@Echo off
title DayZ Server Monitor
color 02
@echo Do not close this window!


    Title DayZ Server started at %time% - %date%
    echo.
    echo DayZ Server started at %time% - %date%
    echo.
goto startup
:restart
    Title DayZ Server restarted at %time% - %date%
    echo.
    echo DayZ Server restarted at %time% - %date%
    echo.
:startup
	c:
	cd "C:\Workfolder\DayZServer\BEC"
	start /min Bec.exe -f Config.cfg --dsc
	
	cd "C:\Workfolder\DayZServer\" 
    start "" /HIGH /min /wait "DayZServer_x64.exe" -config=serverDZ.cfg -port=2302 -profiles=C:\Workfolder\DayZServer\AdminProfile\Admin -dologs -adminlog -netlog -freezecheck -noFilePatching -cpuCount=4
goto restart

 

Edited by Violt

Share this post


Link to post
Share on other sites
4 minutes ago, Violt said:

Here is a simple .Bat file i am using for BEC. 

 

which version of Bec?

Share this post


Link to post
Share on other sites
5 minutes ago, Agusanz said:

which version of Bec?

The Latest

I downloaded mine on http://ibattle.org/downloads/ (Click on the arrow) 

It's working perfectly for DayZ Standalone

Edited by Violt

Share this post


Link to post
Share on other sites
1 minute ago, Violt said:

I downloaded mine on http://ibattle.org/downloads/ (Click on the arrow) 

It's working perfectly for DayZ Standalone

Damn.. it's not working for me. i had to use an older version. Do you mind uploading ur config.cfg?

Share this post


Link to post
Share on other sites
2 minutes ago, Agusanz said:

Damn.. it's not working for me. i had to use an older version. Do you mind uploading ur config.cfg?

Still working on my scheduler.xml so i have it commented out atm. 

Here's my config.cfg 

# This config file is only provided as an example file.
# Edit it to sute your needs.
# For more info on how to edit this file. use the Readme.txt file or visit http://www.ibattle.org/install-and-configure


#--------------------------------------------------------------------------------------------------------
[Bec]
#--------------------------------------------------------------------------------------------------------

# Set the ip to your server. normally 127.0.0.1 will be fine.
Ip = 127.0.0.1


# Set the port to the server. default port is 2302
Port = 2302


# Set the path to the BattlEye directory that is currently in use by the server.
BePath = C:\Workfolder\DayZServer\AdminProfile\Admin\BattlEye


# Set the path to your Admins.xml file containing your admins.
Admins = Admins.xml


# Set the path to your Commands.xml file.
Commands = Commands.xml


#--------------------------------------------------------------------------------------------------------
[Misc]
#--------------------------------------------------------------------------------------------------------

# Auto run loadbans when ban file(s) changes. 
# 1 or True will turn it on.
# 0 or False will turn it off. 
# If this parameter is not defined it will use False as default.

AutoLoadBans = True

# Set which type of hacks that will be added to your banlist.
# 0 = none. 1 = GameHack. 2 = Battleye Hack. 3 = both GameHack & Battleye Hack. 
# value 3 is set as default if this parameter is not defined.
Ban = 3


# Set the names of your custom ban files, Separate each file with "," (comma): file1.txt, banfile2.txt, newfile.txt
# If you do not use any custom ban files. delete this option or leave this option commented.
# This option will check ban files for changes and automatic do a loadbans file when a file gets changed
# Do not specify the default bans.txt file here.
#BeCustomBanFiles = Bans1.txt, file2.txt, file3.txt


# Set the height & width of Becs console window
ConsoleHeight    = 45
ConsoleWidth    = 165


# Only allow english chars.
#AsciiNickOnly = False


# Only allow english chars to be typed on the chat. Note, Warnings must be enabled. 0 or more.
#AsciiChatOnly = True


# If AsciiChatOnly is set True. you can define none english chars that will be accepted.
# You separate each char with a , "note you need to define lower and upper case of the chars."
#IgnoreChatChars    = €,£,æ,Æ,ø,Ø,å,Å,ö,ä,ü,ß


# Set the amount of warnings a player will get before kicked. -1 is disabled. 0 instant kick
# 1 == one warning on a bad word. next bad word results in kick
Warnings = 3


# Kick players who has listed chars in their name when they connect
#DisallowPlayerNameChars    = []{}()0123456789


# Min length, kicks players who has to short name when they connect.
MinPlayerNameLength    = 2


# Max length, kicks players who has to long name when they connect.
MaxPlayerNameLength    = 32


# Set the name of your Arma3server.exe if it has been renamed from arma3server.exe to something else!
# if the exe has its original name. comment it out.
# DO NOT SET FULL PATH TO THE EXE FILE
#ServerExeName = NewArmaExeName.exe


# Set path to the file containing a list of bad words. Note, Warnings must be enabled. 0 or more.
#WordFilterFile = BadWords.txt


# Set the path to the file containing whitelisted guids.
#WhiteListFile = WhiteList.txt


# Set custom whitelist kick message. Text must be in ascii letters.  MAX 58 CHARS. BE only does ascii on messages
WhiteListKickMsg = You are not whitelisted on this server.


# Kick people with offensive names
#NickFilterFile = BadNames.txt


# Set the path to the Scheduler.xml file.
#Scheduler = Scheduler.xml


# Kick people who are idleing in the lobby, kick will happen after given time, Min time is 90 sec. use 0 to disable this function.
KickLobbyIdlers    = 0


# If enabled. Bec will create separate chat files for each channel along with the main file.
#ChatChannelFiles = false

# Set the amount of Normal players who can connect. Set it to -1 to disable it. 
# If set to 0 it means only players who are listed in the Admins.xml, (or whatever you call it) will be able to connect to the server.
# Quick Example 1: server can holed 50 players. and you want to reserve 5 slots for admins. then set SlotLimit to 45.
# Quick Example 2: server can holed 50 players. and you want to reserve 5 slots for admins and 5 slots for friends. then set SlotLimit to 40,
# AND edit your admins.xml. ADD in all your frineds guid and remaining data, put them in group example 100. or whatever you feel likt.
# by using this method you can give some of your friends some access to some commands if you like or none. 
# in general this is works like .Whitelisting X player slots for admins and friends, while leaving the remaining Y slots for public.
SlotLimit = -1

# Set the message people will get when they try to connect and is not whitelisted. Text must be in ascii letters.
SlotLimitKickMsg = The Server has reached its player limit.


# The amount of time Bec will wait for the server to start up.
Timeout = 30


#--------------------------------------------------------------------------------------------------------
[Reporter]
#--------------------------------------------------------------------------------------------------------
# Reporter account. Fill in the username and password for your reporter account.
# GameHacks, BattlEye Hacks will be reported to a database. all players who connect will also be checked against this database.

# Set the Username for your account
#User = alfred


# Set the Password for your account
#Password = 123456


#--------------------------------------------------------------------------------------------------------
[ChatRestriction]
#--------------------------------------------------------------------------------------------------------
# Set max amount of chat lines a player is allowed to send for each channel. 
# Going passed the number will result in kick. -1 is disabled, 0 instant kick.
# If the number is higher than 0 players will be sent warnings.

Lobby = -1
Global = -1
Side = -1
Group = -1
Vehicle    = -1
Command    = -1
Commander = -1
Direct = -1


#--------------------------------------------------------------------------------------------------------
[ChatSpam]
#--------------------------------------------------------------------------------------------------------

# Set max amount of chat lines per channel allowed within given time frame.
# Set the values to 0 to disable this function(s)

# Quick Example:
# Lobby = 5
# Lobby_Time_Lower = 10
# Lobby_Time_Upper = 15

# If the time between each new chatlines from a player is less than CHANNEL_Time_Lower the spam counter increases by + 1. 
# Consider the CHANNEL (Lobby) as the spam counter.
# When a player has (CHANNEL - 1) in spam counting. a warning will be sent to whom it may concern.
# If the time between each new chatline from the player is Greater than CHANNEL_Time_Lower and Less than CHANNEL_Time_Upper the spam counter stay as it is.
# If the time since the last chatline is greater then CHANNEL_Time_Upper the spam counter is reset to 1.
# To get optimal result play around a bit with the values on your server.

Lobby = 0
Lobby_Time_Lower = 0
Lobby_Time_Upper = 0

Global = 0
Global_Time_Lower = 0
Global_Time_Upper = 0

Side = 0
Side_Time_Lower    = 0
Side_Time_Upper    = 0

Group = 2
Group_Time_Lower = 1
Group_Time_Upper = 3

Vehicle    = 0
Vehicle_Time_Lower = 0
Vehicle_Time_Upper = 0

Command = 0
Command_Time_Lower = 0
Command_Time_Upper = 0

Commander = 0
Commander_Time_Lower = 0
Commander_Time_Upper = 0

Direct = 0
Direct_Time_Lower = 0
Direct_Time_Upper = 0


 

Edited by Violt
  • Thanks 1

Share this post


Link to post
Share on other sites

Sadly, it doesnt work. I dont know why latest says server is not online while 1.496 connects..

Share this post


Link to post
Share on other sites
9 minutes ago, Agusanz said:

Damn.. it's not working for me. i had to use an older version. Do you mind uploading ur config.cfg?

Send me your whole server file and all and i'll run it on my server and see what's wrong. 

Send it via for example Onedrive or dropbox. 

Share this post


Link to post
Share on other sites
10 minutes ago, Violt said:

Send me your whole server file and all and i'll run it on my server and see what's wrong. 

Send it via for example Onedrive or dropbox. 

Here you go, i tried to comment out the same stuff as yours to see if it was somekind of bug, but still doesnt work for me: http://www.mediafire.com/file/1vaweegf0susa67/Bec.zip

1.608 error: 9OJzS9e.png

 

Meanwhile 1.496 with the same config.. WTF :(  : jAopXzC.png

Edited by Agusanz
ss

Share this post


Link to post
Share on other sites
2 minutes ago, Violt said:

Can you send me your Start batch file? 

wait a minute... i tried with --dsc now and it connected. wtf. i swear i tried that some hours ago and didn't work..


my starter it's just a shortcut. It's named AZ_Start_Bec it's path is: C:\steamcmd\DayZ-sa_server\Bec\Bec.exe -f Config.cfg
My batch would be Bec.exe -f Config

 

Yours works without --dsc?

Share this post


Link to post
Share on other sites
Just now, Agusanz said:

wait a minute... i tried with --dsc now and it connected. wtf. i swear i tried that some hours ago and didn't work..


my starter it's just a shortcut. It's named AZ_Start_Bec it's path is: C:\steamcmd\DayZ-sa_server\Bec\Bec.exe -f Config.cfg
My batch would be Bec.exe -f Config

 

Yours works without --dsc?

Ah yeah i was like why are you using a shortcut. But yes by using —dsc bec will work. Without that you’ll get the problems you had.

anyways i suggest you using a .bat file as it’s easier to work with.

  • Thanks 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×