@echo off
title ‘My Game’
color zz
if "%1" neq "" ( goto %1)
:Menu
cls
echo ‘1. Start’
echo ‘2. Instructions’
echo ‘3. Exit’
set /p answer=‘Type the
number of your option and press
enter.’
if %answer%==1 goto
‘Start_1’
if %answer%==2 goto
‘Instructions’
if %answer%==3 goto ‘Exit’
:‘Exit’
echo Thanks for playing !
exit /b
Now for the instructions type in:
:‘Instructions’
cls
echo ‘Instructions’
echo.
Then write:
echo ‘Your instructions
here’
As many times as you like then type:
pause
goto Menu
:Start_1
cls
echo ‘You have run into bad
guys. Their forces are:’
echo ‘3 farmers’
echo ‘You have a high chance
of winning.’
set /p answer=‘Would you like
to fight or run?’
if %answer%==‘Fight’ goto
‘Fight_1’
if %answer%==‘Run’ goto
‘Run_1’
Just close the notepad, then click yes,
save the file, change the format to all
file,add . bat after you type the name.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.