[BATCH] Animation de bienvenue

Nos tutoriels complets pour vous aider
Répondre
chatonhub
    unknown unknown

[BATCH] Animation de bienvenue

Message par chatonhub »

en me promenant sur la toile j'ai trouver ceci
un script .bat Énormément bluffant ,pour du batch c'est incroyablement génial ^^
je poste le code et un .rar
copier coller le code dans un bloc note enregistré en bienvenue.bat lancer en admin
allumez le son du pc
Image

Code : Tout sélectionner

@echo off

::::::::::::::::::::::::::::::::::::::::::
:: Script de bienvenue sur Batch.xoo.it ::
::            Par MagicDos              ::
::::::::::::::::::::::::::::::::::::::::::

title %UserName%, Welcome to our Forum ! 
setlocal enabledelayedexpansion
if not exist welcome_to_%username% md welcome_to_%username%
cd welcome_to_%username%
call :VerifData
_.exe
mode con cols=80 lines=28
call :Set
call :Grp
if exist tmp.vbs del/q tmp.vbs
(
echo Set Sound = CreateObject^("WMPlayer.OCX.7"^)
echo Sound.URL = "fond.mp3"
echo Sound.Controls.play
echo do while Sound.currentmedia.duration = 0
echo wscript.sleep 100
echo loop
echo wscript.sleep ^(int^(Sound.currentmedia.duration^)+1^)*1000
)>tmp.vbs
start/min tmp.vbs
:Str
if %DesTroy%==false (
   batbox /g 1 20 /c 0x2a /d "Press SPACE to destroy all"
) else (
   batbox /g 1 20 /c 0x2c /d "Destroying :D"
)
batbox /g 1 21 /c 0x2a /d "Press ENTER to Bombarding"
batbox /g 1 22 /c 0x2a /d "Press ESCAPE to Quit"
for /l %%$ in (1,1,1) do call :Fire %%$
call :Md
call :Oeil
call :Mouth
batbox /k_
if %errorlevel%==13 (
   batbox /g 1 21 /c 0x22 /d "Press ENTER to Bombarding"
   batbox /g 1 21 /c 0x2c /d "Bombarding :D"
   if exist tmp.vbs del/q tmp.vbs
   echo x=msgbox^("Welcome %UserName% :D",0,"Bombarding..."^)>tmp.vbs
   for /l %%$ in (1,1,30) do (
      call :snd bom
      start tmp.vbs
   )
)
if %errorlevel%==32 set DesTroy=true&batbox /g 1 20 /c 0x22 /d "Press SPACE to destroy all"
if %errorlevel%==27 (
   cls
   color 07
   echo Bye :]
   ping localhost -n 3 >nul
   taskkill /f /im wscript.exe
   taskkill /f /im sndrec32.exe
   taskkill /f /im batbox.exe
   taskkill /f /im cmd.exe
)
goto:Str

:Mouth
set $=196
set/a x=%random%%%6
if %x%==0 set $=192
batbox /g 16 14 /c 0xf0 /a %$% /a 196
goto:eof

:Oeil
set $=O
set/a x=%random%%%6
if %x%==0 set $=-
batbox /g 16 13 /c 0xf0 /d "%$%"
goto:eof

:Md
batbox /g %MdX% 26 /c 0x22 /d "By MagicDos"
set/a MdX=%random%%%65
set/a Clr=%random%%%15
if %Clr%==10 set Clr=a
if %Clr%==11 set Clr=b
if %Clr%==12 set Clr=c
if %Clr%==13 set Clr=d
if %Clr%==14 set Clr=e
if %Clr%==15 set Clr=f
batbox /g %MdX% 26 /c 0x2%Clr% /d "By MagicDos"
goto:eof

:Fire
if not !Fire_%1!==true call :NewFire %1
set Clr=PsgEditPix_!Fire_%1_X!_!Fire_%1_Y!
batbox /g !Fire_%1_X! !Fire_%1_Y! !%Clr%!
set/a Fire_%1_Y-=1
batbox /g !Fire_%1_X! !Fire_%1_Y! /c 0xcf /a 176
if !Fire_%1_Y!==!Fire_%1_Exp! (
   call :Bam !Fire_%1_X! !Fire_%1_Y!
   set Fire_%1=false
)
goto:eof

