Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,399 Programmers. There are 1,478 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

Batch of .bat 1

 
Reply to this topicStart new topic

Batch of .bat 1, A collection of files that end with dot bat

derekhahn
post 14 Apr, 2008 - 10:28 AM
Post #1


New D.I.C Head

*
Joined: 7 Mar, 2008
Posts: 7



Here, I made a bunch of batch games. Improve thim if you have to. Lol!

CODE
echo off
cls
echo  DEFENDER OF
echo THE SUPERMART
echo.
pause
cls
echo You are eating corn
echo puffs out of the box
echo when an army of rabit
echo starfish attack the
echo supermart. NO!
echo Prepare to fight!
pause
cls
echo    ROAR! YOU CANNOT
echo       DEFEAT US!
echo.
pause
cls
echo   BOOOOOOOOOOOOOMMM!!!!!!
pause
cls
echo You have defeated my starfish army.
echo  But you can't defeat METAL BEANS!
pause
cls
echo Mission Brief: Get past the
echo explosive penguin guards and
echo destroy the central squirrel.
pause
cls
echo You encounter an explosive penguin.
echo    You lift your bazooka and...
pause
cls
echo            ...shoot it.
pause
cls
echo It blows up and burns
cls
echo It explodes and blows
echo a shortcut thru the walls.
pause
cls
echo You get to the central squirrelputer.
echo        You approach...
pause
cls
echo NO! YOU CANNOT KILL ME!
echo I AM THE CENTRAL SQUIRREL!
pause
cls
echo YOU MUST TYPE RAPIDLY TO DEFEAT
echo  ME!!  ...oh snap! I said it out loud!
pause
cls
echo 10
pause
cls
echo 9
pause
cls
echo 8
pause
cls
echo 7
pause
cls
echo 6
pause
cls
echo 5
pause
echo 4
cls
echo 4
pause
cls
echo 3
pause
cls
echo 2
pause
cls
echo 1
pause
cls
echo ALERT!
echo ALERT!
echo ALERT!
pause
cls
echo BOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOMM!!!!!!!!!!!!!!!!!!!!!!
pause
cls
echo You have saved the supermart.
echo        Here's a toy.
pause
cls
echo THE END!
pause




CODE
echo off
cls
echo Swim...
pause
cls
echo Swim...
echo Swim...
pause
cls
echo Swim...
echo Swim...
echo Hungry!
pause
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


born2c0de
post 15 Apr, 2008 - 02:49 AM
Post #2


printf("I'm a %XR",195936478);

Group Icon
Joined: 26 Nov, 2004
Posts: 3,298

Nice, but you can even ask for user input by using the CHOICE command and check for ERRORLEVEL status.
You could also play around with the FOR loop instead of typing Swim every time.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

nirvanarupali
post 15 Apr, 2008 - 02:56 AM
Post #3


"To think is to create"

Group Icon
Joined: 1 Aug, 2007
Posts: 761

how to user for loop in batch? is it the same in C/C++?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

no2pencil
post 15 Apr, 2008 - 02:59 AM
Post #4


DIC K-mart

Group Icon
Joined: 10 May, 2007
Posts: 3,324

Not like C really...

It is different depending on which OS you are using.

Windows 9x & ME:
CODE
FOR %variable IN (set) DO command [command-parameters]


Windows 2000 & XP:
CODE
FOR %variable IN (set) DO command [command-parameters]


Vista:
?¿?

For Loops in Dos
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 5/17/08 06:21AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month