Jump to content

Left 4 Dead 2


arnada

Recommended Posts

Skrev för ett tag sedan ett litet program som hjälper dig att skapa en Server config fil till Left 4 Dead 2. Vet inte alls hur intresset ser ut men kanske någon som har nytta av de!

Länk

Ladda hem

Screenshot

62942044.jpg

(obs! tre sista raderna är fel på bilden men åtgärdat i programmet)

Källkod

@echo off
title L4D2 Config Creator
cls
goto menu

:menu
cls
echo ^^^^^^^^^^L4D2 Config Creator^^^^^^^^^^
echo.
echo 1= Create Config
echo 2= About
echo.
echo 3= Exit
echo.
echo Enter here:
set /p input_choise=
if "%input_choise%"=="1" goto create
if "%input_choise%"=="2" goto about
if "%input_choise%"=="3" exit
goto menu

:create
cls
echo Server name:
set /p servername=
echo hostname "%servername%" > Server.cfg

cls
echo SysOp Email:
set /p email=
echo sv_contact "%email%" >> Server.cfg

cls
echo Rcon Password:
set /p rcon=
echo rcon_password "%rcon%" >> Server.cfg

cls
echo Server Password (leave blank if none)
set /p svpass=
echo sv_password "%svpass%" >> Server.cfg

cls
echo Hostport (default 27016)
set /p hostport=
echo hostport %hostport% >> Server.cfg

cls
echo Disable Lan? (0=Internet 1=Lan)
set /p input_choise=
if "%input_choise%"=="0" echo sv_lan 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_lan 1 >> Server.cfg

cls
echo Force Preload Content? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_forcepreload 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_forcepreload 1 >> Server.cfg

cls
echo Disable autokick? (0=no 1=yes)
set /p input_choise=
if "%input_choise%"=="0" echo mp_disable_autokick 0 >> Server.cfg
if "%input_choise%"=="1" echo mp_disable_autokick 1 >> Server.cfg

cls
echo Allow Color Correction? (0=no 1=yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_allow_color_correction 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_allow_color_correction 1 >> Server.cfg

cls
echo Allow Wait Command? (0=no 1=yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_allow_wait_command 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_allow_wait_command 1 >> Server.cfg

cls
echo Allow To Hear everyone or just team? (0=Team 1=All)
set /p input_choise=
if "%input_choise%"=="0" echo sv_alltalk 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_alltalk 1 >> Server.cfg

cls
echo Allow Cheats? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_cheats 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_cheats 1 >> Server.cfg

cls
echo Clear Hint History? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_clearhinthistory 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_clearhinthistory 1 >> Server.cfg

cls
echo Steamgroup ID (leave blank if none)
set /p steamgroupid=
echo sv_steamgroup %steamgroupid% >> Server.cfg

cls
echo Connect to matchmaking? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_steamgroup_exclusive 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_steamgroup_exclusive 1 >> Server.cfg

cls
echo Disable Lobby? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_allow_lobby_connect_only 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_allow_lobby_connect_only 1 >> Server.cfg

cls
echo Game Pauseble? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_pausable 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_pausable 1 >> Server.cfg

cls
echo Gametype?
echo.
echo 1= Versus
echo 2= Survival
echo 3= Coop
echo 4= Realism
echo 5= Team Versus
echo 6= Team Scavenge
set /p input_choise=
if "%input_choise%"=="1" echo sv_gametypes "versus" >> Server.cfg
if "%input_choise%"=="2" echo sv_gametypes "survival" >> Server.cfg
if "%input_choise%"=="3" echo sv_gametypes "coop" >> Server.cfg
if "%input_choise%"=="4" echo sv_gametypes "realism" >> Server.cfg
if "%input_choise%"=="5" echo sv_gametypes "teamversus" >> Server.cfg
if "%input_choise%"=="6" echo sv_gametypes "teamscavenge" >> Server.cfg

cls
echo Region?
echo.
echo 1= Eastcoast
echo 2= Westcoast
echo 3= South America
echo 4= Europe
echo 5= Asia
echo 6= Australia
echo 7= Middle East
echo 8= Africa
echo 9= World
set /p input_choise=
if "%input_choise%"=="1" echo sv_region 0 >> Server.cfg
if "%input_choise%"=="2" echo sv_region 1 >> Server.cfg
if "%input_choise%"=="3" echo sv_region 2 >> Server.cfg
if "%input_choise%"=="4" echo sv_region 3 >> Server.cfg
if "%input_choise%"=="5" echo sv_region 4 >> Server.cfg
if "%input_choise%"=="6" echo sv_region 5 >> Server.cfg
if "%input_choise%"=="7" echo sv_region 6 >> Server.cfg
if "%input_choise%"=="8" echo sv_region 7 >> Server.cfg
if "%input_choise%"=="9" echo sv_region 255 >> Server.cfg

cls
echo Add Setti Servers? (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo setmaster add >> Server.cfg
if "%input_choise%"=="1" echo setmaster add 188.40.40.201:27011 >> Server.cfg

cls
echo Setup logs or use default? (0=Default 1=Setup)
echo Enter Here:
set /p input_choise=
if "%input_choise%"=="0" goto logdefault
if "%input_choise%"=="1" goto setuplog
goto create

:logdefault
cls
echo sv_log_onefile 0 >> Server.cfg
echo sv_logbans 1 >> Server.cfg
echo sv_logecho 0 >> Server.cfg
echo sv_logfile 1 >> Server.cfg
echo sv_logflush 0 >> Server.cfg
echo sv_logsdir logs >> Server.cfg
echo Done
pause

cls
echo Setup rates or use default? (0=Default 1=Setup)
echo Enter Here:
set /p input_choise=
if "%input_choise%"=="0" goto ratedefault
if "%input_choise%"=="1" goto setuprate
goto logdefault

:ratedefault
echo sv_minrate 25000 >> Server.cfg
echo sv_maxrate 30000 >> Server.cfg
echo sv_mincmdrate 20 >> Server.cfg
echo sv_maxcmdrate 33 >> Server.cfg
echo Done
pause

cls
echo Execute Extras? (0=No 1=Yes)
echo Enter Here:
set /p input_choise=
if "%input_choise%"=="0" goto done
if "%input_choise%"=="1" goto setupextras
goto ratedefault

:setupextras
cls
echo Type the filname or leave blank (1 of 3 eg. ip_bans.cfg)
set /p extras1=
echo exec %extras1% >> Server.cfg

cls
echo Type the filname or leave blank (2 of 3 eg. ip_bans.cfg)
set /p extras2=
echo exec %extras2% >> Server.cfg

cls
echo Type the filname or leave blank (3 of 3 eg. ip_bans.cfg)
set /p extras3=
echo exec %extras3% >> Server.cfg
echo Done
pause
goto done

:setuplog
cls
echo sv_log_onefile (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_log_onefile 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_log_onefile 1 >> Server.cfg

cls
echo sv_logecho (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_logecho 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_logecho 1 >> Server.cfg

cls
echo sv_logfile (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_logfile 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_logfile 1 >> Server.cfg

cls
echo sv_logflush (0=No 1=Yes)
set /p input_choise=
if "%input_choise%"=="0" echo sv_logflush 0 >> Server.cfg
if "%input_choise%"=="1" echo sv_logflush 1 >> Server.cfg

cls
echo Logs dir
set /p logsdir=
echo sv_logsdir %logsdir% >> Server.cfg
echo Done
pause

cls
echo Setup rates or use default? (0=Default 1=Setup)
echo Enter Here:
set /p input_choise=
if "%input_choise%"=="0" goto ratedefault
if "%input_choise%"=="1" goto setuprate
:setuplog

:setuprate
cls
echo sv_minrate
set /p sv_minrate=
echo sv_minrate %sv_minrate% >> Server.cfg

cls
echo sv_maxrate
set /p sv_maxrate=
echo sv_maxrate %sv_maxrate% >> Server.cfg

cls
echo sv_mincmdrate
set /p sv_mincmdrate=
echo sv_mincmdrate %sv_mincmdrate% >> Server.cfg

cls
echo sv_maxcmdrate
set /p sv_maxcmdrate=
echo sv_maxcmdrate %sv_maxcmdrate% >> Server.cfg
echo Done

cls
echo Execute Extras? (0=No 1=Yes)
echo Enter Here:
set /p input_choise=
if "%input_choise%"=="0" goto done
if "%input_choise%"=="1" goto setupextras
goto setuprate

:done
cls
echo Your Left 4 Dead 2 Server.cfg file is located
echo in the same path as this tool.
echo.
echo Plz check your config file if it's correctly done
echo and remember to report all bugs.
pause
goto menu

:about
cls
echo This tool was made by Arnada at the
echo Swedish community Hacker Unit.
echo.
echo Plz report any bugs or suggestions.
echo you can contact me at badkarma.hku@hotmail.com.
pause
goto menu












Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

Detta har jag letat efter väldigt länge! Tack så mycket!

För övrigt är Left 4 Dead 2 ett skit roligt spel. Nu väntar jag på trean! :)

// Alexander

Kul att du gillade programmet! Notera att programmet anger Setti som masterserver och inte de officiella servrarna. Dock är detta INTE olagligt och bryter inte mot någon eula.. Jag håller på att jobba med ett L4D2 Master Tool där du kan skapa configs, hantera plugins.. Starta / joina server mm.. Dock tar releasen lite tid då ja fastnat i ett annat projekt.

Link to comment
Share on other sites

Kul att du gillade programmet! Notera att programmet anger Setti som masterserver och inte de officiella servrarna. Dock är detta INTE olagligt och bryter inte mot någon eula.. Jag håller på att jobba med ett L4D2 Master Tool där du kan skapa configs, hantera plugins.. Starta / joina server mm.. Dock tar releasen lite tid då ja fastnat i ett annat projekt.

Japp fungerade skit bra. Tack så mycket. Våran server fungerade mycket bättre med dessa inställningar. Skriv gärna när du är klar med Master Tool för det skulle passa fint.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...