:NewFire
set Fire_%1=true
set/a Fire_%1_X=%random%%%78
set Fire_%1_Y=27
set/a Fire_%1_Exp=%random%%%9+1
set/a x=%random%%%3
call :snd fire_!x!
goto:eof

:Bam
call :snd bom
set PosX=%1
set PosY=%2
set HG_X=%PosX%
set HG_Y=%PosY%
set H_X=%PosX%
set H_Y=%PosY%
set HD_X=%PosX%
set HD_Y=%PosY%
set G_X=%PosX%
set G_Y=%PosY%
set D_X=%PosX%
set D_Y=%PosY%
set BG_X=%PosX%
set BG_Y=%PosY%
set B_X=%PosX%
set B_Y=%PosY%
set BD_X=%PosX%
set BD_Y=%PosY%
set Cnt=0
set/a t_=%random%%%2

:Loop
call :Eff
set /a HG_X-=%random%%%3
set /a HG_Y-=%random%%%3
set/a H_Y-=%random%%%3
set/a HD_X+=%random%%%3
set/a HD_Y-=%random%%%3
set/a G_X-=%random%%%3
set/a D_X+=%random%%%3
set/a BG_X-=%random%%%3
set/a BG_Y+=%random%%%3
set/a B_Y+=%random%%%3
set/a BD_X+=%random%%%3
set/a BD_Y+=%random%%%3
for %%$ in (HG,H,HD,G,D,BG,B,BD) do (
   if not !%%$_X! LSS 0 if not !%%$_X! GTR 78 if not !%%$_Y! LSS 0 if not !%%$_Y! GTR 20 batbox /g !%%$_X! !%%$_Y! /c 0xec /a 177
)
if %Cnt%==5 (
   call :Eff
   goto:eof
)
set/a Cnt+=1
goto:Loop
:Eff
for %%$ in (HG,H,HD,G,D,BG,B,BD) do (
   if !DesTroy!==false (
      call :SetClr %%$
      if not !%%$_X! LSS 0 if not !%%$_X! GTR 78 if not !%%$_Y! LSS 0 if not !%%$_Y! GTR 20 batbox /g !%%$_X! !%%$_Y! !Clr!
   ) else (
      set Clr=PsgEditPix_!%%$_X!_!%%$_Y!
      if not !%%$_X! LSS 0 if not !%%$_X! GTR 78 if not !%%$_Y! LSS 0 if not !%%$_Y! GTR 20 batbox /g !%%$_X! !%%$_Y! !%Clr%!
   )
)
goto:eof

:SetClr
set Clr=PsgEditPix_!%1_X!_!%1_Y!
set Clr=!%Clr%!
goto:eof

:snd
Start /min SndRec32 /embedding /play /close "%1.wav"
goto:eof

:Grp
for /l %%$ in (0,1,27) do batbox /g 0 %%$ !Ligne_%%$!
goto:eof

:Set
set MdX=10
set Cli=false
set DesTroy=false
for /l %%$ in (1,1,20) do set Fire_%1=false
for /f "delims=" %%$ in ('type GrpData.izi') do set %%$
goto:eof

:VerifData
cls
echo Chargement de l'animation, veuillez patienter ;)
echo.
echo Verification des fichiers...
echo.
set url=http://magicdos.nfox.co/welcomefiles/
set List=GrpData.izi,sndrec32.EXE,fond.mp3,batbox.exe,_.exe,bom.wav,fire_0.wav,fire_1.wav,fire_2.wav
for %%$ in (%List%) do (
   if not exist %%$ (
      call :dl "!url!%%$" "%%$"
   )
) >nul
echo tout est bien :D
ping localhost -n 3 >nul
goto:eof

:dl
(echo src = "%~1"
echo Set v1 = CreateObject ("MSXML2.XMLHTTP"^)
echo Set v2  = CreateObject ("ADODB.Stream"^)
echo v1.open "GET", src, false
echo v1.send (^)
echo v2.open
echo v2.Type = 1
echo v2.Write v1.ResponseBody
echo v2.SaveToFile "%~2") >"%~dpn0.vbs"
cscript "%~dpn0.vbs"
del "%~dpn0.vbs" >nul
bienvenue.rar
Répondre