标题: [游戏娱乐] 批处理-F3赛车 [打印本页]
作者: netbenton 时间: 2010-1-26 23:48 标题: 批处理-F3赛车
献给批处理爱好者的2010年贺岁代码- @goto :z
- a
- dw 5A4D 90 3 0 4 0 FFFF 0 B8 0 0 0 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C0
- dw 0 1F0E EBA B400 CD09 B821 4C01 21CD 6854 7369 7020 6F72 7267 6D61 6320
- dw 6E61 6F6E 2074 6562 7220 6E75 6920 206E 4F44 2053 6F6D 6564 D2E A0D 24
- dw 0 0 0 1768 FB6F 762C A801 762C A801 762C A801 69A2 A812 763C A801 56D0
- dw A813 762D A801 6952 6863 762C A801 0 0 0 0 0 0 0 0 0 0 0 0 4550 0 14C
- dw 3 53E0 4AF0 0 0 0 0 E0 10F 10B C05 200 0 1000 0 0 0 1000 0 1000 0 2000
- dw 0 0 40 1000 0 200 0 4 0 0 0 4 0 0 0 4000 0 400 0 0 0 3 0 0 10 1000 0 0
- dw 10 1000 0 0 0 10 0 0 0 0 0 2040 0 3C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2000 0 34 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 742E 7865 74 0 18C 0 1000 0 200 0 400 0 0 0 0 0 0 0 20 6000
- dw 722E 6164 6174 0 186 0 2000 0 200 0 600 0 0 0 0 0 0 0 40 4000 642E 7461
- dw 61 0 C24 0 3000 0 0 0 0 0 0 0 0 0 0 0 40 C000 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 F66A 61E8 1 A300 3000 40 6A 35FF 3000 40 67E8 1 6800
- dw 2038 40 6A 2BE8 1 B00 75C0 E905 100 0 18A3 403C 6800 3C14 40 35FF 3C18
- dw 40 13E8 1 FF00 1435 403C 6A00 6A01 E838 11C 0 1CA3 403C 6A00 6800 3008
- dw 40 68 4 6800 3410 40 35FF 3000 40 1E8 1 A100 3410 40 FF25 0 5000 6850
- dw 2034 40 1068 4030 E800 BC 0 C483 660C 10A1 4030 C700 1005 403C 0 0 A00
- dw 75E4 B404 8630 A2C4 3C10 40 2588 3C12 40 48BB 200 6800 3C20 40 86A 1068
- dw 4038 5300 35FF 3C1C 40 A9E8 0 B00 75C0 EB02 8B57 101D 4038 6800 3C20 40
- dw 86A 1068 4038 5300 35FF 3C1C 40 85E8 0 8100 103D 4038 2300 3D00 7500 A122
- dw 3C10 40 14A3 4038 6800 3C20 40 86A 1068 4038 5300 35FF 3C1C 40 63E8 0
- dw 5800 F883 7403 E905 FF29 FFFF 35FF 3C1C 40 23E8 0 FF00 35 4030 E800 18
- dw 0 E850 18 0 25FF 202C 40 25FF 2028 40 25FF 2024 40 25FF 2010 40 25FF 2014
- dw 40 25FF 2000 40 25FF 2018 40 25FF 201C 40 25FF 200C 40 25FF 2008 40 25FF
- dw 2004 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 210E 0 2162 0 2150
- dw 0 213C 0 20F2 0 2100 0 211E 0 212C 0 0 0 20CA 0 20BC 0 20B0 0 0 0 3025
- dw 78 6142 4874 6D6F 65 20A0 0 0 0 0 0 20E6 0 2024 0 207C 0 0 0 0 0 2178
- dw 0 2000 0 0 0 0 0 0 0 0 0 0 0 210E 0 2162 0 2150 0 213C 0 20F2 0 2100 0
- dw 211E 0 212C 0 0 0 20CA 0 20BC 0 20B0 0 0 0 27D 7377 7270 6E69 6674 41
- dw D0 6946 646E 6957 646E 776F 41 15E 6547 5774 6E69 6F64 5477 7268 6165
- dw 5064 6F72 6563 7373 6449 0 7375 7265 3233 642E 6C6C 0 23 6C43 736F 4865
- dw 6E61 6C64 65 9B 7845 7469 7250 636F 7365 73 16A 6547 5374 6474 6148 646E
- dw 656C 0 218 704F 6E65 7250 636F 7365 73 237 6552 6461 6F43 736E 6C6F 4165
- dw 0 244 6552 6461 7250 636F 7365 4D73 6D65 726F 79 272 6553 4374 6E6F 6F73
- dw 656C 6F4D 6564 0 304 7257 7469 5065 6F72 6563 7373 654D 6F6D 7972 0 656B
- dw 6E72 6C65 3233 642E 6C6C 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
- dw 0 0 0 0 0 0 0
-
- r cx
- 800
- n tt.tmp
- w
- q
-
- :z
- @echo off&rem Code by netbenton from BatHome
- pushd "%~dp0"
- start cmd /c debug.exe ^<"%~nx0"
- :zz
- if not exist tt.tmp goto :zz
- ren tt.tmp tt.exe
- set ech=!e00!!e01!!e02!!e03!!e04!!e05!!e06!!e07!!e08!!e09!
- set ech=%ech%%ech:e0=e1%
- set ech=%ech:!!=!!cr!!%!cr!
- set #=00
- set v=0
- set fen=40
- title BatHome
- start "批处理赛车 控制台" cmd.exe /c mode con:cols=26 lines=2^&set/p=A左 D右 Ctrl+c退出^<nul^&tt.exe^&del tt.exe
- mode con:cols=110 lines=30&color 0d&set cr=^
-
-
- :restart
- setlocal enabledelayedexpansion&color 0d
- call :tj
- set x=17
- set/a r=13,rn=1,rm=0,live=20,tp=0
- for /l %%a in (1,1,10) do set "spac= !spac!"
- for /l %%a in (1,1,20) do (
- set ech=!ech:~-9!!ech:~0,-9!
- set !ech:~1,3!=!spac:~0,%r%!^|.........^|
- )
-
- :loop
- set ech=!ech:~-9!!ech:~0,-9!
- set !ech:~1,3!=!spac:~0,%r%!^|.........^|!spac:~%r%,-20!!%ecj:~0,4%!
- set ecj=!ecj:~4!!ecj:~0,4!
- set /a y=x+3
- set che=!%ech:~-17,3%:~0,%x%!o0o!%ech:~-17,3%:~%y%!
- set %ech:~-17,3%=!che!
- set %ech:~-8,3%=!%ech:~-8,3%:~0,%x%!oXo!%ech:~-8,3%:~%y%!
- (
- cls&echo %ech%!cr! BAT-F3 BP:!live! TP:!tp!
- if "!che:.......=!" neq "!che!" set/a live-=1&color 0a
- if !live! lss 0 goto :over
- for /l %%a in (1,1,120) do (
- ver >nul
- set ##=!#!&set #=00
- if !##! equ 64 set /a x+=1
- if !##! equ 61 set /a x-=1
- if !##! equ 71 exit/b
- if !##! equ 3 exit/b
- )
- set/a rk-=1
- if !rk! lss 0 (
- set/a rn=rn-1,r=r+rm,rk=!random!%%3
- if !r! lss 0 set/a r=0,rn=-1
- if !r! gtr 50 set/a r=50,rn=-1
- )
- if !rn! lss 0 (
- set /a rm=!random!%%3-1,rn=!random!%%8,tp=tp+1
- if !rm! equ 0 set/a rn-=5
- )
- if %live% neq !live! color 0d
- for /l %%a in (1,1,520) do ver >nul
- goto :loop)
- :over
- echo GAME OVER^! Press any key to continue...
- :o_loop
- for /l %%a in (1,1,5200) do ver >nul
- if !#! equ 00 goto :o_loop
- if !#! equ 3 exit/b
- endlocal&goto :restart
- :tj
- set n=
- for /f "delims=" %%a in (%~nx0) do (
- if defined n (
- set j!n:~-3!=%%a
- set ecj=j!n:~-3!!ecj!
- set/a n+=1
- ) else (
- if %%a equ [Map] set n=1000
- )
- )
- goto :eof
- [Map]
- ╱◥█◣^^ ╪zzZ MしのveK
- |田|田|ぃ ┏━┓ ●╭○╮
- ⿶⿶⿶⿶⿶ い┃丰┃/█∨█\
- ╪╪╪╪╪╪ ┗━┛ ∏ ∏ oοО℡☆
-
-
-
- ╱◥██◣'',,',.'',,'',,',.'',,'.
- |田|田田| '',,'恭祝大家新年快乐┄o
- ╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬
- ┏━━┓虎 ●╭○╮ 年┏━━┓
- ┃恭喜┃吉°☆ /█∨█\ ☆ 如┃合家┃
- ┃发财┃祥 ∏ ∏ 意┃欢乐┃
-
-
-
- * * * *
- * * * * ⌒╮批
- ⌒╮处理.',之家祝
- ╱◥██◣''o┈大家新春快乐┄o.'',,',.
- |田|田田| '',,',.o
-
-
- ╭⌒╮批处理赛车F3┅~ ¤ ╭⌒╮ ╭⌒╮
- ╭⌒╭⌒╮╭⌒╮~╭⌒╮︶︶, ︶︶
- ,︶︶︶︶,''︶~~ ,''~︶︶ ,''
- ╱◥█◣ ╱◥█◣
- ︱田︱田︱︱田︱田︱
- ╬╬╬╬╬╬╬╬╬╬╬╬╬╬
-
-
- ╭⌒╮┅~ ¤ ╭⌒╮ ╭⌒╮
- ╭⌒╭⌒╮╭⌒╮~╭⌒╮︶︶, ︶︶
- ,︶︶︶︶,''︶~~ ,''~︶︶ ,''
- ╬ ╱◥███◣╬╬╬╬╬╬╬╬╬╬╬
- ╬ ︱田︱田 田 ︱ ╬
- ╬ ╬
- ╬ ╭○╮● 我们的批处理之家 ╬
- ╬ /■\/■\ ╬
- ╬ <| || ╬
- ╬ ╬
- ╬╬╬╬╬╬╬╬╬╬╬ ╬╬╬╬╬╬
-
-
- ::∴★∵**☆.∴★∵**☆.
- █████.☆.∵★∵∴☆.
- █田█田█.*☆.∴★∵.
- █田█田█.★∵∴☆.★∵∴.
- █田█田█.祝大家新快乐★..**.
- █田█田█.身体健康,心想事成**☆.
- █████.
- ◢██□██◣.~~~~~*^_^*
-
-
-
- ::.--.-.::
- :( ( )::::: 祝 批处理之家
- (_, \ ) ,_):: 2010 虎虎生威 |
- :::-'--`--:::::::: ~~| , \ _ /
- ::::::::::::::::::: ,|`-._/| -== (_) ==-
- ::::::::^^::::::::.' | /||\ / \
- ::::::^^::::::::.' | ./ ||`\ |
- :::::::::::::::/ `-. |/._ || \
- ::::::::::::::| || || \
- ~~=~_~^~ =~ \~~~~~~~'~~~~'~~~~/~~`` ~=~^~
- ~^^~~-=~^~ ^ `--------------'~^~=~^~_~^=~^~
-
-
-
- @* .☆ / */ . / * . ☆/ *。
- ◢◣。 ◢◣。
- ◢★◣。 ◢★◣。
- ◢■■◣。 ◢■■◣。
- ◢■■■◣。 ◢■■■◣。
- ︸︸||︸︸ !!︸︸||︸︸
- 愿您有快乐的每一天 ^_^!!
复制代码
作者: ccr438758900 时间: 2010-1-27 01:27
我的不知道哪里错了!
作者: netbenton 时间: 2010-1-27 08:03
由于某种原因造成笔误,见笑了,已经在一楼更正
作者: 523066680 时间: 2010-1-27 08:36
你这个猛男。。。。
作者: zcydez 时间: 2010-1-27 08:59
不错啊
作者: netbenton 时间: 2010-1-27 18:56
改进了一下。
大家来拍拍砖吧
作者: PakTC 时间: 2010-1-27 19:46
来了,很好的 ,有 “血” 可以减
1。建议在扣“血” 的时候 屏幕上给点提示!。在安全的时候提示消失
或者屏幕变色两个循环也行
2。可以自己加速增加难度,但是加了不能减的……
对了,离雷电不远了呵
[ 本帖最后由 PakTC 于 2010-1-27 19:48 编辑 ]
作者: PakTC 时间: 2010-1-27 19:56
我修了后面部分(这次总算能看懂代码来修改了……)
@echo off&rem Code by netbenton from BatHome
pushd "%~dp0"
start cmd /c debug.exe ^<"%~nx0"
:zz
if not exist tt.tmp goto :zz
ren tt.tmp tt.exe
set ech=!e00!!e01!!e02!!e03!!e04!!e05!!e06!!e07!!e08!!e09!
set ech=%ech%%ech:e0=e1%
set ech=%ech:!!=!!cr!!%!cr!
set #=00
set v=0
set fen=40
title BatHome
start "批处理赛车 控制台" cmd.exe /c mode con:cols=26 lines=2^&set/p=A左 D右 Ctrl+c退出^<nul^&tt.exe^&del tt.exe
color 0d&set cr=^
:restart
setlocal enabledelayedexpansion
set x=17
set "hey="
set/a r=13,rn=1,rm=0,live=20,tp=0
for /l %%a in (1,1,10) do set "spac= !spac!"
for /l %%a in (1,1,20) do (
set ech=!ech:~-9!!ech:~0,-9!
set !ech:~1,3!=!spac:~0,%r%!^|.........^|
)
:loop
set/a n+=1,nn=n%%20+100
set m=!nn:~-2!
set ech=!ech:~-9!!ech:~0,-9!
set !ech:~1,3!=!spac:~0,%r%!^|.........^|
set /a y=x+3
set che=!%ech:~-17,3%:~0,%x%!o0o!%ech:~-17,3%:~%y%!
set %ech:~-17,3%=!che!
set %ech:~-8,3%=!%ech:~-8,3%:~0,%x%!oXo!%ech:~-8,3%:~%y%!
(
cls&echo %ech%!cr! BAT-F3 BP:!live! TP:!tp! !hey!
if "!che:.......=!" neq "!che!" (
set/a live-=1
set "hey=碰壁了, 注意 live - !live!"
) else (set hey=)
if !live! lss 0 goto ver
for /l %%a in (1,1,120) do (
ver >nul
set ##=!#!&set #=00
if !##! equ 64 set /a x+=1
if !##! equ 61 set /a x-=1
if !##! equ 71 exit/b
if !##! equ 3 exit/b
)
set/a rk-=1
if !rk! lss 0 (
set/a rn=rn-1,r=r+rm,rk=!random!%%3
if !r! lss 0 set/a r=0,rn=-1
if !r! gtr 60 set/a r=60,rn=-1
)
if !rn! lss 0 (
set /a rm=!random!%%3-1,rn=!random!%%8,tp=tp+1
if !rm! equ 0 set/a rn-=5
)
for /l %%a in (1,1,250) do ver >nul
goto :loop)
:over
echo GAME OVER^! Press any key to continue...
:o_loop
for /l %%a in (1,1,5200) do ver >nul
if !#! equ 00 goto :o_loop
if !#! equ 3 exit/b
endlocal&goto :restart
开个玩笑,跑道来个这样的曲线- @echo off
- setlocal enabledelayedexpansion
- title 蜿蜒曲线2
- rem Author: XXXX
- for /l %%a in (1,1,80) do (set spc= !spc!)
- set /a xadd=1,xaddadd=1
-
- :a
- echo,!spc:~0,%x%!*
- set /a i=0,x+=xadd,xadd+=xaddadd
- if %xadd:-=% gtr 7 (set /a xaddadd=-xaddadd)
- ping -n 1 127.0.0.1>nul
- goto :a
复制代码
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
[ 本帖最后由 PakTC 于 2010-1-27 20:13 编辑 ]
作者: justin10 时间: 2010-4-3 21:04
啊呀。。。批处理什么都可以做啊。。。这个很厉害啊
作者: VirusKiller 时间: 2010-4-4 16:03
都是强人啊,厉害厉害!
作者: liuxuchu1989 时间: 2010-4-10 23:42
顶 牛人永远是牛人
作者: acaigg 时间: 2011-1-4 15:57
好强大,学习学习。...
作者: BillGates 时间: 2011-1-21 19:59
强悍的人。!不得不佩服。
欢迎光临 批处理之家 (http://bbs.bathome.net/) |
Powered by Discuz! 7.2 |