I recently started working on this again and some things are unfinished and I'm still testing like defence.
@echo off
color f4
Title The White Knight v(0.4) BETA by Enginn
set attack=1
set defence=1
set gold=50
set magic=1
set luck=1
set level=1
set exp=0
set stathealth=0
set statpoints=0
:begining
cls
echo.
echo Game created by Enginn, you can not copy this code and release it as your own.
echo.
echo -----------------
echo 1 - Start game
echo 2 - How to play
echo -----------------
echo.
set option=
set /p option=Option:
if %option%==1 goto :exp
if %option%==2 goto :how to play
goto :begining
:how to play
cls
echo.
echo Welcome to the game White Knight
echo.
echo You have a couple of stats they are attack, defence, magic, luck, stat-points
echo Attack lets you hurt more with meele attack.
echo Defence lets you defend yourself when you're attacked.
echo Magic and Luck both let you hurt more with the magic attack.
echo You can use Stat-Points to increase some stats.
echo Everything else is explained in game, have fun.
echo.
echo IF YOU PRESS ENTER WHILE NOTHING IS TYPED IN ANYWHERE IT WILL CLOSE THE GAME.
pause
echo
:exp
set /a expneeded=%level%*100
if %exp% GEQ %expneeded% goto :levelup
goto :start
:levelup
cls
set /a gold=%gold%+(50*%level%)
set /a statpoints=%statpoints%+3
set exp=0
set /a level=%level%+1
echo You gained a level congratulations, you got 3 statpoints and a little gold.
pause >nul
goto :start
:start
cls
set /a expneeded=%level%*100
set /a health=%level%*15
echo ---------------------------
echo Health: %health%
echo Level: %level%
echo Exp: %exp%/%expneeded%
echo Stat-Points: %statpoints%
echo Gold: %gold%
echo Attack: %attack%
echo Defence: %defence%
echo Magic: %magic%
echo Luck: %luck%
echo ---------------------------
echo 1 - Go to the shop
echo 2 - Battle monsters
echo 3 - Stat-Points exchange
echo.
set chosen=
set /p chosen=Option:
if %chosen%==1 goto :shop
if %chosen%==2 goto :monsters
if %chosen%==3 goto :statpoints
goto :start
:monsters
cls
echo -----------------------
echo The Monster Cave
echo -----------------------
echo Type in the monsterlevel you want to battle 1 - 6
echo Type x to leave the Monster cave
echo.
set monsterlevel=
set /p monsterlevel=Monster-level:
if %monsterlevel%==x goto :start
if %monsterlevel% GTR 5 goto :monsters
if %monsterlevel% LSS 1 goto :monsters
goto :level%monsterlevel%
:level1
set monsterhealth=10
:level1choosing
set /a randomish=%random%%%%level%%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%3%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level1meele
if %option%==2 goto :level1magic
goto :level1choosing
:level1meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level1won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level1monsterattack
:level1magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level1won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level1monsterattack
:level1monsterattack
cls
set /a health=%health%-%randomizer%+%defended%
if %health% LEQ 0 goto :level1lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
set /a defended=0
pause >nul
goto :level1choosing
:level1won
echo Congratulations you defeated the monster you gained 10 experience and 15 gold
set /a gold=%gold%+15
set /a exp=%exp%+10
pause >nul
goto :exp
:level1lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:level2
set monsterhealth=35
:level2choosing
set /a randomish=%random%%%%level%%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%6%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level2meele
if %option%==2 goto :level2magic
goto :level2choosing
:level2meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level2won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level2monsterattack
:level2magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level2won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level2monsterattack
:level2monsterattack
cls
set /a health=%health%-%randomizer%
if %health% LEQ 0 goto :level2lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
pause >nul
goto :level2choosing
:level2won
echo Congratulations you defeated the monster you gained 15 experience and 25 gold
set /a gold=%gold%+25
set /a exp=%exp%+15
pause >nul
goto :exp
:level2lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:level3
set monsterhealth=70
:level3choosing
set /a randomish=%random%%%%level%%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%10%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level3meele
if %option%==2 goto :level3magic
goto :level3choosing
:level3meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level3won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level3monsterattack
:level3magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level3won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level3monsterattack
:level3monsterattack
cls
set /a health=%health%-%randomizer%
if %health% LEQ 0 goto :level3lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
pause >nul
goto :level3choosing
:level3won
echo Congratulations you defeated the monster you gained 20 experience and 35 gold
set /a gold=%gold%+35
set /a exp=%exp%+20
pause >nul
goto :exp
:level3lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:level4
set monsterhealth=120
:level4choosing
set /a randomish=%random%%%%level%%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%16%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level4meele
if %option%==2 goto :level4magic
goto :level4choosing
:level4meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level4won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level4monsterattack
:level4magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level4won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level4monsterattack
:level4monsterattack
cls
set /a health=%health%-%randomizer%
if %health% LEQ 0 goto :level4lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
pause >nul
goto :level4choosing
:level4won
echo Congratulations you defeated the monster you gained 25 experience and 50 gold
set /a gold=%gold%+50
set /a exp=%exp%+25
pause >nul
goto :exp
:level4lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:level5
set monsterhealth=200
:level5choosing
set /a randomish=%random%%%%level%%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%25%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level5meele
if %option%==2 goto :level5magic
goto :level5choosing
:level5meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level5won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level5monsterattack
:level5magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level5won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level5monsterattack
:level5monsterattack
cls
set /a health=%health%-%randomizer%
if %health% LEQ 0 goto :level5lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
pause >nul
goto :level5choosing
:level5won
echo Congratulations you defeated the monster you gained 30 experience and 70 gold
set /a gold=%gold%+70
set /a exp=%exp%+30
pause >nul
goto :exp
:level5lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:level6
set monsterhealth=300
:level6choosing
set /a randomish=%random%%%level%
if %randomish% LEQ 0 set randomish=1
set /a randomizer=%random%%%40%
if %randomizer% LEQ 0 set randomizer=1
set /a meele=%randomish%*%attack%
set /a defended=%randomish%*%defence%
set /a magicattack=%randomish%*%magic%*%luck%
cls
echo Monsterhealth: %monsterhealth%
echo Your health: %health%
echo 1 - use meele attack
echo 2 - use magic attack
echo.
set option=
set /p option=Option:
if %option%==1 goto :level6meele
if %option%==2 goto :level6magic
goto :level6choosing
:level6meele
cls
set /a monsterhealth=%monsterhealth%-%meele%
if %monsterhealth% LEQ 0 goto :level6won
echo you attacked the monster with meele, you took %meele% life, monster now has %monsterhealth% life left
pause >nul
goto :level6monsterattack
:level6magic
cls
set /a monsterhealth=%monsterhealth%-%magicattack%
if %monsterhealth% LEQ 0 goto :level6won
echo you attacked the monster with magic, you took %magic% life, monster now has %monsterhealth% life left
pause >nul
goto :level6monsterattack
:level6monsterattack
cls
set /a health=%health%-%randomizer%
if %health% LEQ 0 goto :level6lost
echo Monster attacked you, monster took %randomizer% life, you now have %health% left
pause >nul
goto :level6choosing
:level6won
echo Congratulations you defeated the monster you gained 35 experience and 100 gold
set /a gold=%gold%+100
set /a exp=%exp%+35
pause >nul
goto :exp
:level6lost
echo Sorry you were defeated by the monster
pause >nul
goto :start
:shop
cls
echo --------------------------------------------------
echo Ye olde shoppe
echo --------------------------------------------------
echo Level: %level%
echo Gold: %gold%
echo Attack: %attack%
echo Defence: %defence%
echo Magic: %magic%
echo Luck: %luck%
echo --------------------------------------------------
echo 1 - Swords "gives attack"
echo 2 - Armors "gives defence"
echo 3 - Staffs "gives magic"
echo 4 - Amulets "gives luck"
echo 5 - Exit shoppe
echo --------------------------------------------------
set chosen=
set /p chosen=Option:
if %chosen%==1 goto :swords
if %chosen%==2 goto :armors
if %chosen%==3 goto :staffs
if %chosen%==4 goto :amulets
if %chosen%==5 goto :start
if %chosen%=="" goto :shop2
:shop2
goto :shop
:swords
cls
echo --------------------------------------------------
echo Ye olde shoppe: Swords
echo --------------------------------------------------
echo Requirements:
echo 1 - Iron sword, 200 gold, level 1 " gives you 1 attack"
echo 2 - Steel sword, 500 gold, level 3 "gives you 3 attack"
echo 3 - Gold sword, 1000 gold, level 7 "gives you 7 attack"
echo 4 - Go back to shop listings
echo --------------------------------------------------
set option=
set /p option=Option:
if %option%==1 goto :siron
if %option%==2 goto :ssteel
if %option%==3 goto :sgold
if %option%==4 goto :shop
if %option%=="" goto :swords2
:swords2
goto :swords
:armors
cls
echo --------------------------------------------------
echo Ye olde shoppe: Armors
echo --------------------------------------------------
echo Requirements:
echo 1 - Iron armor, 200 gold, level 1 "gives you 1 defence"
echo 2 - Steel armor, 500 gold, level 3 "gives you 3 defence"
echo 3 - Gold armor, 1000 gold, level 7 "gives you 7 defence"
echo 4 - Go back to shop listings
echo --------------------------------------------------
set option=
set /p option=Option:
if %option%==1 goto :airon
if %option%==2 goto :asteel
if %option%==3 goto :agold
if %option%==4 goto :shop
if %option%=="" goto :armors2
:armors2
goto :armors
:staffs
cls
echo --------------------------------------------------
echo Ye olde shoppe: Staffs
echo --------------------------------------------------
echo Requirements:
echo 1 - Iron staff, 500 gold, level 5 "gives you 1 magic"
echo 2 - Steel staff, 1000 gold, level 10 "gives you 3 magic"
echo 3 - Gold staff, 2000 gold, level 15 "gives you 7 magic"
echo 4 - Go back to shop listings
echo --------------------------------------------------
set option=
set /p option=Option:
if %option%==1 goto :miron
if %option%==2 goto :msteel
if %option%==3 goto :mgold
if %option%==4 goto :shop
if %option%=="" goto :staffs2
:staffs2
goto :staffs
:amulets
cls
echo --------------------------------------------------
echo Ye olde shoppe: Amulets
echo --------------------------------------------------
echo Requirements:
echo 1 - Saphire amulet, 300 gold "gives you 1 luck"
echo 2 - Ruby amulet, 800 gold "gives you 3 luck"
echo 3 - Diamond amulet, 1500 gold "gives you 7 luck
echo 4 - Go back to shop listings
echo --------------------------------------------------
set option=
set /p option=Option:
if %option%==1 goto :lspahire
if %option%==2 goto :lruby
if %option%==3 goto :ldiamond
if %option%==4 goto :shop
if %option%=="" goto :amulets2
:amulets2
goto :amulets
:siron
cls
if %gold% GEQ 200 goto :siron check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:siron check
if %level% GEQ 1 goto :siron accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:siron accept
set /a gold=%gold%-200
set /a attack=%attack%+1
echo Congratulations attack is now %attack%, press any button to return to main screen
pause >nul
goto :shop
:ssteel
cls
if %gold% GEQ 500 goto :ssteel check
echo Sorry requirements not eet, press any button to return to main screen
pause >nul
goto :shop
:ssteel check
if %level% GEQ 3 goto :ssteel accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:ssteel accept
set /a gold=%gold%-500
set /a attack=%attack%+3
echo Congratulations attack is now %attack%, press any button to return to main screen
pause >nul
goto :shop
:sgold
cls
if %gold% GEQ 1000 goto :sgold check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:sgold check
if %level% GEQ 7 goto :sgold accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:sgold accept
set /a gold=%gold%-1000
set /a attack=%attack%+7
echo Congratulations attack is now %attack%, press any button to return to main screen
pause >nul
goto :shop
:miron
cls
if %gold% GEQ 500 goto :miron check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:miron check
if %level% GEQ 5 goto :miron accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:miron accept
set /a gold=%gold%-500
set /a magic=%magic%+1
echo Congratulations magic is now %magic%, press any button to return to main screen
pause >nul
goto :shop
:msteel
cls
if %gold% GEQ 1000 goto :msteel check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:msteel check
if %level% GEQ 5 goto :msteel accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:msteel accept
set /a gold=%gold%-1000
set /a magic=%magic%+3
echo Congratulations magic is now %magic%, press any button to return to main screen
pause >nul
goto :shop
:mgold
cls
if %gold% GEQ 2000 goto :mgold check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:mgold check
if %level% GEQ 5 goto :mgold accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:mgold accept
set /a gold=%gold%-2000
set /a magic=%magic%+7
echo Congratulations magic is now %magic%, press any button to return to main screen
pause >nul
goto :shop
:airon
cls
if %gold% GEQ 200 goto :airon check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:airon check
if %level% GEQ 1 goto :airon accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:airon accept
set /a gold=%gold%-200
set /a defence=%defence%+1
echo Congratulations defence is now %defence%, press any button to return to main screen
pause >nul
goto :shop
:asteel
cls
if %gold% GEQ 500 goto :asteel check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:asteel check
if %level% GEQ 3 goto :asteel accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:asteel accept
set /a gold=%gold%-500
set /a defence=%defence%+3
echo Congratulations defence is now %defence%, press any button to return to main screen
pause >nul
goto :shop
:agold
cls
if %gold% GEQ 1000 goto :agold check
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:agold check
if %level% GEQ 7 goto :agold accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:agold accept
set /a gold=%gold%-1000
set /a defence=%defence%+7
echo Congratulations defence is now %defence%, press any button to return to main screen
pause >nul
goto :shop
:lsaphire
cls
if %gold% GEQ 300 goto :lsaphire accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:lsaphire accept
set /a gold=%gold%-300
set /a magic=%luck%+1
echo Congratulations luck is now %luck%, press any button to return to main screen
pause >nul
goto ::shop
:lruby
cls
if %gold% GEQ 800 goto :lruby accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:lruby accept
set /a gold=%gold%-800
set /a magic=%luck%+3
echo Congratulations luck is now %luck%, press any button to return to main screen
pause >nul
goto :shop
:ldiamond
cls
if %gold% GEQ 1500 goto :ldiamond accept
echo Sorry requirements not met, press any button to return to main screen
pause >nul
goto :shop
:ldiamond accept
set /a gold=%gold%-1500
set /a magic=%luck%+7
echo Congratulations luck is now %luck%, press any button to return to main screen
pause >nul
goto :shop
:statpoints
set /a health=%level%*15+%stathealth%
cls
echo --------------------------------------
echo Stat-Point exchange
echo --------------------------------------
echo Stat-Points: %statpoints%
echo Health: %health%
echo Attack: %attack%
echo Defence: %defence%
echo Magic: %magic%
echo Luck: %luck%
echo --------------------------------------
echo 1 - Get 5 health for 1 stat-point
echo 2 - Get 1 Attack for 1 stat-point
echo 3 - Get 1 Defence for 1 stat-point
echo 4 - Get 1 Magic for 2 stat-points
echo 5 - Get 1 Luck for 2 stat-points
echo 6 - Exit the exchange
echo.
set option=
set /p option=Option:
if %option%==1 goto :stathealth
if %option%==2 goto :statattack
if %option%==3 goto :statdefence
if %option%==4 goto :statmagic
if %option%==5 goto :statluck
if %option%==6 goto :start
goto :statpoints
:stathealth
cls
if %statpoints% GEQ 1 goto :stathealthaccept
echo Sorry you do not have enought stat-points
pause >nul
goto :statpoints
:stathealthaccept
set /a stathealth=%stathealth%+5
set /a statpoints=%statpoints%-1
echo Congratulations you gained 5 health
pause >nul
goto :statpoints
:statattack
cls
if %statpoints% GEQ 1 goto :statattackaccept
echo Sorry you do not have enought stat-points
pause >nul
goto :statpoints
:statattackaccept
set /a attack=%attack%+1
set /a statpoints=%statpoints%-1
echo Congratulations you gained 1 attack
pause >nul
goto :statpoints
:statdefence
cls
if %statpoints% GEQ 1 goto :statdefenceaccept
echo Sorry you do not have enought stat-points
pause >nul
goto :statpoints
:statdefenceaccept
set /a defence=%defence%+1
set /a statpoints=%statpoints%-1
echo Congratulations you gained 1 defence
pause >nul
goto :statpoints
:statmagic
cls
if %statpoints% GEQ 2 goto :statmagicaccept
echo Sorry you do not have enought stat-points
pause >nul
goto :statpoints
:statmagicaccept
set /a magic=%magic%+1
set /a statpoints=%statpoints%-2
echo Congratulations you gained 1 magic
pause >nul
goto :statpoints
:statluck
cls
if %statpoints% GEQ 2 goto :statluckaccept
echo Sorry you do not have enought stat-points
pause >nul
goto :statpoints
:statluckaccept
set /a luck=%luck%+1
set /a statpoints=%statpoints%-2
echo Congratulations you gained 1 magic
pause >nul
goto :statpoints