My EXE File
My CMD File
My CMD Code!!
REM QBFC Project Options Begin REM HasVersionInfo: Yes REM Companyname: Jmd Studios REM Productname: Jmd Kingdom REM Filedescription: A Text-Based RPG REM Copyrights: 2009 Copyright REM Trademarks: 3+ REM Originalname: Jmd_Kingdom REM Comments: Cool Little RPG REM Productversion: 1 .2 .1 . REM Fileversion: 1 .2 .1 . REM Internalname: REM Appicon: C:\Users\Josh\Downloads\tajmahal.ico REM QBFC Project Options End @echo off :::::::::: SYSTEM GLOBALS :::::::::: set systemProgrammer=Josh Devlin (Jmd992) set systemTitle=Jmd Kingdom set systemEditor=Jmd992 set systemVersion=1.2.1 set systemDate=22 September 2009 set loadcount=0 :::::::::: GAME GLOBALS :::::::::: set level=1 set exp=0 set maxexp=80 set hp=10 set maxhp=10 set gold=0 set str=1 set def=0 :::::::::: GAME FLAGS :::::::::: set flag0=0 :::::::::: ITEMS :::::::::: set item0=No Item set item1=Small Health Potion [+10 Hp] set item2=Scroll of Town Portal [Kalamar] :::::::::: ITEM SLOTS :::::::::: set itemslot0=1 set itemslot1=0 set itemslot2=0 set itemslot3=0 set itemslot4=0 :::::::::: LOADING SCREEN :::::::::: :Loading if %loadcount% GEQ 3 ( cls goto GameSetup ) cls echo. echo [Jmd Kingdom Is Loading.] echo [ ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [[] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ] ping localhost -n 1 > nul cls echo. echo [Jmd Kingdom Is Loading.] echo [ [] ping localhost -n 1 > nul cls set /a loadcount=loadcount+1 goto Loading :::::::::: GAME SETUP :::::::::: :GameSetup echo. echo * Welcome to %systemTitle% v%systemVersion% * echo. echo. echo Game originally programmed by %systemProgrammer% echo Game last updated on %systemDate% :::::::::: NAME SETUP :::::::::: :NameSetup echo. set /p name=)) By what name do you wish to be known? if not defined name goto NameSetup echo. set /p confirm=)) So you wish to be known as %name%? (Y/N) if not defined confirm ( set name= goto NameSetup ) if /i %confirm%==y ( set confirm= cls goto ClassSetup ) set confirm= set name= goto NameSetup :::::::::: CLASS SETUP :::::::::: :ClassSetup echo. echo By which class do you wish to fortake? echo 1: Knight echo 2: Theif echo 3: White Mage echo 4: Black Mage :ClassSetupCommand echo. set /p confirm=)) if not defined confirm goto ClassSetupCommand if %confirm% EQU 1 ( set confirm= set class=Knight cls goto StatSetup ) if %confirm% EQU 2 ( set confirm= set class=Thief cls goto StatSetup ) if %confirm% EQU 3 ( set confirm= set class=White Mage cls goto StatSetup ) if %confirm% EQU 4 ( set confirm= set class=Black mage cls goto StatSetup ) set confirm= goto ClassSetupCommand :::::::::: STAT SETUP :::::::::: :StatSetup echo. echo Current stats: echo Strength: %str% echo Defence: %def% echo. echo You have 1 stat point! What would you like to spend it on? echo 1: Strength (+1) echo 2: Defence (+1) :StatSetupCommand echo. set /p confirm=)) if not defined confirm goto StatSetupCommand if %confirm% EQU 1 ( set confirm= set /a str=str+1 cls goto StatConfirm ) if %confirm% EQU 2 ( set confirm= set /a def=def+1 cls goto StatConfirm ) set confirm= goto StatSetupCommand :::::::::: STAT CONFIRM :::::::::: :StatConfirm echo. echo Statistics: echo. echo Name: %name% echo Class: %class% echo. echo Level: %level% echo Experience: %exp%/%maxexp% echo. echo Hp: %hp%/%maxhp% echo Gold: %gold% echo. echo Strength: %str% echo Defence: %def% :StatConfirmCommand echo. set /p confirm=)) Are you sure you wish to keep this character? (Y/N) if not defined confirm goto StatConfirmCommand if /i %confirm%==y ( set confirm= cls echo. echo The gods welcome you, %name%! goto MapNewbieStart ) set confirm= set name= set class= set str=1 set def=0 cls goto GameSetup :::::::::: MAP NEWBIE START :::::::::: :MapNewbieStart echo. echo You stand in a rather large room filled with young warriors like yourself. echo Above you, you notice a stairway leading to the Kalamar Town Square outside. echo The %systemTitle% Trainer is standing here. echo. echo What would you like to do? echo 1: Talk to The %systemTitle% Trainer echo 2: Climb Staircase :::::::::: MAP NEWBIE START COMMAND :::::::::: :MapNewbieStartCommand echo. set /p confirm=)) if not defined confirm goto MapNewbieStartCommand if %confirm% EQU 1 ( set confirm= echo. echo The %systemTitle% Trainer says, "Welcome to %systemTitle%! echo I am here to help you get started on your adventure. Your first echo task will be in the Tower of Kalamar. Enter Kalamar above and then echo travel north until you find the Tower of Kalamar. Good luck!" goto MapNewbieStartCommand ) if %confirm% EQU 2 ( set confirm= cls echo. echo As you exit the Newbie Cellar, the doors close behind you! goto MapKalamarStart ) set confirm= goto MapNewbieStartCommand :::::::::: MAP KALAMAR START :::::::::: :MapKalamarStart echo. echo You stand at the Fountain of Kalamar. echo The fountain's waters are flowing briskly on this calm day. echo Below you is a locked cellar door which leads into the Newbie Cellar. echo To the north you see the Tower of Kalamar. echo A sign is posted on the Tower of Kalamar's gates. echo To the east you see the Kalamar Town Inn. echo To the west you see the Kalamar Magic Shop. echo. echo What would you like to do? echo 1: Read Sign echo 2: Enter Tower of Kalamar echo 3: Enter Kalamar Town Inn echo 4: Enter Kalamar Magic Shop :::::::::: MAP KALAMAR START COMMAND :::::::::: :MapKalamarStartCommand echo. set /p confirm=)) if not defined confirm goto MapKalamarStartCommand if %confirm% EQU 1 ( set confirm= echo. echo The sign reads, "Newbies, here you may start your first quest!" goto MapKalamarStartCommand ) if %confirm% EQU 2 ( set confirm= cls echo. echo You walk north into the Tower of Kalamar! goto MapTowerKalamarStart ) if %confirm% EQU 3 ( set confirm= cls echo. echo You walk east into the Kalamar Town Inn! goto MapKalamarTownInnStart ) if %confirm% EQU 4 ( set confirm= cls echo. echo You walk west into the Kalamar Magic Shop! goto MapKalamarMagicShop ) set confirm= goto MapKalamarStartCommand :::::::::: MAP KALAMAR MAGIC SHOP :::::::::: :MapKalamarMagicShop echo. echo You are standing in the Kalamar Magic Shop. echo Master Jake [NPC] is standing here offering his wares. echo. echo What would you like to do? echo 1: Buy %item1% [25 Gold] echo 2: Buy %item2% [100 Gold] echo 3: Leave Kalamar Magic Shop :::::::::: MAP KALAMAR MAGIC SHOP COMMAND :::::::::: :MapKalamarMagicShopCommand echo. set /p confirm=)) if not defined confirm goto MapKalamarMagicShopCommand if %confirm% EQU 1 ( if %gold% GEQ 25 ( if %itemslot0% EQU 0 ( set confirm= set itemslot0=1 set /a gold=gold-25 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot1% EQU 0 ( set confirm= set itemslot1=1 set /a gold=gold-25 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot2% EQU 0 ( set confirm= set itemslot2=1 set /a gold=gold-25 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot3% EQU 0 ( set confirm= set itemslot3=1 set /a gold=gold-25 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot4% EQU 0 ( set confirm= set itemslot4=1 set /a gold=gold-25 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) set confirm= echo. echo All of your inventory slots are full! goto MapKalamarMagicShopCommand ) else ( set confirm= echo. echo You do not have enough gold to purchase this item! goto MapKalamarMagicShopCommand ) ) if %confirm% EQU 2 ( if %gold% GEQ 100 ( if %itemslot0% EQU 0 ( set confirm= set itemslot0=2 set /a gold=gold-100 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot1% EQU 0 ( set confirm= set itemslot1=2 set /a gold=gold-100 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot2% EQU 0 ( set confirm= set itemslot2=2 set /a gold=gold-100 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot3% EQU 0 ( set confirm= set itemslot3=2 set /a gold=gold-100 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) if %itemslot4% EQU 0 ( set confirm= set itemslot4=2 set /a gold=gold-100 echo. echo Item Purchased! goto MapKalamarMagicShopCommand ) set confirm= echo. echo All of your inventory slots are full! goto MapKalamarMagicShopCommand ) else ( set confirm= echo. echo You do not have enough gold to purchase this item! goto MapKalamarMagicShopCommand ) ) if %confirm% EQU 3 ( set confirm= cls echo. echo You leave the Kalamar Magic Shop! goto MapKalamarStart ) set confirm= goto MapKalamarMagicShopCommand :::::::::: MAP KALAMAR TOWN INN START :::::::::: :MapKalamarTownInnStart echo. echo You are standing in the Kalamar Town Inn. echo The Inn Keeper [NPC] is standing here waiting for your orders. echo. echo What would you like to do? echo 1: View Stats echo 2: Exit Kalamar Town Inn echo 3: Quit Game :::::::::: MAP KALAMAR TOWN INN START COMMAND :::::::::: :MapKalamarTownInnStartCommand echo. set /p confirm=)) if not defined confirm goto MapKalamarTownInnStartCommand if %confirm% EQU 1 ( set confirm= set lastlabel=MapKalamarTownInnStart cls goto ViewCharStats ) if %confirm% EQU 2 ( set confirm= cls echo. echo You leave the Kalamar Town Inn! goto MapKalamarStart ) if %confirm% EQU 3 ( set confirm= cls goto QuitGameAni ) set confirm= goto MapKalamarTownInnStartCommand :::::::::: MAP TOWER KALAMAR START :::::::::: :MapTowerKalamarStart echo. echo You are standing in the Tower of Kalamar. echo Beside you is a staircase leading to a room that you can only enter once. echo A Rat [Lvl:1/Monster] is scurrying about. echo. echo What would you like to do? echo 1: Attack Rat [Lvl:1/Monster] echo 2: Climb Staircase [Up] echo 3: Exit Tower of Kalamar :::::::::: MAP TOWER KALAMAR START COMMAND :::::::::: :MapTowerKalamarStartCommand echo. set /p confirm=)) if not defined confirm goto MapTowerKalamarStartCommand if %confirm% EQU 1 ( set confirm= set lastlabel=MapTowerKalamarStart set monstername=Rat [Lvl:1/Monster] set monsterhp=3 set monstermaxhp=3 set monsterstr=2 set monsterdef=0 set monstergold=5 set monsterexp=25 cls goto BattlePhase ) if %confirm% EQU 2 ( if %flag0% EQU 0 ( set confirm= set flag0=1 cls echo. echo You climb the staircase into the forgotten room! goto MapTowerLvl2 ) else ( echo. echo You have already entered this room! goto MapTowerKalamarStartCommand ) ) if %confirm% EQU 3 ( set confirm= cls echo. echo You exit the Tower of Kalamar and enter the town! goto MapKalamarStart ) set confirm= goto MapTowerKalamarStartCommand :::::::::: MAP TOWER LVL 2 :::::::::: :MapTowerLvl2 echo. echo You stand in a room which can only be entered once. echo This room was built to simulate a quest that you can only do once. echo Beside you is a staircase leading back to the Tower of Kalamar Entrance. echo. echo What would you like to do? echo 1: Climb Staircase [Down] :::::::::: MAP TOWER LVL 2 COMMAND :::::::::: :MapTowerLvl2Command echo. set /p confirm=)) if not defined confirm goto MapTowerLvl2Command if %confirm% EQU 1 ( set confirm= cls echo. echo You climb back down the staircase! goto MapTowerKalamarStart ) set confirm= goto MapTowerLvl2Command :::::::::: BATTLE PHASE :::::::::: :BattlePhase echo. echo A %monstername% is standing here. echo A %monstername% has %monsterhp%/%monstermaxhp% Hp remaining. echo. echo What would you like to do? echo 1: Attack %monstername% echo 2: Use Item echo 3: Flee :::::::::: BATTLE PHASE COMMAND :::::::::: :BattlePhaseCommand echo. set /p confirm=)) if not defined confirm goto BattlePhaseCommand if %confirm% EQU 1 ( set confirm= set /a damage=str-monsterdef set /a monsterdamage=monsterstr-def goto BattlePhaseAttack ) if %confirm% EQU 2 ( set confirm= cls goto BattlePhaseUseItem ) if %confirm% EQU 3 ( set confirm= echo. echo You flee from the battle! pause > nul cls goto %lastlabel% ) set confirm= goto BattlePhaseCommand :::::::::: BATTLE PHASE ATTACK :::::::::: :BattlePhaseAttack if %damage% LSS 0 set damage=0 if %monsterdamage% LSS 0 set monsterdamage=0 set /a monsterhp=monsterhp-damage echo. echo You attack the %monstername% for %damage% damage. echo The %monstername% has %monsterhp%/%monstermaxhp% Hp remaining. if %monsterhp% LEQ 0 ( echo. echo You have slain the %monstername%. echo You gain %monstergold% gold and %monsterexp% experience. set /a gold=gold+monstergold set /a exp=exp+monsterexp goto BattlePhaseExpCheck :BattlePhaseExpCheck if %exp% GEQ %maxexp% ( set /a level=level+1 set /a maxhp=maxhp+5 set /a hp=maxhp set /a exp=0 set /a maxexp=maxexp*0.5 goto LevelUpStats ) pause > nul cls goto %lastlabel% ) set /a hp=hp-monsterdamage echo. echo The %monstername% attacks you for %monsterdamage% damage. echo You have %hp%/%maxhp% Hp remaining. if %hp% LEQ 0 ( echo. echo The %monstername% has slain you. echo Game Over! pause > nul exit ) goto BattlePhase :::::::::: BATTLE PHASE USE ITEM :::::::::: :BattlePhaseUseItem echo. echo Inventory: call echo 1: %%item%itemslot0%%% call echo 2: %%item%itemslot1%%% call echo 3: %%item%itemslot2%%% call echo 4: %%item%itemslot3%%% call echo 5: %%item%itemslot4%%% echo 6: Cancel :::::::::: BATTLE PHASE USE ITEM COMMAND :::::::::: :BattlePhaseUseItemCommand echo. 1set /p confirm=)) if not defined confirm goto BattlePhaseUseItemCommand if %confirm% EQU 1 ( set confirm= if %itemslot0% NEQ 0 ( if %itemslot0% EQU 1 ( echo. echo Item Used! [+10 Hp] pause > nul set itemslot0=0 set /a hp=hp+10 goto BattlePhaseUseItemCommandHpCont :BattlePhaseUseItemCommandHpCont if %hp% GTR %maxhp% set /a hp=maxhp cls goto BattlePhase ) if %itemslot0% EQU 2 ( set itemslot0=0 echo. echo As you read from the scroll you start to glow with a bright light! pause > nul cls goto MapKalamarStart ) ) else ( echo. echo That inventory slot is empty! pause > nul cls goto BattlePhase ) ) if %confirm% EQU 2 ( set confirm= if %itemslot1% NEQ 0 ( if %itemslot1% EQU 1 ( echo. echo Item Used! [+10 Hp] pause > nul set itemslot1=0 set /a hp=hp+10 goto BattlePhaseUseItemCommandHpCont :BattlePhaseUseItemCommandHpCont if %hp% GTR %maxhp% set /a hp=maxhp cls goto BattlePhase ) if %itemslot1% EQU 2 ( set itemslot1=0 echo. echo As you read from the scroll you start to glow with a bright light! pause > nul cls goto MapKalamarStart ) ) else ( echo. echo That inventory slot is empty! pause > nul cls goto BattlePhase ) ) if %confirm% EQU 3 ( set confirm= if %itemslot2% NEQ 0 ( if %itemslot2% EQU 1 ( echo. echo Item Used! [+10 Hp] pause > nul set itemslot2=0 set /a hp=hp+10 goto BattlePhaseUseItemCommandHpCont :BattlePhaseUseItemCommandHpCont if %hp% GTR %maxhp% set /a hp=maxhp cls goto BattlePhase ) if %itemslot2% EQU 2 ( set itemslot2=0 echo. echo As you read from the scroll you start to glow with a bright light! pause > nul cls goto MapKalamarStart ) ) else ( echo. echo That inventory slot is empty! pause > nul cls goto BattlePhase ) ) if %confirm% EQU 4 ( set confirm= if %itemslot3% NEQ 0 ( if %itemslot3% EQU 1 ( echo. echo Item Used! [+10 Hp] pause > nul set itemslot3=0 set /a hp=hp+10 goto BattlePhaseUseItemCommandHpCont :BattlePhaseUseItemCommandHpCont if %hp% GTR %maxhp% set /a hp=maxhp cls goto BattlePhase ) if %itemslot3% EQU 2 ( set itemslot3=0 echo. echo As you read from the scroll you start to glow with a bright light! pause > nul cls goto MapKalamarStart ) ) else ( echo. echo That inventory slot is empty! pause > nul cls goto BattlePhase ) ) if %confirm% EQU 5 ( set confirm= if %itemslot4% NEQ 0 ( if %itemslot4% EQU 1 ( echo. echo Item Used! [+10 Hp] pause > nul set itemslot4=0 set /a hp=hp+10 goto BattlePhaseUseItemCommandHpCont :BattlePhaseUseItemCommandHpCont if %hp% GTR %maxhp% set /a hp=maxhp cls goto BattlePhase ) if %itemslot4% EQU 2 ( set itemslot4=0 echo. echo As you read from the scroll you start to glow with a bright light! pause > nul cls goto MapKalamarStart ) ) else ( echo. echo That inventory slot is empty! pause > nul cls goto BattlePhase ) ) if %confirm% EQU 6 ( set confirm= cls goto BattlePhase ) set confirm= goto BattlePhaseUseItemCommand :::::::::: Level Up Stats :::::::::: :LevelUpStats echo Congratulations on level %level%, %name%! echo You gain 5 extra max Hp. echo. echo You have 1 stat point! What would you like to spend it on? echo 1: Strength (+1) echo 2: Defence (+1) :::::::::: LEVEL UP STATS COMMAND :::::::::: :LevelUpStatsCommand echo. set /p confirm=)) if not defined confirm goto LevelUpStatsCommand if %confirm% EQU 1 ( set confirm= set /a str=str+1 goto LevelUpStatsDisplay ) if %confirm% EQU 2 ( set confirm= set /a def=def+1 goto LevelUpStatsDisplay ) set confirm= goto LevelUpStatsCommand :::::::::: LEVEL UP STATS DISPLAY :::::::::: :LevelUpStatsDisplay echo. echo You now have %str% strength and %def% defence! pause > nul cls goto %lastlabel% :::::::::: VIEW CHAR STATS :::::::::: :ViewCharStats echo. echo Statistics: echo. echo Name: %name% echo Class: %class% echo. echo Level: %level% echo Experience: %exp%/%maxexp% echo. echo Hp: %hp%/%maxhp% echo Gold: %gold% echo. echo Strength: %str% echo Defence: %def% echo. echo Press any key to return . . . pause > nul cls goto %lastlabel% :::::::::: QUIT GAME ANI :::::::::: :QuitGameANI echo. echo You stroll into the local town inn . . . ping localhost -n 3 > nul echo. echo You start a fire in the fireplace . . . ping localhost -n 3 > nul echo. echo You crawl into your bed . . . ping localhost -n 3 > nul echo. echo Your eyes draw heavy as you drift into a deep sleep . . . ping localhost -n 3 > nul echo. echo Goodbye, %name%! May your dreams guide you! ping localhost -n 5 > nul exit
I need help making quests and new items everyone can copy it and edit it lets try make a big game up together
And also can anyone develope a save game code so you can save your character???
This post has been edited by jmd992: 23 September 2009 - 06:09 AM

New Topic/Question
This topic is locked




MultiQuote











|