Princess game
This is the game I made called "Saving Princess Game " 4.3, It is a text based rpg. If you want to play just click the Download link. (only for windows computers) You are free to make any changes to the game. "If you know how to. "
Download File
Saving Princess Game version 4.3
Characters: 18941
Lines: 941
File size: 18kb
Download File
Saving Princess Game version 4.3
Characters: 18941
Lines: 941
File size: 18kb
CODE:
@echo off
TITLE SAVING PRINCESS GAME 4.3 by: Jacob Orth
::# Config load########################################
for /f "Delims=" %%n in (c.txt) do (
set c=%%n
)
color %c%
::# MAIN/SETTINGS#######################################
:Main
cls
echo Saving Princess Game
echo --------------------
echo 1.Start
echo 2.Instructions
echo 3.Config
echo 4.About
echo 5.Website
echo 6.Load
echo 7.Exit
set /p $=Enter:
if %$% equ 1 goto Start
if %$% equ 2 goto ins
if %$% equ 3 goto Config
if %$% equ 4 goto About
if %$% equ 5 goto web
if %$% equ 6 goto load
if %$% equ 7 exit
goto Main
:web
start https://sites.google.com/site/jacoborthsprograms/?pli=1
cls
echo Loading
ping localhost -n 0.5 >nul
cls
echo Loading.
ping localhost -n 0.5 >nul
cls
echo Loading..
ping localhost -n 0.5 >nul
cls
echo Loading...
ping localhost -n 0.5 >nul
cls
echo Loading....
ping localhost -n 0.5 >nul
cls
echo Loading.....
ping localhost -n 0.5 >nul
cls
echo Loading......
ping localhost -n 0.5 >nul
cls
echo Loading.......
ping localhost -n 0.5 >nul
cls
echo Loading.
ping localhost -n 0.5 >nul
cls
echo Loading..
ping localhost -n 0.5 >nul
cls
echo Loading...
ping localhost -n 0.5 >nul
cls
echo Loading....
ping localhost -n 0.5 >nul
cls
echo Loading.....
ping localhost -n 0.5 >nul
cls
echo Loading......
ping localhost -n 0.5 >nul
cls
echo Loading.......
ping localhost -n 0.5 >nul
goto Main
:About
cls
echo Saving Princess Game 4.2
echo ------------------------
echo.
echo.
echo By---------------------------------------------------------------
echo Jacob Orth's Programs.
echo.
echo Website: https://sites.google.com/site/jacoborthsprograms/home
echo.
echo 2013 Jacob Orths Programs.
echo -----------------------------------------------------------------
echo.
echo.
echo -----------------------------------------------------------------
echo Ms-Dos Program
echo Runs in CMD.exe
echo -----------------------------------------------------------------
echo.
echo.
echo Tested in--------------------------------------------------------
echo Windows 8
echo.
echo C 2012 Microsoft Corporation. All rights reserved.
echo -----------------------------------------------------------------
echo.
echo.
pause >nul
goto Main
:Config
cls
echo.
echo Configure
echo ---------
echo.
echo 0 = Black 8 = Gray
echo 1 = Blue 9 = Light Blue
echo 2 = Green A = Light Green
echo 3 = Aqua B = Light Aqua
echo 4 = Red C = Light Red
echo 5 = Purple D = Light Purple
echo 6 = Yellow E = Light Yellow
echo 7 = White F = Bright White
echo.
echo Default: 07
echo.
echo Set the background color and the foreground color.
echo The first letter/number is the background color,
echo the second is the foreground. Do not use spaces.
echo.
echo Type "BBB" to go back.
echo.
set /p c=Enter:
if /i "%c%" equ "BBB" goto Main
if /i "%c%" equ "bbb" goto Main
echo %c% > c.txt
for /f "Delims=" %%1 in (c.txt) do (
set c=%%1
)
color %c%
goto Main
:ins
cls
echo INSTUCTIONS
ping localhost -n 2 >nul
echo *Your goal is to Adventure and save princess (The Title)
ping localhost -n 2 >nul
echo *You can do that by killing monsters
ping localhost -n 2 >nul
echo *You will have hp, gold, exp/lvl ups, power, weapons, armor, and potions
ping localhost -n 2 >nul
echo *You can get weapons armor and potions in the shop
ping localhost -n 2 >nul
echo *You can level up by fighting monsters
ping localhost -n 2 >nul
echo *Fighting monsters also gives you gold
ping localhost -n 2 >nul
echo *You use gold to buy things every thing you buy is auto equipped
ping localhost -n 2 >nul
echo *always hit enter to continue
ping localhost -n 2 >nul
echo *(There are glitches you can use to your advantage)
pause >nul
goto Main
:Start
cls
setlocal enabledelayedexpansion
echo PROFILE
set /p name=Enter your name:
if exist QE%name%SAV.dil set load=1
goto new
:new
set hp=100
set exp=0
set exptill=60
set gold=50
set lvl=1
set power=4
set powergain=3
set weappower=2
set pots=1
set armor=0
goto home
:set100
set /a pots = %pots% -1
set /a hp = %hp% +50
goto home
::# SHOP ############################################
:shop
cls
echo Welcome to the shop %name%.
echo.
echo You have %gold% Gold
echo.
echo 1) 1 Potion $20
echo 2) 10 armor $30
echo 3) Weapon upgrade $60
echo 4) Diamond Sword! ! ! $10,000
echo 5) Go back
set /p input=Enter:
if "%input%" == "1" goto bypots
if "%input%" == "2" goto byarmor
if "%input%" == "3" goto byweapon
if "%input%" == "4" goto bysword
if "%input%" == "5" goto home
goto home
:bysword
cls
if %gold% leq 10000 goto No
set /a gold = %gold% -10000
set /a weappower = %weappower% + 99999999999999999
color 0a
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0b
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0c
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0d
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0e
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0f
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 2 >nul
color 0a
cls
echo CONGRADULATIONS YOU BOUGHT A DIAMOND SWORD ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
echo Plus 99999999999999999 weapon power ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
ping localhost -n 9 >nul
echo YOU HACKED OR YOU ARE ADDICTED ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
pause >nul
goto home
:bypots
cls
if %gold% leq 20 goto No
set /a gold = %gold% -20
set /a pots = %pots% +1
echo You bought 1 potion.
pause >nul
goto home
:byarmor
cls
if %gold% leq 30 goto No
set /a gold = %gold% -30
set /a armor = %armor% + 10
echo You bought 10 armor.
pause >nul
goto home
:byweapon
cls
if %gold% leq 30 goto No
set /a gold = %gold% -60
set /a weappon = %weappower% + 20
echo You bought 20 armor.
goto home
:No
echo Insignificant funds
pause >nul
goto shop
::#load/save############################################
:save
cls
echo What do you want to save game as?
echo.
set /p name=Enter:
cls
echo Saveing.
ping localhost -n 2 >nul
cls
echo Saveing..
ping localhost -n 2 >nul
cls
echo Saveing...
ping localhost -n 2 >nul
cls
echo Saveing....
ping localhost -n 2 >nul
cls
echo Saveing.....
ping localhost -n 2 >nul
cls
echo Saveing......
ping localhost -n 2 >nul
cls
echo Saveing.......
ping localhost -n 2 >nul
cls
echo Saveing........
ping localhost -n 2 >nul
echo %hp% > %name%1.txt
echo %exp% > %name%2.txt
echo %exptill% > %name%3.txt
echo %gold% > %name%4.txt
echo %lvl% > %name%5.txt
echo %power% > %name%6.txt
echo %powergain% > %name%7.txt
echo %weappower% > %name%8.txt
echo %pots% > %name%9.txt
echo %armor% > %name%10.txt
echo %c% > %name%c.txt
goto stats
:stats
cls
echo %name% level %lvl%
echo %exp%/%exptill% expirence
echo.
echo %hp%/100 health
echo %gold% gold
echo %pots% potions
echo.
echo Your power is %power%
echo Your weapon power is %weappower%
echo.
echo PRESS ENTER KEY TO CONTINUE
pause >nul
goto home
:load
cls
echo What game do you want to load?
echo.
set /p name=Enter:
cls
echo loading.
ping localhost -n 2 >nul
cls
echo loading..
ping localhost -n 2 >nul
cls
echo loading...
ping localhost -n 2 >nul
cls
echo loading....
ping localhost -n 2 >nul
cls
echo loading.....
ping localhost -n 2 >nul
cls
echo loading......
ping localhost -n 2 >nul
cls
echo loading.......
ping localhost -n 2 >nul
cls
echo loading........
ping localhost -n 2 >nul
for /f "Delims=" %%a in (%name%1.txt) do (
set hp=%%a
)
for /f "Delims=" %%b in (%name%2.txt) do (
set exp=%%b
)
for /f "Delims=" %%c in (%name%3.txt) do (
set exptill=%%c
)
for /f "Delims=" %%d in (%name%4.txt) do (
set gold=%%d
)
for /f "Delims=" %%d in (%name%5.txt) do (
set lvl=%%d
)
for /f "Delims=" %%e in (%name%6.txt) do (
set power=%%e
)
for /f "Delims=" %%f in (%name%7.txt) do (
set powergain=%%f
)
for /f "Delims=" %%g in (%name%8.txt) do (
set weappower=%%g
)
for /f "Delims=" %%i in (%name%9.txt) do (
set pots=%%i
)
for /f "Delims=" %%j in (%name%10.txt) do (
set armor=%%j
)
for /f "Delims=" %%k in (c.txt) do (
set %c%=%%k
)
goto home
::#death#############################################
:death
cls
echo You Died!
echo and you lost some stuff...
set /a exp=%exp% - (%exp% * 65/100)
set gold = 0
set hp=80
pause >nul
goto home
:runaway
cls
set /a hp = %hp% -50
if %hp% leq 0 goto death
echo You successfuly ran away
echo but your heath is - 50
pause >nul
goto home
:levelup
cls
echo Congrats! LEVEL UP!
pause >nul
set /a lvl=%lvl% + 1
set /a exp=%exp% - %exptill%
set /a exptill=%exptill% + %exptill% * 66 / 100
set /a power=%power% + %powergain%
set /a powergain=%powergain% + 1
set hp=100
goto save
::# HOME #############################################
:home
set m=0
set en1hp=40
set en2hp=80
set en3hp=160
if %exp% geq %exptill% goto levelup
cls
echo.
echo Saving Princess Game
echo ------------------------------------------------------------------------
echo Level %lvl% Experience %exp%/%exptill% Armor %armor%
echo Heath %hp%/100 Gold %gold% Potions %pots%
echo ------------------------------------------------------------------------
echo.
echo Where do you want to go %name%?
echo.
echo 1.Outside the village
echo 2.Shop
echo 3.Stats
echo 4.Drink potion
echo 5.Save Game
echo 6.Load Game
echo 7.Exit
echo.
set /p m=Enter:
if %m% equ 1 goto out
if %m% equ 2 goto shop
if %m% equ 4 goto set100
if %m% equ 5 goto save
if %m% equ 7 goto main
if %m% equ 3 goto stats
if %m% equ 6 goto load
if %m% equ 0 goto home
goto home
::# ENEMY ##########################################
:fightgoblin
cls
echo You have %hp% health
echo Goblin has %en1hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atackgoblin
if %input% equ 2 goto drinkpotgoblin
if %input% equ 3 goto runaway
goto fightgoblin
:atackgoblin
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killgoblin
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto fightgoblin
:drinkpotgoblin
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto fightgoblin
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto fightgoblin
:killgoblin
cls
echo YOU KILLED HIM!
echo you gained 7 exp and 6 gold
set /a exp=%exp% + 7
set /a gold=%gold% + 40
pause >nul
goto out3
::# OUTS #############################################
:out3
cls
echo There is a fork in the road. Where do you want to go?
echo 1.Right
echo 2.Left
echo 3.Wait Here
echo 4.Go home
set /p input=Enter:
if %input% equ 1 goto R
if %input% equ 2 goto L
if %input% equ 3 goto out
if %input% equ 4 goto home
goto out3
:out
cls
echo YOU WERE ATACKED BY A GOBLIN!
pause >nul
goto fightgoblin
::# RIGHT #############################################
:R
cls
echo You have %hp% health
echo Skeloton has %en2hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atacksk
if %input% equ 2 goto drinkpotsk
if %input% equ 3 goto runaway
goto R
:atacksk
cls
set /a en2hp=%en2hp% - (%power% + %weappower%)
if %en2hp% leq 0 goto killsk
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto R
:drinkpotsk
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto R
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto R
:killsk
cls
echo YOU KILLED HIM!
echo you gained 12 exp and 70 gold
set /a exp=%exp% + 12
set /a gold=%gold% + 70
pause >nul
goto crab
::#3rd ENEMY ##########################################
:crab
cls
echo You have %hp% health
echo Big Crab has %en3hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atackc
if %input% equ 2 goto drinkpotc
if %input% equ 3 goto runaway
goto crab
:atackc
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killc
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto crab
:drinkpotc
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto crab
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto crab
:killc
cls
echo YOU KILLED HIM!
echo you gained 12 exp and 70 gold
set /a exp=%exp% + 12
set /a gold=%gold% + 70
pause >nul
goto Castle
::#Left###############################################
:L
cls
echo You have %hp% health
echo Thingy has %en2hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atacksk
if %input% equ 2 goto drinkpotsk
if %input% equ 3 goto runaway
goto L
:atacksk
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killsk
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto L
:drinkpotsk
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto L
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto L
:killsk
cls
echo YOU KILLED HIM!
echo you gained 12 exp and 70 gold
set /a exp=%exp% + 12
set /a gold=%gold% + 70
pause >nul
cls
echo.
echo You made it to the Princess' castle but there is huge crocodile infested moat!
echo.
echo 1. Try to swim across
echo 2. Go home
echo.
set /p input= Enter:
if %input% equ "1" goto doirealy
if %input% equ "2" goto home
:doirealy
cls
echo You died.
ping localhost -n 1 >nul
cls
echo You died. .
ping localhost -n 1 >nul
cls
echo You died. . .
ping localhost -n 1 >nul
echo do I realy have to elaborate
pause >nul
goto death
::# Castle #############################################
:Castle
cls
echo You made it to the Princess' castle!
echo 1. Climb up
echo 2. Go through door
echo 3. Go home
set /p input=Enter
if "%input%" == "1" goto clim
if "%input%" == "2" goto door
if "%input%" == "3" goto home
goto Castle
:clim
cls
echo You made it up
echo 1. Carry princess down
echo 2. Go out of princess' room
set /p input=Enter
if "%input%" == "1" goto fell
if "%input%" == "2" goto dstairs
:fell
cls
echo YOU FELL TO YOUR DEATH
pause >nul
goto death
:ustairs?
cls
echo 1. Go up stairs
echo 2. Stay here
set /p input=Enter
if "%input%" == "1" goto clim
if "%input%" == "2" goto door
:dstairs
cls
echo You got down the stairs
pause >nul
goto g2
::# 2nd ENEMY ##########################################
:door
cls
set en1hp=90
cls
echo YOU WERE ATACKED BY A DRAGON!
pause >nul
goto fightdragon2
:fightdragon2
cls
echo You have %hp% health
echo Dragon has %en1hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atackdragon
if %input% equ 2 goto drinkpotdragon
if %input% equ 3 goto runaway
goto fightdragon2
:atackdragon2
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killdragon2
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto fightdragon2
:drinkpotdragon2
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto fightdragon2
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto fightdragon2
:killdragon2
cls
echo YOU KILLED HIM!
echo you gained 50 exp and 600 gold
set /a exp=%exp% + 7
set /a gold=%gold% + 40
pause >nul
goto ustairs?
:g2
cls
set en1hp=40
cls
echo YOU WERE ATACKED BY A DRAGON!
pause >nul
goto fightdragon
:fightdragon
cls
echo You have %hp% health
echo Dragon has %en1hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atackdragon
if %input% equ 2 goto drinkpotdragon
if %input% equ 3 goto runaway
goto fightdragon
:atackdragon
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killdragon
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto fightdragon
:drinkpotdragon
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto fightdragon
)
set /a pots = %pots% -1
set /a hp = %hp% +50
goto fightdragon
:killdragon
cls
echo YOU KILLED HIM AND GOT OUT OF THE CASTLE WITH THE PRINCESS!
echo You gained 50 exp and 600 gold
set /a exp=%exp% + 7
set /a gold=%gold% + 40
pause >nul
goto END
::#5th ENEMY ##########################################
:fightgoblin1
cls
echo You have %hp% health
echo Goblin has %en1hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.RUN AWAY like a baby!
set /p input=Enter:
if %input% equ 1 goto atackgoblin1
if %input% equ 2 goto drinkpotgoblin1
if %input% equ 3 goto runaway
goto fightgoblin1
:atackgoblin1
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killgoblin1
set /a hp=%hp% - ( 7 - %armor% / 5 )
if %hp% leq 0 goto death
goto fightgoblin1
:drinkpotgoblin1
cls
if %pots% leq 0 (
echo You don't have any potions
pause >nul
goto fightgoblin1
set /a pots = %pots% -1
set /a hp = %hp% +50
goto fightgoblin1
:killgoblin1
cls
echo YOU KILLED HIM!
echo you gained 7 exp and 6 gold
set /a exp=%exp% + 7
set /a gold=%gold% + 40
pause >nul
goto out2
:END
cls
echo ------------------------
echo [ [---- [\ ] [---\ ]
echo [ [ [ \ ] [ ] ]
echo [ [---- [ \ ] [ ] ]
echo [ [ [ \ ] [ ] ]
echo [ [---- [ \] [---/ ]
echo ------------------------
echo -------------------------------------
echo [ Not realy you can keep adventureing?]
echo [-------------------------------------]
echo [ 1. Keep Adventureing ]
echo [ 2. END GAME :( ]
echo -------------------------------------
set /p input =Enter:
if %input% == "1" goto home
if %input% == "2" exit
goto END