Advertisement
T3RRYT3RR0R

Batch RNG animation concept

Feb 28th, 2020
402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.10 KB | None | 0 0
  1. @echo off & Title RNG Animation concept
  2.     Setlocal EnableDelayedExpansion
  3.     Set /A width=41,hieght=19
  4.     Mode Con: cols=%width% lines=%hieght%
  5.     Set /A hieght-=1,width-=1
  6.  
  7. REM Pattern Definition - 1 of three possible patterns generated at random. Pattern count Increased / Decreased
  8. REM (cont) depending on how p# values are utilised in :Loop
  9.     For /L %%A in (1,1,2) Do (Set /A p%%A=!random! %%2 + 2)
  10.  
  11. REM Color Change and print loop. Pattern can be further modified by exchanging utilisation of p# in For /L (Set)
  12. :Loop
  13.     For /L %%A In (!p1!,!p1!,!hieght!) Do (
  14.         For /L %%B In (!p1!,!p1!,!width!) Do (
  15.             Set /A r1=!Random! %%10 + 1,r2=!random! %%10 + 1
  16.             Set /A "C=(!Random! %%3) + 34"
  17.             IF !r1! LEQ !r2! (Set ".=[%%A;%%BH[!C!m ") Else (Set ".=[%%A;%%BH[!C!m ")
  18.             ECHO(!.!
  19.         )
  20.     )
  21.     For /L %%A In (!p2!,!p1!,!hieght!) Do (
  22.         For /L %%B In (!p2!,!p1!,!width!) Do (
  23.             Set /A r1=!Random! %%10 + 1,r2=!random! %%10 + 1
  24.             Set /A "C=(!Random! %%4) + 34"
  25.             IF !r1! LEQ !r2! (Set ".=[%%A;%%BH[!C!m ") Else (Set ".=[%%A;%%BH[!C!m ")
  26.             ECHO(!.!
  27.         )
  28.     )
  29.     GOTO :Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement