@echo off
:top
cls
echo.                       Duke Nukem 3D - Atomc Edition
echo                             "Duke Smurfem 3D"
echo.
echo                               by Paul Smith
echo                           a.k.a.  Wally Waffles
echo.
echo                          1 - L(a)unch Duke Smurfem 3D
echo                          2 - Go to (S)ETUP utility
echo.
echo                          3 - (I)nstall Duke Smurfem 3D
echo                          4 - (U)ninstall Duke Smurfem 3D
echo.
echo                          5 - (R)ead text file
echo                          6 - E(x)it
echo.
echo   v1.10 - Last Modified: May 9, 1999
echo.
echo Pick a number or a letter:
choice /n /c:123456asiurx /t:1,20
if errorlevel 12 goto end
if errorlevel 11 goto text
if errorlevel 10 goto uninstall
if errorlevel 9 goto install
if errorlevel 8 goto setup
if errorlevel 7 goto gameon
if errorlevel 6 goto end
if errorlevel 5 goto text
if errorlevel 4 goto uninstall
if errorlevel 3 goto install
if errorlevel 2 goto setup
if errorlevel 1 goto gameon

:gameon
CLS
if not exist SMRFGAME.CON goto nosmurf
echo Do you want:
echo.
echo    1 - Regular Single-Play
echo        or
echo    2 - Fake Multi-Mode with an AI opponent?
echo.
choice /n /c:12 /t:1,20
if errorlevel 2 goto gameonai
if errorlevel 1 goto gameonone

:gameonone
DUKE3D.EXE /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:gameonai
echo How many opponents do you want? (1-7)
choice /n /c:1234567 /t:1,20
if errorlevel 7 goto q8
if errorlevel 6 goto q7
if errorlevel 5 goto q6
if errorlevel 4 goto q5
if errorlevel 3 goto q4
if errorlevel 2 goto q3
if errorlevel 1 goto q2

:q2
DUKE3D.EXE /Q2 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q3
DUKE3D.EXE /Q3 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q4
DUKE3D.EXE /Q4 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q5
DUKE3D.EXE /Q5 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q6
DUKE3D.EXE /Q6 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q7
DUKE3D.EXE /Q7 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:q8
DUKE3D.EXE /Q8 /A /L9 /M /tX /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:install
cls
echo If at any time you wish to abort installation, press Ctrl-C
echo.
echo The following 3 conditions must be present:
echo.
echo   *Are we in your Duke Nukem 3D v1.5 directory?
echo   *Have you unzipped SMURFEM.GRP into the current directory?
echo   *Is KEXTRACT.EXE in the current directory?
echo.
echo If these three conditions are not present, abort and make it so!
echo KEXTRACT.EXE is located on the Duke Nukem 3D CD-ROM in the \GOODIES\BUILD\
echo directory.  If you have v1.4, you can download the patch from my website.
pause
if not exist DUKE3D.EXE goto nogame
if not exist SMURFEM.GRP goto nogrp
if not exist KEXTRACT.EXE goto nokx
CLS
echo I'm going to create a directory called YOURCRAP\SMURFEM\  Should any of
echo YOUR files need to be backed up, this is where they'll be moved to.
echo If you have any TILES0*.ART files (00-19) in your directory they might
echo interfere with Duke Smurfem 3D, so they'll be backed up!
pause
echo Creating directory called YOURCRAP\SMURFEM\
MD YOURCRAP
CD YOURCRAP
MD SMURFEM
CD ..
if exist TILES000.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES001.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES002.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES003.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES004.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES005.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES006.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES007.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES008.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES009.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES010.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES011.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES012.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES013.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES014.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES015.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES016.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES017.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES018.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist TILES019.ART move TILES0*.ART YOURCRAP\SMURFEM
if exist DEMO1.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO2.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO3.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO4.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO5.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO6.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO7.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO8.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist DEMO9.DMO move DEMO*.DMO YOURCRAP\SMURFEM
if exist LOGO.ANM move LOGO.ANM YOURCRAP\SMURFEM
if exist DUKETEAM.ANM move DUKETEAM.ANM YOURCRAP\SMURFEM
echo Backup process complete.  Any files that were backed up will be found in
echo the YOURCRAP\SMURFEM directory.
pause
CLS
echo I will now extract a few files from SMURFEM.GRP
pause
KEXTRACT.EXE SMURFEM.GRP SMRFGAME.CON SMURFEM.TXT
echo Installtion complete!
pause
goto top

:uninstall
if not exist SMRFGAME.CON goto nocon
cls
echo Are you SURE you want to UNINSTALL Duke Smurfem 3D?   [Y/N]
choice /n /c:yn /t:n,20
if errorlevel 2 goto no_un
if errorlevel 1 goto yes_un

:no_un
echo Uninstallation Aborted ^.^
pause
goto top

