Juego En .Bat

Páginas: 8 (1797 palabras) Publicado: 7 de mayo de 2012
@echo off
@title PushBox v 1
@mode con cols=21 lines=18
@::Another Batch Game
@::by ::masterhacks.20m.com::

if not exist "keyboard.exe" (Goto :NoKey)

:load
call :Logo
setlocal enabledelayedexpansion
set LimX=12
set LimY=10
set NLevels=5

:init
for /l %%a in (0,1,%LimX%) do (
for /l %%b in (0,1,%LimY%) do (
set X%%aY%%b=°))
set Player=
set Bound=Û
set Box=*
setPush=o

:Levels
set /a L+=1
Call :Level%L%
Call :Graphic
set P%L%=%Movs%
if "%EOG%"=="True" Goto :End
if "%L%"=="%NLevels%" Goto :Win
ping -n 1 0.0.0.0 >nul
Goto :Init

:Graphic
Call :Clear
:First
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. PushBox v1 by Smart
echo.
echo. Nivel:%L% Movs:%Movs%
echo.ÉÍÍÍÍÍÍÍÍÍÍÍÍÍ»
for /l %%f in (0,1,%LimY%) do (echo. º!Lin_%%f!º)
echo. ÈÍÍÍÍÍÍÍÍÍÍÍÍͼ
keyboard
if "%errorlevel%"=="77" (call :MovX+ "%CurPos%")
if "%errorlevel%"=="75" (call :MovX- "%CurPos%")
if "%errorlevel%"=="80" (call :MovY+ "%CurPos%")
if "%errorlevel%"=="72" (call :MovY- "%CurPos%")
if "%errorlevel%"=="88" (set EOG=True&Goto :Eof)
if "%errorlevel%"=="120" (set EOG=True&Goto :Eof)Call :Check%L%
if "%NXL%"=="True" (Goto :Eof)
Goto :Graphic

::Logica de Movimiento en el Plano
::Coded by :: masterhacks.20m.com ::

:MovX+
for /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
set /a MovX=%%p+1
set /a MovXX=%%p+2
call set NMovX=%%X!MovX!Y%%q%%
call set NMovXX=%%X!MovXX!Y%%q%%
if "!NMovX!"=="%Bound%" (Goto :Eof)
if "!NMovX!"=="%Push%" (
if !%~1!==%Player% set %~1=
setX!MovX!Y%%q=%Player%
set CurPos=X!MovX!Y%%q)
if "!NMovX!"==" " (
if !%~1!==%Player% set %~1=
set X!MovX!Y%%q=%Player%
set CurPos=X!MovX!Y%%q)
if "!NMovX!"=="%Box%" (
if "!NMovXX!"=="%Bound%" (Goto :Eof)
if "!NMovXX!"=="%Box%" (Goto :Eof)
if !%~1!==%Player% set %~1=
set X!MovX!Y%%q=%Player%
set X!MovXX!Y%%q=%Box%
set CurPos=X!MovX!Y%%q))
set /a Movs+=1
for %%u in (%Pushes%) do (if"!%%u!"==" " (set %%u=%Push%))
Goto :Eof

:MovX-
for /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
set /a MovX=%%p-1
set /a MovXX=%%p-2
call set NMovX=%%X!MovX!Y%%q%%
call set NMovXX=%%X!MovXX!Y%%q%%
if "!NMovX!"=="%Bound%" (Goto :Eof)
if "!NMovX!"=="%Push%" (
if !%~1!==%Player% set %~1=
set X!MovX!Y%%q=%Player%
set CurPos=X!MovX!Y%%q)
if "!NMovX!"==" " (
if !%~1!==%Player% set%~1=
set X!MovX!Y%%q=%Player%
set CurPos=X!MovX!Y%%q)
if "!NMovX!"=="%Box%" (
if "!NMovXX!"=="%Bound%" (Goto :Eof)
if "!NMovXX!"=="%Box%" (Goto :Eof)
if !%~1!==%Player% set %~1=
set X!MovX!Y%%q=%Player%
set X!MovXX!Y%%q=%Box%
set CurPos=X!MovX!Y%%q))
set /a Movs+=1
for %%u in (%Pushes%) do (if "!%%u!"==" " (set %%u=%Push%))
Goto :Eof

:MovY+
for /f "tokens=1,2 delims=X,Y" %%p in("%~1") do (
set /a MovY=%%q+1
set /a MovYY=%%q+2
call set NMovY=%%X%%pY!MovY!%%
call set NMovYY=%%X%%pY!MovYY!%%
if "!NMovY!"=="%Bound%" (Goto :Eof)
if "!NMovY!"=="%Push%" (
if !%~1!==%Player% set %~1=
set X%%pY!MovY!=%Player%
set CurPos=X%%pY!MovY!)
if "!NMovY!"==" " (
if !%~1!==%Player% set %~1=
set X%%pY!MovY!=%Player%
set CurPos=X%%pY!MovY!)
if "!NMovY!"=="%Box%" (
if"!NMovYY!"=="%Bound%" (Goto :Eof)
if "!NMovYY!"=="%Box%" (Goto :Eof)
if !%~1!==%Player% set %~1=
set X%%pY!MovY!=%Player%
set X%%pY!MovYY!=%Box%
set CurPos=X%%pY!MovY!))
set /a Movs+=1
for %%u in (%Pushes%) do (if "!%%u!"==" " (set %%u=%Push%))
Goto :Eof

:MovY-
for /f "tokens=1,2 delims=X,Y" %%p in ("%~1") do (
set /a MovY=%%q-1
set /a MovYY=%%q-2
call set NMovY=%%X%%pY!MovY!%%
call setNMovYY=%%X%%pY!MovYY!%%
if "!NMovY!"=="%Bound%" (Goto :Eof)
if "!NMovY!"=="%Push%" (
if !%~1!==%Player% set %~1=
set X%%pY!MovY!=%Player%
set CurPos=X%%pY!MovY!)
if "!NMovY!"==" " (
if !%~1!==%Player% set %~1=
set X%%pY!MovY!=%Player%
set CurPos=X%%pY!MovY!)
if "!NMovY!"=="%Box%" (
if "!NMovYY!"=="%Bound%" (Goto :Eof)
if "!NMovYY!"=="%Box%" (Goto :Eof)
if !%~1!==%Player% set %~1=...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Juegos De Bate Y Campo
  • EL BATO
  • bateas
  • Batidas
  • Bater A
  • batidos
  • Batidos
  • bato

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS