|
最新修改:
附件见三楼!!
9750的游戏太少了……
我现在就自己写了个猜数字……
在网上找了个hitman2.1,稍稍改动升级到2.6。
核心代码没有改变,只是增加了显示Perfect、Cool、Lost之类的计数。
效果图:
另求大牛把那个贪吃蛇for 5800改成for8750。
我自己改了下,随机数可以伸缩变换,屏幕坐标也可以改,可是我虽然知道9750对应的按键代码,修改却无从下手……
呃,废话不多说了,发Hitman2.6的代码:
(#代表那个小三角,分数如果觉得lost、miss扣得太狠的话,我就觉得太狠了……可以修改为15左右)
- //主程序:HIT2.6
- 0G
- 0H
- 0I
- 0J
- 0L
- 0O //注意是字母"欧"
- 0E
- While E11
- ClrText
- HITMAN2.1
- 1.START
- 2.CHART
- 3.HELP
- ? E
- If E=1
- Then 0N
- 0S
- 1T
- 4F
- IfEnd
- If E=2
- Then 1Z
- Prog LIST.DLL
- IfEnd
- If E=3
- Then 1Z
- Prog HELP.DLL
- IfEnd
- WhileEnd
- ClrText: READY?
- ClrText: GO!!!!!!!
- ClrText
- While T20
- If F=4
- Then 0F
- 0M
- Int 9Ran#+1B
- IfEnd
- If B=1
- Then 1
- IfEnd
- If B=2
- Then 2
- IfEnd
- If B=3
- Then 3
- IfEnd
- If B=4
- Then 4
- IfEnd
- If B=5
- Then 5
- IfEnd
- If B=6
- Then 6
- IfEnd
- If B=7
- Then 7
- IfEnd
- If B=8
- Then 8
- IfEnd
- If B=9
- Then 9
- IfEnd
- Getkey
- GetkeyK
- If K=72
- Then 1K
- IfEnd
- If K=62
- Then 2K
- IfEnd
- If K=52
- Then 3K
- IfEnd
- If K=73
- Then 4K
- IfEnd
- If K=63
- Then 5K
- IfEnd
- If K=53
- Then 6K
- IfEnd
- If K=74
- Then 7K
- IfEnd
- If K=64
- Then 8K
- IfEnd
- If K=54
- Then 9K
- IfEnd
- F+1F
- If M=0
- Then If K=B
- Then 1M
- If F=1
- Then S+80S: Perfect
- G+1G
- IfEnd
- If F=2
- Then S+40S: Cool
- H+1H
- IfEnd
- If F=3
- Then S+20S: Good
- I+1I
- IfEnd
- If F=4
- Then S+10S: Hit!
- J+1J
- IfEnd
- IfEnd
- IfEnd
- If KB And M=0 And F3 And 1K And K9
- Then Miss
- S-25S
- L+1L
- IfEnd
- If KB And F=4 And M=0
- Then LOST
- S-25S
- O+1O //大写字母"欧"
- IfEnd
- If F=4
- Then T+1T
- IfEnd
- WhileEnd
- ClrText
- END
- If QS And SR
- Then SQ
- YOU ARE THE 5TH
- IfEnd
- If RS And SU
- Then RQ
- SR
- YOU ARE THE 4TH
- IfEnd
- If US And SV
- Then RQ
- UR
- SU
- YOU ARE THE 3rd
- IfEnd
- If VS And SW
- Then RQ
- UR
- VU
- SV
- YOU ARE THE 2nd
- IfEnd
- If wS
- Then RQ
- UR
- VU
- wv
- Sw
- YOU ARE THE 1st
- IfEnd
- YOUR SCORE
- S#
- Locate 1,5,"ERFECT:"
- Locate 9,5,G
- Locate 12,5,"COOL:"
- Locate 20,5,H
- Locate 1,6,"GOOD:"
- Locate 9,6,I
- Locate 12,6,"HIT:"
- Locate 20,6,J
- Locate 1,7,"MISS:"
- Locate 9,7,L
- Locate 12,7,"LOST:"
- Locate 20,7,O //注意是字母"欧"
复制代码- //辅助程序1:LIST.DLL
- ClrText
- If Z1
- Then Locate 5,1, RUNTIME ERROR
- IfEnd
- While Z=1
- 0Z
- Locate 8,2, CHART
- Locate 1,3, NO.1
- Locate 18,3,W
- Locate 1,4, NO.2
- Locate 18,4,V
- Locate 1,5, NO.3
- Locate 18,5,U
- Locate 1,6, NO.4
- Locate 18,6,R
- Locate 1,7, NO.5
- Locate 18,7,Q
- WhileEnd
复制代码 不知为何原来写hitman的人要把辅助程序写成dll……难道这也算函数……
help.dll自己随便写写,不写也罢^_^
参考代码(我的版本)- CLrText
- "INPUT WHAT YOU SEE"
复制代码 够简洁吧~
还请大家多多指教 |
|