a enregistrer en .bat:
@echo off
title PC - The Last Warrior Graphique -=By Pierre JOUSSAIN=-
mode con cols=29 lines=25
color 0a
Choice /N /T:Y,1 >Nul 2>&1
If "%Errorlevel%"=="9009" goto nochoice
set procom=acp
:initialisation
cls
echo.
echo Chargement (0/5)...
if not exist "%homedrive%\TheLastWarrior" md "%homedrive%\TheLastWarrior"
if not exist "%homedrive%\TheLastWarrior\%username%" md "%homedrive%\TheLastWarrior\%username%"
if not exist "%homedrive%\TheLastWarrior\%username%\scomax.txt" echo ByPierreJOUSSAIN>"%homedrive%\TheLastWarrior\%username%\scomax.txt"
for /F "usebackq tokens=1,2 delims=:" %%A in (`TIME /T`) DO (
if not exist "%homedrive%\TheLastWarrior\%username%\session.txt" echo echo Install ---- Par : %username% ---- Le %date% ---- a %%Ah%%B >"%homedrive%\TheLastWarrior\%username%\session.txt"
)
for /f "delims=" %%i in ('type %homedrive%\TheLastWarrior\%username%\Session.txt') do set /a session+=1
for /F "usebackq tokens=1,2 delims=:" %%A in (`TIME /T`) DO (
echo Session : %session% ---- Par : %username% ---- Le %date% ---- a %%Ah%%B>>"%homedrive%\TheLastWarrior\%username%\session.txt"
)
if %errorlevel%==0 set verwin=Windows 8 [Non teste]
ver | find /i "version 6.1." > nul
if %errorlevel%==0 set verwin=Windows 7 [Compatible]
ver | find /i "version 6.0." > nul
if %errorlevel%==0 set verwin=Windows Vista [Non teste]
ver | find /i "version 5.1." > nul
if %errorlevel%==0 set verwin=Windows XP [Compatible]
ver | find /i "version 5.2." > nul
if %errorlevel%==0 set verwin=Windows 2003 [Non teste]
ver | find /i "Windows 2000" > nul
cls
echo.
echo Chargement (1/5)...
if %errorlevel%==0 set verwin=Windows 2000 [Non teste]
ver | find /i "Windows NT" > nul
if %errorlevel%==0 set verwin=Windows NT [Non teste]
ver | find /i "Windows ME" > nul
if %errorlevel%==0 set verwin=Windows ME [Non teste]
ver | find /i "Windows 98" > nul
if %errorlevel%==0 set verwin=Windows 1998 [Non teste]
ver | find /i "Windows 95" > nul
if %errorlevel%==0 set verwin=Windows 1995 [Non teste]
goto mapstartcharge
:debut
set colorgame=a
set gauche=Q
set droite=D
set tirer=Z
set menu=X
set info=The Last Warrior
set tlw=0
set vie=3
set pts=0
set iaa=2
set scomax=ByPierreJOUSSAIN
if exist "%homedrive%\TheLastWarrior\%username%\scomax.txt" for /f %%a in (%homedrive%\TheLastWarrior\%username%\scomax.txt) do set scomax=%%a
if %scomax% equ ByPierreJOUSSAIN set scomax=0
cls
echo.
echo The Last Warrior
echo Le jeu en batch graphique...
echo.
echo.
echo bonne chance
echo.
echo Version : 2.3
echo : Bug+Menu
echo.
echo -=Pierre JOUSSAIN=-
echo Copyright
2012
echo.
echo Windows :
echo %verwin%
echo.
echo Bon jeu !!!
echo.
echo.
pause>nul
cls
:singleps
color 0%colorgame%
Cls
Echo.
Echo.
Echo. The Last Warrior !
Echo. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
Echo. ÚÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo. ³1.³ ³ Jouer ³
Echo. ÀÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo. ÚÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo. ³2.³ ³ Touches ³
Echo. ÀÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo. ÚÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo. ³3.³ ³ Couleur ³
Echo. ÀÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo. ÚÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo. ³4.³ ³ Vos scores ³
Echo. ÀÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo. ÚÄÄ¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo. ³5.³ ³ Quitter ³
Echo. ÀÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo.
set /p choixm=Votre choix :
if %choixm% equ 1 goto map
if %choixm% equ 2 goto help
if %choixm% equ 3 goto color
if %choixm% equ 4 goto scores
if %choixm% equ 5 goto quitg
goto singleps
:quitg
Echo.
Echo Merci d'avoir joue
Echo A bientot sur
echo The Last Warrior !
Endlocal
Ping -n 3 localhost >nul
Exit
:scores
cls
echo.
echo Vos scores, %username% :
echo.
echo.
echo Meilleur score : %scomax%pts
echo.
echo Scores recents :
if exist "%homedrive%\TheLastWarrior\%username%\recent01.txt" type "%homedrive%\TheLastWarrior\%username%\recent01.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent02.txt" type "%homedrive%\TheLastWarrior\%username%\recent02.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent03.txt" type "%homedrive%\TheLastWarrior\%username%\recent03.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent04.txt" type "%homedrive%\TheLastWarrior\%username%\recent04.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent05.txt" type "%homedrive%\TheLastWarrior\%username%\recent05.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent06.txt" type "%homedrive%\TheLastWarrior\%username%\recent06.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent07.txt" type "%homedrive%\TheLastWarrior\%username%\recent07.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent08.txt" type "%homedrive%\TheLastWarrior\%username%\recent08.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent09.txt" type "%homedrive%\TheLastWarrior\%username%\recent09.txt"
if exist "%homedrive%\TheLastWarrior\%username%\recent10.txt" type "%homedrive%\TheLastWarrior\%username%\recent10.txt"
echo.
echo.
echo Session : %session%
Pause >nul
goto singleps
:color
cls
echo.
echo Veuillez selectionnez une
echo couleur parmi :
echo.
echo 1 = Bleu fonce
echo 2 = Vert
echo 3 = Bleu-gris
echo 4 = Marron
echo 7 = Gris clair
echo 8 = Gris
echo 9 = Bleu clair
echo A = Vert clair (par default)
echo C = Rouge
echo D = Rose
echo E = Jaune
echo F = Blanc
echo.
echo Veuillez saisir la couleur
set /p colorgame=souhaitee :
if %colorgame% equ 1 goto singleps
if %colorgame% equ 2 goto singleps
if %colorgame% equ 3 goto singleps
if %colorgame% equ 4 goto singleps
if %colorgame% equ 7 goto singleps
if %colorgame% equ 8 goto singleps
if %colorgame% equ 9 goto singleps
if %colorgame% equ A goto singleps
if %colorgame% equ C goto singleps
if %colorgame% equ D goto singleps
if %colorgame% equ E goto singleps
if %colorgame% equ F goto singleps
goto color
:help
Cls
Echo.
Echo Comment jouer ?
Echo.
Echo Touches %gauche%,%droite%,%tirer%
Echo.
Echo %gauche% = Aller a gauche
Echo %droite% = Aller a droite
Echo %tirer% = Tirer
Echo.
Echo.
echo Veuillez saisir votre clavier
echo 1) Azerty (Francais)
echo 2) Qwerty (Anglais)
echo.
set /p azeqwe=Votre choix :
if 1 equ %azeqwe% goto azerty
if 2 equ %azeqwe% goto qwerty
goto help
:azerty
set gauche=Q
set droite=D
set tirer=Z
goto singleps
:qwerty
set gauche=A
set droite=D
set tirer=W
goto singleps
:perdu1
set /a vie=%vie%-1
set info=Vous venez de perdre 1 vie
if equ %i1% set h1=
if equ %i2% set h2=
if equ %i3% set h3=
if equ %i4% set h4=
if equ %i5% set h5=
if equ %i6% set h6=
if equ %i7% set h7=
if equ %i8% set h8=
if equ %i9% set h9=
if %vie% equ 0 goto perdu
goto map
:perdu
cls
echo.
echo Vous avez perdu,
echo avec %pts% points
echo.
echo Merci d'avoir joue,
echo A bientot !
echo.
echo.
echo Appuyez sur une touche
echo pour sauvegarder...
pause >nul
if %scomax% lss %pts% echo %pts%>"%homedrive%\TheLastWarrior\%username%\scomax.txt"
if not exist "%homedrive%\TheLastWarrior\%username%\recent01.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent01.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent01.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent02.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent02.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent02.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent03.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent03.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent03.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent04.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent04.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent04.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent05.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent05.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent05.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent06.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent06.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent06.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent07.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent07.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent07.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent08.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent08.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent08.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent09.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent09.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent09.txt" if not exist "%homedrive%\TheLastWarrior\%username%\recent10.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent10.txt"&goto initialisation
if exist "%homedrive%\TheLastWarrior\%username%\recent10.txt" echo Le %date% : %pts%points>"%homedrive%\TheLastWarrior\%username%\recent01.txt"&goto initialisation
goto initialisation
:map
cls
echo.
echo -=Pierre JOUSSAIN=-
echo.
echo Points : %pts%
echo Vie : %vie%
echo B.A : %tlw%
echo ÉÍÍÍÍÍÍÍÍÍ»
echo º%a1%%a2%%a3%%a4%%a5%%a6%%a7%%a8%%a9%º
echo º%b1%%b2%%b3%%b4%%b5%%b6%%b7%%b8%%b9%º
echo º%c1%%c2%%c3%%c4%%c5%%c6%%c7%%c8%%c9%º
echo º%d1%%d2%%d3%%d4%%d5%%d6%%d7%%d8%%d9%º
echo º%e1%%e2%%e3%%e4%%e5%%e6%%e7%%e8%%e9%º
echo º%f1%%f2%%f3%%f4%%f5%%f6%%f7%%f8%%f9%º
echo º%g1%%g2%%g3%%g4%%g5%%g6%%g7%%g8%%g9%º
echo º%h1%%h2%%h3%%h4%%h5%%h6%%h7%%h8%%h9%º
echo º%i1%%i2%%i3%%i4%%i5%%i6%%i7%%i8%%i9%º
echo ÈÍÍÍÍÍÍÍÍͼ
echo %tirer%
echo %gauche% %droite%
echo.
echo %info%
if pro equ %procom% goto chpro
:Move
REM CHOICE /C %tirer%%gauche%%droite% /N >nul
CHOICE /C:%tirer%%gauche%%droite% /N
If "%errorlevel%"=="1" (goto feu)
If "%errorlevel%"=="2" (goto gauche)
If "%errorlevel%"=="3" (goto droite)
goto map
:chpro
echo.
echo Telechargez "choice.com"
set /p choise=Mode sans echecs :
If %choise% equ %tirer% goto feu
If %choise% equ %gauche% goto gauche
If %choise% equ %droite% goto droite
goto map
:gauche
if equ %i1% goto map
if equ %i2% set i2= &set i1=&goto bt
if equ %i3% set i3= &set i2=&goto bt
if equ %i4% set i4= &set i3=&goto bt
if equ %i5% set i5= &set i4=&goto bt
if equ %i6% set i6= &set i5=&goto bt
if equ %i7% set i7= &set i6=&goto bt
if equ %i8% set i8= &set i7=&goto bt
if equ %i9% set i9= &set i8=&goto bt
:droite
if equ %i1% set i1= &set i2=&goto bt
if equ %i2% set i2= &set i3=&goto bt
if equ %i3% set i3= &set i4=&goto bt
if equ %i4% set i4= &set i5=&goto bt
if equ %i5% set i5= &set i6=&goto bt
if equ %i6% set i6= &set i7=&goto bt
if equ %i7% set i7= &set i8=&goto bt
if equ %i8% set i8= &set i9=&goto bt
if equ %i9% goto map
:feu
set info=Vous n'avez pas de B.A
if %tlw% equ 0 goto map
set /a tlw=%tlw%-1
set a1= &set a2= &set a3= &set a4= &set a5= &set a6= &set a7= &set a8= &set a9=
set b1= &set b2= &set b3= &set b4= &set b5= &set b6= &set b7= &set b8= &set b9=
set c1= &set c2= &set c3= &set c4= &set c5= &set c6= &set c7= &set c8= &set c9=
set d1= &set d2= &set d3= &set d4= &set d5= &set d6= &set d7= &set d8= &set d9=
set e1= &set e2= &set e3= &set e4= &set e5= &set e6= &set e7= &set e8= &set e9=
set f1= &set f2= &set f3= &set f4= &set f5= &set f6= &set f7= &set f8= &set f9=
set g1= &set g2= &set g3= &set g4= &set g5= &set g6= &set g7= &set g8= &set g9=
set h1= &set h2= &set h3= &set h4= &set h5= &set h6= &set h7= &set h8= &set h9=
if 1 equ %i1% set i1=
if 2 equ %i2% set i2=
if 3 equ %i3% set i3=
if 4 equ %i4% set i4=
if 5 equ %i5% set i5=
if 6 equ %i6% set i6=
if 7 equ %i7% set i7=
if 8 equ %i8% set i8=
if 9 equ %i9% set i9=
set start1= &set start2= &set start3= &set start4= &set start5= &set start6= &set start7= &set start8= &set start9=
set info=Bombe Atomique explose !
goto bt
:iaaa
set /a iaan=%random%*7/32767+1
set iaac=0
:iaa1
set /a iaa1=%random%*9/32767+1
if %iaa1% equ 1 set start1=i
if %iaa1% equ 2 set start2=i
if %iaa1% equ 3 set start3=i
if %iaa1% equ 4 set start4=i
if %iaa1% equ 5 set start5=i
if %iaa1% equ 6 set start6=i
if %iaa1% equ 7 set start7=i
if %iaa1% equ 8 set start8=i
if %iaa1% equ 9 set start9=i
set /a iaac=%iaac%+1
if %iaac% equ %iaan% goto iaaf
goto iaa1
:iaaf
set iaa=0
goto bt
:mapstartcharge
cls
echo.
echo Chargement (2/5)...
set a1= &set a2= &set a3= &set a4= &set a5= &set a6= &set a7= &set a8= &set a9=
set b1= &set b2= &set b3= &set b4= &set b5= &set b6= &set b7= &set b8= &set b9=
set c1= &set c2= &set c3= &set c4= &set c5= &set c6= &set c7= &set c8= &set c9=
cls
echo.
echo Chargement (3/5)...
set d1= &set d2= &set d3= &set d4= &set d5= &set d6= &set d7= &set d8= &set d9=
set e1= &set e2= &set e3= &set e4= &set e5= &set e6= &set e7= &set e8= &set e9=
set f1= &set f2= &set f3= &set f4= &set f5= &set f6= &set f7= &set f8= &set f9=
cls
echo.
echo Chargement (4/5)...
set g1= &set g2= &set g3= &set g4= &set g5= &set g6= &set g7= &set g8= &set g9=
set h1= &set h2= &set h3= &set h4= &set h5= &set h6= &set h7= &set h8= &set h9=
set i1= &set i2= &set i3= &set i4= &set i5=&set i6= &set i7= &set i8= &set i9=
set end1= &set end2= &set end3= &set end4= &set end5= &set end6= &set end7= &set end8= &set end9= &
set start1= &set start2= &set start3= &set start4= &set start5= &set start6= &set start7= &set start8= &set start9=
cls
echo.
echo Chargement (5/5)...
goto debut
:bt
if %iaa% equ 2 goto iaaa
if i equ %i1% set end1=i&set i1=
if i equ %i2% set end2=i&set i2=
if i equ %i3% set end3=i&set i3=
if i equ %i4% set end4=i&set i4=
if i equ %i5% set end5=i&set i5=
if i equ %i6% set end6=i&set i6=
if i equ %i7% set end7=i&set i7=
if i equ %i8% set end8=i&set i8=
if i equ %i9% set end9=i&set i9=
if i equ %h1% if equ %i1% goto perdu1
if i equ %h1% set i1=i&set h1=
if i equ %h2% if equ %i2% goto perdu1
if i equ %h2% set i2=i&set h2=
if i equ %h3% if equ %i3% goto perdu1
if i equ %h3% set i3=i&set h3=
if i equ %h4% if equ %i4% goto perdu1
if i equ %h4% set i4=i&set h4=
if i equ %h5% if equ %i5% goto perdu1
if i equ %h5% set i5=i&set h5=
if i equ %h6% if equ %i6% goto perdu1
if i equ %h6% set i6=i&set h6=
if i equ %h7% if equ %i7% goto perdu1
if i equ %h7% set i7=i&set h7=
if i equ %h8% if equ %i8% goto perdu1
if i equ %h8% set i8=i&set h8=
if i equ %h9% if equ %i9% goto perdu1
if i equ %h9% set i9=i&set h9=
if i equ %g1% set h1=i&set g1=
if i equ %g2% set h2=i&set g2=
if i equ %g3% set h3=i&set g3=
if i equ %g4% set h4=i&set g4=
if i equ %g5% set h5=i&set g5=
if i equ %g6% set h6=i&set g6=
if i equ %g7% set h7=i&set g7=
if i equ %g8% set h8=i&set g8=
if i equ %g9% set h9=i&set g9=
if i equ %f1% set g1=i&set f1=
if i equ %f2% set g2=i&set f2=
if i equ %f3% set g3=i&set f3=
if i equ %f4% set g4=i&set f4=
if i equ %f5% set g5=i&set f5=
if i equ %f6% set g6=i&set f6=
if i equ %f7% set g7=i&set f7=
if i equ %f8% set g8=i&set f8=
if i equ %f9% set g9=i&set f9=
if i equ %e1% set f1=i&set e1=
if i equ %e2% set f2=i&set e2=
if i equ %e3% set f3=i&set e3=
if i equ %e4% set f4=i&set e4=
if i equ %e5% set f5=i&set e5=
if i equ %e6% set f6=i&set e6=
if i equ %e7% set f7=i&set e7=
if i equ %e8% set f8=i&set e8=
if i equ %e9% set f9=i&set e9=
if i equ %d1% set e1=i&set d1=
if i equ %d2% set e2=i&set d2=
if i equ %d3% set e3=i&set d3=
if i equ %d4% set e4=i&set d4=
if i equ %d5% set e5=i&set d5=
if i equ %d6% set e6=i&set d6=
if i equ %d7% set e7=i&set d7=
if i equ %d8% set e8=i&set d8=
if i equ %d9% set e9=i&set d9=
if i equ %c1% set d1=i&set c1=
if i equ %c2% set d2=i&set c2=
if i equ %c3% set d3=i&set c3=
if i equ %c4% set d4=i&set c4=
if i equ %c5% set d5=i&set c5=
if i equ %c6% set d6=i&set c6=
if i equ %c7% set d7=i&set c7=
if i equ %c8% set d8=i&set c8=
if i equ %c9% set d9=i&set c9=
if i equ %b1% set c1=i&set b1=
if i equ %b2% set c2=i&set b2=
if i equ %b3% set c3=i&set b3=
if i equ %b4% set c4=i&set b4=
if i equ %b5% set c5=i&set b5=
if i equ %b6% set c6=i&set b6=
if i equ %b7% set c7=i&set b7=
if i equ %b8% set c8=i&set b8=
if i equ %b9% set c9=i&set b9=
if i equ %a1% set b1=i&set a1=
if i equ %a2% set b2=i&set a2=
if i equ %a3% set b3=i&set a3=
if i equ %a4% set b4=i&set a4=
if i equ %a5% set b5=i&set a5=
if i equ %a6% set b6=i&set a6=
if i equ %a7% set b7=i&set a7=
if i equ %a8% set b8=i&set a8=
if i equ %a9% set b9=i&set a9=
if i equ %start1% set a1=i&set start1=
if i equ %start2% set a2=i&set start2=
if i equ %start3% set a3=i&set start3=
if i equ %start4% set a4=i&set start4=
if i equ %start5% set a5=i&set start5=
if i equ %start6% set a6=i&set start6=
if i equ %start7% set a7=i&set start7=
if i equ %start8% set a8=i&set start8=
if i equ %start9% set a9=i&set start9=
set /a tlwg=%random%*40/32767+1
if %tlwg% equ 1 set /a tlw=%tlw%+1
if %tlwg% equ 1 set info=+1 Bombe Atomique
set /a iaa=%iaa%+1
set /a pts=%pts%+10
goto map
:nochoice
set procom=pro
cls
echo.
echo ATTENTION !!!
echo.
echo.
echo Vous ne possedez pas la
echo commande "choice.com" !
echo.
echo Le jeu "graphique" va
echo etre en mode sans echecs
echo.
echo.
echo Pour remedier a ce petit
echo inconvenient, merci de
echo telecharger le commmande.
echo.
echo.
pause>nul
goto initialisation