From a91bde05aa9061aba6a06244c1808e8cf6715496 Mon Sep 17 00:00:00 2001 From: ineedbots Date: Sun, 5 Sep 2021 15:03:44 -0600 Subject: [PATCH] CoD2 server stuff --- .gitignore | 5 +++++ deploy.bat | 1 + main/server.cfg | 9 +++++++++ z_server.bat | 28 ++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 100644 main/server.cfg create mode 100644 z_server.bat diff --git a/.gitignore b/.gitignore index 34f8ee1..1564051 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,11 @@ !/z_deploy.bat !/.astylerc +!/main +/main/* +!/main/server.cfg +!/z_server.bat + *.dat *.log players/ diff --git a/deploy.bat b/deploy.bat index 729bb6f..804da6f 100644 --- a/deploy.bat +++ b/deploy.bat @@ -1,3 +1,4 @@ xcopy cod2m_bot_warfare\mods\bots\maps mods\bots\maps\ /Y /I /E /H /C xcopy cod2m_bot_warfare\mods\bots\scriptdata mods\bots\scriptdata\ /Y /I /E /H /C +xcopy cod2m_bot_warfare\main main\ /Y /I /E /H /C xcopy cod2m_bot_warfare\mods\bots\bots.txt mods\bots\ /Y /I /H /C diff --git a/main/server.cfg b/main/server.cfg new file mode 100644 index 0000000..f75b3e0 --- /dev/null +++ b/main/server.cfg @@ -0,0 +1,9 @@ +set sv_pure "1" + +set bots_manage_fill "12" +set bots_manage_fill_kick "1" + +set scr_dm_scorelimit "0" +set scr_dm_timelimit "0" + +set sv_maprotation "map mp_carentan" diff --git a/z_server.bat b/z_server.bat new file mode 100644 index 0000000..9c27f83 --- /dev/null +++ b/z_server.bat @@ -0,0 +1,28 @@ +@echo off +::RemoteCONtrol password, needed for most management tools like IW4MADMIN and B3. Do not skip if you installing IW4MADMIN. +set rcon_password= +::Name of the config file the server should use. +set cfg=server.cfg +::Name of the server shown in the title of the cmd window. This will NOT bet shown ingame. +set name=CoD2M Bot Warfare +::Port used by the server (default: 28960) +set port=28970 +::What ip to bind too +set ip=0.0.0.0 +::Mod name (default "") +set mod=mods/bots +::Only change this when you don't want to keep the bat files in the game folder. MOST WON'T NEED TO EDIT THIS! +set gamepath=%cd% +::Max clients in your server +set maxclients=64 + +title CoD2M MP - %name% - Server restarter +echo Visit plutonium.pw / Join the Discord (a6JM2Tv) for NEWS and Updates! +echo Server "%name%" will load "%cfg%" and listen on port "%port%" UDP with IP "%ip%"! +echo To shut down the server close this window first! +echo (%date%) - (%time%) %name% server start. + +:server +start /wait /abovenormal "%name%" "%~dp0CoD2MP_s.exe" +set dedicated "2" +set net_ip "%ip%" +set net_port "%port%" +set rcon_password "%rcon_password%" +set fs_game "%mod%" +set sv_maxclients "%maxclients%" +exec "%cfg%" +map_rotate +echo (%date%) - (%time%) WARNING: %name% server closed or dropped... server restarts. +goto Server