Advertisement
T3RRYT3RR0R

Batch Matrix and MusicPlayer

Apr 17th, 2020
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 8.82 KB | None | 0 0
  1. @REM::::::: Multicolor Batch matrix Animations by T3RRY :::::::::::::::::::::::::::::::::::::::::::::
  2. ::: Updated 09 May 2020                                                                           :::
  3. :::  - Color gradiant Macro added for increased color range.                                      :::
  4. :::  - Centering and spacing calculations added for displaying menu correctly at all screen Sizes :::
  5. :::  - Sring Length Macro added to facilitate the above                                           :::
  6. :::  - Adjusted Menu Line spacing calculations to allow for easy addition of new lines            :::
  7.     @Echo Off & CD "%~dp0" & REM                                                              :::
  8. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  9.  
  10. CHCP 65001 >nul & REM Used for menu border characters
  11.  
  12. ::: { Variable used in calling this script from the Self created resizing Batch.   
  13.     Set "AlignFile=%~dpnx0"
  14. ::: }
  15.  
  16. ::: { Creates variable Æ = Ascii-27 escape code.
  17. ::: - http://www.dostips.com/forum/viewtopic.php?t=1733
  18. ::: - https://stackoverflow.com/a/34923514/12343998
  19. :::
  20. ::: - Æ (Alt 146) can be used  with and without DelayedExpansion.
  21.     Setlocal
  22.     For /F "tokens=2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
  23.         Endlocal
  24.         Set "Æ=%%a"
  25.     )
  26. ::: }
  27.  
  28. ::: { Set environment state for Macro Definitions
  29.     Setlocal DisableDelayedExpansion
  30.  
  31.     (Set LF=^
  32.  
  33.  
  34.     %= Above Empty lines Required =%)
  35.  
  36.     Set ^"\n=^^^%LF%%LF%^%LF%%LF%^^"
  37.  
  38. ::: { String length Macro %@strLen% <ResultVar> <String - Spaces must be substituted.>
  39. Set @strLen=for /L %%n in (1 1 2) do if %%n==2 (%\n%
  40.     For /F "tokens=1,* delims=, " %%G in ("!argv!") do (%\n%
  41.         Set tmpLen=%%H%\n%
  42.         Set result=%%G%\n%
  43.         Set LenTrim=Start%\n%
  44.         For /L %%a in (1,1,250) Do (%\n%
  45.             IF NOT "!LenTrim!"=="" (%\n%
  46.                 Set LenTrim=!tmpLen:~0,-%%a!%\n%
  47.                 If "!LenTrim!"=="" Set !result!=%%a%\n%
  48.             )%\n%
  49.         ) %\n%
  50.         ) %\n%
  51.     ) ELSE set argv=,
  52. ::: }
  53.  
  54. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Input / Color output Macros
  55. ::: { %MSG|% <"Your Message Value"> <%@Con%> <Y#;X#> <ColorName>
  56.     Set "MSG|=Set Args-In="
  57. ::: }
  58.  
  59. ::: { %@Con.Map% <Y#;X#> <Offset#> <ColorName> <StringLength#>
  60.     Set @Con.Map=for /L %%n in (1 1 2) do if %%n==2 (%\n%
  61.         For /F "tokens=1,2,3,4 delims=, " %%G in ("!argv!") do (%\n%
  62.             Echo(%Æ%[%%GH!%%I!!CharacterSet:~%%H,%%J!!Off!^&^&Endlocal%\n%
  63.         ) %\n%
  64.     ) ELSE setlocal enableDelayedExpansion ^& set argv=,
  65. ::: }
  66.  
  67. ::: { %@Gradient.Con.Map% <Y#;X#> <Offset#> <ColorName> <StringLength#>
  68. ::: - For all colors other than Red or Yellow RGB Color values will be totally random
  69.     Set @Gradient.Con.Map=for /L %%n in (1 1 2) do if %%n==2 (%\n%
  70.         For /F "tokens=1,2,3,4 delims=, " %%G in ("!argv!") do (%\n%
  71.             Set /A RR#=!Random! %% 250,GG#=!Random! %% 250,BB#=!Random! %% 250 ^>Nul %\n%
  72.             IF /I "%%I" == "red" Set /A RR#=!Random! %% 175 + 75,GG#=!Random! %% 10 + 10,BB#=!Random! %% 10 + 10 ^>Nul %\n%
  73.             IF /I "%%I" == "yellow" Set /A RR#=!Random! %% 100 + 100,GG#=!Random! %% 40 + 100,BB#=!Random! %% 20 + 20 ^>Nul %\n%
  74.             Echo(%Æ%[%%GH%Æ%!!!!!!;!GG#!;!BB#!m!CharacterSet:~%%H,%%J!!Off!^&^&Endlocal%\n%
  75.         ) %\n%
  76.     ) ELSE setlocal enableDelayedExpansion ^& set argv=,
  77. ::: }
  78.  
  79. ::: {  <%MSG|%> <"Your Message Value"> %@CON% <Y#;X#> <ColorName>
  80.     Set @Con=^&for /L %%n in (1 1 2) do if %%n==2 (%\n%
  81.         For /F "tokens=1,2 delims=, " %%G in ("!argv!") do (%\n%
  82.             For %%O in (!Args-In!) do Echo(%Æ%[%%GH%Æ%[K!%%H!%%~O!Off!^&^&Endlocal%\n%
  83.         ) %\n%
  84.     ) ELSE setlocal enableDelayedExpansion ^& set argv=,
  85. ::: } End Macro Definitions
  86.  
  87. ::: { Assigns ANSI color code values to each color, then builds an Array containing those color values to be accessed using random number.
  88.     Setlocal EnableDelayedExpansion
  89.     Set /A Red=31,Green=32,Yellow=33,Blue=34,Purple=35,Cyan=36,White=37,Grey=90,Pink=91,Beige=93,Aqua=94,Magenta=95,Teal=96,Off=0,Black=30,CI#=0
  90.     For %%A in (Red,Yellow,Pink,Beige,Grey,Purple,Green,Cyan,White,Aqua,Magenta,Blue,Teal,Off,Black) do (
  91.         Set "%%A=%Æ%[!%%A!m"
  92.         Set /A "CI#+=1"
  93.         Set "C#[!CI#!]=%%A"
  94.     )
  95. ::: }
  96.  
  97. ::: { Define character Set to be used. Accessed using Random number and Substring Modification to extract the character at that mapped position
  98.     Set "CharacterSet=1qA{Z2W<sX[3EDC@4R}FV^5TG&BYHn7]UJM8-IK9OL0Ppo_iu>ytre$wQ\aSdf/gh~jkl+mN|bvc#xz"
  99. %!!%
  100.     Set "BorderSet=•○ʘ¤"
  101.     Set "Border[i]=3" & REM 1 less than number of Characters Due to use in Substring Offset
  102. ::: }
  103.  
  104. ::: { Identifies when the program has been called by the resizing batch it creates and goes to label passed by call
  105.     If Not "%~3"=="" (
  106.         Set "Console_Hieght=%~1"
  107.         Set "Console_Width=%~2"
  108.         Set "AlignFile=%~4"
  109.         Goto :%~3
  110.     ) Else (Goto :main)
  111. ::: }
  112.  
  113.  
  114. ::: { Subroutine to process output of wmic command into usable variables  for screen dimensions (resolution)
  115. :ChangeConsole <Lines> <Columns> <Label to Resume From> <If a 4th parameter is Defined, Aligns screen at top left>
  116. ::: - Get screen Dimensions
  117.     For /f "delims=" %%# in  ('"wmic path Win32_VideoController  get CurrentHorizontalResolution,CurrentVerticalResolution /format:value"') do (
  118.         Set "%%#">nul
  119.     )
  120. ::: - Calculation of X axis relative to screen resolution and console size. Resolution scales to Max Columns ~ 165
  121.     Set /A XresScale=CurrentHorizontalResolution / 165
  122.     Set /A HorzCentre=CurrentHorizontalResolution / 2
  123.     Set /A CentreX= ( HorzCentre - ( ( %~2 * XresScale ) / 2 ) ) - 8
  124. ::: - Calculation of Y axis relative to screen resolution and console size. Resolution scales to Max Lines ~ 43
  125.     Set /A YresScale= CurrentVerticalResolution / 43
  126.     Set /A VertCentre=CurrentVerticalResolution / 2
  127.     Set /A CentreY= VertCentre - ( ( %~1 * YresScale ) / 2 )
  128. ::: - Optional 4th parameter can be used to align console at top left of screen instead of screen centre
  129.     If Not "%~4"=="" (Set /A CentreY=0,CentreX=-8)
  130.     Set "Console_Width=%~2"
  131.  
  132. ::: - Creates a batch file to reopen the main script using Call with parameters to define properties for console change and the label to resume from.
  133.     (
  134.     Echo.@Mode Con: lines=%~1 cols=%~2
  135.     Echo.@Title Rainbow Matrix by T3RRY
  136.     Echo.@Call "%AlignFile%" "%~1" "%~2" "%~3" "%AlignFile%"
  137.     )>"%temp%\ChangeConsole.bat"
  138.  
  139. ::: - .Vbs script creation and launch to reopen batch with new console settings, with aid of above batch script
  140.     (
  141.     Echo.Set objWMIService = GetObject^("winmgmts:\\.\root\cimv2"^)
  142.     Echo.Set objConfig = objWMIService.Get^("Win32_ProcessStartup"^)
  143.     Echo.objConfig.SpawnInstance_
  144.     Echo.objConfig.X = %CentreX%
  145.     Echo.objConfig.Y = %CentreY%
  146.     Echo.Set objNewProcess = objWMIService.Get^("Win32_Process"^)
  147.     Echo.intReturn = objNewProcess.Create^("%temp%\ChangeConsole.bat", Null, objConfig, intProcessID^)
  148.     )>"%temp%\Consolepos.vbs"
  149.  
  150. ::: - Starts the companion batch script to Change Console properties, ends the parent.
  151.     Start "" "%temp%\Consolepos.vbs" & Exit
  152.  
  153. ::: { creates a companion batch file thats called with arguments for trackpath, volume and loop tf values
  154. :Sound.Components
  155.     (
  156.     Echo.@ECHO OFF
  157.     Echo.Set "MusicPath=%%~1"
  158.     ECHO.IF Not Exist "%%MusicPath%%" Goto :Eof
  159.     Echo.Set "vol=%%~2"
  160.     Echo.Set "Loop_TF=%%~3"
  161. ::: - Change to the Directory you want to create the Music Launcher in.
  162.     Echo.PUSHD %%sounds%%
  163. ::: - Ensure no Conflict with the Previous Script.
  164.     Echo.IF exist PlayMusic.vbs ^(
  165.     Echo.DEL PlayMusic.vbs
  166.     Echo.^)
  167. ::: - Creates a vbs Script to Launch the music (Occurs without any visual indication or prompting)
  168.     Echo.^( echo Set Sound = CreateObject^("WMPlayer.OCX.7"^^^)
  169.     Echo.echo Sound.URL = "%%MusicPath%%"
  170.     Echo.echo Sound.settings.volume = %%vol%%
  171.     Echo.echo Sound.settings.setMode "loop", %%Loop_TF%%
  172.     Echo.echo Sound.Controls.play
  173.     Echo.echo While Sound.playState ^^^<^^^> 1
  174.     Echo.echo      WScript.Sleep 1000
  175.     Echo.echo Wend
  176.     Echo.^)^>PlayMusic.vbs
  177.     Echo.start /min PlayMusic.vbs
  178. ::: -   Return to the Previous Directory
  179.     Echo.POPD
  180. ::: -   Exit the Launcher and return to Previous batch program.
  181.     Echo.Goto :EOF
  182.     )>"%Player%"
  183. ::: { Monitor checks process status of cmd.exe every 1500 ms and calls StopMusic batch file to taskill all vbs scripts when
  184. ::: - cmd.exe process count is 0. Delay is to reduce CPU usage of the WMI service
  185.     (
  186.     ECHO Set objWMIService = GetObject ("winmgmts:"^)
  187.     ECHO Set proc = objWMIService.ExecQuery("select * from Win32_Process Where Name='cmd.exe'"^)
  188.     ECHO DO while proc.count ^> 0
  189.     ECHO Set proc = objWMIService.ExecQuery("select * from Win32_Process Where Name='cmd.exe'"^)
  190.     ECHO if proc.count ^< 1 then exit do
  191.     ECHO wscript.sleep 250
  192.     ECHO loop
  193.     ECHO Set WshShell=createobject("wscript.shell"^)
  194.     ECHO WshShell.run "%MusicStopper%", 0, true
  195.     )>"%Monitor%"
  196. ::: }
  197. ::: { Simple taskkill script to terminate vbs scripts on program exit
  198.     (
  199.     Echo.@ECHO OFF
  200.     Echo.taskkill /pid WScript.exe /f /t ^>nul
  201.     Echo.Goto :EOF
  202.     )>"%MusicStopper%"
  203. Exit /B
  204. ::: }
  205. ::: { Download the songs this script uses.
  206. :Download_Songs
  207.     %!!|%"Downloading song. %blue%1%green% of %yellow%5"%@Con% 1;1 green
  208.     PUSHD %Sounds%
  209.     Curl -s -O https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Kai_Engel/Caeli/Kai_Engel_-_07_-_modum.mp3
  210.     %!!|%"Downloading song. %aqua%2%green% of %yellow%5"%@Con% 1;1 green
  211.     Curl -s -O https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Kai_Engel/Atlantida/Kai_Engel_-_05_-_When_the_World_Falls_Down.mp3
  212.     %!!|%"Downloading song. %cyan%3%green% of %yellow%5"%@Con% 1;1 green
  213.     Curl -s -O https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Kai_Engel/Caeli/Kai_Engel_-_08_-_daemones.mp3
  214.     %!!|%"Downloading song. %teal%4%green% of %yellow%5"%@Con% 1;1 green
  215.     Curl -s -O https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Kai_Engel/Chapter_Four__Fall/Kai_Engel_-_07_-_Downpour_Pon_X.mp3
  216.     %!!|%"Downloading song. %yellow%5%green% of %yellow%5"%@Con% 1;1 green
  217.     Curl -s -O https://files.freemusicarchive.org/storage-freemusicarchive-org/music/ccCommunity/Kai_Engel/Satin/Kai_Engel_-_08_-_Downfall.mp3
  218.     POPD
  219.     CLS
  220. Exit /B
  221. ::: }
  222.  
  223. :main
  224. ::: { Call Subroutine to Resize and Position the Console
  225.     Call :ChangeConsole 40 165 Matrix
  226. ::: }
  227.  
  228. ::: { Display Elements 
  229. :Matrix
  230.     Setlocal enableDelayedExpansion
  231. ::: { Define pathways and create subfolders used for self generated component files
  232. ::: - calls subroutines to create component files.
  233.     For %%A in ("%AlignFile%") Do Set "ProgDir=%%~dpA"
  234.     If not exist "%ProgDir%Sounds" MD "%ProgDir%Sounds"
  235.     Set "Sounds=%ProgDir%Sounds"
  236.     Set "Player=%Sounds%\BatchMusicPlayer.bat"
  237.     Set "MusicStopper=%Sounds%\StopMusic.bat"
  238.     Set "Monitor=%Sounds%\BatchMonitor.vbs"
  239.     Call :Sound.Components
  240. ::: }
  241.  
  242. ::: { Initiate script to close vbs scripts on exit
  243.     Start "" "%monitor%"
  244. ::: }
  245.  
  246. ::: { Define variables for songs
  247.     Set "Modum=%Sounds%\Kai_Engel_-_07_-_modum.mp3"
  248.     Set "World_Falls_Down=%Sounds%/Kai_Engel_-_05_-_When_the_World_Falls_Down.mp3"
  249.     Set "Daemones=%Sounds%\Kai_Engel_-_08_-_daemones.mp3"
  250.     Set "Downpour=%Sounds%\Kai_Engel_-_07_-_Downpour_Pon_X.mp3"
  251.     Set "Downfall=%Sounds%\Kai_Engel_-_08_-_Downfall.mp3"
  252.     IF Not exist "%Downfall%" Call :Download_Songs
  253. ::: }
  254.     CALL "%Player%" "%Modum%" "100" "true"
  255. ::: { Variables used to animate Border
  256.     Set /A BorderLeft=Console_Width / 3,BorderRight=(Console_Width / 3) * 2,BorderTop=5,BorderBase=Console_Hieght - 5,aCI=0,Char=0
  257. ::: }
  258.  
  259. ::: { Calculate X Y Coordinates required to Centre Text Horizontally using String Length and Border Dimensions
  260. :::   Define number of menu options. Used to calculate even Line spacing.
  261.     Set /A TextHCentre=Console_Width / 2
  262.     %@StrLen% Line[1] [W]aterfall_Matrix
  263.     %@StrLen% Line[2] [C]haos_Matrix
  264.     %@StrLen% Line[3] [R]ainbow_Painting
  265.     %@StrLen% Line[4] [F]laming_Matrix
  266.     Set "Menu.Options=4"
  267. ::: - Calculate Spacing available for Lines of text relative to border size and number of  menu options
  268.     Set /A TextSpace=(BorderBase - BorderTop) / (Menu.Options + 1)
  269. ::: - Final Calculation of X Y values needed to centre text horizontaly and space / centre lines vertically.
  270.     For /L %%P in (1,1,%Menu.Options%) Do Set /A Column[%%P]=TextHCentre - (Line[%%P] / 2) & Set /A Line[%%P]=BorderTop + ( %%P * %TextSpace% )
  271. ::: }
  272. ::: - Psuedo-pipe Strings for display into @Con Macro at [ARG 1 calculated Y;X Position] in [ARG 2 Color]
  273. ::     Method allows for handling of complex strings containing additional color changes.
  274.     %!!|% "[W]aterfall %cyan%Matrix" %@Con% %Line[1]%;%Column[1]% blue
  275.     %!!|% "[C]haos %red%M%yellow%a%green%t%blue%r%purple%i%magenta%x" %@Con% %Line[2]%;%Column[2]% magenta
  276.     %!!|% "%red%[%pink%R%magenta%]%purple%a%blue%i%aqua%n%cyan%b%green%o%yellow%w %red%painting" %@Con% %Line[3]%;%Column[3]% aqua
  277.     %!!|% "[F]laming %yellow%Matrix" %@Con% %Line[4]%;%Column[4]% red
  278. ::: - Numbers higher than actual console hieght cause the the console to scroll. the higher the number, the smoother the scroll
  279. ::: - and the less dense the characters on screen will be.
  280.     Set /A Console_Hieght=(Console_Hieght * 5) / 4
  281.  
  282. :AnimateLoop
  283. ::: { Manipulate color and characters used for border.
  284.     Set /A aCI+=1
  285. ::: - Loop through the Character set using String Substitution to Isolate a given Character
  286.     IF "%Char%" EQU "%Border[i]%" (Set Char=0) Else (Set /A Char+=1)
  287. ::: - Loop through the Color Array
  288.     IF "%aCI%"=="%CI#%" Set "aCI=1"
  289. ::: - Preface the Output string with the current Color
  290.     FOR %%A in (!C#[%aCI%]!) do Set "ANIM=Echo.!%%A!"
  291. ::: - Build the Border box
  292.     For /L %%X in (!BorderLeft!,1,!BorderRight!) do Set "ANIM=!ANIM!%Æ%[!BorderTop!;%%XH!BorderSet:~%Char%,1!%Æ%[!BorderBase!;%%XH!BorderSet:~%Char%,1!"
  293.     For /L %%Y in (!BorderTop!,1,!BorderBase!) Do Set "ANIM=!ANIM!%Æ%[%%Y;!BorderLeft!H!BorderSet:~%Char%,1!%Æ%[%%Y;!BorderRight!H!BorderSet:~%Char%,1!"
  294. ::: - Output the border
  295.     %ANIM%
  296. ::: }
  297.  
  298. ::: { manipulate variables for color and line position to animate the prompt, with the aid of a Loop and Choice Timeout with Default Switch.
  299.     For /F "Delims=" %%C in ('Choice /T 1 /N /C:WCRFA /D A') Do (Set "Selection=%%C" & IF /I "%%C"=="A" Goto :AnimateLoop)
  300. ::: }
  301.     CLS & (CALL "%MusicStopper%" && Start "" "%monitor%") & Goto :loop.%Selection%
  302.  
  303. ::: {** Script Break. Matrix Animation loops below. **}
  304.  
  305.  
  306. :loop.W
  307.     TITLE Flow Matrix By T3RRY
  308.     CALL "%Player%" "%Downpour%" "100" "true"
  309. :waterfall.loop
  310.     For /L %%A in (1,1,125) do (
  311.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%3 + 1
  312.         %@Con.Map% !Ypos!;!Xpos! !Char! !C#[%nCI%]! !CharCount!
  313.     )
  314. Goto :waterfall.loop
  315.  
  316. :loop.C
  317.     TITLE Chaos Matrix By T3RRY
  318.     CALL "%Player%" "%Downfall%" "100" "true"
  319. :chaos.loop
  320.     For /L %%A in (1,1,5000) do (
  321.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%3 + 1
  322.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[%%B]! !CharCount!
  323.     )
  324. Goto :chaos.loop
  325.  
  326. :loop.R
  327.     TITLE Rainbow painter By T3RRY
  328.     Set /A Console_Hieght=((Console_Hieght / 5) * 4) - 4
  329.     CALL "%Player%" "%World_Falls_Down%" "100" "true"
  330. :rainbow.loop
  331.     Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%3 + 1
  332.     For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[%%B]! !CharCount!
  333. Goto :rainbow.loop
  334.  
  335. :loop.F
  336.     TITLE Flaming Matrix By T3RRY
  337.     CALL "%Player%" "%Daemones%" "100" "true"
  338. :flame.loop
  339.     For /L %%A in (1,1,100) do (
  340.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%5 + 1
  341.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[2]! !CharCount!
  342.         Set /A Xpos-=1,Ypos+=1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%6 + 1
  343.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[1]! !CharCount!
  344.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%5 + 1
  345.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[2]! !CharCount!
  346.         Set /A Xpos-=1,Ypos+=1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%6 + 1
  347.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[1]! !CharCount!
  348.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%5 + 1
  349.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[2]! !CharCount!
  350.         Set /A Xpos+=1,Ypos+=1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%6 + 1
  351.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[1]! !CharCount!
  352.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%5 + 1
  353.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[2]! !CharCount!
  354.         Set /A Xpos+=1,Ypos-=1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%6 + 1
  355.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[1]! !CharCount!
  356.         Set /A Xpos=!random! %%!Console_Width! + 1,Ypos=!random! %%!Console_Hieght! + 1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%5 + 1
  357.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[2]! !CharCount!
  358.         Set /A Xpos-=1,Ypos-=1,Char=!random! %%79 + 1,nCI=!random! %%!CI#! + 1,CharCount=!random! %%6 + 1
  359.         For %%B in (!nCI!) do %@Gradient.Con.Map% !Ypos!;!Xpos! !Char! !C#[1]! !CharCount!
  360.     )
  361. Goto :flame.loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement