@echo off      
set LEVEL=default

rem :>>> The line below makes a backup copy of your duke3d.cfg

if not exist duke3d.bak copy duke3d.cfg duke3d.bak >nul

:start

rem :>>> The 2nd parameter for dukekick.exe is the directory where your
rem :>>> Maps should be located, MAP/ is default. If you want to use 
rem :>>> DN3D root dir for maps just remove the 2nd parameter.

rem :>>> Do not change the 1st parameter (/C). it's just a switch that 
rem :>>> ensures that dukekick.exe is only executed by kick.bat.

dukekick.exe /C c:\levels\

if errorlevel = 100 goto singleno
if errorlevel = 95 goto singleyes
if errorlevel = 90 goto end
if errorlevel = 70 goto deathnet24
if errorlevel = 65 goto deathnet58
if errorlevel = 60 goto modemorserial
if errorlevel = 50 goto build

goto end

:singleno
duke3d.exe -SETUPFILE DUKE3D.CFG /m -map %level%
goto start

:singleyes
duke3d -SETUPFILE DUKE3D.CFG -map %level%
goto start

:deathnet24
rem :>>> if any problems with 2-4 player netgame add this switch /i1
commit.exe -SETUPFILE DUKE3D.CFG -map %level%
goto start

:deathnet58
rem :>>> if any problems with 5-8 player netgame add this switch /i0
commit.exe -SETUPFILE DUKE3D.CFG -map %level%
goto start

:modemorserial
commit.exe -SETUPFILE DUKE3D.CFG -map %level%
goto start

:build
build %level%
goto start

:end
