Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Echo off
- @title BlockBreaker v 1
- @mode con cols=28 lines=24
- :: Batch Game - BlockBreaker v 1
- :: Coded by SmartGenius
- :: SmartGenius, Corp. 2010
- If not exist "choice.com" (Goto :NoKey)
- :Load
- Call :Logo
- Setlocal enabledelayedexpansion
- Set /a "LimX=18","LimY=16","TBound=1","LBound=1"
- Set /a "RBound=%LimX%-1"
- Set /a "BBound=%LimY%-3"
- Set NLevels=1
- :Init
- For /l %%a in (0,1,%LimX%) do (
- For /l %%b in (0,1,%LimY%) do (
- Set X%%aY%%b= ))
- Set Ball=O
- Set Bound=Û
- Set Line=Û
- Set Lost=ù
- Set Point=*
- :Levels
- Set /a L+=1
- Call :Level%L%
- Call :Graphic
- Set P%L%=%Movs%
- If "%LOS%"=="True" Goto :Lost
- If "%WIN%"=="True" Goto :Win
- If "%NXL%"=="True" Goto :End
- If "%L%"=="%NLevels%" Goto :Win
- ping -n 1 0.0.0.0 >nul
- Goto :Init
- :Graphic
- Call :Clear
- Cls
- For /l %%d in (0,1,%LimY%) do (
- For /l %%e in (0,1,%LimX%) do (
- Set Lin_%%d=!Lin_%%d!!X%%eY%%d!))
- Echo.
- Echo. BlockBreaker v 1 by Smart
- Echo.
- Echo. Lives:%Lives% Points:%Points%
- Echo. ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
- For /l %%f in (0,1,%LimY%) do (Echo. º!Lin_%%f!º)
- Echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
- Call :%Action%
- If "%Lives%"=="0" (Set LOS=True&Set NXL=True)
- If "%Dots%"=="0" (Set WIN=True&Set NXL=True)
- If "%NXL%"=="True" (Goto :Eof)
- Goto :Graphic
- :Paused
- CHOICE /C:WADX /N >nul
- If "%errorlevel%"=="1" (Set Action=Playing)
- If "%errorlevel%"=="2" (call :LeftA)
- If "%errorlevel%"=="3" (call :RightA)
- If "%errorlevel%"=="4" (Set NXL=True)
- Goto :Eof
- :Playing
- CHOICE /C:WADX /N /T:W,1 >nul
- If "%errorlevel%"=="1" (Set Action=Playing)
- If "%errorlevel%"=="2" (call :LeftB)
- If "%errorlevel%"=="3" (call :RightB)
- If "%errorlevel%"=="4" (Set NXL=True)
- Call :MovBall
- Goto :Eof
- :RightA
- If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
- For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
- call :MovAX+ "%%u" "%%v" TB "!%%u!"
- call Set NewTable=!TB!,%Table%
- For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
- Set Table=!NewTable!
- call :MovAX+ "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
- )
- Goto :Eof
- :RightB
- If ["%Table%"]==["%MaxTable%"] (Goto :Eof)
- For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
- call :MovAX+ "%%u" "%%v" TB "!%%u!"
- call Set NewTable=!TB!,%Table%
- For /f "tokens=1-5 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
- Set Table=!NewTable!)
- Goto :Eof
- :LeftA
- If ["%Table%"]==["%MinTable%"] (Goto :Eof)
- For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
- call :MovAX- "%%v" "%%u" TB "!%%v!"
- call Set NewTable=%Table%,!TB!
- For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
- Set Table=!NewTable!
- call :MovAX- "%CurPos%" "%CurPos%" CurPos "!%CurPos%!"
- )
- Goto :Eof
- :LeftB
- If ["%Table%"]==["%MinTable%"] (Goto :Eof)
- For /f "tokens=1,5 delims=," %%u in ("%Table%") do (
- call :MovAX- "%%v" "%%u" TB "!%%v!"
- call Set NewTable=%Table%,!TB!
- For /f "tokens=2-6 delims=," %%t in ("!NewTable!") do (Set NewTable=%%t,%%u,%%v,%%w,%%x)
- Set Table=!NewTable!)
- Goto :Eof
- :MovAX+
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p+1
- call Set NMovX=%%X!MovX!Y%%q%%
- If "!NMovX!"=="%Bound%" (Goto :Eof)
- If "!NMovX!"==" " (
- Set %~2=
- Set X!MovX!Y%%q=%~4
- Set %3=X!MovX!Y%%q))
- Goto :Eof
- :MovAX-
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p-1
- call Set NMovX=%%X!MovX!Y%%q%%
- If "!NMovX!"=="%Bound%" (Goto :Eof)
- If "!NMovX!"==" " (
- Set %~2=
- Set X!MovX!Y%%q=%~4
- Set %3=X!MovX!Y%%q))
- Goto :Eof
- :MovBall
- Set EOM=False
- Call :%NextMov% "%CurPos%"
- If "%EOM%"=="True" Goto :Eof
- Goto :MovBall
- :Diag1
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p+1
- Set /a MovY=%%q+1
- call Set NMovX=%%X!MovX!Y%%q%%
- call Set NMovY=%%X%%pY!MovY!%%
- call Set NMovXY=%%X!MovX!Y!MovY!%%
- If "!NMovXY!"=="%Bound%" (
- If "%%q"=="%BBound%" (Set NextMov=Diag3)
- If "%%p"=="%RBound%" (Set NextMov=Diag4)
- Goto :Eof)
- If "!NMovY!"=="%Point%" (
- Set "X%%pY!MovY!= "
- Set NextMov=Diag3
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovX!"=="%Point%" (
- Set "X!MovX!Y%%q= "
- Set NextMov=Diag4
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"=="%Point%" (
- Set "X!MovX!Y!MovY!= "
- Set NextMov=Diag2
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"==" " (
- Set %~1=
- Set X!MovX!Y!MovY!=%Ball%
- Set CurPos=X!MovX!Y!MovY!
- Set EOM=True)
- )
- If "!NMovXY!"=="%Lost%" (
- Set %~1=
- Set /a Lives-=1
- call :ReSet
- Set EOM=True)
- )
- Goto :Eof
- :Diag2
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p-1
- Set /a MovY=%%q-1
- call Set NMovX=%%X!MovX!Y%%q%%
- call Set NMovY=%%X%%pY!MovY!%%
- call Set NMovXY=%%X!MovX!Y!MovY!%%
- If "!NMovXY!"=="%Bound%" (
- If "%%q"=="%TBound%" (Set NextMov=Diag4)
- If "%%p"=="%LBound%" (Set NextMov=Diag3)
- Goto :Eof)
- If "!NMovY!"=="%Point%" (
- Set "X%%pY!MovY!= "
- Set NextMov=Diag4
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovX!"=="%Point%" (
- Set "X!MovX!Y%%q= "
- Set NextMov=Diag3
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"=="%Point%" (
- Set "X!MovX!Y!MovY!= "
- Set NextMov=Diag1
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"==" " (
- Set %~1=
- Set X!MovX!Y!MovY!=%Ball%
- Set CurPos=X!MovX!Y!MovY!
- Set EOM=True)
- )
- If "!NMovXY!"=="%Lost%" (
- Set %~1=
- Set /a Lives-=1
- call :ReSet
- Set EOM=True)
- )
- Goto :Eof
- :Diag3
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p+1
- Set /a MovY=%%q-1
- call Set NMovX=%%X!MovX!Y%%q%%
- call Set NMovY=%%X%%pY!MovY!%%
- call Set NMovXY=%%X!MovX!Y!MovY!%%
- If "!NMovXY!"=="%Bound%" (
- If "%%q"=="%TBound%" (Set NextMov=Diag1)
- If "%%p"=="%RBound%" (Set NextMov=Diag2)
- Goto :Eof)
- If "!NMovY!"=="%Point%" (
- Set "X%%pY!MovY!= "
- Set NextMov=Diag1
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovX!"=="%Point%" (
- Set "X!MovX!Y%%q= "
- Set NextMov=Diag2
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"=="%Point%" (
- Set "X!MovX!Y!MovY!= "
- Set NextMov=Diag4
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"==" " (
- Set %~1=
- Set X!MovX!Y!MovY!=%Ball%
- Set CurPos=X!MovX!Y!MovY!
- Set EOM=True)
- )
- If "!NMovXY!"=="%Lost%" (
- Set %~1=
- Set /a Lives-=1
- call :ReSet
- Set EOM=True)
- )
- Goto :Eof
- :Diag4
- For /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
- Set /a MovX=%%p-1
- Set /a MovY=%%q+1
- call Set NMovX=%%X!MovX!Y%%q%%
- call Set NMovY=%%X%%pY!MovY!%%
- call Set NMovXY=%%X!MovX!Y!MovY!%%
- If "!NMovXY!"=="%Bound%" (
- If "%%q"=="%BBound%" (Set NextMov=Diag2)
- If "%%p"=="%LBound%" (Set NextMov=Diag1)
- Goto :Eof)
- If "!NMovY!"=="%Point%" (
- Set "X%%pY!MovY!= "
- Set NextMov=Diag2
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovX!"=="%Point%" (
- Set "X!MovX!Y%%q= "
- Set NextMov=Diag1
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"=="%Point%" (
- Set "X!MovX!Y!MovY!= "
- Set NextMov=Diag3
- Set /a Points+=5
- Set /a Dots-=1
- Goto :Eof
- )
- If "!NMovXY!"==" " (
- Set %~1=
- Set X!MovX!Y!MovY!=%Ball%
- Set CurPos=X!MovX!Y!MovY!
- Set EOM=True)
- )
- If "!NMovXY!"=="%Lost%" (
- Set %~1=
- Set /a Lives-=1
- call :ReSet
- Set EOM=True)
- )
- Goto :Eof
- :Clear
- For /l %%m in (0,1,%LimY%) do (Set Lin_%%m=)
- Goto :Eof
- :Reset
- Set CurPos=X8Y13
- Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
- For /l %%h in (1,1,17) do (Set X%%hY14= )
- For %%k in (%Init%) do (Set %%k=%Line%)
- For /f "tokens=1 delims=," %%j in ("%Init%") do (Set %%j=%Ball%)
- Set Action=Paused
- Goto :Eof
- :Lost
- msg * Perdiste !
- Goto :End
- :Win
- msg * Has Ganado !
- Goto :End
- :End
- msg * Gracias por Jugar BlockBreaker v1 by SmartGenius
- Endlocal
- Exit
- :Level1
- Set /a "Movs=0","Points=0","Dots=36","Lives=3"
- Set CurPos=X8Y13
- Set Table=X10Y14,X9Y14,X8Y14,X7Y14,X6Y14
- Set MaxTable=X17Y14,X16Y14,X15Y14,X14Y14,X13Y14
- Set MinTable=X5Y14,X4Y14,X3Y14,X2Y14,X1Y14
- Set Init=X8Y13,X6Y14,X7Y14,X8Y14,X9Y14,X10Y14
- Set Dir=N
- Set Action=Paused
- Set NextMov=Diag3
- For /l %%e in (%LBound%,1,%RBound%) do (Set X%%eY1= )
- For /l %%f in (6,1,10) do (Set X%%fY2=%Bound%)
- For %%k in (%Init%) do (Set %%k=%Line%)
- For /f "tokens=1 delims=," %%j in ("%Init%") do (Set %%j=%Ball%)
- For /l %%i in (0,1,%LimX%) do (
- Set X0Y%%i=%Bound%
- Set X%LimX%Y%%i=%Bound%
- Set X%%iY0=%Bound%
- Set X%%iY%LimY%=%Bound%)
- For /l %%l in (2,1,16) do (Set X%%lY2=%Point%)
- For /l %%m in (4,1,14) do (Set X%%mY3=%Point%)
- For /l %%n in (6,1,12) do (Set X%%nY4=%Point%)
- For /l %%o in (8,1,10) do (Set X%%oY5=%Point%)
- For /l %%r in (1,1,17) do (Set X%%rY15=%Lost%)
- Goto :Eof
- :Logo
- Cls
- Color 0b
- Echo.
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°ÛÛÛ°°Û°°°ÛÛÛ°°ÛÛ°Û°°Û°°
- Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
- Echo. °°°ÛÛÛ°°Û°°°Û°Û°Û°°°ÛÛ°°°°
- Echo. °°°Û°°Û°Û°°°Û°Û°Û°°°Û°Û°°°
- Echo. °°°ÛÛÛ°°ÛÛÛ°ÛÛÛ°°ÛÛ°Û°°Û°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°°B°R°E°A°K°E°R°°°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
- Echo. °°±°±°±°±°±°±°±°±°±°±°±°°°
- Echo. °°°±°±°±°±°±°±°±°±°±°±°±°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°°²°°°°°°°°°°°°°°°°°°°
- Echo. °°°°ÛÛÛÛÛ°°°°°°°°°°°°°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- Echo. °°°°°: SmartGenius :°°°°°°
- Echo. °°°°° Corp. 2010 °°°°°°
- Echo. °°°°°°°°°°°°°°°°°°°°°°°°°°
- ping -n 3 0.0.0.0 >nul
- Goto :Eof
- :NoKey
- @mode con cols=30 lines=20
- cls
- Echo.
- Echo Uno de los archivos necesarios para el
- Echo funcionamiento de este Script no se
- Echo encuentra.
- Echo.
- Echo CHOICE.COM
- Echo.
- Echo Por favor descargue una copia del Comando
- Echo CHOICE de Internet...
- Echo.
- pause
- exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement