User win

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Message
Author
ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: User win

#46 Post by ShadowThief » 19 Jul 2015 02:32

It would help me out immensely if you posted your entire code. Preferably in [code] tags.

117Mickey
Posts: 39
Joined: 19 Jun 2015 05:33

Re: User win

#47 Post by 117Mickey » 19 Jul 2015 02:39

Sure, but its preety long. And what does code tag mean?

117Mickey
Posts: 39
Joined: 19 Jun 2015 05:33

Re: User win

#48 Post by 117Mickey » 19 Jul 2015 02:48

Here you go, its pretty long.

Thanks

@echo off
title IST Game 2015
mode con: cols=70 lines=18

:Start
cls
FOR /F "tokens=*" %%A IN ('DATE/T') DO FOR %%B IN (%%A) DO SET Today=%%B
echo Today is the %Today% Version 3.9
echo.
echo Copyright 2015 Year 9 IST
echo.
echo This was made by Ali Dogramaci
echo.
echo Do you want to play as Teacher, Student or access Tools
echo.
choice /C:TSO /M "T, S or O? " /N
if errorlevel 3 goto :Tools
if errorlevel 2 goto :NameStudent
if errorlevel 1 goto :Teacher

:NameStudent
cls
echo Welcome to my game where you catch your teacher doing wrong things
echo.
echo Enter your name below
SET /P POOP=%POOP%
IF %POOP%==Ali GOTO AdminS
IF %POOP%==ali GOTO AdminS
IF %POOP%==Keith GOTO AdminS
IF %POOP%==keith GOTO AdminS
goto Student

:Student
set winS=0
cls
echo Hi %POOP%, try and win
echo.
echo Check the teachers screen - C
echo.
echo Download software to hack - D
echo.
echo Continue doing your work - W
echo.
echo Exit - X
echo.
echo Subscribe - A
echo.
choice /C:CDWXA /M "C, D, W, X or A? " /N
if errorlevel 5 goto :Subscribe
if errorlevel 4 goto :Exit
if errorlevel 3 goto :CYW
if errorlevel 2 goto :Soft
if errorlevel 1 goto :CheckS

:CheckS
if %winS% lss 2 (set /A winS+=1) else set winS=0
cls
echo %POOP% suddenly gets up and walk to the teachers desk
ping 192.0.2.2 -n 1 -w 2000 > nul
set /a LLK =%random% %% 2
goto :Desk%LLK%

:Desk0
cls
echo They close the screen and tell you to walk away
ping 192.0.2.2 -n 1 -w 2000 > nul
echo %POOP% sits down at their own desk
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Student

:Desk1
cls
echo The teacher was playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
set /a OLO =%random% %% 2
goto :Ran%OLO%

:Ran0
cls
echo They give you the game so you can play as well
ping 192.0.2.2 -n 1 -w 2000 > nul
echo %POOP% had a fun time playing
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Student

:Ran1
cls
echo They shout at you and tell you to go back to your seat
ping 192.0.2.2 -n 1 -w 2000 > nul
echo %SSD% sits back down
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Student

:Soft
if %winS% geq 1 set /A winS+=1s
if %winS% equ 3 goto :WINWINS
cls
echo Downloading software from the internet
ping 192.0.2.2 -n 1 -w 2000 > nul
echo Downloaded...
ping 192.0.2.2 -n 1 -w 2000 > nul
echo Mirroring the screen
ping 192.0.2.2 -n 1 -w 1000 > nul
set /a JUH =%Random% %% 2
goto :RandomS%JUH%

:RandomS0
cls
echo You see games on the screen.
ping 192.0.2.2 -n 1 -w 2000 > nul
echo You confront the teacher with what you saw.
ping 192.0.2.2 -n 1 -w 1000 > nul
set /a IIP =%Conf% %% 2
goto :ScreenC%IIP%

:RandomS1
cls
echo You see nothing suspicious
ping 192.0.2.2 -n 1 -w 2000 > nul
goto CYW

:ScreenC
cls
echo The teacher shouts back for confronting them
ping 192.0.2.2 -n 1 -w 2000 > nul
echo They give you an infringment
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 Student

:ScreenC
cls
echo The teacher acknoledges what you saw
ping 192.0.2.2 -n 1 -w 2000 > nul
echo They give themselves an infringment
ping 192.0.2.2 -n 1 -w 2000 > nul
echo :)
ping 192.0.2.2 -n 1 -w 1000 > nul
goto Student

:CYW
set winS=0
cls
echo You continue doing your own work.
ping 192.0.2.2 -n 1 -w 2000 > nul
goto Student

:Teacher
cls
echo Welcome to my game where you catch students playing games
echo.
echo Enter your name below
SET /P NN=%NN%
IF %NN%==Ali GOTO AdminT
IF %NN%==ali GOTO AdminT
IF %NN%==Kieth GOTO AdminT
IF %NN%==keith GOTO AdminT
goto Menu

