- 按键精灵会员
- 310264
- 333
- 6
- 590 朵
- 742 个
- 163 个
- 40740
- 2009-09-11
|
1#
t
T
发表于 2010-03-10 13:07
|
|只看楼主
自动打怪实战脚本系列第二弹! 所针对的游戏类型是回合制的网游,绝大多数的《梦幻XX》、《XXQ传》都通用。 如无法观看,请点击下载:按键精灵视频教程全集下集 源代码 - Hwnd = Plugin.Window.GetKeyFocusWnd()
- sRect = Plugin.Window.GetClientRect(Hwnd)
- MyArray=Split(sRect,"|")
- Ux=CLng(MyArray(0))
- Uy=CLng(MyArray(1))
- Dim x(9), y(9)
- x(0) = 184 : y(0) = 167
- x(1) = 262 : y(1) = 125
- x(2) = 107 : y(2) = 205
- Delay 500
- Rem 走路
- Call 吃药()
- MoveTo 358+Ux, 257+Uy
- Delay 50
- LeftClick 1
- Delay 500
- Call 战斗子程序()
- MoveTo 430+Ux, 313+Uy
- Delay 50
- LeftClick 1
- Delay 500
- Call 战斗子程序()
- Goto 走路
- Sub 战斗子程序()
- IfColor 132+Ux,35+Uy,"D3D3D3",0 Then
- Rem 战斗
- FindPic 0,0,1024,768,"Attachment:\fashu.bmp",0.9,intX,intY
- If intX > 0 And intY > 0 Then
-
- i=0
- For 3
- KeyPress "F1", 1
- Delay 100
- MoveTo x(i)+Ux, y(i)+Uy
- Delay 100
- LeftClick 1
- Delay 100
- LeftClick 1
- i=i+1
- Next
- End If
- Delay 1000
- IfColor 132+Ux,35+Uy,"D3D3D3",1 Then
- Goto 战斗结束
- End If
- Goto 战斗
- End If
- Rem 战斗结束
- End Sub
- Sub 吃药()
- IfColor 755+Ux,13+Uy,"1702D7",1 Then
- MoveTo 755+Ux, 13+Uy
- Delay 100
- RightClick 1
- End If
- IfColor 756+Ux,27+Uy,"D98400",1 Then
- MoveTo 756+Ux, 27+Uy
- Delay 100
- RightClick 1
- End If
- IfColor 606+Ux,13+Uy,"1702D7",1 Then
- MoveTo 606+Ux, 13+Uy
- Delay 100
- RightClick 1
- End If
- IfColor 607+Ux,27+Uy,"D98400",1 Then
- MoveTo 607+Ux, 27+Uy
- Delay 100
- RightClick 1
- End If
- End Sub
复制代码
|