This is a simple DOS-based batch file game. Entitled Legend, the idea comes from the old Telnet LOTR, however it is all programmed from scratch. It is playable all the way through, but technically does not have an ending. Any bugs, errors, or possible improvements would be fantastic to hear!
The code is found here: http://pastebin.com/raw.php?i=8SzYLvC8
To play, simply download the code into a file with a .bat extension, and run the file.
This is a pre release, so any comments and suggests are very much welcome!
-RCAProduction
Batch Adventure Game - Legend, Version 0.8 PRE
Moderator: DosItHelp
Re: Batch Adventure Game - Legend, Version 0.8 PRE
If you view your stats, then you automatically leave the town:
Is that how it should work?
Or is there any other reason for this question?
You could also set the number of lines and columns using the "mode" command.
In addition you shouldn't use the choice command if you want to run it on winxp, else add a note where to download from.
One alternative is to use xcopy could be found here (because this seems to be a public project don't forget to ask the authors; PM them):
http://www.dostips.com/forum/viewtopic.php?p=27384#p27384.
So you should check the user input, and output variable names using delayed expansion (!user!).
Actually it is possible to change anything by typing this username:
You only have to save it a second time.
penpen
Is that how it should work?
These lines (and the file "Legend!.bat") seem to be pretty useless.Legend.bat wrote:Code: Select all
if exist Legend!.bat (ATTRIB -R Legend!.bat)
echo. Legend.bat>Legend!.bat
ATTRIB +R Legend!.bat
You could choose a specific codepage, so there is no need for such an initialization (for example 850 (Multilingual Latin I) :Legend.bat wrote:Code: Select all
echo Which option appears more like a box?
echo.
echo " A.)
echo " _
echo " !_!
echo "
echo " B.)
echo " ÚÄ¿
echo " ³ ³
echo " ÀÄÙ
echo.
choice /c AB /n /m ">"
:: ...
Code: Select all
chcp 850
You could also set the number of lines and columns using the "mode" command.
In addition you shouldn't use the choice command if you want to run it on winxp, else add a note where to download from.
One alternative is to use xcopy could be found here (because this seems to be a public project don't forget to ask the authors; PM them):
http://www.dostips.com/forum/viewtopic.php?p=27384#p27384.
Never trust user input!Legend.bat wrote:Code: Select all
:namee
set /p user="Your name:"
ATTRIB -H settings.meow
CLS
choice /c YN /m "Save?"
if %errorlevel%==2 (goto entered)
(
echo %user%
echo %gen%
echo %gold%
echo %health%
echo %weapon%
echo %level%
echo %kills%
echo %armor%
echo %defense%
echo %bank%
echo %kiss%
echo %weplev%
)>settings.meow
So you should check the user input, and output variable names using delayed expansion (!user!).
Actually it is possible to change anything by typing this username:
Code: Select all
Conan&set "gold=100000"&set "level=200"&>con echo(Thanks: Press a key to continue.&pause>nul&set "user=Conan"
penpen