Situatie
Solutie
- Press Start
- Type in notepad
- In notepad Copy and Paste the code below:
@echo off
:menu
color 0a
cls
echo DRAGON KILL
echo Choose the number:
echo 1. Start game
echo 2. Exit
set /p menu=
if ‘%menu%’==’1’ (
goto sets
)
if ‘%menu%’==’2’ (
exit
)else goto menu
:sets
cls
set /a money=1000
set /a health=1000
set /a potions=0
set /a damage=2
set /a dd=5
set /a dh=25
set /a moneygain=50
set /a levels=0
set /a new=%dh%+5
:start
cls
echo Money:%money%
echo Health:%health%
echo Number of healing potions:%potions%
echo Choose the number:
echo 1. Venture onward to the dragon
echo 2. Go to Store
echo 3. Go to Title screen
echo 4. Drink heal potion
set /p choose=
if ‘%choose%’==’1’ (
cls
echo DO NOT HOLD THE ENTER KEY
pause
goto fight
)
if ‘%choose%’==’2’ (
goto store
)
if ‘%choose%’==’3’ (
goto menu
)
if ‘%choose%’==’4’ (
goto nextx
)else goto start
:fight
cls
echo Health:%health%
echo Dragon’s Health:%new%
echo You have encountered a dragon
pause
cls
echo Press enter to hit the dragon
set /p hit=
set /a new=%new%-%damage%
if %new% LSS 1 (
goto defeat
)
cls
echo Health:%health%
echo Dragon’s Health:%new%
echo You have hit the dragon
echo The dragon lost %damage% health
- In the top right of notepad click File
- Then click Save As
- IMPORTANT: Name the file DragonKill.bat
- Then Click the drop down menu below that says Text Document
- Change it to All Files
- Click save
- Then go to your windows explorer (the file folder icon) then open up the game!
Leave A Comment?