China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-30 15:03
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Challenge the digital rain again (updated) View 3,441 Replies 34
Original Poster Posted 2008-05-25 02:32 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
Just a bit slow, going to sleep, won't speed up for now.

@echo off&mode con cols=42 lines=20&color 0c
setlocal enabledelayedexpansion
title 数码雨-zw19750516
set code=1 2 3 4 5 6 7 8 9 a b c d e f 0 &set m=1&set v=1
set code1=!code: =!
:begin
set /a a=%random%%%48
set a=!code:~%a%,1!
set str%m%=!str%m%!%a%
set /a n+=1
if %n% lss 40 goto begin
set /a x+=1
if %x% equ 20 call :lp
cls
for /l %%i in (%m%,-1,%v%) do echo !str%%i!
set /a m+=1
if %m% geq 20 set /a v+=1
set n=0&goto begin
:lp
set /a a=%random%%%15
set a=!code1:~%a%,1!
color 0%a%&set x=0


[ Last edited by zw19750516 on 2008-5-25 at 06:27 PM ]
Recent Ratings for This Post ( 1 in total) Click for details
RaterScoreTime
26933062 +15 2008-05-25 02:42
批处理之家新域名:www.bathome.net
Floor 2 Posted 2008-05-25 02:43 ·  中国 湖南 娄底 电信
银牌会员
★★★
Credits 2,268
Posts 879
Joined 2006-12-19 16:23
19-year member
UID 73968
Gender Male
Status Offline
It really feels like it's going to rain, full marks!
致精致简!
Floor 3 Posted 2008-05-25 08:33 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
Why does "Rain" change to Chinese, type it a few times, and then it freezes?

[ Last edited by cad55 on 2008-5-25 at 08:40 AM ]
Floor 4 Posted 2008-05-25 08:33 ·  中国 重庆 电信
版主
★★★★★
Credits 9,023
Posts 5,017
Joined 2007-05-31 19:39
19-year member
UID 89899
Gender Male
Status Offline
Can each column be aligned like in The Matrix?
Floor 5 Posted 2008-05-25 08:48 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
Aligning is not difficult, but it doesn't look very good after aligning...
批处理之家新域名:www.bathome.net
Floor 6 Posted 2008-05-25 09:21 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
I think for alignment, if the starting characters remain unchanged and the following characters change, it will be very similar. The most important thing is the falling speed. But the more perfect it is, the harder it is. This digital rain is pretty good already.
Floor 7 Posted 2008-05-25 09:24 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline

@echo off&mode con cols=42 lines=20&color 02
setlocal enabledelayedexpansion
title Digital Rain - zw19750516
set code=123456789abcdef0&set m=1&set v=1
:set
set num=20
cls&echo The default press Enter will set the rainfall to 20
set /p num=Please set the rainfall (1-40):
echo %num%|findstr "">nul&&goto wrong
if %num% lss 1 goto wrong
if %num% gtr 40 goto wrong
set num1=%num%
set /a num=200/num
if %num% equ 5 (
title Current heavy rain, rainfall: %num1%
) else (
if %num% leq 10 (
title Current moderate rain, rainfall: %num1%
) else (
if %num% leq 20 (
title Current light rain, rainfall: %num1%
) else (
if %num% leq 40 (
title Current drizzle, rainfall: %num1%
) else (
title Current very light rain, rainfall: %num1%
)
)
)
)
color 0c
:begin
set /a a=%random%%%16,b=%random%%%%num%
set a=!code:~%a%,1!
if %b% equ 0 (
set "b=%a%"
) else (
set "b= "
)
set str%m%=!str%m%!%b%
set /a n+=1
if %n% lss 40 goto begin
set /a x+=1
if %x% equ 20 call :lp
cls
for /l %%i in (%m%,-1,%v%) do echo.!str%%i!
set /a m+=1
if %m% geq 20 set /a v+=1
set n=0&goto begin
:wrong
cls&echo Please set correctly&ping /n 2 127.1>nul&goto set
:lp
set /a a=%random%%%15
set a=!code:~%a%,1!
color 0%a%&set x=0


[ Last edited by zw19750516 on 2008-5-25 at 11:31 AM ]
批处理之家新域名:www.bathome.net
Floor 8 Posted 2008-05-25 10:27 ·  中国 江苏 扬州 电信
高级用户
★★★
Credits 620
Posts 329
Joined 2007-12-05 15:34
18-year member
UID 104754
Gender Male
Status Offline
LZ.
You are an expert in rain...

How can I get Chinese characters to appear...
Floor 9 Posted 2008-05-25 10:31 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline
One Chinese character takes up two spaces, just note this point.
批处理之家新域名:www.bathome.net
Floor 10 Posted 2008-05-25 11:25 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline

@echo off&mode con cols=42 lines=20&color 02
setlocal enabledelayedexpansion
title Tianxia Spell-zw19750516
set code=123456789abcdef&set m=1&set v=1
set code1=哞喃呢吮咪嘛啊哄唏怛陀茶吒伽迦揭羯婆跋沙娑鸠度谜讫瞋赭阇唋奢
:set
set num=20
cls&echo The default will set the spell level to 20 when pressing Enter
set /p num=Please set the spell level (1-40):
echo %num%|findstr "">nul&&goto wrong
if %num% lss 1 goto wrong
if %num% gtr 40 goto wrong
title Current spell level: %num%
set /a num=200/num
color 0c
:begin
set /a a=%random%%%30,b=%random%%%%num%
set a=!code1:~%a%,1!
if %b% equ 0 (
set "b=%a%"
) else (
set "b= "
)
set str%m%=!str%m%!%b%
set /a n+=1
if %n% lss 20 goto begin
set /a x+=1
if %x% equ 20 call :lp
cls
for /l %%i in (%m%,-1,%v%) do echo.!str%%i!
set /a m+=1
if %m% geq 20 set /a v+=1
set n=0&goto begin
:wrong
cls&echo Please set correctly&ping /n 2 127.1>nul&goto set
:lp
set /a a=%random%%%15
set a=!code:~%a%,1!
color 0%a%&set x=0


[ Last edited by zw19750516 on 2008-5-25 at 11:31 AM ]
批处理之家新域名:www.bathome.net
Floor 11 Posted 2008-05-25 12:43 ·  中国 广东 揭阳 电信
银牌会员
★★★★
SuperCleaner
Credits 2,362
Posts 1,133
Joined 2008-02-02 21:36
18-year member
UID 110072
Gender Male
Status Offline
Excited!!!!! This is actually my suggestion!!!!! I'm a hero! (Boasting without thinking)
For a moment, I forgot -- how to write the word "perfect". Alas~~~
Floor 12 Posted 2008-05-25 12:52 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 120
Posts 60
Joined 2007-10-26 22:42
18-year member
UID 100889
Gender Male
Status Offline
Floor 13 Posted 2008-05-25 12:53 ·  中国 江苏 苏州 吴江区 电信
银牌会员
★★★
Credits 1,608
Posts 780
Joined 2007-10-07 10:19
18-year member
UID 99089
Gender Male
Status Offline
The owner is 34 years old??
Floor 14 Posted 2008-05-25 14:07 ·  中国 湖南 株洲 电信
金牌会员
★★★★
永远的学习者
Credits 3,105
Posts 1,276
Joined 2008-03-08 13:00
18-year member
UID 112398
Gender Male
Status Offline

@echo off&mode con cols=42 lines=20&color 02
title 乱雨-zw19750516
set code=123456789abcdef&set m=1&set v=1
set code1==^^^&%%%^:!$#^>^<:=~*()@"'`;\|abcdefghijklmnopqrstuvwxyz0123456789-_+?,.
setlocal enabledelayedexpansion
:set
set num=20
cls&echo The default press Enter will set the rainfall to 20
set /p num=Please set the rainfall (1-40):
echo %num%|findstr "">nul&&goto wrong
if %num% lss 1 goto wrong
if %num% gtr 40 goto wrong
set num1=%num%
set /a num=200/num
if %num% equ 5 (
title Current heavy rain, rainfall:%num1%
) else (
if %num% leq 10 (
title Current moderate rain, rainfall:%num1%
) else (
if %num% leq 20 (
title Current light rain, rainfall:%num1%
) else (
if %num% leq 40 (
title Current drizzle, rainfall:%num1%
) else (
title Current very light rain, rainfall:%num1%
)
)
)
)
color 0c
:begin
set /a a=%random%%%63,b=%random%%%%num%
set a=!code1:~%a%,1!
if %b% equ 0 (
set "b=!a!"
) else (
set "b= "
)
set str%m%=!str%m%!!b!
set /a n+=1
if %n% lss 40 goto begin
set /a x+=1
if %x% equ 20 call :lp
cls
for /l %%i in (%m%,-1,%v%) do echo.!str%%i!
set /a m+=1
if %m% geq 20 set /a v+=1
set n=0&goto begin
:wrong
cls&echo Please set correctly&ping /n 2 127.1>nul&goto set
:lp
set /a a=%random%%%15
set a=!code:~%a%,1!
color 0%a%&set x=0

if %x% equ 20 call :lp
cls
for /l %%i in (%m%,-1,%v%) do echo.!str%%i!
set /a m+=1
if %m% geq 20 set /a v+=1
set n=0&goto begin
:wrong
cls&echo Please set correctly&ping /n 2 127.1>nul&goto set
:lp
set /a a=%random%%%15
set a=!code:~%a%,1!
color 0%a%&set x=0


[ Last edited by zw19750516 on 2008-5-25 at 02:10 PM ]
批处理之家新域名:www.bathome.net
Floor 15 Posted 2008-05-25 18:05 ·  中国 江苏 苏州 电信
初级用户
★★
Credits 161
Posts 87
Joined 2008-05-25 17:25
18-year member
UID 119673
Gender Male
Status Offline
What a heavy rain. Haha
Forum Jump: