User win
Moderator: DosItHelp
User win
Hi, i made an adventure game, just wondering on how to make the user win.
For example its based on user inputs, so when user inputs North 2 times and South 3 times, the user will be taken to a new branch where it will say the user has won. echo you won.
Thanks
For example its based on user inputs, so when user inputs North 2 times and South 3 times, the user will be taken to a new branch where it will say the user has won. echo you won.
Thanks
Re: User win
Show us your code, so we can see where we can help you.
Re: User win
Its preety long, i changed the names to random names, so yeah.
@echo off
title IST Game
mode con: cols=60 lines=15
:Start
cls
echo Version 1.8
echo.
echo Welcome to my game where you catch students playing games
echo.
echo This was made by Ali Dogramaci which was based
echo of Jordan Cinc's game made on Phython
echo.
echo Copyright 2015 Year 9 IST
echo.
echo.
echo Enter your name below
SET /P NN=%NN%
:Menu
cls
echo Choose an action
echo.
echo Move North - N
echo.
echo Move East - E
echo.
echo Move South - S
echo.
echo Move West - W
echo.
echo Exit Game - Exit
SET /P Z=
IF %Z%==N GOTO North
IF %Z%==n GOTO North
IF %Z%==E GOTO East
IF %Z%==e GOTO East
IF %Z%==S GOTO South
IF %Z%==s GOTO South
IF %Z%==W GOTO West
IF %Z%==w GOTO West
IF %Z%==Exit GOTO Exit
IF %Z%==exit GOTO Exit
GOTO Wrong
:Wrong
cls
echo That is not a valid input
pause
goto Menu
:North
cls
echo %NN% has chosen to venture North
set /a A =%random% %% 4
goto :ChoiceN%A%
:ChoiceN0
set /a Z =%random% %% 2
goto :YNNA%Z%
:YNNA0
echo.
echo You caught Ali playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Q=
IF %Q%==Educate GOTO educate
IF %Q%==educate GOTO educate
IF %Q%==Ignore GOTO Menu
IF %Q%==ignore GOTO Menu
GOTO Wrong
:YNNA1
echo.
echo Ali was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN1
set /a ZZ =%random% %% 2
goto :YNNT%ZZ%
:YNNT0
echo.
echo You caught Tiger playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQ=
IF %QQ%==Educate GOTO educate
IF %QQ%==educate GOTO educate
IF %QQ%==Ignore GOTO Menu
IF %QQ%==ignore GOTO Menu
GOTO Wrong
:YNNT1
echo.
echo Tiger was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN2
set /a ZZZ =%random% %% 2
goto :YNNJ%ZZZ%
:YNNJ0
echo.
echo You caught Jordan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQ=
IF %QQQ%==Educate GOTO educate
IF %QQQ%==educate GOTO educate
IF %QQQ%==Ignore GOTO Menu
IF %QQQ%==ignore GOTO Menu
GOTO Wrong
:YNNJ1
echo.
echo Jordan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN3
set /a ZZZZ =%random% %% 2
goto :YNNK%ZZZZ%
:YNNK0
echo.
echo You caught Keith playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQQ=
IF %QQQQ%==Educate GOTO educate
IF %QQQQ%==educate GOTO educate
IF %QQQQ%==Ignore GOTO Menu
IF %QQQQ%==ignore GOTO Menu
GOTO Wrong
:YNNK1
echo.
echo Keith was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:East
cls
echo %NN% has chosen to venture East
set /a B =%random% %% 4
goto ChoiceE%B%
:ChoiceE0
set /a ZZ =%random% %% 2
goto :YNEM%ZZ%
:YNEM0
echo.
echo You caught Moss playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P W=
IF %W%==Educate GOTO educate
IF %W%==educate GOTO educate
IF %W%==Ignore GOTO Menu
IF %W%==ignore GOTO Menu
GOTO Wrong
:YNEM1
echo.
echo Moss was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE1
set /a ZZZ =%random% %% 2
goto :YNEB%ZZ%
:YNEB0
echo.
echo You caught Brett playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WW=
IF %WW%==Educate GOTO educate
IF %WW%==educate GOTO educate
IF %WW%==Ignore GOTO Menu
IF %WW%==ignore GOTO Menu
GOTO Wrong
:YNEB1
echo.
echo Brett was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE2
set /a ZZ =%random% %% 2
goto :YNEBE%ZZ%
:YNEBE0
echo.
echo You caught Ben playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWW=
IF %WWW%==Educate GOTO educate
IF %WWW%==educate GOTO educate
IF %WWW%==Ignore GOTO Menu
IF %WWW%==ignore GOTO Menu
GOTO Wrong
:YNEBE1
echo.
echo Ben was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE3
set /a LL =%random% %% 2
goto :YNEL%LL%
:YNEL0
echo.
echo You caught Lachlan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWWW=
IF %WWWW%==Educate GOTO educate
IF %WWWW%==educate GOTO educate
IF %WWWW%==Ignore GOTO Menu
IF %WWWW%==ignore GOTO Menu
GOTO Wrong
:YNEL1
echo.
echo Lachlan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:South
cls
echo %NN% has chosen to venture South
set /a C =%random% %% 4
goto :ChoiceS%C%
:ChoiceS0
set /a ZZ =%random% %% 2
goto :YNS-%ZZ%
:YNS-0
echo.
echo You caught - playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Y=
IF %Y%==Educate GOTO educate
IF %Y%==educate GOTO educate
IF %Y%==Ignore GOTO Menu
IF %Y%==ignore GOTO Menu
GOTO Wrong
:YNS-1
echo.
echo - was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS1
set /a LL =%random% %% 2
goto :YNSJAY%LL%
:YNSJAY0
echo.
echo You caught Jayden playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LX=
IF %LX%==Educate GOTO educate
IF %LX%==educate GOTO educate
IF %LX%==Ignore GOTO Menu
IF %LX%==ignore GOTO Menu
GOTO Wrong
:YNSJAY1
echo.
echo Jayden was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS2
set /a LI =%random% %% 2
goto :YNSJU%LI%
:YNSJU0
echo.
echo You caught Julien playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LP=
IF %LP%==Educate GOTO educate
IF %LP%==educate GOTO educate
IF %LP%==Ignore GOTO Menu
IF %LP%==ignore GOTO Menu
GOTO Wrong
:YNSJU1
echo.
echo Julien was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS3
set /a LL =%random% %% 2
goto :YNSY%LL%
:YNSY0
echo.
echo You caught Yuxuan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LS=
IF %LS%==Educate GOTO educate
IF %LS%==educate GOTO educate
IF %LS%==Ignore GOTO Menu
IF %LS%==ignore GOTO Menu
GOTO Wrong
:YNSY1
echo.
echo Yuxuan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:West
cls
echo %NN% has chosen to venture West
set /a D =%random% %% 4
goto :ChoiceW%D%
:ChoiceW0
set /a LL =%random% %% 2
goto :YNWJUS%LL%
:YNWJUS0
echo.
echo You caught Justin playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LC=
IF %LC%==Educate GOTO educate
IF %LC%==educate GOTO educate
IF %LC%==Ignore GOTO Menu
IF %LC%==ignore GOTO Menu
GOTO Wrong
:YNWJUS1
echo.
echo Justin was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW1
set /a LL =%random% %% 2
goto :YNWF%LL%
:YNWF0
echo.
echo You caught Forrest playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LV=
IF %LV%==Educate GOTO educate
IF %LV%==educate GOTO educate
IF %LV%==Ignore GOTO Menu
IF %LV%==ignore GOTO Menu
GOTO Wrong
:YNWF1
echo.
echo Forrest was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW2
set /a LL =%random% %% 2
goto :YNWM%LL%
:YNWM0
echo.
echo You caught Matthew playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LA=
IF %LA%==Educate GOTO educate
IF %LA%==educate GOTO educate
IF %LA%==Ignore GOTO Menu
IF %LA%==ignore GOTO Menu
GOTO Wrong
:YNWM1
echo.
echo Mathhew was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW3
set /a LL =%random% %% 2
goto :YNWE%LL%
:YNWE0
echo.
echo You caught Erol playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LY=
IF %LY%==Educate GOTO educate
IF %LY%==educate GOTO educate
IF %LY%==Ignore GOTO Menu
IF %LY%==ignore GOTO Menu
GOTO Wrong
:YNWE1
echo.
echo Erol was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:educate
cls
echo You educated the student
ping 192.0.3.2 -n 1 -w 2000 > nul
echo The student replied back with lies
ping 192.0.6.2 -n 1 -w 2000 > nul
echo You shout at the student for lieing
ping 192.0.1.2 -n 1 -w 2000 > nul
echo The student has promised not to play games again
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Decision
ecision
cls
echo Do you believe him?
SET /P V=
IF %V%==Yes GOTO Menu
IF %V%==yes GOTO Menu
IF %V%==No GOTO Drive
IF %V%==no GOTO Drive
rive
cls
echo You check his Data Drive for any games
ping 192.0.1.2 -n 1 -w 2000 > nul
set /a OPOP =%random% %% 2
goto :Games%OPOP%
:Games0
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo You found games!
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You order him to delete them all
ping 192.0.1.2 -n 1 -w 2000 > nul
echo He obeys and you walk away while you give him a death stare
ping 192.0.1.2 -n 1 -w 4000 > nul
goto Menu
:Games1
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo No games are found
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You walk away
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Menu
:Exit
exit
@echo off
title IST Game
mode con: cols=60 lines=15
:Start
cls
echo Version 1.8
echo.
echo Welcome to my game where you catch students playing games
echo.
echo This was made by Ali Dogramaci which was based
echo of Jordan Cinc's game made on Phython
echo.
echo Copyright 2015 Year 9 IST
echo.
echo.
echo Enter your name below
SET /P NN=%NN%
:Menu
cls
echo Choose an action
echo.
echo Move North - N
echo.
echo Move East - E
echo.
echo Move South - S
echo.
echo Move West - W
echo.
echo Exit Game - Exit
SET /P Z=
IF %Z%==N GOTO North
IF %Z%==n GOTO North
IF %Z%==E GOTO East
IF %Z%==e GOTO East
IF %Z%==S GOTO South
IF %Z%==s GOTO South
IF %Z%==W GOTO West
IF %Z%==w GOTO West
IF %Z%==Exit GOTO Exit
IF %Z%==exit GOTO Exit
GOTO Wrong
:Wrong
cls
echo That is not a valid input
pause
goto Menu
:North
cls
echo %NN% has chosen to venture North
set /a A =%random% %% 4
goto :ChoiceN%A%
:ChoiceN0
set /a Z =%random% %% 2
goto :YNNA%Z%
:YNNA0
echo.
echo You caught Ali playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Q=
IF %Q%==Educate GOTO educate
IF %Q%==educate GOTO educate
IF %Q%==Ignore GOTO Menu
IF %Q%==ignore GOTO Menu
GOTO Wrong
:YNNA1
echo.
echo Ali was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN1
set /a ZZ =%random% %% 2
goto :YNNT%ZZ%
:YNNT0
echo.
echo You caught Tiger playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQ=
IF %QQ%==Educate GOTO educate
IF %QQ%==educate GOTO educate
IF %QQ%==Ignore GOTO Menu
IF %QQ%==ignore GOTO Menu
GOTO Wrong
:YNNT1
echo.
echo Tiger was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN2
set /a ZZZ =%random% %% 2
goto :YNNJ%ZZZ%
:YNNJ0
echo.
echo You caught Jordan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQ=
IF %QQQ%==Educate GOTO educate
IF %QQQ%==educate GOTO educate
IF %QQQ%==Ignore GOTO Menu
IF %QQQ%==ignore GOTO Menu
GOTO Wrong
:YNNJ1
echo.
echo Jordan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN3
set /a ZZZZ =%random% %% 2
goto :YNNK%ZZZZ%
:YNNK0
echo.
echo You caught Keith playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQQ=
IF %QQQQ%==Educate GOTO educate
IF %QQQQ%==educate GOTO educate
IF %QQQQ%==Ignore GOTO Menu
IF %QQQQ%==ignore GOTO Menu
GOTO Wrong
:YNNK1
echo.
echo Keith was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:East
cls
echo %NN% has chosen to venture East
set /a B =%random% %% 4
goto ChoiceE%B%
:ChoiceE0
set /a ZZ =%random% %% 2
goto :YNEM%ZZ%
:YNEM0
echo.
echo You caught Moss playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P W=
IF %W%==Educate GOTO educate
IF %W%==educate GOTO educate
IF %W%==Ignore GOTO Menu
IF %W%==ignore GOTO Menu
GOTO Wrong
:YNEM1
echo.
echo Moss was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE1
set /a ZZZ =%random% %% 2
goto :YNEB%ZZ%
:YNEB0
echo.
echo You caught Brett playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WW=
IF %WW%==Educate GOTO educate
IF %WW%==educate GOTO educate
IF %WW%==Ignore GOTO Menu
IF %WW%==ignore GOTO Menu
GOTO Wrong
:YNEB1
echo.
echo Brett was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE2
set /a ZZ =%random% %% 2
goto :YNEBE%ZZ%
:YNEBE0
echo.
echo You caught Ben playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWW=
IF %WWW%==Educate GOTO educate
IF %WWW%==educate GOTO educate
IF %WWW%==Ignore GOTO Menu
IF %WWW%==ignore GOTO Menu
GOTO Wrong
:YNEBE1
echo.
echo Ben was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE3
set /a LL =%random% %% 2
goto :YNEL%LL%
:YNEL0
echo.
echo You caught Lachlan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWWW=
IF %WWWW%==Educate GOTO educate
IF %WWWW%==educate GOTO educate
IF %WWWW%==Ignore GOTO Menu
IF %WWWW%==ignore GOTO Menu
GOTO Wrong
:YNEL1
echo.
echo Lachlan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:South
cls
echo %NN% has chosen to venture South
set /a C =%random% %% 4
goto :ChoiceS%C%
:ChoiceS0
set /a ZZ =%random% %% 2
goto :YNS-%ZZ%
:YNS-0
echo.
echo You caught - playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Y=
IF %Y%==Educate GOTO educate
IF %Y%==educate GOTO educate
IF %Y%==Ignore GOTO Menu
IF %Y%==ignore GOTO Menu
GOTO Wrong
:YNS-1
echo.
echo - was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS1
set /a LL =%random% %% 2
goto :YNSJAY%LL%
:YNSJAY0
echo.
echo You caught Jayden playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LX=
IF %LX%==Educate GOTO educate
IF %LX%==educate GOTO educate
IF %LX%==Ignore GOTO Menu
IF %LX%==ignore GOTO Menu
GOTO Wrong
:YNSJAY1
echo.
echo Jayden was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS2
set /a LI =%random% %% 2
goto :YNSJU%LI%
:YNSJU0
echo.
echo You caught Julien playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LP=
IF %LP%==Educate GOTO educate
IF %LP%==educate GOTO educate
IF %LP%==Ignore GOTO Menu
IF %LP%==ignore GOTO Menu
GOTO Wrong
:YNSJU1
echo.
echo Julien was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS3
set /a LL =%random% %% 2
goto :YNSY%LL%
:YNSY0
echo.
echo You caught Yuxuan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LS=
IF %LS%==Educate GOTO educate
IF %LS%==educate GOTO educate
IF %LS%==Ignore GOTO Menu
IF %LS%==ignore GOTO Menu
GOTO Wrong
:YNSY1
echo.
echo Yuxuan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:West
cls
echo %NN% has chosen to venture West
set /a D =%random% %% 4
goto :ChoiceW%D%
:ChoiceW0
set /a LL =%random% %% 2
goto :YNWJUS%LL%
:YNWJUS0
echo.
echo You caught Justin playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LC=
IF %LC%==Educate GOTO educate
IF %LC%==educate GOTO educate
IF %LC%==Ignore GOTO Menu
IF %LC%==ignore GOTO Menu
GOTO Wrong
:YNWJUS1
echo.
echo Justin was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW1
set /a LL =%random% %% 2
goto :YNWF%LL%
:YNWF0
echo.
echo You caught Forrest playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LV=
IF %LV%==Educate GOTO educate
IF %LV%==educate GOTO educate
IF %LV%==Ignore GOTO Menu
IF %LV%==ignore GOTO Menu
GOTO Wrong
:YNWF1
echo.
echo Forrest was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW2
set /a LL =%random% %% 2
goto :YNWM%LL%
:YNWM0
echo.
echo You caught Matthew playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LA=
IF %LA%==Educate GOTO educate
IF %LA%==educate GOTO educate
IF %LA%==Ignore GOTO Menu
IF %LA%==ignore GOTO Menu
GOTO Wrong
:YNWM1
echo.
echo Mathhew was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW3
set /a LL =%random% %% 2
goto :YNWE%LL%
:YNWE0
echo.
echo You caught Erol playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LY=
IF %LY%==Educate GOTO educate
IF %LY%==educate GOTO educate
IF %LY%==Ignore GOTO Menu
IF %LY%==ignore GOTO Menu
GOTO Wrong
:YNWE1
echo.
echo Erol was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:educate
cls
echo You educated the student
ping 192.0.3.2 -n 1 -w 2000 > nul
echo The student replied back with lies
ping 192.0.6.2 -n 1 -w 2000 > nul
echo You shout at the student for lieing
ping 192.0.1.2 -n 1 -w 2000 > nul
echo The student has promised not to play games again
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Decision
ecision
cls
echo Do you believe him?
SET /P V=
IF %V%==Yes GOTO Menu
IF %V%==yes GOTO Menu
IF %V%==No GOTO Drive
IF %V%==no GOTO Drive
rive
cls
echo You check his Data Drive for any games
ping 192.0.1.2 -n 1 -w 2000 > nul
set /a OPOP =%random% %% 2
goto :Games%OPOP%
:Games0
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo You found games!
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You order him to delete them all
ping 192.0.1.2 -n 1 -w 2000 > nul
echo He obeys and you walk away while you give him a death stare
ping 192.0.1.2 -n 1 -w 4000 > nul
goto Menu
:Games1
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo No games are found
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You walk away
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Menu
:Exit
exit
Re: User win
117Mickey - You said here that you understood, but from the looks of your code
you didn't understand, as you didn't change your code.
viewtopic.php?p=41764#p41764
you didn't understand, as you didn't change your code.
viewtopic.php?p=41764#p41764
Re: User win
But i have made it case sensitive. A or a still takes me to :A
Re: User win
if has a switch that will do both in the one command.
It will also work when people type EDucate instead of Educate or educate
It will also work when people type EDucate instead of Educate or educate
Re: User win
ok, but that is not the main problem. Making the user win is. Those are small issues.
Re: User win
117Mickey wrote:Hi, i made an adventure game, just wondering on how to make the user win.
For example its based on user inputs, so when user inputs North 2 times and South 3 times, the user will be taken to a new branch where it will say the user has won. echo you won.
Thanks
Excuse me, I am afraid I don't understand your question.
I assume you don't know what the program do... It is not an "adventure game". In a game with several stages, where the user may "walk" through several "rooms", the user have the opportunity to win if he/she walk the right path until reach a certain "exit". However, "your" program is NOT of this type, so "how to make the user win?" question in this program have no sense...
... unless you want the program show "You won" when the user choose precisely North 2 times and South 3 times. Is this what you want?
Antonio
Re: User win
Well, as I said before, when the program is an adventure game you just need to insert the "echo You won" at the stage placed at North 2 times and South 3 times path. However, because this program have not well defined stages/paths, an ugly patch is needed.
Insert the following modifications:
Antonio
Insert the following modifications:
Code: Select all
:Start
set win=0
. . .
:North
if %win% lss 2 (set /A win+=1) else set win=0
. . .
:East
set win=0
. . .
:South
if %win% geq 2 set /A win+=1
if %win% equ 5 echo You won & goto :EOF
. . .
:West
set win=0
. . .
Antonio
Last edited by Aacini on 13 Jul 2015 14:24, edited 1 time in total.
Re: User win
Oh, thank you very much. But one last thing. That code i posted above was an old version. Could i post my new one and then you could work of that. Thanks very much.
@echo off
title IST Game
mode con: cols=60 lines=15
:Start
cls
FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B
echo Today is the %Today% Version 2.1
echo.
echo Welcome to my game where you catch students playing games
echo.
echo This was made by Ali Dogramaci which was based
echo of Jordan Cinc's game made on Phython
echo.
echo Copyright 2015 Year 9 IST
echo.
echo.
echo Enter your name below
SET /P NN=%NN%
:Menu
cls
echo Choose an action
echo.
echo Move North - N
echo.
echo Move East - E
echo.
echo Move South - S
echo.
echo Move West - W
echo.
echo Exit Game - Exit
SET /P Z=
IF %Z%==N GOTO North
IF %Z%==n GOTO North
IF %Z%==E GOTO East
IF %Z%==e GOTO East
IF %Z%==S GOTO South
IF %Z%==s GOTO South
IF %Z%==W GOTO West
IF %Z%==w GOTO West
IF %Z%==Exit GOTO Exit
IF %Z%==exit GOTO Exit
GOTO Wrong
:Wrong
cls
echo That is not a valid input
pause
goto Menu
:North
cls
echo %NN% has chosen to venture North
set /a A =%random% %% 4
goto :ChoiceN%A%
:ChoiceN0
set /a Z =%random% %% 2
goto :YNNA%Z%
:YNNA0
echo.
echo You caught Ali playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Q=
IF %Q%==Educate GOTO educate
IF %Q%==educate GOTO educate
IF %Q%==Ignore GOTO Menu
IF %Q%==ignore GOTO Menu
GOTO Wrong
:YNNA1
echo.
echo Ali was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN1
set /a ZZ =%random% %% 2
goto :YNNT%ZZ%
:YNNT0
echo.
echo You caught Tiger playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQ=
IF %QQ%==Educate GOTO educate
IF %QQ%==educate GOTO educate
IF %QQ%==Ignore GOTO Menu
IF %QQ%==ignore GOTO Menu
GOTO Wrong
:YNNT1
echo.
echo Tiger was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN2
set /a ZZZ =%random% %% 2
goto :YNNJ%ZZZ%
:YNNJ0
echo.
echo You caught Jordan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQ=
IF %QQQ%==Educate GOTO educate
IF %QQQ%==educate GOTO educate
IF %QQQ%==Ignore GOTO Menu
IF %QQQ%==ignore GOTO Menu
GOTO Wrong
:YNNJ1
echo.
echo Jordan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN3
set /a ZZZZ =%random% %% 2
goto :YNNK%ZZZZ%
:YNNK0
echo.
echo You caught Keith playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQQ=
IF %QQQQ%==Educate GOTO educate
IF %QQQQ%==educate GOTO educate
IF %QQQQ%==Ignore GOTO Menu
IF %QQQQ%==ignore GOTO Menu
GOTO Wrong
:YNNK1
echo.
echo Keith was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:East
cls
echo %NN% has chosen to venture East
set /a B =%random% %% 4
goto ChoiceE%B%
:ChoiceE0
set /a ZZ =%random% %% 2
goto :YNEM%ZZ%
:YNEM0
echo.
echo You caught Moss playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P W=
IF %W%==Educate GOTO educate
IF %W%==educate GOTO educate
IF %W%==Ignore GOTO Menu
IF %W%==ignore GOTO Menu
GOTO Wrong
:YNEM1
echo.
echo Moss was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE1
set /a ZZZ =%random% %% 2
goto :YNEB%ZZ%
:YNEB0
echo.
echo You caught Brett playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WW=
IF %WW%==Educate GOTO educate
IF %WW%==educate GOTO educate
IF %WW%==Ignore GOTO Menu
IF %WW%==ignore GOTO Menu
GOTO Wrong
:YNEB1
echo.
echo Brett was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE2
set /a ZZ =%random% %% 2
goto :YNEBE%ZZ%
:YNEBE0
echo.
echo You caught Ben playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWW=
IF %WWW%==Educate GOTO educate
IF %WWW%==educate GOTO educate
IF %WWW%==Ignore GOTO Menu
IF %WWW%==ignore GOTO Menu
GOTO Wrong
:YNEBE1
echo.
echo Ben was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE3
set /a LL =%random% %% 2
goto :YNEL%LL%
:YNEL0
echo.
echo You caught Lachlan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWWW=
IF %WWWW%==Educate GOTO educate
IF %WWWW%==educate GOTO educate
IF %WWWW%==Ignore GOTO Menu
IF %WWWW%==ignore GOTO Menu
GOTO Wrong
:YNEL1
echo.
echo Lachlan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:South
cls
echo %NN% has chosen to venture South
set /a C =%random% %% 4
goto :ChoiceS%C%
:ChoiceS0
set /a ZZ =%random% %% 2
goto :YNS-%ZZ%
:YNS-0
echo.
echo You caught Jaspar playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Y=
IF %Y%==Educate GOTO educate
IF %Y%==educate GOTO educate
IF %Y%==Ignore GOTO Menu
IF %Y%==ignore GOTO Menu
GOTO Wrong
:YNS-1
echo.
echo Jaspar was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS1
set /a LL =%random% %% 2
goto :YNSJAY%LL%
:YNSJAY0
echo.
echo You caught Jayden playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LX=
IF %LX%==Educate GOTO educate
IF %LX%==educate GOTO educate
IF %LX%==Ignore GOTO Menu
IF %LX%==ignore GOTO Menu
GOTO Wrong
:YNSJAY1
echo.
echo Jayden was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS2
set /a LI =%random% %% 2
goto :YNSJU%LI%
:YNSJU0
echo.
echo You caught Julien playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LP=
IF %LP%==Educate GOTO educate
IF %LP%==educate GOTO educate
IF %LP%==Ignore GOTO Menu
IF %LP%==ignore GOTO Menu
GOTO Wrong
:YNSJU1
echo.
echo Julien was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS3
set /a LL =%random% %% 2
goto :YNSY%LL%
:YNSY0
echo.
echo You caught Yuxuan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LS=
IF %LS%==Educate GOTO educate
IF %LS%==educate GOTO educate
IF %LS%==Ignore GOTO Menu
IF %LS%==ignore GOTO Menu
GOTO Wrong
:YNSY1
echo.
echo Yuxuan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:West
cls
echo %NN% has chosen to venture West
set /a D =%random% %% 4
goto :ChoiceW%D%
:ChoiceW0
set /a LL =%random% %% 2
goto :YNWJUS%LL%
:YNWJUS0
echo.
echo You caught Justin playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LC=
IF %LC%==Educate GOTO educate
IF %LC%==educate GOTO educate
IF %LC%==Ignore GOTO Menu
IF %LC%==ignore GOTO Menu
GOTO Wrong
:YNWJUS1
echo.
echo Justin was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW1
set /a LL =%random% %% 2
goto :YNWF%LL%
:YNWF0
echo.
echo You caught Forrest playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LV=
IF %LV%==Educate GOTO educate
IF %LV%==educate GOTO educate
IF %LV%==Ignore GOTO Menu
IF %LV%==ignore GOTO Menu
GOTO Wrong
:YNWF1
echo.
echo Forrest was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW2
set /a LL =%random% %% 2
goto :YNWM%LL%
:YNWM0
echo.
echo You caught Matthew playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LA=
IF %LA%==Educate GOTO educate
IF %LA%==educate GOTO educate
IF %LA%==Ignore GOTO Menu
IF %LA%==ignore GOTO Menu
GOTO Wrong
:YNWM1
echo.
echo Matthew was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW3
set /a LL =%random% %% 2
goto :YNWE%LL%
:YNWE0
echo.
echo You caught Erol playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LY=
IF %LY%==Educate GOTO educate
IF %LY%==educate GOTO educate
IF %LY%==Ignore GOTO Menu
IF %LY%==ignore GOTO Menu
GOTO Wrong
:YNWE1
echo.
echo Erol was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:educate
cls
set /a UI =%random% %% 3
goto :Educate%UI%
:Educate0
cls
echo You educated the student
ping 192.0.3.2 -n 1 -w 2000 > nul
echo The student replied back with lies
ping 192.0.6.2 -n 1 -w 2000 > nul
echo You shout at the student for lieing
ping 192.0.1.2 -n 1 -w 2000 > nul
echo The student has promised not to play games again
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Decision
:Educate1
cls
echo You ask the student not to play games again
ping 192.0.5.2 -n 1 -w 2000 > nul
echo The student has deleted the games
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Menu
:Educate2
cls
echo The student denies playing games
ping 192.0.5.2 -n 1 -w 2000 > nul
echo You ask the student if he is sure
ping 192.0.5.2 -n 1 -w 2000 > nul
echo You check the internet log for any games
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Log
:Log
cls
echo Checking...
ping 192.0.5.2 -n 1 -w 3000 > nul
set /a KL =%random% %% 2
goto :LogYN%KL%
:LogYN0
cls
echo The log shows games
ping 192.0.5.2 -n 1 -w 1000 > nul
echo You give the student an infringment
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Menu
:LogYN1
cls
echo The log shows no games
ping 192.0.5.2 -n 1 -w 1000 > nul
echo You apoligise to the student and
echo return to your seat
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Menu
ecision
cls
echo Do you believe him?
SET /P V=
IF %V%==Yes GOTO Menu
IF %V%==yes GOTO Menu
IF %V%==No GOTO Drive
IF %V%==no GOTO Drive
rive
cls
echo You check his Data Drive for any games
ping 192.0.1.2 -n 1 -w 2000 > nul
set /a OPOP =%random% %% 2
goto :Games%OPOP%
:Games0
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo You found games!
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You order him to delete them all
ping 192.0.1.2 -n 1 -w 2000 > nul
echo He obeys and you walk away while you give him a death stare
ping 192.0.1.2 -n 1 -w 4000 > nul
goto Menu
:Games1
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo No games are found
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You walk away
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Menu
:Exit
exit
@echo off
title IST Game
mode con: cols=60 lines=15
:Start
cls
FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B
echo Today is the %Today% Version 2.1
echo.
echo Welcome to my game where you catch students playing games
echo.
echo This was made by Ali Dogramaci which was based
echo of Jordan Cinc's game made on Phython
echo.
echo Copyright 2015 Year 9 IST
echo.
echo.
echo Enter your name below
SET /P NN=%NN%
:Menu
cls
echo Choose an action
echo.
echo Move North - N
echo.
echo Move East - E
echo.
echo Move South - S
echo.
echo Move West - W
echo.
echo Exit Game - Exit
SET /P Z=
IF %Z%==N GOTO North
IF %Z%==n GOTO North
IF %Z%==E GOTO East
IF %Z%==e GOTO East
IF %Z%==S GOTO South
IF %Z%==s GOTO South
IF %Z%==W GOTO West
IF %Z%==w GOTO West
IF %Z%==Exit GOTO Exit
IF %Z%==exit GOTO Exit
GOTO Wrong
:Wrong
cls
echo That is not a valid input
pause
goto Menu
:North
cls
echo %NN% has chosen to venture North
set /a A =%random% %% 4
goto :ChoiceN%A%
:ChoiceN0
set /a Z =%random% %% 2
goto :YNNA%Z%
:YNNA0
echo.
echo You caught Ali playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Q=
IF %Q%==Educate GOTO educate
IF %Q%==educate GOTO educate
IF %Q%==Ignore GOTO Menu
IF %Q%==ignore GOTO Menu
GOTO Wrong
:YNNA1
echo.
echo Ali was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN1
set /a ZZ =%random% %% 2
goto :YNNT%ZZ%
:YNNT0
echo.
echo You caught Tiger playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQ=
IF %QQ%==Educate GOTO educate
IF %QQ%==educate GOTO educate
IF %QQ%==Ignore GOTO Menu
IF %QQ%==ignore GOTO Menu
GOTO Wrong
:YNNT1
echo.
echo Tiger was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN2
set /a ZZZ =%random% %% 2
goto :YNNJ%ZZZ%
:YNNJ0
echo.
echo You caught Jordan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQ=
IF %QQQ%==Educate GOTO educate
IF %QQQ%==educate GOTO educate
IF %QQQ%==Ignore GOTO Menu
IF %QQQ%==ignore GOTO Menu
GOTO Wrong
:YNNJ1
echo.
echo Jordan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceN3
set /a ZZZZ =%random% %% 2
goto :YNNK%ZZZZ%
:YNNK0
echo.
echo You caught Keith playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P QQQQ=
IF %QQQQ%==Educate GOTO educate
IF %QQQQ%==educate GOTO educate
IF %QQQQ%==Ignore GOTO Menu
IF %QQQQ%==ignore GOTO Menu
GOTO Wrong
:YNNK1
echo.
echo Keith was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:East
cls
echo %NN% has chosen to venture East
set /a B =%random% %% 4
goto ChoiceE%B%
:ChoiceE0
set /a ZZ =%random% %% 2
goto :YNEM%ZZ%
:YNEM0
echo.
echo You caught Moss playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P W=
IF %W%==Educate GOTO educate
IF %W%==educate GOTO educate
IF %W%==Ignore GOTO Menu
IF %W%==ignore GOTO Menu
GOTO Wrong
:YNEM1
echo.
echo Moss was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE1
set /a ZZZ =%random% %% 2
goto :YNEB%ZZ%
:YNEB0
echo.
echo You caught Brett playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WW=
IF %WW%==Educate GOTO educate
IF %WW%==educate GOTO educate
IF %WW%==Ignore GOTO Menu
IF %WW%==ignore GOTO Menu
GOTO Wrong
:YNEB1
echo.
echo Brett was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE2
set /a ZZ =%random% %% 2
goto :YNEBE%ZZ%
:YNEBE0
echo.
echo You caught Ben playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWW=
IF %WWW%==Educate GOTO educate
IF %WWW%==educate GOTO educate
IF %WWW%==Ignore GOTO Menu
IF %WWW%==ignore GOTO Menu
GOTO Wrong
:YNEBE1
echo.
echo Ben was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceE3
set /a LL =%random% %% 2
goto :YNEL%LL%
:YNEL0
echo.
echo You caught Lachlan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P WWWW=
IF %WWWW%==Educate GOTO educate
IF %WWWW%==educate GOTO educate
IF %WWWW%==Ignore GOTO Menu
IF %WWWW%==ignore GOTO Menu
GOTO Wrong
:YNEL1
echo.
echo Lachlan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:South
cls
echo %NN% has chosen to venture South
set /a C =%random% %% 4
goto :ChoiceS%C%
:ChoiceS0
set /a ZZ =%random% %% 2
goto :YNS-%ZZ%
:YNS-0
echo.
echo You caught Jaspar playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P Y=
IF %Y%==Educate GOTO educate
IF %Y%==educate GOTO educate
IF %Y%==Ignore GOTO Menu
IF %Y%==ignore GOTO Menu
GOTO Wrong
:YNS-1
echo.
echo Jaspar was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS1
set /a LL =%random% %% 2
goto :YNSJAY%LL%
:YNSJAY0
echo.
echo You caught Jayden playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LX=
IF %LX%==Educate GOTO educate
IF %LX%==educate GOTO educate
IF %LX%==Ignore GOTO Menu
IF %LX%==ignore GOTO Menu
GOTO Wrong
:YNSJAY1
echo.
echo Jayden was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS2
set /a LI =%random% %% 2
goto :YNSJU%LI%
:YNSJU0
echo.
echo You caught Julien playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LP=
IF %LP%==Educate GOTO educate
IF %LP%==educate GOTO educate
IF %LP%==Ignore GOTO Menu
IF %LP%==ignore GOTO Menu
GOTO Wrong
:YNSJU1
echo.
echo Julien was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceS3
set /a LL =%random% %% 2
goto :YNSY%LL%
:YNSY0
echo.
echo You caught Yuxuan playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LS=
IF %LS%==Educate GOTO educate
IF %LS%==educate GOTO educate
IF %LS%==Ignore GOTO Menu
IF %LS%==ignore GOTO Menu
GOTO Wrong
:YNSY1
echo.
echo Yuxuan was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:West
cls
echo %NN% has chosen to venture West
set /a D =%random% %% 4
goto :ChoiceW%D%
:ChoiceW0
set /a LL =%random% %% 2
goto :YNWJUS%LL%
:YNWJUS0
echo.
echo You caught Justin playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LC=
IF %LC%==Educate GOTO educate
IF %LC%==educate GOTO educate
IF %LC%==Ignore GOTO Menu
IF %LC%==ignore GOTO Menu
GOTO Wrong
:YNWJUS1
echo.
echo Justin was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW1
set /a LL =%random% %% 2
goto :YNWF%LL%
:YNWF0
echo.
echo You caught Forrest playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LV=
IF %LV%==Educate GOTO educate
IF %LV%==educate GOTO educate
IF %LV%==Ignore GOTO Menu
IF %LV%==ignore GOTO Menu
GOTO Wrong
:YNWF1
echo.
echo Forrest was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW2
set /a LL =%random% %% 2
goto :YNWM%LL%
:YNWM0
echo.
echo You caught Matthew playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LA=
IF %LA%==Educate GOTO educate
IF %LA%==educate GOTO educate
IF %LA%==Ignore GOTO Menu
IF %LA%==ignore GOTO Menu
GOTO Wrong
:YNWM1
echo.
echo Matthew was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:ChoiceW3
set /a LL =%random% %% 2
goto :YNWE%LL%
:YNWE0
echo.
echo You caught Erol playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
SET /P LY=
IF %LY%==Educate GOTO educate
IF %LY%==educate GOTO educate
IF %LY%==Ignore GOTO Menu
IF %LY%==ignore GOTO Menu
GOTO Wrong
:YNWE1
echo.
echo Erol was not doing anything wrong
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You return to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Menu
:educate
cls
set /a UI =%random% %% 3
goto :Educate%UI%
:Educate0
cls
echo You educated the student
ping 192.0.3.2 -n 1 -w 2000 > nul
echo The student replied back with lies
ping 192.0.6.2 -n 1 -w 2000 > nul
echo You shout at the student for lieing
ping 192.0.1.2 -n 1 -w 2000 > nul
echo The student has promised not to play games again
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Decision
:Educate1
cls
echo You ask the student not to play games again
ping 192.0.5.2 -n 1 -w 2000 > nul
echo The student has deleted the games
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Menu
:Educate2
cls
echo The student denies playing games
ping 192.0.5.2 -n 1 -w 2000 > nul
echo You ask the student if he is sure
ping 192.0.5.2 -n 1 -w 2000 > nul
echo You check the internet log for any games
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Log
:Log
cls
echo Checking...
ping 192.0.5.2 -n 1 -w 3000 > nul
set /a KL =%random% %% 2
goto :LogYN%KL%
:LogYN0
cls
echo The log shows games
ping 192.0.5.2 -n 1 -w 1000 > nul
echo You give the student an infringment
ping 192.0.5.2 -n 1 -w 2000 > nul
goto Menu
:LogYN1
cls
echo The log shows no games
ping 192.0.5.2 -n 1 -w 1000 > nul
echo You apoligise to the student and
echo return to your seat
ping 192.0.5.2 -n 1 -w 3000 > nul
goto Menu
ecision
cls
echo Do you believe him?
SET /P V=
IF %V%==Yes GOTO Menu
IF %V%==yes GOTO Menu
IF %V%==No GOTO Drive
IF %V%==no GOTO Drive
rive
cls
echo You check his Data Drive for any games
ping 192.0.1.2 -n 1 -w 2000 > nul
set /a OPOP =%random% %% 2
goto :Games%OPOP%
:Games0
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo You found games!
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You order him to delete them all
ping 192.0.1.2 -n 1 -w 2000 > nul
echo He obeys and you walk away while you give him a death stare
ping 192.0.1.2 -n 1 -w 4000 > nul
goto Menu
:Games1
cls
ping 192.0.1.2 -n 1 -w 3000 > nul
echo No games are found
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You walk away
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Menu
:Exit
exit
Re: User win
Please, help me. I haven't learnt that much-advanced coding. You're the only person who bothered to even help me.
Re: User win
It's far better to post a specific question about a problem you have.
Aacini went to some effort to analyse your code and provide an improved version - yet you didn't
seem to run it, or comment on what he had improved.
Aacini went to some effort to analyse your code and provide an improved version - yet you didn't
seem to run it, or comment on what he had improved.
Re: User win
How do you know I didn't run it, I even saved it next to my old version. I acknowledge him greatly for spending his time on improving mine. I used coding that I thought wasn't even possible on batch. I'm just asking if he can edit it and remake it. Just asking, he is the only person who helped.