:AdminT
cls
echo To win the game, go North 2 times and South 3 times
pause
goto Menu

:AdminS
cls
echo To win the game on student, go
pause
goto Student

:Menu
set win=0
cls
echo Hi %NN%, try and win
echo.
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 - X
echo.
echo Subscribe - A
echo.

choice /C:NESWXA /M "N, E, S, W, X or A? " /N
if errorlevel 6 goto :Subscribe
if errorlevel 5 goto :Exit
if errorlevel 4 goto :West
if errorlevel 3 goto :South
if errorlevel 2 goto :East
if errorlevel 1 goto :North

:Wrong
cls
echo That is not a valid input
pause
goto Menu


:North
if %win% lss 2 (set /A win+=1) else set win=0
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
echo.
choice /C:IE /M "E or I? " /N
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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

choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
set win=0
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 Michael playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
echo.
choice /C:IE /M "E or I? " /N
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

:YNEM1
echo.
echo Michael 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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
if %win% geq 2 set /A win+=1
if %win% equ 5 echo You won & goto :WINWINT
cls
echo %NN% has chosen to venture South
set /a C =%random% %% 4
goto :ChoiceS%C%

:ChoiceS0
set /a ZZ =%random% %% 2
goto :YNSJ%ZZ%

:YNSJ0
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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

:YNSJ1
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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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 Tony playing games
ping 192.0.2.2 -n 1 -w 2000 > nul
echo What will you do?
echo.
echo - Educate
echo - Ignore
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

:YNSY1
echo.
echo Tony 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
set win=0
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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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
echo.
choice /C:IE /M "E or I? " /N
echo.
if errorlevel 2 call :educate
if errorlevel 1 goto Menu

: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

:Decision
cls
echo Do you believe him?

choice /C:YN /M "Y or N? " /N
echo.
if errorlevel 2 call :Drive
if errorlevel 1 goto Menu

:Drive
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

:WINWINT
cls
echo You have educated students and deleted their games
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You win
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Exit

:WINWINS
cls
echo You have caught the teacher doing something wrong
ping 192.0.1.2 -n 1 -w 2000 > nul
echo You win
ping 192.0.1.2 -n 1 -w 2000 > nul
goto Exit

:Subscribe
cls
start chrome https://www.youtube.com/channel/UCgoc_O65zZSZDQyTg_r-FRA

:Tools
cls
echo Welcome to the tools section
echo.
echo Guess the number - G
echo Random Number Generator - O
echo Roll a random dice - D
echo.
choice /C:GOD /M "G, O or D? " /N
if errorlevel 3 goto :Dice
if errorlevel 2 goto :RNG
if errorlevel 1 goto :GuessTN

:GuessTN
cls
echo Guess the number
ping 192.0.1.2 -n 1 -w 2000 > nul
set /a guessnum=0
set /a answer=%RANDOM% * 100 / 32768 + 1
set variable1=admin
:top
echo.
set /p guess=
echo.
if %guess% GTR %answer% ECHO Lower!
if %guess% LSS %answer% ECHO Higher!
if %guess%==%answer% GOTO EQUAL
set /a guessnum=%guessnum% +1
if %guess%==%variable1% ECHO Cheating hey?, the answer is: %answer%
goto top
:equal
echo Congratulations, You guessed right!!!
echo.
echo It took you %guessnum% guesses.
echo.
choice /C:RX /M "Enter R to restart or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :GuessTN

:RNG
cls
echo Random Number Generator Between 1 - 1000
set /a answer=%RANDOM% * 1000 / 32768 + 1
echo Your number is %answer%
echo.
choice /C:AX /M "Enter A for a new number or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RNG

:Dice
cls
echo Roll a random dice

:MainDice
echo.
choice /C:R /M "Enter R to roll the dice" /N
if errorlevel 1 goto :RollR

:RollR
cls
set /a RollDI=%RANDOM% * 6 / 32768 + 1
set /a ROLL =%random% %% 6
goto :Dice%ROLL%

:Dice0
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Dice1
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Dice2
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Dice3
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Dice4
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Dice5
cls
echo You rolled a %RollDI%
echo.
choice /C:RX /M "Enter R to roll the dice again or X to exit" /N
if errorlevel 2 goto :Exit
if errorlevel 1 goto :RollR

:Exit
cls
echo Thanks for playing :)
ping 192.0.1.2 -n 1 -w 2000 > nul
exit

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: User win

#49 Post by ShadowThief » 19 Jul 2015 02:48

When you paste your text into the text box to reply, highlight your entire code and click the Code button that's right above the text box. That will make it easier to read.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: User win

#50 Post by foxidrive » 19 Jul 2015 02:49

This thread isn't productive, with poor communication and unreasonable expectations from the original poster, so it has been locked.

If you would like it reopened then send a moderator a personal message.

Locked