Delay 500
dm_ret = dm.FindStr(777,104, 1001,643, "NPC家族总管", "000000-000000", 1, x, y)
If x > 0 and y > 0 Then
Call Plugin.Bkgnd.LeftDoubleClick(qq, x+10-3, y+5-22)
Delay 2000
Else
Goto 回家族
End If
IfColor 177,228,"0",0 Then
Call 关闭地图
Call 交接任务
Else
Goto 回家族
End If
Else
KeyPress "F10", 1
Delay 1000
Call 血蓝组队
FindPic 376,167,671,296,"Attachment:\战斗不可传送.bmp",0.9,intX,intY
If intX > 0 And intY > 0 Then
Call 打开地图
MoveTo 231, 607
Delay 200
LeftDoubleClick 1
Delay 200
Call 关闭地图
Goto 回家族
End If
Delay 8000
Goto 回家族
End If
End Sub
Sub 交接任务
Rem 木材
Delay 1000
dm_ret = dm.FindStr(22, 122, 315 , 581, "支线收集木材|支线收集石料|支线收集泥灰", "6c2e2e-000000", 1, zxmcx, zxmcy)
If zxmcx > 0 and zxmcy > 0 Then
Delay 500
Call Plugin.Bkgnd.LeftClick(qq, zxmcx-3, zxmcy+5-22)
Delay 500
Rem 木材任务
IfColor 195,432,"0",0 Then
Call Plugin.Bkgnd.LeftClick(qq, 259-3,549-22)
Delay 1000
Else
Delay 500
Goto 木材任务
End If
Goto 木材
End If
Call 打开列表任务
dm_ret = dm.FindStr(16 , 131, 229, 546,"收集木材|收集石料|收集泥灰", "000000-000000",1, m, c)
If m > 0 and c > 0 Then
Call 关掉垃圾
Call 识别等级
End If
Rem 报警
Call Plugin.Media.Beep(523, 200)
Call Plugin.Msg.Tips("任务完成!")
Goto 报警
End Sub
//--------------
Sub 初始化
PutAttachment "c:\test_game\map","*.bmp*"
PutAttachment "c:\test_game","dm.dll"
PutAttachment "c:\test_game","*.txt"
set ws=createobject("Wscript.Shell")
ws.run "regsvr32 c:\test_game\dm.dll /s"
set ws=nothing
Set dm = CreateObject("dm.dmsoft")
ver = dm.Ver()
If len(ver) = 0 Then
MessageBox "创建对象失败,检查系统是否禁用了vbs脚本权限"
EndScript
End If
base_path = dm.GetBasePath()
dm_ret = dm.SetPath(base_path)
dm_ret = dm.SetDict(0, "收集建材.txt")
End Sub
//--------------
Sub 兔子
Rem 兔子
Call 刷兔子
Goto 兔子
End Sub
Sub 木桩
Rem 木桩
Call 刷木桩
Goto 木桩
End Sub
Sub 鼠标单击
Rem 单击
RightClick 1
Goto 单击
End Sub
Sub 刷兔子
Call 坐标一
Call 坐标二
Call 坐标三
Call 坐标四