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-08-01 00:00
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » DouDiZhu script, under development... Mouse test version updated [2010-4-23] View 5,783 Replies 45
Floor 31 Posted 2010-03-31 18:45 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Switch to the latest version of SYBC 1.1.31 and use the DEBUG memory call method. The game speed is greatly increased, and the screen refresh time is almost halved
SYBNQQ:354324773
Floor 32 Posted 2010-04-03 03:20 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Test code:


 @echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
:: Variable initialization
:: The cards of players 1-3 are uniformly used with P1XXX-p3XXX variables. P4XXX is reserved. The cards played by players are uniformly used with P5XXX-P6XXX. P7XXX is reserved. P0XXX is used for temporary needs.
:: Variables related to poker cards are uniformly used with PKXXX
:: PKSXX represents the corresponding values of each point card and character. pks11=J, pks12=Q
:: PKHX represents the corresponding values of each suit number and character. pkh1= (hearts), pkh0=T (jokers)
:: PKYX represents the corresponding values of each color number and character. Poker has only two colors: red and black. pky0=c (red), pky1=0 (black) (same as the color command)
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;BK=$7f;BK2=$f7;BK3=$37;BK4=$73;NB=$f1;p=1
set pk%a:;=&set pk%
:: Load/generate sybc. Variable SYBCOM saves the hexadecimal data of SYBC. V saves DEBUG code. Finally, it is piped to DEBUG for execution.
SET SYBCOM=A100`80BE AC00 3C 375 83E9 3C00 ACFF 4275`2CBE AC00 E08A 86AC 50C4 BE1F 0 3CAC`7553 ACFB 593C F675 3CAC 7542 ACF1 433C`EC75 3CAC 7553 ACE7 3D3C E275 14EB 3CAC`743A 3C0F 740D 3C4D 7400 8349 1EE 48EB`54B4 E8AC 93 ADE8 3C00 7F18 8A37 E8F0`87 A1E8 3C00 7F4F 8A2B B0D0 F602 50E2`A0B0 E6F6 35F 57F8 3CAC 7424 E80A 6A`49E8 8A00 EBCA E817 3F CA8A 10EB B0`16CD C48A 4CB4 21CD 815F A0C7 5700 B850`B800 750 2B5A 8AEE ACD1 243C D974 3B3C`8C74 D3C DE74 3C DA74 233C 575 D783`EB01 AA01 C28A EBAA E8E0 1D 3C93 7E39`402 8009 39FB 37E C380 2409 800F FE3`10B2 E2F6 C302 D08A ACC3 203C FB74 D3C`A274 3C 9E74 D88A 3CAC 7420 3CEC 740D`3C93 7400 C38F 2C93 8030 30EB AB4 E4F6`C302 C3`
SET SYBCV=`A80`DB FF``RCX`120`G`Q
::SET V=;RCX;120;N SYBC.COM;W;Q
::if not exist sybc.com (ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
:: Save the coordinates of the refresh block. The middle part of the game interface (the position to play cards). Each time local refresh is needed. Variable DEBUGQK saves the start and end memory addresses to be refreshed.
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
:: Initial information
color 3e
echo Landlord {Comment Version} 2010-3-20
echo.
echo Currently, there is no AI, and the computer will not play cards. You can play cards randomly. The cards will be dealt automatically after playing.
echo.
echo Currently available keys and their functions:
echo F2 Re-deal cards F5 Refresh
echo Arrow keys Control poker Space Play cards
echo.
echo Press any key to start the test...
echo.
call :SYBC
(echo.Q)|DEBUG>NUL
echo Test failed. Please close the game and contact SYBN QQ:354324773
call :SYBC 110000A Test successful. Please press any key again to start the game. Wish you a happy game.
echo.
echo Systems after win 2003 cannot run SYBC normally, so you will see the "Test failed" message.
pause>NUL
:2
:: Call the deal card module
call :FP
:1
:: Variable CBXX is uniformly used for color background information
set cB0=$f
cls
:: Timing 1
set t1=%time%
:: Display the top bar
SET SYBCS=10000%CB0%0 :::│%CB0%C Score%CB0%9 Computer left %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%C  Landlord V0.0  %CB0%0│%CB0%0 %CB0%0│ Bottom cards │:::
SET SYBCS=%SYBCS%;:10100%CB0%0 ::│%CB0%C Points%CB0%9 Computer right %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%9Development: SYBN NETBENTON PLP %CB0%0│%CB0%9 Computer left %CB0%0│ │::
SET SYBCS=%SYBCS%;:10200%CB0%0 :│%CB0%C Rank%CB0%9 Player SYBN %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%22010-3-20  Press F1 to view help%CB0%0│%CB0%D Bid 3 points %CB0%0│ │:
SET SYBCS=%SYBCS%;:10168%CB0%%PDI1Y%%PDI1S% %CB0%%PDI2Y%%PDI2S% %CB0%%PDI3Y%%PDI3S%;%CB0%%PDI1Y%%PDI1H% %CB0%%PDI2Y%%PDI2H% %CB0%%PDI3Y%%PDI3H%
set SYBCS0=%SYBCS%
:: Display the name boxes of 3 people
SET SYBCS=%SYBCS%;:10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Computer left $4c▌;$c4▌$ce Remaining cards 11 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
SET SYBCS=%SYBCS%;:10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Computer right $4c▌;$c4▌$ce Remaining cards 7 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
SET SYBCS=%SYBCS%;:11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Player SYBN$4c▌;$c4▌$ce Remaining cards 17 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
:: Display the back of the computer's cards
call :pb 10701
call :pb 10769
set SYBCS1=%SYBCS%
CALL :SYBCS
:: P11 displays the player's cards
call :p11
:: Timing 2
set t2=%time%
:: Calculate the time difference and display
call :timec
:GB
title Please select the cards you want to play...
:: Initialize the card selection pointer. Variable GBy is the original pointer position
set /a GBy=12212,GBs=1
:GB1
:: Locate the card selection pointer. Variable GBW is the new pointer position
set /a GBW=12209+GBs*3
:: Display the card selection pointer and erase the original pointer
call :sybc %GBy%f1 ;
call :sybc %GBw%f1↑
:: The SYBC function without parameters is similar to CHOICE, pausing the script and getting a key
call :sybc
:: Next line, display the pressed key
::title sybc-%errorlevel%-
:: Perform corresponding operations according to different keys
:: Left and right arrows move the cursor
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
:: Up and down arrows pull up/put down the poker and refresh the player's cards
if %errorlevel% == 72 if !p2w%GBs%! == 0 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 if !p2w%GBs%! == 1 set /a p2w%GBs%=0&&call :p11 0 %GBs%
:: Space bar to play cards
if %errorlevel% == 57 goto chupai
:: F2 to re-deal cards
if %errorlevel% == 60 goto 2
:: F5 to refresh
if %errorlevel% == 63 goto 1
:: The pointer exceeds the high and low limits, then restore
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
:: Save the original pointer to wait for erasure
set /a GBy=GBw
goto :GB1
:chupai
:: Play cards
set /a p6s=0,p6h=0,p6y=0,p6z=0,p0s=0,p0h=0,p0y=0,p0z=0,p2zBF=%p2z%
set p2sBF=%p2s%
set p2hBF=%p2h%
set p2yBF=%p2y%
for /l %%a in (1,1,%p2z%) do if !p2w%%a! == 1 (set /a p6z=p6z+1&&set p6s=!p6s!!p2s:~%%a,1!&&set p6h=!p6h!!p2h:~%%a,1!&&set p6y=!p6y!!p2y:~%%a,1!&&set p6js=Farmer) else (set /a p0z=p0z+1&&set p0s=!p0s!!p2s:~%%a,1!&&set p0h=!p0h!!p2h:~%%a,1!&&set p0y=!p0y!!p2y:~%%a,1!)
for /l %%a in (1,1,%p0z%) do (set /a p2z=p0z&&set p2s=!p0s!&&set p2h=!p0h!&&set p2y=!p0y!)
:yanzheng
set px=Violation&set pxs=0&set pxz={Violated!}&set ps=---34567890JQKA02N$
:: Initialize
for /l %%a in (0,1,4) do set pss%%a=0
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set ps%%a=0&set p6zs%%a=0
:: Calculate the number of cards of each middle point
for /l %%a in (1,1,20) do for /f %%b in ("!p6s:~%%a,1!") do set /a ps%%b+=1
:: Calculate the number of cards
set /a p6zs=%ps3%+%ps4%+%ps5%+%ps6%+%ps7%+%ps8%+%ps9%+%ps0%+%psj%+%psq%+%psk%+%psa%+%ps2%+%psn%
:: Get the mark string %p6ss%
set p6ss=---%ps3%%ps4%%ps5%%ps6%%ps7%%ps8%%ps9%%ps0%%psj%%psq%%psk%%psa%0%ps2%%psn%$
:: Extract the largest single card, pair, three-of-a-kind, four-of-a-kind
for /l %%a in (3,1,17) do set pss!p6ss:~%%a,1!=%%a
:: Extract the smallest single card, pair, three-of-a-kind, four-of-a-kind
for /l %%a in (17,-1,3) do set psx!p6ss:~%%a,1!=%%a
:: Single card
if %p6zs% == 1 set px=One card&set pxz=One card{!ps:~%pss1%,1!}&set pxs=%pss1%
set p=%p6ss%&set q=%p6zs%
:: Three-of-a-kind and airplane
:: Explanation: %p:3=.% == %p% means there is no 3 in %p%, plus not means there is 3 in %p% to make if effective
if %q% == 6 if not %p:33=.% == %p% set px=Airplane
if %q% == 8 if not %p:33=.% == %p% set px=Airplane with single card
if %q% == 10 if not %p:33=.% == %p% if %p:1=.% == %p% set px=Airplane with pair
if not %px:Airplane=.% == %px% set pxs=%pss3%&set pxz=%px%
if %q% == 9 if not %p:333=.% == %p% set px=Three consecutive
if %q% == 12 if not %p:333=.% == %p% set px=Three consecutive with single card
if %q% == 15 if not %p:333=.% == %p% if %p:1=.% == %p% set px=Three consecutive with pair
if %q% == 12 if not %p:3333=.% == %p% set px=Three big consecutive
if %q% == 16 if not %p:3333=.% == %p% set px=Three big consecutive with single card
set p3=%p:3333=.%
if %q% == 20 if not %p:3333=.% == %p% if %p:1=.% == %p% if %p3:3=.% == %p3% set px=Three big consecutive with pair
if %q% == 15 if not %p:33333=.% == %p% set px=Three giant consecutive
if %q% == 20 if not %p:33333=.% == %p% set px=Three giant consecutive with single card
if %q% == 18 if not %p:333333=.% == %p% set px=Three divine consecutive
if not %px:Three=.% == %px% set pxs=%pss3%&set pxz=%px%
if %q% == 3 if not %p:3=.% == %p% set px=Three-of-a-kind&set pxz=Three-of-a-kind!ps:~%pss3%,1!
if %q% == 4 if not %p:3=.% == %p% set px=Three-of-a-kind with one card&set pxz=Three-of-a-kind!ps:~%pss3%,1! with one card!ps:~%pss1%,1!
if %q% == 5 if not %p:3=.% == %p% if not %p:2=.% == %p% set px=Three-of-a-kind with one pair&set pxz=Three-of-a-kind!ps:~%pss3%,1! with one pair!ps:~%pss2%,1!
:: Pair and brothers
if %q% == 2 if %p:1=.% == %p% set px=Pair&set pxz=One pair!ps:~%pss2%,1!&set pxs=%pss2%
if %q% == 6 if not %p:222=.% == %p% set px=3 brothers
if %q% == 8 if not %p:2222=.% == %p% set px=4 brothers
if %q% == 10 if not %p:22222=.% == %p% set px=5 brothers
if %q% == 12 if not %p:222222=.% == %p% set px=6 brothers
if %q% == 14 if not %p:2222222=.% == %p% set px=7 brothers
if %q% == 16 if not %p:22222222=.% == %p% set px=8 brothers
if %q% == 18 if not %p:222222222=.% == %p% set px=9 brothers
if %q% == 20 if not %p:2222222222=.% == %p% set px=10 brothers
:: Straight
if %q% == 5 if not %p:11111=.% == %p% set px=5-card straight
if %q% == 6 if not %p:111111=.% == %p% set px=6-card straight
if %q% == 7 if not %p:1111111=.% == %p% set px=7-card straight
if %q% == 8 if not %p:11111111=.% == %p% set px=8-card straight
if %q% == 9 if not %p:111111111=.% == %p% set px=9-card straight
if %q% == 10 if not %p:1111111111=.% == %p% set px=10-card straight
if %q% == 11 if not %p:11111111111=.% == %p% set px=11-card straight
if %q% == 12 if not %p:111111111111=.% == %p% set px=12-card straight
:: Bomb
if %q% == 4 if not %p:4=.% == %p% set px=Bomb&set pxz=Bomb{Four!ps:~%pss4%,1!}&set pxs=%pss4%&set pxs=%pss4%
if %q% == 2 if not %p:2$=.% == %p% set px=Joker bomb&set pxz=Joker bomb{Invincible}&set pxs=%pss2%
:: Extract effective cards (the largest one in straight and brothers, the largest one in three-of-a-kind without the card to be taken)
if not %px:Straight=.% == %px% set pxs=%pss1%&set pxz=%px%!ps:~%psx1%,1! to !ps:~%pss1%,1!
if not %px:Brothers=.% == %px% set pxs=%pss2%&set pxz=%px%!ps:~%psx2%,1! to !ps:~%pss2%,1!
call :sybc 1146830 The cards you played: ; ;:115683C%pxz%
if "%px%" == "Violation" (set p2s=%p2sBF%&&set p2h=%p2hBF%&&set p2y=%p2yBF%&&set p2z=%p2zBF%
for /l %%a in (1,1,20) do set p2w%%a=0
call :p11
call :sybc 1166830 Cannot play like this. Please play again!
goto :GB)
(ECHO.fB800:%DEBUGQK:;= 20 3e&ECHO.fB800:% 20 3e&ECHO.q%)|DEBUG>NUL
for /l %%a in (1,1,%P6z%) do set /a wz=11220+%%a*3&&call :pa !wz! !p6y:~%%a,1! !p6s:~%%a,1! !p6h:~%%a,1! %p6js%
call :sybcs
for /l %%a in (1,1,20) do set p2w%%a=0
SET SYBCS=%SYBCS%;:1035030 ▁▁▁▁▁▁ ;$03▉$30      ▏;$03▉$3e I don't want it! $30▏;$03▉$3e      $30╲; $03▇▇▇▇▇▇▇
call :sybcs
SET SYBCS=%SYBCS%;:1071330 ▁▁▁▁▁▁ ;$03▉$30      ▏;$03▉$3e I can't take it! $30▏;╱$3e      $30▏;$03▇▇▇▇▇▇▇$30
call :sybcs
if %p6z% == %p2zBF% goto :win
call :p11
call :sybc 11606ce ;:11606ce%p2z%
call :sybc 1166830 No one can take it. Please continue to play cards!
goto :GB
:p1
if "%2" == "" goto :P11
:P11
(echo.FB800:B40 FFF 20 3E&echo q)|DEBUG>NUL
set SYBCS=10000f1
for /l %%a in (1,1,%p2z%) do set /a wz=11908+%%a*3,pz=%%a+1&(if !p2w%%a! == 1 set /a wz=!wz!-100)&call :pa !wz! !p2y:~%%a,1! !p2s:~%%a,1! !p2h:~%%a,1! Farmer
CALL :SYBCS
goto :eof
:pl
set pl=%2
for %%a in (0,1,20) set /a pq1=%%a*7+5,pq2=%%a*7+6 &&call :pa %1
goto :eof
:pb
SET SYBCS=%SYBCS%;:%1%pkBK3%▄▄▄▄▄;%pkbk% %pkNB% {\__/} %pkBK% ; %pkNB% / $fc@@%pkNB% \ %pkBK% ; %pkNB%( ($f0oo%pkNB%) )%pkBK% ; %pkNB% / ~~ \ %pkBK% ;%pkbk% $f2Landlord%pkbk% ;%pkBK4%▄▄▄▄▄%pkBK%
goto :eof
:pa
if not "%4" == "" SET SYBCS=%SYBCS%;:%1%pkBK% ▄▄▄▄ ; $f%2%3%pkNB%    %pkBK% ; $f%2%4%pkNB% %5 %pkBK% ; %pkNB% %6 $f%2%4%pkBK% ; %pkNB%    $f%2%3%pkBK% ; %pkBK2%▄▄▄▄%pkBK%
goto :eof
:fp
title Dealing cards...
for /l %%a in (1,1,20) do set p2w%%a=0
set paid=&set paif=&set paiy=&set /a p1z=17,p2z=17,p3z=17
:FP1
set /a pran+=1,m=0,n=0,d=0
:: Randomly sort 54 cards (shuffle)
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2) do (for %%b in (!pkh1!-!pky0! !pkh2!-!pky0! !pkh3!-!pky1! !pkh4!-!pky1!) do (set p%pran%#!random!!random!.%%a-%%b=1))
set P%pran%#300543001.N-!pkh0!-!pky1!=1&set P%pran%#543001000.N-!pkh0!-!pky0!=1
:: Deal cards and leave three bottom cards
set he1=&set he2=&set he3=&set Di=
for /f "tokens=2 delims==." %%a in ('set p%pran%#') do set /a m=m%%3+1,n+=1&&if !n! leq 51 (for %%c in (!m!) do set he%%c=!he%%c! %%a) else (set di=!di! %%a)
set a=1s=%di:~1,1%;1h=%di:~3,1%;1y=%di:~5,1%;2s=%di:~7,1%;2h=%di:~9,1%;2y=%di:~11,1%;3s=%di:~13,1%;3h=%di:~15,1%;3y=%di:~17,1%
set pdi%a:;=&set pdi%
:: Organize the cards in each player's hand
for /l %%a in (1,1,3) do (for %%b in (!he%%a!) do (for /f "tokens=1,2,3 delims=-" %%c in ("%%b") do (
set pd%pran%#%%c=!pd%pran%#%%c!%%c
set pf%pran%#%%c=!pf%pran%#%%c!%%d
set py%pran%#%%c=!py%pran%#%%c!%%e))
for %%b in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set paid%pran%#=!paid%pran%#!!pd%pran%#%%b!&set paif%pran%#=!paif%pran%#!!pf%pran%#%%b!&set paiy%pran%#=!paiy%pran%#!!py%pran%#%%b!
for /f "tokens=1,2,3 delims=." %%b in ("!paid%pran%#!.!paif%pran%#!.!paiy%pran%#!") do set p%%as=0%%b&set p%%ah=0%%c&set p%%ay=0%%d
)
if "%pdi3s%" == "" goto FP
goto :eof
:win
(echo.FB800:B40 FFF 20 3E&echo q)|DEBUG>NUL
call :sybc 12030F1╔════════╗;║$FC Congratulations, you win.$F1║;║$F8 Press any key to start a new game$F1║;╚════════╝
pause>nul
goto :2
:timec
IF "%t1%" == "" EXIT /B 0
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%N IN ("%t1%") DO SET O=1%%O&SET P=1%%P&SET Q=1%%Q&SET /A N=100+%%N
IF "%t2%" == "" SET /A T=N*360000+O*6000+P*100+Q-36610100&&EXIT /B !T!
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%M IN ("%t2%") DO SET I=1%%N&SET J=1%%O&SET K=1%%P&SET /A H=100+%%M
IF "%t2%" GTR "A" (SET L=%t2%&SET /A T=N*360000+O*6000+P*100+Q-36610100,S=T/100,M=T/6000,H=T/360000) ELSE (SET L=%3&SET /A H=H-N,I=I-O,J=J-P,K=K-Q,T=H*360000+I*6000+J*100+K,S=T/100,M=T/6000,H=T/360000)
IF "%L%" == "" SET L=T
call :sybc 1176831 Time consumed: hundredths of a second;:11773$3c!%L%!
goto :eof
:SYBCS
(ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%SYBCV:`=&ECHO.%)|DEBUG>NUL
goto :EOF
:SYBC
IF "%1" == "" SET SYBCCD=00&GOTO SYBCC
SET SYBCCD=54
set SYBCC=%*
:SYBCC
SET V=`A80`DB %SYBCCD% 00 "%SYBCC%" 0D``RCX`120`G`Q
(ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%V:`=&ECHO.%)|DEBUG>NUL
EXIT /B %ERRORLEVEL%


[ Last edited by sl543001 on 2010-4-5 at 21:05 ]
SYBNQQ:354324773
Floor 33 Posted 2010-04-04 11:15 ·  中国 四川 广元 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
19-year member
UID 59720
Status Offline
32 L without the ↑ symbol
Floor 34 Posted 2010-04-04 11:28 ·  中国 上海 东方有线
中级用户
★★
Credits 218
Posts 86
Joined 2006-08-10 10:45
19-year member
UID 60205
Gender Male
Status Offline
Worship and learn DDDDDDDDDDD
Floor 35 Posted 2010-04-04 12:51 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Updated post 32, let's try again!
Trying to figure out how to make the script support mouse operations
SYBNQQ:354324773
Floor 36 Posted 2010-04-04 13:56 ·  中国 四川 广元 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
19-year member
UID 59720
Status Offline
32 L still no ↑ symbol
Attachments
bbb.gif
Floor 37 Posted 2010-04-04 17:58 ·  中国 四川 广元 联通
高级用户
★★★
Credits 609
Posts 374
Joined 2006-08-02 22:38
19-year member
UID 59720
Status Offline
You didn't modify the line call :sybc %GBy%f1 ;:%GBw%f1↑ (sybc %GBy%f1 ;:%GBw%f1↑). Just everyone can modify it.
Floor 38 Posted 2010-04-05 20:54 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Haha, sorry!

Because the version of SYBC is not stable yet, there are frequent updates, and I'm planning to add new functions to it.

So the process of upgrading from the old version to the new version will be a bit troublesome.

Generally as follows:

1. The parameters of various versions of SYBC are basically the same (this is not a problem)

2. The new version is generally larger than the old version, so you need to modify the RCX parameter in variable V (sometimes I forget to change it, so it goes wrong, this time it's not)

2. The new version supports new calling methods, and modifying the calls will be very troublesome (this is where the problem occurs this time)

Problem: The original script used the SYBC file, but the new version doesn't, but some places forgot to change it, so it goes wrong

Fortunately, I don't plan to change the calling method again for now. The original call form in the SYBC file will not be recommended, but it is still supported
SYBNQQ:354324773
Floor 39 Posted 2010-04-23 10:57 ·  中国 河北 廊坊 电信
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
SYBC 1.1.41 has added mouse support, but it's not very perfect. It's under test. You can use the mouse to control card playing, but it doesn't support non-3rd parties.
SYBNQQ:354324773
Floor 40 Posted 2010-04-23 13:34 ·  中国 湖北 武汉 教育网
新手上路
Credits 10
Posts 10
Joined 2010-04-22 15:45
16-year member
UID 165243
Gender Male
Status Offline
Haha! The poster is really powerful!
Floor 41 Posted 2010-04-23 13:51 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Tested SYBC 1.1.41 and found no abnormalities yet
Released test code for Dou Di Zhu based on SYBC 1.1.41

@echo off&SETLOCAL ENABLEDELAYEDEXPANSION&(CHCP 437 &GRAFTABL 936)>NUL
mode con cols=80 lines=25 >nul
:: Variable initialization
:: Player 1-3 cards are uniformly used with P1XXX-p3XXX variables, P4XXX reserved. Cards played by players are uniformly used with P5XXX-P6XXX, P7XXX reserved, P0XXX for temporary needs
:: Card-related variables are uniformly used with PKXXX
:: PKSXX represents the corresponding value of each point card and character pks11=J pks12=Q
:: PKHX represents the corresponding value of each suit number and character pkh1= (red heart) pkh0=T (joker)
:: PKYX represents the corresponding value of each color number and character. Poker has only red and black 2 colors pky0=c (red) pky1=0 (black) (same as color command)
set a=s1=A;s2=2;s3=3;s4=4;s5=5;s6=6;s7=7;s8=8;s9=9;s10=0;s11=J;s12=Q;s13=K;s14=A;s15=2;s16=N;s17=N;h1=;h2=;h3=;h4=;h0=T;y0=c;y1=0;BK=$7f;BK2=$f7;BK3=$37;BK4=$73;NB=$f1;p=1
set pk%a:;=&set pk%
:: Load/generate sybc variable SYBCOM to save SYBC's hexadecimal data, V saves DEBUG code, and finally handed over to DEBUG for execution via pipe
SET SYBCOM=A100``80BE BA00 0 88AC ACC4 88AC 80C3 FC`3674 FC80 BEFF 82 4B75 2CBE AC00 C488`86AC 50C4 BE1F 0 3CAC 7553 ACFB 593C`F675 3CAC 7542 ACF1 433C EC75 3CAC 7553`ACE7 3D3C E275 1DEB 1B3 8EE9 B300 E902`89 3CAC 743A 3C0E 740D 3C5B 7400 8357`1EE 83E9 AC00 313C 1874 4A3C DA74 4B3C`DB74 4D3C 4474 6A3C CE74 6B3C CF74 6D3C`3874 D6E8 E800 F0 183C 2A7F C688 CAE8`E800 E4 4F3C 1E7F C288 2B0 E2F6 B050`F6A0 5FE6 C701 AC57 243C 374 EE83 E801`74 D188 38EB 4CB4 21CD B8 CD00 B833`1 33CD 5B8 CD00 A933 3 F174 3B8`CD00 8933 B3C8 F608 EBF3 B0DB CD00 8016`2FB D274 E088 CEEB 815F A0C7 5700 B850`B800 750 295A 88F5 ACCA 243C B174 3B3C`1174 D3C 5174 3C 4D74 233C 875 D783`EB01 E904 FF3C 80AA FA 574 D088 EBAA`83D8 1D7 D3EB 32E8 3C00 7523 8008 23FB`375 B2 38C3 74D8 87F9 3CC3 7E39 402`8009 39FB 37E C380 2409 800F FE3 10B2`E2F6 D800 C288 B4C3 CD4C AC21 203C FB74`D3C F374 3C EF74 C388 3CAC 7420 3CEC`740D 3CE4 7400 C3E0 C387 302C EB80 B430`F60A E4 C3D8``
SET SYBCV=`A80`DB FF``RCX`200`G`Q
SET V=;RCX;200;N SYBC.COM;W;Q
(ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%V:;=&ECHO.%)|DEBUG>NUL
:: Save the refresh block coordinates. The middle part of the game interface (the position to play cards). Each time partial refresh is needed. Variable DEBUGQK saves the start and end addresses of the memory to be refreshed
set DEBUGQK=1F8 267;298 307;338 3a7;3D8 447;478 4e7;518 587;5B8 627;658 6c7;6F8 767;798 807;838 8a7;8D8 947;978 9e7;A18 a87;AB8 b27
set kh= ;
for /l %%a in (1,1,6) do set kh=!kh!%KH%
:: Initial information
color 3e
echo Dou Di Zhu {Comment Version} 2010-3-20
echo.
echo Currently no AI, the computer will not play cards. You can play cards randomly, and it will automatically deal cards after playing.
echo.
echo Key mode functions: M(mouse mode) F2(redeal) F5(refresh) Arrow keys(control cards) Space(play cards)
echo.
echo Mouse mode functions: Keyboard buttons(keyboard mode) Cards(select/cancel select one card) Play cards(play cards)
echo.
echo Press any key to start testing...
echo.
call :SYBC
(echo.Q)|DEBUG>NUL
echo Test failed. Please close the game. And contact SYBN QQ:354324773
call :SYBC 110000A Test succeeded. Please press any key again to start the game, wish you a happy game.
echo.
echo Systems after win 2003 cannot run SYBC normally, so you will see "Test failed" words.
echo system test passed system test passed
pause>NUL
:2
:: Call the deal card module
call :FP
:1
:: Variable CBXX is uniformly used for color background information
set cB0=$f
cls
:: Timing 1
set t1=%time%
:: Display the top bar
SET SYBCS=10000%CB0%0 :::│%CB0%C Score%CB0%9 Left computer %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%C  Dou Di Zhu V0.0  %CB0%0│%CB0%0 %CB0%0│ Bottom cards │:::
SET SYBCS=%SYBCS%;:10100%CB0%0 ::│%CB0%C Points%CB0%9 Right computer %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%9Developed:SYBN NETBENTON PLP %CB0%0│%CB0%9 Left computer %CB0%0│ │::
SET SYBCS=%SYBCS%;:10200%CB0%0 :│%CB0%C Ranking%CB0%9 Player SYBN %CB0%00 %CB0%2+0%CB0%C=%CB0%00 %CB0%0│%CB0%22010-3-20  Press F1 to view help%CB0%0│%CB0%D Bid 3 points %CB0%0│ │:
SET SYBCS=%SYBCS%;:10168%CB0%%PDI1Y%%PDI1S% %CB0%%PDI2Y%%PDI2S% %CB0%%PDI3Y%%PDI3S%;%CB0%%PDI1Y%%PDI1H% %CB0%%PDI2Y%%PDI2H% %CB0%%PDI3Y%%PDI3H%
set SYBCS0=%SYBCS%
:: Display the name boxes of 3 people
SET SYBCS=%SYBCS%;:10300$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Left computer $4c▌;$c4▌$ce Remaining cards 11 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
SET SYBCS=%SYBCS%;:10368$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Right computer $4c▌;$c4▌$ce Remaining cards 7 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
SET SYBCS=%SYBCS%;:11400$4c☉$4c▄▄▄▄$4c☉;$c4▌$c9 Player SYBN$4c▌;$c4▌$ce Remaining cards 17 cards $4c▌;$4c☉$c4▄▄▄▄$4c☉
:: Display the card backs of the computer
call :pb 10701
call :pb 10769
set SYBCS1=%SYBCS%
CALL :SYBCS
:: P11 displays the player's cards
set kzms=sb
call :p11
:: Timing 2
set t2=%time%
:: Calculate the time difference and display
call :timec
goto :%kzms%
:GB
:SB
title Please use the mouse to select the cards you want to play...
:SB1
set kzms=sb
sybc M
set err=%errorlevel%
set /a GBSvv=err-8,GBSvm=17+p2z*3,GBS=GBSvv/3
if %err% gtr %GBSvm% (goto chupai) else (if %err% == 10 (goto chupai) else (if %err% lss 10 set kzms=jp&&call :p11&&goto :GBJ))
if %GBs% gtr %p2z% set GBs=%P2z%
if !p2w%GBs%! == 0 (set /a p2w%GBs%=1&&call :p11 1 %GBs%&&goto :SB1) else (set /a p2w%GBs%=0&&call :p11 0 %GBs%&&goto :SB1)
goto :SB1
:GBJ
title Please use the keyboard to select the cards you want to play...
:: Initialize the card selection pointer. Variable GBy is the original pointer position
set /a GBy=12212,GBs=1
:GB1
set kzms=jp
:: Locate the card selection pointer. Variable GBW is the new pointer position
set /a GBW=12209+GBs*3
:: Display the card selection pointer and erase the original pointer
call :sybc %GBy%f1 ;
call :sybc %GBw%f1↑
:: SYBC function without parameters is similar to CHOICE, pause the script and get a key
call :sybc
:: Next line, display the pressed key
::title sybc-%errorlevel%-
:: Perform corresponding operations according to different keys
:: Left and right keys move the cursor
if %errorlevel% == 75 set /a GBs-=1
if %errorlevel% == 77 set /a GBs+=1
:: Up and down keys raise/lower the card and refresh the player's cards
if %errorlevel% == 72 if !p2w%GBs%! == 0 set /a p2w%GBs%=1&&call :p11 1 %GBs%
if %errorlevel% == 80 if !p2w%GBs%! == 1 set /a p2w%GBs%=0&&call :p11 0 %GBs%
:: Space bar play cards
if %errorlevel% == 57 goto chupai
:: F2 redeal
if %errorlevel% == 60 goto 2
:: F5 refresh
if %errorlevel% == 63 goto 1
::
if %errorlevel% == 50 goto :SB
:: Pointer exceeds the high and low limits, then restore
if %GBs% lss 1 set gbs=%p2z%
if %GBs% gtr %p2z% set gbs=1
:: Save the original pointer for erasure
set /a GBy=GBw
goto :GB1
:chupai
:: Play cards
set /a p6s=0,p6h=0,p6y=0,p6z=0,p0s=0,p0h=0,p0y=0,p0z=0,p2zBF=%p2z%
set p2sBF=%p2s%
set p2hBF=%p2h%
set p2yBF=%p2y%
for /l %%a in (1,1,%p2z%) do if !p2w%%a! == 1 (set /a p6z=p6z+1&&set p6s=!p6s!!p2s:~%%a,1!&&set p6h=!p6h!!p2h:~%%a,1!&&set p6y=!p6y!!p2y:~%%a,1!&&set p6js=Farmer) else (set /a p0z=p0z+1&&set p0s=!p0s!!p2s:~%%a,1!&&set p0h=!p0h!!p2h:~%%a,1!&&set p0y=!p0y!!p2y:~%%a,1!)
for /l %%a in (1,1,%p0z%) do (set /a p2z=p0z&&set p2s=!p0s!&&set p2h=!p0h!&&set p2y=!p0y!)
:yanzheng
set px=Violation&set pxs=0&set pxz={Violated!}&set ps=---34567890JQKA02N$
:: Initialize
for /l %%a in (0,1,4) do set pss%%a=0
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set ps%%a=0&set p6zs%%a=0
:: Calculate the number of cards of each middle point
for /l %%a in (1,1,20) do for /f %%b in ("!p6s:~%%a,1!") do set /a ps%%b+=1
:: Calculate the number of cards
set /a p6zs=%ps3%+%ps4%+%ps5%+%ps6%+%ps7%+%ps8%+%ps9%+%ps0%+%psj%+%psq%+%psk%+%psa%+%ps2%+%psn%
:: Get the mark string %p6ss%
set p6ss=---%ps3%%ps4%%ps5%%ps6%%ps7%%ps8%%ps9%%ps0%%psj%%psq%%psk%%psa%0%ps2%%psn%$
:: Extract the largest single card, 2 cards, 3 cards, 4 cards
for /l %%a in (3,1,17) do set pss!p6ss:~%%a,1!=%%a
:: Extract the smallest single card, 2 cards, 3 cards, 4 cards
for /l %%a in (17,-1,3) do set psx!p6ss:~%%a,1!=%%a
:: Single card
if %p6zs% == 1 set px=One card&set pxz=One card{!ps:~%pss1%,1!}&set pxs=%pss1%
set p=%p6ss%&set q=%p6zs%
:: 3 cards and planes
:: Explanation: %p:3=.% == %p% means there is no 3 in %p%, plus not means there is 3 in %p% to make if effective
if %q% == 6 if not %p:33=.% == %p% set px=Plane
if %q% == 8 if not %p:33=.% == %p% set px=Plane with single card
if %q% == 10 if not %p:33=.% == %p% if %p:1=.% == %p% set px=Plane with pairs
if not %px:Plane=.% == %px% set pxs=%pss3%&set pxz=%px%
if %q% == 9 if not %p:333=.% == %p% set px=Three consecutive
if %q% == 12 if not %p:333=.% == %p% set px=Three consecutive with single card
if %q% == 15 if not %p:333=.% == %p% if %p:1=.% == %p% set px=Three consecutive with pairs
if %q% == 12 if not %p:3333=.% == %p% set px=Three large consecutive
if %q% == 16 if not %p:3333=.% == %p% set px=Three large consecutive with single card
set p3=%p:3333=.%
if %q% == 20 if not %p:3333=.% == %p% if %p:1=.% == %p% if %p3:3=.% == %p3% set px=Three large consecutive with pairs
if %q% == 15 if not %p:33333=.% == %p% set px=Three giant consecutive
if %q% == 20 if not %p:33333=.% == %p% set px=Three giant consecutive with single card
if %q% == 18 if not %p:333333=.% == %p% set px=Three divine consecutive
if not %px:Three=.% == %px% set pxs=%pss3%&set pxz=%px%
if %q% == 3 if not %p:3=.% == %p% set px=Three cards&set pxz=Three cards!ps:~%pss3%,1!
if %q% == 4 if not %p:3=.% == %p% set px=Three with one&set pxz=Three cards!ps:~%pss3%,1! with one card!ps:~%pss1%,1!
if %q% == 5 if not %p:3=.% == %p% if not %p:2=.% == %p% set px=Three with pair&set pxz=Three cards!ps:~%pss3%,1! with one pair!ps:~%pss2%,1!
:: Pairs and brothers
if %q% == 2 if %p:1=.% == %p% set px=Pair&set pxz=One pair!ps:~%pss2%,1!&set pxs=%pss2%
if %q% == 6 if not %p:222=.% == %p% set px=3 brothers
if %q% == 8 if not %p:2222=.% == %p% set px=4 brothers
if %q% == 10 if not %p:22222=.% == %p% set px=5 brothers
if %q% == 12 if not %p:222222=.% == %p% set px=6 brothers
if %q% == 14 if not %p:2222222=.% == %p% set px=7 brothers
if %q% == 16 if not %p:22222222=.% == %p% set px=8 brothers
if %q% == 18 if not %p:222222222=.% == %p% set px=9 brothers
if %q% == 20 if not %p:2222222222=.% == %p% set px=10 brothers
:: Straight
if %q% == 5 if not %p:11111=.% == %p% set px=5 consecutive cards
if %q% == 6 if not %p:111111=.% == %p% set px=6 consecutive cards
if %q% == 7 if not %p:1111111=.% == %p% set px=7 consecutive cards
if %q% == 8 if not %p:11111111=.% == %p% set px=8 consecutive cards
if %q% == 9 if not %p:111111111=.% == %p% set px=9 consecutive cards
if %q% == 10 if not %p:1111111111=.% == %p% set px=10 consecutive cards
if %q% == 11 if not %p:11111111111=.% == %p% set px=11 consecutive cards
if %q% == 12 if not %p:111111111111=.% == %p% set px=12 consecutive cards
:: Bomb
if %q% == 4 if not %p:4=.% == %p% set px=Bomb&set pxz=Bomb{Four cards!ps:~%pss4%,1!}&set pxs=%pss4%&set pxs=%pss4%
if %q% == 2 if not %p:2$=.% == %p% set px=Joker bomb&set pxz=Joker bomb{Invincible}&set pxs=%pss2%
:: Extract valid cards (the largest one in straight and brothers, the largest one without carrying cards in three cards)
if not %px:Straight=.% == %px% set pxs=%pss1%&set pxz=%px%!ps:~%psx1%,1! to!ps:~%pss1%,1!
if not %px:Brothers=.% == %px% set pxs=%pss2%&set pxz=%px%!ps:~%psx2%,1! to!ps:~%pss2%,1!
call :sybc 1146830 The cards you played: ; ;:115683C%pxz%
if "%px%" == "Violation" (set p2s=%p2sBF%&&set p2h=%p2hBF%&&set p2y=%p2yBF%&&set p2z=%p2zBF%
for /l %%a in (1,1,20) do set p2w%%a=0
call :p11
call :sybc 1166830 Cannot play like this.;Please play again!
goto :GB)
(ECHO.fB800:%DEBUGQK:;= 20 3e&ECHO.fB800:% 20 3e&ECHO.q%)|DEBUG>NUL
for /l %%a in (1,1,%P6z%) do set /a wz=11220+%%a*3&&call :pa !wz! !p6y:~%%a,1! !p6s:~%%a,1! !p6h:~%%a,1! %p6js%
call :sybcs
for /l %%a in (1,1,20) do set p2w%%a=0
SET SYBCS=%SYBCS%;:1035030 ▁▁▁▁▁▁ ;$03▉$30      ▏;$03▉$3e I don't want it! $30▏;$03▉$3e      $30╲; $03▇▇▇▇▇▇▇
call :sybcs
SET SYBCS=%SYBCS%;:1071330 ▁▁▁▁▁▁ ;$03▉$30      ▏;$03▉$3e I can't take it! $30▏;╱$3e      $30▏;$03▇▇▇▇▇▇▇$30
call :sybcs
if %p6z% == %p2zBF% goto :win
call :p11
call :sybc 11606ce ;:11606ce%p2z%
call :sybc 1166830 No one can take it.;Please continue to play cards!
goto :GB
:p1
if "%2" == "" goto :P11
:P11
set SYBCS=11800$3e%KH%:12000$##Press M key to switch; to mouse mode; play cards more conveniently; it is recommended to use mouse;:12070$##F2 redeal;F5 refresh screen;Arrow keys control;Space bar play cards
if "%kzms%" == "sb" set SYBCS=11800$3e%KH%:11900$##┌───┒;│Keyboard┃;┕━━━┛;Mouse mode cannot; use function keys; click to use keyboard;:11970$##┌───┒;│Play cards┃;┕━━━┛;In mouse mode; click to select cards; then click play cards
for /l %%a in (1,1,%p2z%) do set /a wz=11908+%%a*3,pz=%%a+1&(if !p2w%%a! == 1 set /a wz=!wz!-100)&call :pa !wz! !p2y:~%%a,1! !p2s:~%%a,1! !p2h:~%%a,1! Farmer
CALL :SYBCS
goto :eof
:pl
set pl=%2
for %%a in (0,1,20) set /a pq1=%%a*7+5,pq2=%%a*7+6 &&call :pa %1
goto :eof
:pb
SET SYBCS=%SYBCS%;:%1%pkBK3%▄▄▄▄▄;%pkbk% %pkNB% {\__/} %pkBK% ; %pkNB% / $fc@@%pkNB% \ %pkBK% ; %pkNB%( ($f0oo%pkNB%) )%pkBK% ; %pkNB% / ~~ \ %pkBK% ;%pkbk% $f2Dou Di Zhu%pkbk% ;%pkBK4%▄▄▄▄▄%pkBK%
goto :eof
:pa
if not "%4" == "" SET SYBCS=%SYBCS%;:%1%pkBK% ▄▄▄▄ ; $f%2%3%pkNB%    %pkBK% ; $f%2%4%pkNB% %5 %pkBK% ; %pkNB% %6 $f%2%4%pkBK% ; %pkNB%    $f%2%3%pkBK% ; %pkBK2%▄▄▄▄%pkBK%
goto :eof
:fp
title Dealing cards...
for /l %%a in (1,1,20) do set p2w%%a=0
set paid=&set paif=&set paiy=&set /a p1z=17,p2z=17,p3z=17
:FP1
set /a pran+=1,m=0,n=0,d=0
:: Randomly sort 54 cards (shuffle)
for %%a in (3 4 5 6 7 8 9 0 J Q K A 2) do (for %%b in (!pkh1!-!pky0! !pkh2!-!pky0! !pkh3!-!pky1! !pkh4!-!pky1!) do (set p%pran%#!random!!random!.%%a-%%b=1))
set P%pran%#300543001.N-!pkh0!-!pky1!=1&set P%pran%#543001000.N-!pkh0!-!pky0!=1
:: Deal cards and leave three bottom cards
set he1=&set he2=&set he3=&set Di=
for /f "tokens=2 delims==." %%a in ('set p%pran%#') do set /a m=m%%3+1,n+=1&&if !n! leq 51 (for %%c in (!m!) do set he%%c=!he%%c! %%a) else (set di=!di! %%a)
set a=1s=%di:~1,1%;1h=%di:~3,1%;1y=%di:~5,1%;2s=%di:~7,1%;2h=%di:~9,1%;2y=%di:~11,1%;3s=%di:~13,1%;3h=%di:~15,1%;3y=%di:~17,1%
set pdi%a:;=&set pdi%
:: Organize the cards in each player's hand
for /l %%a in (1,1,3) do (for %%b in (!he%%a!) do (for /f "tokens=1,2,3 delims=-" %%c in ("%%b") do (
set pd%pran%#%%c=!pd%pran%#%%c!%%c
set pf%pran%#%%c=!pf%pran%#%%c!%%d
set py%pran%#%%c=!py%pran%#%%c!%%e))
for %%b in (3 4 5 6 7 8 9 0 J Q K A 2 N) do set paid%pran%#=!paid%pran%#!!pd%pran%#%%b!&set paif%pran%#=!paif%pran%#!!pf%pran%#%%b!&set paiy%pran%#=!paiy%pran%#!!py%pran%#%%b!
for /f "tokens=1,2,3 delims=." %%b in ("!paid%pran%#!.!paif%pran%#!.!paiy%pran%#!") do set p%%as=0%%b&set p%%ah=0%%c&set p%%ay=0%%d
)
if "%pdi3s%" == "" goto FP
goto :eof
:win
(echo.FB800:B40 FFF 20 3E&echo q)|DEBUG>NUL
set sybcs=12030F1╔════════╗;║$FCCongratulations, you win.$F1║;║$F8Press any key to start a new game$F1║;╚════════╝
call :SYBCS
pause>nul
goto :2
:timec
IF "%t1%" == "" EXIT /B 0
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%N IN ("%t1%") DO SET O=1%%O&SET P=1%%P&SET Q=1%%Q&SET /A N=100+%%N
IF "%t2%" == "" SET /A T=N*360000+O*6000+P*100+Q-36610100&&EXIT /B !T!
FOR /F "DELIMS=:. TOKENS=1,2,3,4" %%M IN ("%t2%") DO SET I=1%%N&SET J=1%%O&SET K=1%%P&SET /A H=100+%%M
IF "%t2%" GTR "A" (SET L=%t2%&SET /A T=N*360000+O*6000+P*100+Q-36610100,S=T/100,M=T/6000,H=T/360000) ELSE (SET L=%3&SET /A H=H-N,I=I-O,J=J-P,K=K-Q,T=H*360000+I*6000+J*100+K,S=T/100,M=T/6000,H=T/360000)
IF "%L%" == "" SET L=T
call :sybc 1176831 Elapsed time: hundredths of a second;:11773$3c!%L%!
goto :eof
:SYBCS
(ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%SYBCV:`=&ECHO.%)|DEBUG>NUL
goto :EOF
:SYBC
IF "%1" == "" SET SYBCCD=00&GOTO SYBCC
SET SYBCCD=64
set SYBCC=%*
:SYBCC
SET V=`A80`DB %SYBCCD% 00 "%SYBCC%" 0D``RCX`200`G`Q
(ECHO.%SYBCOM:`=&ECHO.DW %&ECHO.%V:`=&ECHO.%)|DEBUG>NUL
EXIT /B %ERRORLEVEL%


[ Last edited by sl543001 on 2010-4-26 at 22:50 ]
SYBNQQ:354324773
Floor 42 Posted 2010-04-25 18:15 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Is planning to continue updating SYBC, strengthening mouse support
SYBNQQ:354324773
Floor 43 Posted 2010-04-25 18:35 ·  中国 山东 烟台 莱阳市 电信
新手上路
Credits 18
Posts 17
Joined 2009-05-14 00:12
17-year member
UID 145028
Gender Male
Status Offline
So powerful. But I tried it. The code given by 25L, after I play my cards, the opponent keeps "unable to play" cards.
Floor 44 Posted 2010-04-25 21:51 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
The opponent has been "unable to play" cards all the time because the script has not yet written the AI, so the computer will never play cards. Please wait for the future version.
SYBNQQ:354324773
Floor 45 Posted 2010-04-26 22:51 ·  中国 河北 廊坊 联通
中级用户
★★
Credits 499
Posts 225
Joined 2008-12-30 22:09
17-year member
UID 135392
Gender Male
Status Offline
Corrected the code on floor 41
SYBNQQ:354324773
Forum Jump: