-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.bat
89 lines (78 loc) · 2.42 KB
/
server.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@echo off
setlocal enabledelayedexpansion
:menu
cls
echo.
echo Select a map:
echo 1. Alleys_DM
echo 2. Andromeda_DM
echo 3. Andromeda_Siege [Only supports Siege mode]
echo 4. Sahara_DM_E3
set /p mapChoice=Enter the map number:
if "%mapChoice%"=="1" set map=Alleys_DM
if "%mapChoice%"=="2" set map=Andromeda_DM
if "%mapChoice%"=="3" set map=Andromeda_Siege
if "%mapChoice%"=="4" set map=Sahara_DM_E3
:players
echo.
echo Enter the number of players:
echo (Expected range is 1-16)
set /p numPlayers=
:: Validate number of players
if %numPlayers% lss 1 (
echo Invalid input. Number of players should be between 1 and 16. Please try again.
goto players
)
if %numPlayers% gtr 16 (
echo Invalid input. Number of players should be between 1 and 16. Please try again.
goto players
)
:goal_score
echo.
echo Enter the goal score:
echo (For a full server of 5v5, a score of around 40000 is fairly standard. Expected range is 1000-80000.)
set /p goalScore=
:: Validate goal score
if %goalScore% lss 1000 (
echo Invalid input. Goal score should be between 1000 and 80000. Please try again.
goto goal_score
)
if %goalScore% gtr 80000 (
echo Invalid input. Goal score should be between 1000 and 80000. Please try again.
goto goal_score
)
:time_limit
echo.
echo Enter the time limit (in minutes):
echo (Expected range is 5-60)
set /p timeLimit=
:: Validate time limit
if %timeLimit% lss 5 (
echo Invalid input. Time limit should be between 5 and 60 minutes. Please try again.
goto time_limit
)
if %timeLimit% gtr 60 (
echo Invalid input. Time limit should be between 5 and 60 minutes. Please try again.
goto time_limit
)
:game_mode
echo.
echo Select a game mode:
if "%map%"=="Andromeda_Siege" (
echo 1. Siege
set /p gameMode=Enter the game mode number:
if "%gameMode%"=="1" set game=Robots.R_Siege
) else (
echo 1. Team Deathmatch
echo 2. Deathmatch
set /p gameMode=Enter the game mode number:
if "%gameMode%"=="1" set game=Robots.R_TeamDeathmatch
if "%gameMode%"=="2" set game=Robots.R_Deathmatch
)
echo.
set /p serverName=Enter the server name:
:start_server
echo Starting Hawken server with the selected options...
start HawkenGame-Win32-Shipping.exe Server %map%?NumPublicConnections=%numPlayers%?GoalScore=%goalScore%?TimeLimit=%timeLimit%?bIsLanMatch=True?game=%game%?ServerName=%serverName% -log
echo Server started.
pause