
@echo off
title Arena
::Stats
set HP=100
set OPHP=100
set DMG=10
set WepDMG=0
set HealthPots=0
set TotalDMG=%DMG%+%WepDMG%
:LogIn
cls
echo Welcome to the Arena
echo.
echo Press L if your a returning Champion
echo Press N if your a Newbie
echo.
set /p ch1=">>"
if %ch1%== L goto Load
if %ch1%== N goto Intro
if not %ch1%== L goto :LogIn
if not %ch1%== N goto :LogIn
:Intro
cls
echo The Arena is a cutthroat competition of strength.There is no mercy.No retrys either you do you die forever you have to start over so good luck out there.
pause
cls
echo Welcome Contestant!
echo.
echo What is your name?
echo.
set /p Name=">>"
cls
echo Welcome to the Arena %Name%, heres some gold to help you on your way.
echo.
echo You got 100 gold!
set Gold=100
goto Save
:Load
cls
echo What is your name Champion?
echo.
set /p Name=">>"
(
set /p Name=
set /p WepDMG=
set /p Gold=
set /p HealthPots=
)<%Name%.txt
goto Menu
:Menu
cls
echo Welcome to the Arena! %Name% Gold %Gold%
echo.
echo 1) Battle Someone
echo 2) Armory
echo 3) Save
echo 4) Exit
echo.
set /p ch2=">>"
if %ch2%== 1 goto Battle
if %ch2%== 2 goto Armory
if %ch2%== 3 goto Save
if %ch2%== 4 goto Exit
if not %ch2%== 1 goto Menu
if not %ch2%== 2 goto Menu
if not %ch2%== 3 goto Menu
if not %ch2%== 4 goto Menu
:Exit
cls
echo Are you Sure? Yes or No?
echo.
set /p ch3=">>"
if %ch3%== Yes Exit
if %ch3%== No goto Menu
if not %ch3%== goto Exit
if not %ch3%== goto Exit
if not defined %ch2% (
cls
goto Exit
)
:Save
(
echo %Name%
echo %WepDMG%
echo %Gold%
echo %HealthPots%
)>%Name%.txt
goto Menu
:Armory
cls
echo Welcome to the Armory, here you can upgrade your gear and buy health pots.
echo.
echo 1) Dagger +5 DMG 50 gold
echo 2) Go back
echo.
set /p ch5=">>"
if %ch5%== 1 goto BuyDagger
if %ch5%== 2 goto Menu
if not %ch5%== 1 goto Armory
if not %ch5%== 2 goto Armory
:BuyDagger
cls
if %Gold% lss 50 goto InsufficientFunds
echo You bought a Dagger for 50 gold!
set /a WepDMG+=5
set /a Gold=%Gold%-50
pause
goto Armory
:InsufficientFunds
cls
echo You can't buy this you too poor!
pause
goto Armory
:Battle
cls
if %OPHP% lss 0 goto Victory
if %HP% lss 0 goto Fail
echo %Name% %HP% Opponent %OPHP%
echo.
echo 1) Attack
echo 2) HealthPot
echo.
set /p ch4=">>"
if %ch4%== 1 goto Attack
if %ch4%== 2 goto HealthPot
if not %ch4%== 1 goto Battle
if not %ch4%== 2 goto Battle
:Attack
set /a OPHP=%OPHP%-%TotalDMG%
goto OPAttack
:HealthPot
if %HealthPots% EQU 0 goto NoHealthPots
set /a HP=%HP%+20
set /a HealthPots=%HealthPots%-1
echo.
echo You gained 20 Health
pause
cls
goto Battle
:OPAttack
set /a HP=%HP%-%Random% %%10-5%
goto Battle
:NoHealthPots
cls
echo You have no Health Pots!
pause
goto Battle
:Victory
cls
echo Congratulations! You killed the guy, You won 100 gold!
set /a Gold=%Gold%+100
set OPHP=100
pause
goto :Menu
:Fail
echo You failed!
echo You weren't fit for the Arena.
echo You are Dead.
Del %Name%.txt
pause
goto LogIn
I have tried multiple code but none of it works