:yes_un
echo You chose to UNINSTALL!
pause
echo Duke Smurfem 3D is now being uninstalled...
if exist SMRFGAME.CON DEL SMRFGAME.CON
if exist SMRFDEFS.CON DEL SMRFDEFS.CON
if exist SMRFUSER.CON DEL SMRFUSER.CON
if exist SMURFEM.TXT DEL SMURFEM.TXT
if exist YOURCRAP\SMURFEM\TILES000.ART goto unback
if exist YOURCRAP\SMURFEM\TILES001.ART goto unback
if exist YOURCRAP\SMURFEM\TILES002.ART goto unback
if exist YOURCRAP\SMURFEM\TILES003.ART goto unback
if exist YOURCRAP\SMURFEM\TILES004.ART goto unback
if exist YOURCRAP\SMURFEM\TILES005.ART goto unback
if exist YOURCRAP\SMURFEM\TILES006.ART goto unback
if exist YOURCRAP\SMURFEM\TILES007.ART goto unback
if exist YOURCRAP\SMURFEM\TILES008.ART goto unback
if exist YOURCRAP\SMURFEM\TILES009.ART goto unback
if exist YOURCRAP\SMURFEM\TILES010.ART goto unback
if exist YOURCRAP\SMURFEM\TILES011.ART goto unback
if exist YOURCRAP\SMURFEM\TILES012.ART goto unback
if exist YOURCRAP\SMURFEM\TILES013.ART goto unback
if exist YOURCRAP\SMURFEM\TILES014.ART goto unback
if exist YOURCRAP\SMURFEM\TILES015.ART goto unback
if exist YOURCRAP\SMURFEM\TILES016.ART goto unback
if exist YOURCRAP\SMURFEM\TILES017.ART goto unback
if exist YOURCRAP\SMURFEM\TILES018.ART goto unback
if exist YOURCRAP\SMURFEM\TILES019.ART goto unback
if exist YOURCRAP\SMURFEM\DEMO1.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO2.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO3.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO4.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO5.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO6.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO7.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO8.DMO goto unback
if exist YOURCRAP\SMURFEM\DEMO9.DMO goto unback
if exist YOURCRAP\SMURFEM\LOGO.ANM goto unback
if exist YOURCRAP\SMURFEM\DUKETEAM.ANM goto unback
goto unfin

:unback
echo The following files were backed up when you installed
echo Duke Smurfem 3D:
pause
dir YOURCRAP\SMURFEM /p
echo What do you want done with these files?
echo.
echo      1 - Restore these files to my Duke3D directory
echo.
echo      2 - Leave these files and I'll take care of them
echo.
echo      3 - Don't restore these files;  Delete them!
echo.
choice /n /c:123
if errorlevel 3 goto undel
if errorlevel 2 goto unstay
if errorlevel 1 goto unres

:unres
echo Restoring your files from YOURCRAP\SMURFEM
CD YOURCRAP\SMURFEM
MOVE *.* ..\..
CD ..
RD SMURFEM
CD ..
goto unfin

:unstay
echo Backed up files shall remain backed up...
goto unfin

:undel
echo Deleting your backed up files...
if exist YOURCRAP\SMURFEM\TILES000.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES001.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES002.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES003.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES004.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES005.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES006.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES007.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES008.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES009.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES010.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES011.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES012.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES013.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES014.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES015.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES016.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES017.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES018.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\TILES019.ART del YOURCRAP\SMURFEM\*.ART
if exist YOURCRAP\SMURFEM\DEMO1.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO2.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO3.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO4.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO5.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO6.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO7.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO8.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\DEMO9.DMO del YOURCRAP\SMURFEM\*.DMO
if exist YOURCRAP\SMURFEM\LOGO.ANM del YOURCRAP\SMURFEM\*.ANM
if exist YOURCRAP\SMURFEM\DUKETEAM.ANM del YOURCRAP\SMURFEM\*.ANM
CD YOURCRAP
RD SMURFEM
CD ..
goto unfin

:unfin
echo.
echo Uninstallation complete.
echo To REALLY finalize uninstallation though, you must delete
echo SMURFEM.GRP and SMURFEM.BAT yourself.
pause
goto top

:setup
if not exist SMRFGAME.CON goto nosmurf
SETUP.EXE /xSMRFGAME.CON /gSMURFEM.GRP %1 %2 %3 %4 %5 %6 %7 %8 %9
goto top

:text
if not exist SMURFEM.TXT goto ktxt
type SMURFEM.TXT | MORE
pause
goto top

:nogame
echo DUKE3D.EXE not found!
echo This leads me to believe that we are NOT in your Duke3D directory!
pause
goto top

:nosmurf
echo Sorry, but you must install Duke Smurfem 3D
echo before you can play it (SMRFGAME.CON not found)
pause
goto top

:nokx
echo KEXTRACT.EXE not found!
echo This file is necessary to install Duke Smurfem 3D!
pause
goto top

:nogrp
echo SMURFEM.GRP not found!
echo Installation cannot proceed without this file!
pause
goto top

:nocon
echo You must install Duke Smurfem 3D before you can uninstall it!
echo    (SMRFGAME.CON not found)
pause
goto top

:ktxt
if not exist KEXTRACT.EXE goto notxt
if not exist SMURFEM.GRP goto notxt
KEXTRACT.EXE SMURFEM.GRP SMURFEM.TXT
type SMURFEM.TXT | MORE
pause
del SMURFEM.TXT
goto top

:notxt
echo SMURFEM.TXT not found!
echo You can either "Kextract" it from SMURFEM.GRP or unzip it from SMURFEM.ZIP
pause
goto top

:end
cls
echo                      Duke Nukem 3D - Atomic Edition
echo                           "Duke Smurfem 3D"
echo.
echo                 SMURFEM.GRP was slopped together by
echo                 Paul Smith a.k.a. Wally Waffles, 1998
echo                 E-Mail address: wallywaffles@geocities.com
echo                 URL: www.geocities.com/TimesSquare/Fortress/1896
echo.
echo                 Please distribute SMURFEM.ZIP to your friends!
echo                 If this is included in a disk compilation,
echo                 please send me a free copy.  I'd REALLY
echo                 apreciate it!  Thanks!
echo v1.10
