Instructables

Batch RPG Starting Piont

This is a quick starting point for a batch file text based game. My idea was a dnd type game using the D20 system.
Let's begin!

 
Remove these adsRemove these ads by Signing Up

Step 1: Batch

Picture of Batch
To create a batch first open notepad and remember when you save the file change the .txt to .bat by saving it as filename.bat

Step 2: Script

Picture of Script
Copy and paste this into notepad:

@echo off
title Mage Quest
echo Mage Guild
echo Enter Name
set /p name=
set pick=7
pause
goto start
:start
cls
set /a pick=%pick% -1
set lvl=1
set armor=0
set /a ac=(10 +((%lvl% /2) +%armor%))
set setscore=%pick% +10
echo What will your %pick%th highest stat be?
echo 1 Strength
echo 2 Constitution
echo 3 Dexterity
echo 4 Intelligence
echo 5 Wisdom
echo 6 Charisma
set /p chsc=choice1~6
if %chsc%==1 set /a str=(%setscore% +(%lvl% /2))
if %chsc%==2 set /a con=(%setscore% +(%lvl% /2))
if %chsc%==3 set /a dex=(%setscore% +(%lvl% /2))
if %chsc%==4 set /a int=(%setscore% +(%lvl% /2))
if %chsc%==5 set /a wis=(%setscore% +(%lvl% /2))
if %chsc%==6 set /a cha=(%setscore% +(%lvl% /2))
if %pick%==0 goto charstats
if %pick%==0 cls
else
goto start
:charstats
echo %name%
echo Strength %str%
echo Chomstitution %con%
echo Dexterity %dex%
echo Intelligence %int%
echo Wisdom %wis%
echo Charisma %cha%
echo AC %ac%
pause
cocoandpuff4 months ago
@echo off
color 0b
TITLE Goose Man
echo ./ooo:`
echo -dh/--:++ ``` ```` ``` ```
echo `ms `...` /dyyydo` .hhyydh. -dyyy. -hhyhh-
echo .M+ :ssmy -N: .N+ dy hh -ds/. `mh+++dh
`echo sm: hy -N+ :N: hh` `dy `/m+`my::::-
echo :sdhhhy/ :yhhhy: `sdhhh+` +hhhy. .shhhh/
echo.
echo /Nm/ .dNs
echo /N/m: `dohy -+sso- `o-+so-
echo /N`+m. hs`hy --..+N- .My:.oN.
echo /N` sd`sh hy +hhhhM: .N- -N-
echo /N` `hmm` hy `my::sM: .N- -N-
echo ./ `+. :: `/+/./. `+` `+`
pause >nul
:Main
cls
echo Welcome to Goose Man
echo.
echo 1.Start
echo 2.Exit
set /p $=Enter:


if %$% equ 1 goto Start
if %$% equ 2 goto exit
goto Main

:Start
cls
setlocal enabledelayedexpansion
set /p name=Enter your name:
if exist QE%name%SAV.dll 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 weapprice=120
set pots=1
set armor=0
goto home

:load
for /f %%a in (QE%name%SAV.dll) do set %%a
set /a temp2=(%hp% * %lvl% + %exp% * %exptill% + %weapprice% + %power% * %weappower%)/(%gold% + %pots% + %powergain%)
if not %temp1% equ %temp2% set temp3=1
goto home

:death
cls
echo You Died!
echo You lost some stuff...
set /a exp=%exp% - (%exp% * 65/100)
set hp=1
pause >nul
goto home

:runaway
cls
echo You sucsessfully ran away!
set hp=1
pause >nul
goto home

:levelup
cls
echo Congratulations! LEVEL UP
pause >nul
set /a 1v1=%lvl% + 1
set /a exp=%exp% - %exptill%
set /a exptill=%exptill% + %exptill% * 65 / 100
set /a power=%power% + %powergain%
set /a powergain+%powergain% +1
set hp=100
goto save

::# HOME #####################################################################################################################

:home
set en1hp=40
set en2hp=80
set en3hp=160
if %exp% geq %exptill% goto level up
cls
if"%temp3%"equ "1" echo You Are A Cheater!
echo Level %lvl% Experience %exp%/%exptill% Armor %armor%
echo Health %hp%/100 Gold %gold% Potions%pots%
echo.
echo Where do you want to go?
echo.
echo 1.Outside the village
echo 2.Shop
echo 3.Healer
echo 4.Save Game
echo 5.Exit
echo.
set input=5
set /p input=Enter:
if %input% equ 1 goto out
if %input% equ 2 goto shop
if %input% equ 3 goto healer
if %input% equ 4 goto save
if %input% equ 5 goto Main
goto home

:shop












.````` `.```
echo `````````` `------. ------.`
echo `` . .----------...---------.
echo `.......`` `.--------------------------`
echo .:----:` `.----.---------------- .---. +1 Level
echo `-------:-. `.` .--------------- `.
echo `-------------.` ----------------
echo -:--------------- ----------------
echo -::::::::::::::::: ----------------
echo -::::::::::::::::/ ----------------
echo .::::::::::::::::/ ----------------
echo -:::::::::::::::: .------------...
echo ``..----::::::-`
echo ------------------------------------------------------------------------------
echo ------------------------------------------------------------------------------
echo ------------------------------------------------------------------------------
echo What would you like to buy?
echo.
echo 1)Potion
echo 2)Armor
echo 3)+1Level
pause >nul

if %input% equ 1 goto buypotion
if %input% equ 2 goto buyarmor
if %input% equ 3 goto buylevel
goto home

:buypotion
echo Yay! you bought a Potion
set pots=%pots% + 1
set gold=%gold% - 30
pause >nul

:: #ENEMY1 #########################################################

:out
set en1hp=40
cls
echo You were attacked by a goblin!




color 0a
echo `.````-/+o+:..://+/.
echo `+ssyhhyhddhyhyyo/-`
echo `-odhhhdhdhhho-`
echo .oyddddmmh:`
echo `.ohdmmmmhy+/:-`
echo `+yhhhhhhyyyyhy.`
echo ``-yhyshyssyhddhdo-`
echo `.syhhhhhhhdddhyhd+.
echo `.oddhohhyhhhdd+/hddy`
echo `-hhdyhhysydddmo.yddm-
echo .:dmy+dhysyddddh-:ymm:`
echo `.smm/+ddhhddmddmo.smm/``
echo `-dmm/hhddddmddhdh/dmmo``
echo :hddhhdddy:/ddhddhddds`
echo .sdddddmo..`-yddddhos:
echo .:+hmmdd.````omdmd:`
echo .smmmo``` .dmmms
echo .`+ddmmo` ` -dmms
echo ./osdddmmd.` `sddd/
echo .yhdddhys:-` -dmdddy.`
echo ``...`` --:/:.



pause >nul
goto fightgoblin

:fightgoblin
cls



echo `.````-/+o+:..://+/.
echo `+ssyhhyhddhyhyyo/-`
echo `-odhhhdhdhhho-`
echo .oyddddmmh:`
echo `.ohdmmmmhy+/:-`
echo `+yhhhhhhyyyyhy.`
echo ``-yhyshyssyhddhdo-`
echo `.syhhhhhhhdddhyhd+.
echo `.oddhohhyhhhdd+/hddy`
echo `-hhdyhhysydddmo.yddm-
echo .:dmy+dhysyddddh-:ymm:`
echo `.smm/+ddhhddmddmo.smm/``
echo `-dmm/hhddddmddhdh/dmmo``
echo :hddhhdddy:/ddhddhddds`
echo .sdddddmo..`-yddddhos:
echo .:+hmmdd.````omdmd:`
echo .smmmo``` .dmmms
echo .`+ddmmo` ` -dmms
echo ./osdddmmd.` `sddd/
echo .yhdddhys:-` -dmdddy.`
echo ``...`` --:/:.
color 0b
echo You have %hp% health
echo Goblin has %en1hp%
echo.
echo 1.Attack
echo 2.Drink Potion
echo 3.Run Away!
set input=5
set /p input=Enter:
if %input% equ 1 goto attackgoblin
if %input% equ 1 goto drinkpotgoblin
if %input% equ 1 goto runaway

:attackgoblin
cls
if %armor% geq 5 goto attackgoblin2
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killedgoblin
set /a hp=%hp% - (4 - %armor%)
if %hp% leq 0 goto death
goto fightgoblin

:attackgoblin
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killedgoblin
set /a hp=%hp% - (7 - %armor%)
if %hp% leq 0 goto death
goto fightgoblin

:drinkpotgoblin
if %pots% Iss 1 (
echo You don't have any potions
pause >nul
goto fightgoblin
)
set /a hp = %hp% + 50
set /a pots=%pots% - 1
goto fightgoblin

:killedgoblin
cls
echo You Killed Him!
echo you gained 7 exp and 6 gold!
set /a exp=%exp% + 7
set /a gold=%gold% + 6
pause >nul
goto out2

:: # Enemy2#############################################

:out2
cls
echo 1.Go further
echo 2.Wait Here
echo 3.Go home
echo 4.Kill goblin again
set input=5
set /p input=Enter:
if %input% equ 1 goto out3
if %input% equ 1 goto out
if %input% equ 1 goto home
if %input% equ 4 goto attackgoblin2
goto out2

:attackgoblin2
set en1hp=40
cls
echo You were attacked by a goblin!




color 0a
echo `.````-/+o+:..://+/.
echo `+ssyhhyhddhyhyyo/-`
echo `-odhhhdhdhhho-`
echo .oyddddmmh:`
echo `.ohdmmmmhy+/:-`
echo `+yhhhhhhyyyyhy.`
echo ``-yhyshyssyhddhdo-`
echo `.syhhhhhhhdddhyhd+.
echo `.oddhohhyhhhdd+/hddy`
echo `-hhdyhhysydddmo.yddm-
echo .:dmy+dhysyddddh-:ymm:`
echo `.smm/+ddhhddmddmo.smm/``
echo `-dmm/hhddddmddhdh/dmmo``
echo :hddhhdddy:/ddhddhddds`
echo .sdddddmo..`-yddddhos:
echo .:+hmmdd.````omdmd:`
echo .smmmo``` .dmmms
echo .`+ddmmo` ` -dmms
echo ./osdddmmd.` `sddd/
echo .yhdddhys:-` -dmdddy.`
echo ``...`` --:/:.



pause >nul
goto fightgoblin

:fightgoblin
cls



color 0a
echo `.````-/+o+:..://+/.
echo `+ssyhhyhddhyhyyo/-`
echo `-odhhhdhdhhho-`
echo .oyddddmmh:`
echo `.ohdmmmmhy+/:-`
echo `+yhhhhhhyyyyhy.`
echo ``-yhyshyssyhddhdo-`
echo `.syhhhhhhhdddhyhd+.
echo `.oddhohhyhhhdd+/hddy`
echo `-hhdyhhysydddmo.yddm-
echo .:dmy+dhysyddddh-:ymm:`
echo `.smm/+ddhhddmddmo.smm/``
echo `-dmm/hhddddmddhdh/dmmo``
echo :hddhhdddy:/ddhddhddds`
echo .sdddddmo..`-yddddhos:
echo .:+hmmdd.````omdmd:`
echo .smmmo``` .dmmms
echo .`+ddmmo` ` -dmms
echo ./osdddmmd.` `sddd/
echo .yhdddhys:-` -dmdddy.`
echo ``...`` --:/:.
color 0b
echo You have %hp% health
echo Goblin has %en1hp%
echo.
echo 1.Attack
echo 2.Drink Potion
echo 3.Run Away!
set input=5
set /p input=Enter:
if %input% equ 1 goto attackgoblin
if %input% equ 1 goto drinkpotgoblin
if %input% equ 1 goto runaway

:attackgoblin
cls
if %armor% geq 5 goto attackgoblin2
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killedgoblin
set /a hp=%hp% - (4 - %armor%)
if %hp% leq 0 goto death
goto fightgoblin

:attackgoblin
cls
set /a en1hp=%en1hp% - (%power% + %weappower%)
if %en1hp% leq 0 goto killedgoblin
set /a hp=%hp% - (7 - %armor%)
if %hp% leq 0 goto death
goto fightgoblin

:drinkpotgoblin
if %pots% equ 1 (
echo You don't have any potions
pause >nul
goto fightgoblin
)
set /a hp = %hp% + 50
set /a pots=%pots% - 1
goto fightgoblin

:killedgoblin
cls
echo You Killed Him!
echo you gained 7 exp and 6 gold!
set /a exp=%exp% + 7
set /a gold=%gold% + 6
pause >nul
goto out2

:out3
set en2hp=80
cls
echo You have %hp% health
echo Skeleton has %en2hp%
echo.
echo 1.Attack
echo 2.Drink potion
echo 3.Run away
set input=5
set /p input=Enter:
if %input% equ 1 goto attackskeleton
if %input% equ 2 goto drinkpotskeleton
if %input% equ 3 goto runaway
goto fightskeleton

:attackskeleton
cls


::# Save ##########################################################################

:save
if"%temp3%"equ"1"(
cls
echo You're a cheater, YOU NO SAVE
pause >nul
goto stats
)
echo Saving
set /a temp2=(%hp% * %lvl% + %exp% * %exptill% + %weapprice% + %power% * %weappower%)/(%gold% + %pots% + %powergain%)
(echo hp=%hp%)> QE%name%SAV.dll
(echo exp=%exp%)>> QE%name%%SAV.dll
(echo exptill=%exptill%)>> QE%name%SAV.dll
(echo gold=%gold%)>> QE%name%SAV.dll
(echo lvl=%lvl%)>> QE%name%SAV.dll
(echo power=%power%)>> QE%name%SAV.dll
(echo powergain=%powergain%)>> QE%name%SAV.dll
(echo weappower=%weappower%)>> QE%name%SAV.dll
(echo weapprice=%weapprice%)>> Qe%name%SAV.dll
(echo pots=%pots%)>> QE%name%SAV.dll
(echo armor=%armor%)>> QE%name%SAV.dll
(echo temp1=%temp1%)>> QE%name%SAV.dll
pause >nul

:stats
cls
echo %name% %lvl%
echo %exp%/%exptill% expierence
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 ANY KEY
pause >nul
goto home

here is a simple game I got the basis from someone else though not all
If you want someone to help finish this with you then I would be honoured...
doombot9000 (author)  Prof. Pickle1 year ago
That’d be great. Honestly I haven’t worked on this since I posted it. If you want to take a crack at it that’d be amazing!
Sure, but I'll need some help with ideas on what to make it do...

Are you up for the challenge?
Can i help?
...A little bit too late. Our team fell apart as exavi's computer broke and WOKANDAL had his super important exams. We never got back to it, and not much progress has been made.

I'd like to see some good instructables from you though.
I am back! I have actually done a bit to the program since then. And I am doing a bit more to the skills etc.
So if you wanna get the team back together, I would be more than happy :D
The other member is still out of action, but I guess we can continue work.
LusoFeaz1 year ago
Aww. Well i still need help in batch programming but i can make a batch rpg flawlessly. And how am i suppose to add/take screenshots. Thats why i cant post anything.
This is HiPoweredHacker here and I would be honored to show you how to program some batch. To take screen shots use the "prt sc" button on your keyboard, that wil take a screen shot and copy it to the clipboard. so it can be pasted.
This is HiPoweredHacker here and I would be honored to show you how to program some batch. To take screen shots use the "prt sc" button on your keyboard, that wil take a screen shot and copy it to the clipboard. so it can be pasted.
Why Dont You Join Batch Homies Group And Post Your Batch Instructables There?
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!