Microsoft > Microsoft DOS

Batch Programs Thread.

(1/126) > >>

macdad-:
Ok this continues off of the "i want to make a simple game in dos" thread. if you have some batch programs you would like to share and discuss about just post em in this thread.  :)


--- Quote from: macdad- on August 05, 2008, 03:56:47 PM ---this isnt a help post, its where you post batch programs you've made if you want to share them.

--- End quote ---

Carbon Dudeoxide:
I made this a while back.


--- Code: ---Rock, Paper, Scissors!
@echo off
set tp=star
set uscore=0
set cscore=0
cls
:start
Title Rock paper scissors
COLOR f0
cls
echo.
echo. Computer score = %cscore%
echo. Your score =     %uscore%
echo.
Echo. Pick and type either 'rock' 'paper' or 'scissors' and press Enter
Set /p tp= :
if %tp% equ rock set g=1
if %tp% equ paper set g=2
if %tp% equ scissors set g=3
Set /a Number=(%Random% %%3)+1
If %Number% equ 1 set h=rock
If %Number% equ 2 set h=paper
If %Number% equ 3 set h=scissors
if %h% equ rock set a=1
if %h% equ paper set a=2
if %h% equ scissors set a=3
if %a% equ %g% goto tie
if %a%%g% equ 13 goto lost
if %a%%g% equ 21 goto lost
if %a%%g% equ 32 goto lost
if %a%%g% equ 12 goto winner
if %a%%g% equ 23 goto winner
if %a%%g% equ 31 goto winner
if /i %tp% EQU rosk (
Title WINNER!
set /a uscore=%uscore%+1
cls
echo.
Echo. Your Guess was rock and I picked scissors. That meens you won!
echo.
echo.
pause
goto start
)
if /i %tp%==star goto :wtfno
else (
:wtfno
cls
echo.
echo. You didn't choose anything.
echo.
echo. Please type either 'rock' 'paper' or 'scissors' and
echo. press Enter.
echo.
echo.Press any key to start playing again. . .
pause > nul
goto :start
)

:winner
Title WINNER!
set /a uscore=%uscore%+1
cls
echo.
Echo. Your Guess was %tp% and I picked %h%. That meens you won!
echo.
echo.
pause
goto start

: tie
Title TIE
cls
echo.
Echo. Your Guess was %tp% and I picked %h%. That meens we tied
echo.
echo.
pause
goto start

: lost
Title LOST!
set /a cscore=%cscore%+1
cls
echo.
Echo. You picked %tp% and I picked %H% so I won!
echo.
echo.
pause
goto start
--- End code ---

Carbon Dudeoxide:
Here's another one. It's pretty fun. Something to do when you're bored.

Play it out to the end. Not that hard.


--- Code: ---@echo off
color f0
cls
@echo off
setlocal
title Guessing Game Small Version
:startggs
cls
set /A MyNumber="(%Random% %%1000) + 1"
set /A NumGuess=0
echo You have to guess a number in the range 1 to 1000
echo I will for each guess tell you if the number is to small
echo or to large                  
echo.
:Nextggs
set /P Guess="Enter a number> "
set /A NumGuess+=1
if %Guess% EQU %MyNumber% goto :Winggs
if %Guess% LSS %MyNumber% echo Your number is to small
if %Guess% EQU 815 goto :winggs
if %Guess% GTR %MyNumber% echo Your number is to large
if /I %guess%==back goto :1
if %guess%==back goto :1
goto :Nextggs

:Winggs
echo Congratulations you guessed the numer in %NumGuess% tries
set /P Answer="Do you want to try again [y/n]> "
if [%Answer%]==[y] goto :startggs
if {%Answer%}=={n} goto :1
--- End code ---

Carbon Dudeoxide:
And this one here:
http://www.computerhope.com/forum/index.php/topic,29824.0.html

That was made by my friends friend (CH Name = Jargee)

He's the one who showed me to ComputerHope.

I like his game though, very entertaining.

macdad-:
that seems like a spinoff of my DOS Cards game but its cool. 8)

oh yea i finished my second version of Sys Stat version 2.0.1 with alot
of new features. plz dont copyright!

[recovering disk space -- attachment deleted by admin]

Navigation

[0] Message Index

[#] Next page

Go to full version