08-18-2010, 04:57 PM
This is a CLI program with a bunch of shit in it...Took a lot of time, enjoy.
Code:
@echo off
REM Made by Null.
:mm
title Multi-Prog
cls
echo Pick a program:
echo.
echo 1) Guessing game
echo.
echo 2) Black Jack
echo.
echo 3) Tally counter
echo.
echo 4) Calculator
echo.
echo 5) Pathagoren Theorem
echo.
echo 6) Distance Formula
echo.
echo 7) Exit
echo.
set /p msc=Choice:
if %msc% EQU 1 goto :gg
if %msc% EQU 2 goto :bj
if %msc% EQU 3 goto :tc
if %msc% EQU 4 goto :ca
if %msc% EQU 5 goto :pt
if %msc% EQU 6 goto :df
if %msc% EQU 7 (exit)
goto :mm
:gg
cls
:s
echo Welcome to the number guessing game. The goal of the game is to guess a number
echo between set perameters.
echo.
echo Please choose a difficulty:
echo.
echo 1) Easy (1-100)
echo.
echo 2) Medium (1-500)
echo.
echo 3) Hard (1-1000)
echo.
echo 4) WTF?? (1-32767)
echo.
set /p chose1=Difficulty:
if %chose1%==1 goto :e
if %chose1%==2 goto :m
if %chose1%==3 goto :h
if %chose1%==4 goto :wtf
goto :s
:e
cls
set counter=0
set /a num=%random% %%100+1
Echo This is the easy difficulty of the number guessing game. Simply guess numbers
ECHO and then you will be told whethor the number is too high or too low.
echo.
echo Press any button to get started.
pause>nul
:es
cls
set /a counter=%counter%+1
echo The number is between 1 and 100.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :egtr
if %gss% EQU %num% goto :ewin
if %gss% LSS %num% goto :elss
goto :es
:egtr
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too high. The number is between 1 and 100.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :egtr
if %gss% LSS %num% goto :elss
if %gss% EQU %num% goto :ewin
goto :egtr
:elss
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too low. The number is between 1 and 100.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :egtr
if %gss% LSS %num% goto :elss
if %gss% EQU %num% goto :ewin
goto :elss
:ewin
cls
echo Congrats! You guessed %num%!
echo.
echo It took you %counter% trys!
echo.
echo Would you like to play again? (y/n)
echo.
set /p epa=Play again?:
if %epa%==y goto :s
if %epa%==Y goto :s
if %epa%==n goto :mma
if %epa%==N goto :mma
goto :ewin
:m
cls
set counter=0
set /a num=%random% %%500+1
Echo This is the medium difficulty of the number guessing game. Simply guess numbers
echo and then you will be told whethor the number is too high or too low.
echo.
echo Press any button to get started.
pause>nul
:ms
cls
set /a counter=%counter%+1
echo The number is between 1 and 500.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :mgtr
if %gss% EQU %num% goto :mwin
if %gss% LSS %num% goto :mlss
goto :ms
:mgtr
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too high. The number is between 1 and 500.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :mgtr
if %gss% LSS %num% goto :mlss
if %gss% EQU %num% goto :mwin
goto :mgtr
:mlss
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too low. The number is between 1 and 500.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :mgtr
if %gss% LSS %num% goto :mlss
if %gss% EQU %num% goto :mwin
goto :mlss
:mwin
cls
echo Congrats! You guessed %num%!
echo.
echo It took you %counter% trys!
echo.
echo Would you like to play again? (y/n)
echo.
set /p mpa=Play again?:
if %mpa%==y goto :s
if %mpa%==Y goto :s
if %mpa%==n goto :mma
if %mpa%==N goto :mma
goto :mwin
:h
cls
set counter=0
set /a num=%random% %%1000+1
Echo This is the hard difficulty of the number guessing game. Simply guess numbers
ECHO and then you will be told whethor the number is too high or too low.
echo.
echo Press any button to get started.
pause>nul
:hs
cls
set /a counter=%counter%+1
echo The number is between 1 and 1000.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :hgtr
if %gss% EQU %num% goto :hwin
if %gss% LSS %num% goto :hlss
goto :hs
:hgtr
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too high. The number is between 1 and 1000.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :hgtr
if %gss% LSS %num% goto :hlss
if %gss% EQU %num% goto :hwin
goto :hgtr
:hlss
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too low. The number is between 1 and 1000.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :hgtr
if %gss% LSS %num% goto :hlss
if %gss% EQU %num% goto :hwin
goto :hlss
:hwin
cls
echo Congrats! You guessed %num%!
echo.
echo It took you %counter% trys!
echo.
echo Would you like to play again? (y/n)
echo.
set /p hpa=Play again?:
if %hpa%==y goto :s
if %hpa%==Y goto :s
if %hpa%==n goto :mma
if %hpa%==N goto :mma
goto :hwin
:wtf
cls
set counter=0
set /a num=%random%
Echo This is the WHAT THE F**K difficulty of the number guessing game. Simply guess
echo numbers and then you will be told whethor the number is too high or too low.
echo.
echo Press any button to get started.
pause>nul
:wtfs
cls
set /a counter=%counter%+1
echo The number is between 1 and 32767.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :wtfgtr
if %gss% EQU %num% goto :wtfwin
if %gss% LSS %num% goto :wtflss
goto :wtfs
:wtfgtr
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too high. The number is between 1 and 32767.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :wtfgtr
if %gss% LSS %num% goto :wtflss
if %gss% EQU %num% goto :wtfwin
goto :wtfgtr
:wtflss
cls
set /a counter=%counter%+1
echo Your guess, %gss%, was too low. The number is between 1 and 32767.
echo.
echo You are on guess %counter%.
echo.
set /p gss=Guess:
if %gss% GTR %num% goto :wtfgtr
if %gss% LSS %num% goto :wtflss
if %gss% EQU %num% goto :wtfwin
goto :wtflss
:wtfwin
cls
echo Congrats! You guessed %num%!
echo.
echo It took you %counter% trys!
echo.
echo Would you like to play again? (y/n)
echo.
set /p wtfpa=Play again?:
if %wtfpa%==y goto :s
if %wtfpa%==Y goto :s
if %wtfpa%==n goto :mma
if %wtfpa%==N goto :mma
goto :wtfwin
:bj
cls
echo Hello! Whats your name?
echo.
set /p name=Name:
echo.
echo Hello %name%!!
pause
:strt
cls
echo Welcome to the Black Jack casino. This is a black jack game.
echo Its pretty simple you simply type the number for whatever command you want,
echo then press enter. (This game uses a 1-11 system no option 1 or 11 sorry!)
echo.
echo Press any key to begin.
pause>nul
cls
:e1
echo 1) Deal
echo.
echo 2) Rules
echo.
echo 3) Quit
echo.
set /p c1=Selection:
if %c1%==1 goto :deal
if %c1%==2 goto :rules
if %c1%==3 goto :mma
goto :e1
:deal
cls
:z
set /a dlr1=%random% %%11+1
set /a dlr2=%random% %%11+1
set /a dlrttl=%dlr1%+%dlr2%
set /a plyr1=%random% %%11+1
set /a plyr2=%random% %%11+1
set /a plyrttl=%plyr1%+%plyr2%
if %dlrttl%==21 goto :dlrblkjk
if %plyrttl%==21 goto :plyrblkjck
if %dlrttl% GTR 21 goto :z
if %plyrttl% GTR 21 goto :z
:a
echo You have %plyrttl%; the dealer is showing a %dlr2%.
echo.
echo What would you like to do?
echo.
echo 1) Hit
echo.
echo 2) Stay
echo.
echo 3) Punch the dealer in the face
echo.
echo 4) Rob the place
echo.
set /p q1=Choice:
if %q1%==1 goto :ht
if %q1%==2 goto :sty
if %q1%==3 goto :drgdout
if %q1%==4 goto :rob
goto :a
:ht
cls
set /a plyr3=%random% %%11+1
set /a plyrttl=%plyrttl%+%plyr3%
if %plyrttl% GTR 21 goto :plyrbust
:b
cls
echo You now have %plyrttl%. The is showing a %dlr2%.
echo.
echo What would you like to do?
echo.
echo 1) Hit
echo.
echo 2) Stay
echo.
echo 3) Punch the dealer
echo.
echo 4) Rob the place
echo.
set /p q2=Choice:
if %q2%==1 goto :ht
if %q2%==2 goto :sty
if %q2%==3 goto :drgdout
if %q2%==4 goto :rob
goto :b
:sty
cls
:dlrht
set /a dlrlmt=15
if %dlrttl% GTR %dlrlmt% goto :dlrsty
Echo Player Stays. Dealer Hits.
pause
set /a dlr3=%random% %%8+1
set /a dlrttl=%dlrttl%+%dlr3%
if %dlrttl% GTR 21 goto :dlrbust
goto :dlrht
:dlrsty
cls
echo Dealer stays.
pause
if %plyrttl%==%dlrttl% goto :drw
if %plyrttl% GTR %dlrttl% goto :plyrwin
if %plyrttl% LSS %dlrttl% goto :dlrwin
:plyrbust
cls
echo Player Busts with %plyrttl%. Dealer Wins.
pause
goto :strt
:dlrbust
cls
echo Dealer busts with %dlrttl%. Player wins.
pause
goto :strt
:plyrwin
cls
echo Player has: %plyrttl%
echo Dealer has: %dlrttl%
echo.
echo Player wins!
pause
goto :strt
:dlrwin
cls
echo Player has: %plyrttl%
echo Dealer has: %dlrttl%
echo.
echo Dealer wins!
pause
goto :strt
:drgdout
cls
echo Unfortunately, you were tazed and left in an alleyway, where you were robbed.
echo.
echo Better luck next time.
pause
goto :strt
:rob
set /a robchance=%random% %%100+1
if %robchance% LSS 51 goto :robwin
if %robchance% GTE 51 goto :robfail
:robwin
cls
echo Congrats! You made it away with the money. Good job man.
pause
goto :strt
:robfail
cls
echo Well, you almost got out of the place with the money, but on your way out, you
echo tripped over someone you told to "GET DOWN." When you fell, your gun went off,
echo and you shot yourself in the leg.
echo.
echo Apperently, crime doesnt pay after all.
pause
goto :strt
:rules
cls
echo The goal of the game is to reach a total of 21.
echo.
echo "Hit" means you get another card, which could have the value of 1-11.
echo.
echo If you go over 21 you lose, but you dont want to have a value less than the
echo Dealer's.
echo.
pause
goto :strt
:tc
cls
:aaaa
set counter=0
cls
echo This program will keep track of number counts for you. Select a max amount.
echo.
echo 1) 10 count
echo.
echo 2) 50 count
echo.
echo 3) 100 count
echo.
echo 4) 500 count
echo.
echo 5) 1000 count
echo.
echo 6) Infinite count
echo.
echo 7) Quit
echo.
set /p cnt=Choice:
if %cnt%==1 goto :10
if %cnt%==2 goto :50
if %cnt%==3 goto :100
if %cnt%==4 goto :500
if %cnt%==5 goto :1000
if %cnt%==6 goto :4ever
if %cnt%==7 goto :mma
goto :aaaa
:10
cls
set /a counter=%counter%+1
if %counter%==11 goto :aaaa
echo Count number %counter%.
echo.
pause
goto :10
:50
cls
set /a counter=%counter%+1
if %counter%==51 goto :aaaa
echo Count number %counter%.
echo.
pause
goto :50
:100
cls
set /a counter=%counter%+1
if %counter%==101 goto :aaaa
echo Count number %counter%.
echo.
pause
goto :100
:500
cls
set /a counter=%counter%+1
if %counter%==501 goto :aaaa
echo Count number %counter%.
echo.
pause
goto :500
:1000
cls
set /a counter=%counter%+1
if %counter%==1001 goto :aaaa
echo Count number %counter%.
echo.
pause
goto :1000
:4ever
cls
set /a counter=%counter%+1
echo Count number %counter%.
echo.
pause
goto :4ever
:ca
cls
echo This is a calculator. Just type in the equation you want.
echo.
echo For example if you want to add 2 and 2 type: 2+2
echo.
pause
:cstrt
cls
echo Type expression. -Will not calculate decimals-
echo.
set /p e=Expression:
set /a a=%e%
echo.
echo The answer is: %a%
echo.
set /p caga=Try again? (y/n)
if %caga%==y goto :cstrt
if %caga%==Y goto :cstrt
if %caga%==n goto :mma
if %caga%==N goto :mma
goto :mma
:pt
cls
:jjj
cls
echo This Program will find the root form of the hypotenuse for Pathagoreon theorem.
echo.
echo Just type in the lengths of the legs as prompted. (If you do not know use the
echo distance formula.
echo.
set /p leg1=Length of first leg:
set /p leg2=Length of second leg:
set /a asq=%leg1%*%leg1%
set /a bsq=%leg2%*%leg2%
set /a csq=%asq%+%bsq%
cls
echo The hypotenuse's length is the square root of %csq%.
pause
cls
echo Do another?
echo.
echo 1) Yes
echo.
echo 2) No
echo.
set /p agn=Choice:
if %agn%==1 goto :jjj
if %agn% EQU 2 goto :mma
goto :jjj
:df
cls
:bbb
cls
echo The distance formula will find the distance between two points on a graph. The
echo coordinates would be (x1,y1) and (x2,y2). Please enter the coordinates as
echo prompted.
echo.
pause
cls
set /p x1=What is x1 (x sub 1):
set /p y1=What is y1 (y sub 1):
set /p x2=What is x2 (x sub 2):
set /p y2=What is y2 (y sub 2):
cls
set /a x3=%x2%-%x1%
set /a y3=%y2%-%y1%
set /a x4=%x3%*%x3%
set /a y4=%y3%*%y3%
set /a sr=%x4%+%y4%
:b
echo The distance is the Square root of %sr%.
echo.
echo Try again?
echo.
echo 1) Yes
echo.
echo 2) No
echo.
set /p c=Choice:
if %c% EQU 1 goto :bbb
if %c% EQU 2 goto :mma
goto :b
:mma
cls
echo Select one:
echo.
echo 1) Pick another program
echo.
echo 2) Exit
echo.
set /p mmaqa=Choice:
if %mmaqa%==1 goto :mm
if %mmaqa%==2 (exit)
goto :mma