Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- cls
- color 4E
- cd %~dp0..\System
- set gamemode=
- set mapname=
- :gamemode
- cls
- echo.
- echo.
- echo UT2004 Dedicated Server launcher
- echo ================================
- echo.
- echo 1) Instagib DM
- echo 2) Normal DeathMatch
- echo 3) Team DeathMatch
- echo 4) Capture The Flag
- echo 5) Double Domination
- echo 6) Bombing Run
- echo 7) Vehicle CTF
- echo 8) Mutant
- echo 9) Last Man Standing
- echo a) Invasion
- echo b) Assault
- echo c) Onslaught
- echo.
- echo You can start the Web-admin application when the server is running.
- echo.
- echo.
- set menuchoice=
- set /p menuchoice= (Q to quit):
- set menuchoice=%menuchoice:~0,1%
- :: -- To lower
- SETLOCAL ENABLEDELAYEDEXPANSION
- CALL :LoCase menuchoice
- if '%menuchoice%'=='q' goto quit
- if '%menuchoice%'=='1' set gamemode=XGame.xDeathMatch & set mapname=DM-Rankin & set mutators=?mutator=XGame.MutInstaGib & goto StartServer
- if '%menuchoice%'=='2' set gamemode=XGame.xDeathMatch & set mapname=DM-Rankin & goto Mutators
- if '%menuchoice%'=='3' set gamemode=XGame.xTeamGame & set mapname=DM-Rankin & goto Mutators
- if '%menuchoice%'=='4' set gamemode=XGame.xCTFGame & set mapname=CTF-Colossus & goto Mutators
- if '%menuchoice%'=='5' set gamemode=XGame.xDoubleDom & set mapname=DOM-Atlantis & goto Mutators
- if '%menuchoice%'=='6' set gamemode=XGame.xBombingRun & set mapname=BR-Canyon & goto Mutators
- if '%menuchoice%'=='7' set gamemode=XGame.xVehicleCTFGame & set mapname=CTF-Colossus & goto Mutators
- if '%menuchoice%'=='8' set gamemode=BonusPack.xMutantGame & set mapname=DM-Rankin & goto Mutators
- if '%menuchoice%'=='9' set gamemode=BonusPack.xLastManStandingGame & set mapname=DM-Rankin & goto Mutators
- if '%menuchoice%'=='a' set gamemode=SkaarjPack.Invasion & set mapname=DM-Rankin & goto Mutators
- if '%menuchoice%'=='b' set gamemode=UT2K4Assault.ASGameInfo & set mapname=AS-Convoy & goto Mutators
- if '%menuchoice%'=='c' set gamemode=Onslaught.ONSOnslaughtGame & set mapname=ONS-Torlan & goto Mutators
- :: -- We NEED a gamemode
- if '%gamemode%'=='' goto gamemode
- if '%gamemode%'==' ' goto gamemode
- :Mutators
- cls
- echo.
- echo Select mutators:
- echo.
- echo a) Bonus Combos
- echo b) BigHead
- echo c) Lightweight Vehicles (Onslaught)
- echo d) Onslaught Weapons (Onslaught)
- echo e) Stunt Vehicles (Onslaught)
- echo f) Vehicle Arena (Onslaught)
- echo g) UT Classic
- echo h) Lightning Guns (UTClassic)
- echo i) InstaGib
- echo j) UTV2004S
- echo k) Super Berserk
- echo l) BigWheels (Onslaught)
- echo m) Game Speed
- echo n) LowGrav
- echo o) Air Control
- echo p) UT2003 Style
- echo q) QuadJump
- echo r) No Adrenaline
- echo s) Sniper Rifles (UTClassic)
- echo t) Regeneration
- echo u) Slow Motion Corpses
- echo v) Species Statistics
- echo w) UDamage Reward
- echo x) Vampire
- echo y) Zoom InstaGib
- echo z) Arena
- echo 0) No SuperWeapons
- echo.
- echo.
- echo You can select multiple mutators!
- set menuchoice=
- set /p menuchoice= Mutators:
- if 'menuchoice'=='' goto start_server
- if 'menuchoice'==' ' goto start_server
- rem Initialize mutator variable
- rem ---------------------------
- set mutators=?mutator=
- :loop
- rem -- Get first character
- set mut_choice=%menuchoice:~0,1%
- rem -- Replace spaces
- set mut_choice=%mut_choice: =%
- set mutators=%mutators: =%
- if '%mut_choice%'=='a' set mutators=%mutators%BonusPack.MutCrateCombo
- if '%mut_choice%'=='b' set mutators=%mutators%UnrealGame.MutBigHead
- if '%mut_choice%'=='c' set mutators=%mutators%Onslaught.MutLightweightVehicles
- if '%mut_choice%'=='d' set mutators=%mutators%Onslaught.MutOnslaughtWeapons
- if '%mut_choice%'=='e' set mutators=%mutators%Onslaught.MutWheeledVehicleStunts
- if '%mut_choice%'=='f' set mutators=%mutators%OnslaughtFull.MutVehicleArena
- if '%mut_choice%'=='g' set mutators=%mutators%UTClassic.MutUTClassic
- if '%mut_choice%'=='h' set mutators=%mutators%UTClassic.MutUseLightning
- if '%mut_choice%'=='i' set mutators=%mutators%UTClassic.MutInstaGib
- if '%mut_choice%'=='j' set mutators=%mutators%UTV2004s.utvMutator
- if '%mut_choice%'=='k' set mutators=%mutators%UnrealGame.MutBerserk
- if '%mut_choice%'=='l' set mutators=%mutators%Onslaught.MutBigWheels
- if '%mut_choice%'=='m' set mutators=%mutators%UnrealGame.MutGameSpeed
- if '%mut_choice%'=='n' set mutators=%mutators%UnrealGame.MutLowGrav
- if '%mut_choice%'=='o' set mutators=%mutators%UnrealGame.MutMovementModifier
- if '%mut_choice%'=='p' set mutators=%mutators%XGame.MutFastWeapSwitch
- if '%mut_choice%'=='q' set mutators=%mutators%XGame.MutQuadJump
- if '%mut_choice%'=='r' set mutators=%mutators%XGame.MutNoAdrenaline
- if '%mut_choice%'=='s' set mutators=%mutators%XGame.MutUseSniper
- if '%mut_choice%'=='t' set mutators=%mutators%XGame.MutRegen
- if '%mut_choice%'=='u' set mutators=%mutators%XGame.MutSlomoDeath
- if '%mut_choice%'=='v' set mutators=%mutators%XGame.MutSpeciesStats
- if '%mut_choice%'=='w' set mutators=%mutators%XGame.MutUDamageReward
- if '%mut_choice%'=='x' set mutators=%mutators%XGame.MutVampire
- if '%mut_choice%'=='y' set mutators=%mutators%XGame.MutZoomInstagib
- if '%mut_choice%'=='z' set mutators=%mutators%XWeapons.MutArena
- if '%mut_choice%'=='0' set mutators=%mutators%XWeapons.MutNoSuperWeapon
- rem -- Extract first character to process the next
- set menuchoice=%menuchoice:~1%
- rem -- Is there something left?
- if not '%menuchoice%'=='' set mutators=%mutators%, & goto loop
- :StartServer
- rem -- Remove spaces
- set gamemode=%gamemode: =%
- set mapname=%mapname: =%
- set mutators=%mutators: =%
- set port=7777
- cls
- echo.
- echo.
- echo Login details for the web interface are:
- echo.
- echo Username: admin
- echo Password: lan
- echo.
- echo The web interface will be started simultaniously. You might need
- echo to hit refresh in your browser when the server is fully started.
- echo.
- echo.
- set /p port= Enter port or use default (7777) by pressing ENTER:
- start http://localhost/ServerAdmin/
- echo.
- echo Port : [%port%]
- echo Gamemode: [%gamemode%]
- echo Mutators: [%mutators%]
- echo Map : [%mapname%]
- echo.
- echo Starting server...
- echo.
- ucc server %mapname%?game=%gamemode%%mutators% port=%port% ini=UT2004.ini ServerName=Gerbens log=server.log -lanplay
- echo.
- echo Server shut down!
- pause>nul
- goto :gamemode
- :LoCase
- :: Subroutine to convert a variable VALUE to all lower case.
- :: The argument for this subroutine is the variable NAME.
- SET %~1=!%1:A=a!
- SET %~1=!%1:B=b!
- SET %~1=!%1:C=c!
- SET %~1=!%1:D=d!
- SET %~1=!%1:E=e!
- SET %~1=!%1:F=f!
- SET %~1=!%1:G=g!
- SET %~1=!%1:H=h!
- SET %~1=!%1:I=i!
- SET %~1=!%1:J=j!
- SET %~1=!%1:K=k!
- SET %~1=!%1:L=l!
- SET %~1=!%1:M=m!
- SET %~1=!%1:N=n!
- SET %~1=!%1:O=o!
- SET %~1=!%1:P=p!
- SET %~1=!%1:Q=q!
- SET %~1=!%1:R=r!
- SET %~1=!%1:S=s!
- SET %~1=!%1:T=t!
- SET %~1=!%1:U=u!
- SET %~1=!%1:V=v!
- SET %~1=!%1:W=w!
- SET %~1=!%1:X=x!
- SET %~1=!%1:Y=y!
- SET %~1=!%1:Z=z!
- GOTO:EOF
- :UpCase
- :: Subroutine to convert a variable VALUE to all upper case.
- :: The argument for this subroutine is the variable NAME.
- SET %~1=!%1:a=A!
- SET %~1=!%1:b=B!
- SET %~1=!%1:c=C!
- SET %~1=!%1:d=D!
- SET %~1=!%1:e=E!
- SET %~1=!%1:f=F!
- SET %~1=!%1:g=G!
- SET %~1=!%1:h=H!
- SET %~1=!%1:i=I!
- SET %~1=!%1:j=J!
- SET %~1=!%1:k=K!
- SET %~1=!%1:l=L!
- SET %~1=!%1:m=M!
- SET %~1=!%1:n=N!
- SET %~1=!%1:o=O!
- SET %~1=!%1:p=P!
- SET %~1=!%1:q=Q!
- SET %~1=!%1:r=R!
- SET %~1=!%1:s=S!
- SET %~1=!%1:t=T!
- SET %~1=!%1:u=U!
- SET %~1=!%1:v=V!
- SET %~1=!%1:w=W!
- SET %~1=!%1:x=X!
- SET %~1=!%1:y=Y!
- SET %~1=!%1:z=Z!
- GOTO:EOF
- :quit
- set menuchoice=
- set mut_choice=
- set mutators=
- set mapname=
- set gamemode=
- set port=
- color 08
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement