联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
CODE: [Copy to clipboard]@echo off :begen-cpg-2 title 吃苹果 set j=0 set /p qp=是否全屏?(y/n) if %qp%==n ( mode con:cols=16 lines=14 goto tg ) else ( if %qp%==y (goto qp) else (echo 输入错误!&%0)) :qp echo exit|%ComSpec% /k prompt e 100 B4 00 B0 12 CD 10 B0 03 CD 10 CD 20 $_g$_q$_|debug>nul chcp 437>nul graftabl 936>nul :tg color 71 set main= set /p time=请输入字母掉落延长时间(单位:秒): :begen ::随机抽取字母(由于是新手,方法难免有点……) set /a k=%random%%%10 set /a z=%random%%%26 if %z%==0 set z=a if %z%==1 set z=b if %z%==2 set z=c if %z%==3 set z=d if %z%==4 set z=e if %z%==5 set z=f if %z%==6 set z=g if %z%==7 set z=h if %z%==8 set z=i if %z%==9 set z=j if %z%==10 set z=k if %z%==11 set z=l if %z%==12 set z=m if %z%==13 set z=n if %z%==14 set z=o if %z%==15 set z=p if %z%==16 set z=q if %z%==17 set z=r if %z%==18 set z=s if %z%==19 set z=t if %z%==20 set z=u if %z%==21 set z=v if %z%==22 set z=w if %z%==23 set z=x if %z%==24 set z=y if %z%==25 set z=z if %k%==0 set l=%z% if %k%==1 set l= %z% if %k%==2 set l= %z% if %k%==3 set l= %z% if %k%==4 set l= %z% if %k%==5 set l= %z% if %k%==6 set l= %z% if %k%==7 set l= %z% if %k%==8 set l= %z% if %k%==9 set l= %z% set main=%l%%main:~0,-10% set over=%main:~100,10% cls echo.得分:%j%分 echo. ┌─────┐ echo. │%main:~0,10%│ echo. │%main:~10,10%│ echo. │%main:~20,10%│ echo. │%main:~30,10%│ echo. │%main:~40,10%│ echo. │%main:~50,10%│ echo. │%main:~60,10%│ echo. │%main:~70,10%│ echo. │%main:~80,10%│ echo. │%main:~90,10%│ echo. └─────┘ :choice choice /c abcdefghijklmnopqrstuvwxyz0123456789 /cs /t %time% /d 0 /n>nul set /a j=j+1 set jr=%errorlevel% if %errorlevel%==1 set jr=a if %errorlevel%==2 set jr=b if %errorlevel%==3 set jr=c if %errorlevel%==4 set jr=d if %errorlevel%==5 set jr=e if %errorlevel%==6 set jr=f if %errorlevel%==7 set jr=g if %errorlevel%==8 set jr=h if %errorlevel%==9 set jr=i if %errorlevel%==10 set jr=j if %errorlevel%==11 set jr=k if %errorlevel%==12 set jr=l if %errorlevel%==13 set jr=m if %errorlevel%==14 set jr=n if %errorlevel%==15 set jr=o if %errorlevel%==16 set jr=p if %errorlevel%==17 set jr=q if %errorlevel%==18 set jr=r if %errorlevel%==19 set jr=s if %errorlevel%==20 set jr=t if %errorlevel%==21 set jr=u if %errorlevel%==22 set jr=v if %errorlevel%==23 set jr=w if %errorlevel%==24 set jr=x if %errorlevel%==25 set jr=y if %errorlevel%==26 set jr=z if %errorlevel%==28 (echo 暂停中&pause&goto choice) if %errorlevel%==29 goto exit setlocal enabledelayedexpansion set setin=%main%&set change=!setin:%jr%= !&set main=!change! if not "%over%"==" " goto over goto begen :over cls echo.s=msgbox("游戏结束!"^&vbcrlf^&"得分:%j%"^&vbcrlf^&"继续努力哦!"^&vbcrlf^&"是否再玩?",4,"游戏结束"^)>temp.vbs echo.createobject("scripting.filesystemobject").createtextfile("temp.tmpfile").write s>>temp.vbs call temp.vbs del /f /q temp.vbs for /f %%x in (temp.tmpfile) do (set xz=%%x) del /f /q temp.tmpfile if "%xz%"=="7" goto exit if "%xz%"=="6" goto begen-cpg-2 :exit cls echo.谢谢使用! ping -n 2 127.0.1>nul exit
附件 1: 吃苹果.rar (2010-6-24 10:22, 17.58 K,下载次数: 15)