i cant use more than one choice in batch code game?

March 26, 2019 at 15:13:26
Specs: Windows 10
im making a game and my third choice brings me to my second choice, heres the game so far

@echo off
color 3E
title The Pond
echo.
echo Hello player. This is a small choose your own path game
echo.
echo I hope you enjoy
echo.
pause
:p

cls
echo.
echo Your walking down a path, and see a small pond off to the right side of the path.
:p1
echo.
echo ____---------:======:---________________
echo ; ; / \_
echo ; ; _/ \ ^<---POND
echo ; ; / \
echo ; ; ^| ^|
echo " . \________________/
echo.
set /p choice=Would you like to: 1) go to the pond - or - 2) continue down the path?(1/2)
if %choice%==1 goto po1
if %choice%==2 goto pa1
if not %choice%==1/2/stop goto p
:po1
cls
echo.
echo You start walking towards the pond, but realize you dont have a fishing rod or blanket to sit on
echo.
echo Press any key to go back to the path
pause>nul
goto p1
:pa1
cls
echo.
echo As you continue down the path, you see a house at the end. You try the door and find that its unlocked
echo.
echo You enter the house
echo.
pause
:h
cls
color 0F
echo.
echo You step inside the house, and you are greeted with many different items
echo.
echo ^\ ^/
echo ^\ ^/
echo \________________________________________________________________________^/
echo ^| ^|
echo ^| ^|
echo ^| ^|
echo ^| o ^|
echo ^| ^/ ^\ ^|
echo ^| ____^/___^\____ ^|
echo ^| PAINTING--^>{^| ______ ^|} ^|
echo ^| ^|^|^/______^\ ^|^| ^|
echo ^| _MATCH BOX ^|^| ^|__ ^| ^|^| ^|
echo ^| ^| {^|_^|^|^|__^|____^|} ^|
echo ^| V ^|
echo ^| [ ] ^<---CANDLE _______ ___ ^|
echo ^|____^| ^|____ __^/______^/_=_^/^|___ ^|
echo ^/ C^\_^|_^|_^/ ^/^| ^/ ^|_____^|___^|^/ ^/^| ^|
echo ^/_________ ^/ ^| ^/_________________^/ ^| ^|
echo ^| ^| ^|________^| ^| ^|_____________________________^|
echo ^| ^| ^/ ^| ^| ^/ ^\
echo ^/^|_________^|^/ ^|________________^|^/ ^\
echo ^/ ^\
echo.
echo 1) CANDLE
echo 2) MATCH BOX
echo 3) PAINTING
echo.
set /p chioce=Which item would you like to use?
if %chioce%==1 goto can1
if %choice%==2 goto mb1
if %choice%==3 goto pa1
if not %choice%==1/2/3/stop goto h
:can1
cls
echo.
echo You take the candle but realize you have nothing to light it with
echo.
echo Press any key to go back to the room
pause>nul
goto h
:mb1
cls
color 8E
echo.
echo You take a match from the match box and light the candle
echo The room lights up and you can see a trap door in the floor
echo.
set /p choice=What do you want to do?: 1) Stay in the room - or - 2) Open the trap door (1/2)
if %choice%==1 goto h
if %choice%==2 goto td1
if not %choice%==1/2/stop goto mb1
pause>nul
goto mb1
:td1
cls
echo.
echo You try to open the trap door, but it needs a key
echo.
echo Press any key to go back to the room
pause>nul
goto h
:pa1
cls
echo.
echo You look behind the painting and see a safe
echo Thankfully, the safe is already open
echo.
echo Inside, you see a key
echo.
set /p choice=Would you like to use the key on the trap door?: 1) Yes - or - 2) No (1/2)
if %choice%==1 goto td2
if %choice%==2 goto h
if not %choice%==1/2/stop goto pa1
:td2
cls
echo.
echo You open the trap door and see a ladder in the candle light
echo.
set /p choice=What do you want to do?: 1) Descend the ladder - or - 2) Go back to the room (1/2)
if %choice%==1 goto bs1
if %choice%==2 goto h
if not %choice%==1/2/stop goto td2
:bs1
echo.
echo More coming soon!
echo.
echo Press any key to return to the beginning
pause>nul
goto p


See More: i cant use more than one choice in batch code game?

Reply ↓  Report •

#1
March 26, 2019 at 15:14:14
I have ASCII art in it.

Reply ↓  Report •
Related Solutions


Ask Question