End If Exit Sub End If End Sub Sub 多选择战斗() s = 10 Rem 继续 If Form1.ComboBox2.ListIndex = 0 Then Rem 等待_开始战斗 dm_ret = dm.FindStr(0,0,w,h,pass,"7eff00-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 20, intY - 65 Delay 150 dm.LeftClick End If Delay 10 dm_ret = dm.FindStr(0,0,w,h,"开始战斗","ffd300-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 20, intY + 8 Delay 150 dm.LeftClick Else Delay 500 Goto 等待_开始战斗 End If '战斗等待 Rem 战斗等待 dm_ret = dm.FindStr(0,0,w,h,"确定","ffd300-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 5, intY + 5 Delay 150 dm.LeftClick Else Delay 500 dm_ret = dm.FindPic(0,0,w,h,"宝箱开.bmp|宝箱关.bmp","000000",0.9,0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX, intY Delay 150 dm.LeftClick End If Goto 战斗等待 End If ElseIf Form1.ComboBox2.ListIndex = 1 Then Rem 等待_开始战斗0 dm_ret = dm.FindStr(0,0,w,h,pass,"7eff00-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 20, intY - 65 Delay 100 dm.LeftClick End If Delay 1000 dm_ret = dm.FindStr(0,0,w,h,"免费机会","fff114-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then Delay 10 p1 = intX : p2 = intY s = dm.Ocr(p1, p2, p1 + 120, p2 + 15, "30ff00-000000", 1.0) s = CLng(s) If s = 0 Then Exit Sub Else dm_ret = dm.FindStr(0,0,w,h,"开始战斗","ffd300-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 20, intY + 8 Delay 150 dm.LeftClick End If '战斗与战斗结束 Delay 10 '战斗等待 Rem 战斗等待0 dm_ret = dm.FindStr(0,0,w,h,"确定","ffd300-000000",1.0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX + 5, intY + 5 Delay 150 dm.LeftClick Else Delay 500 dm_ret = dm.FindPic(0,0,w,h,"宝箱开.bmp|宝箱关.bmp","000000",0.9,0,intX,intY) If intX >= 0 and intY >= 0 Then dm.MoveTo intX, intY Delay 150 dm.LeftClick End If Goto 战斗等待0 End If End If Else Delay 1500 Goto 等待_开始战斗0 End If End If Goto 继续 End Sub If Form1.CheckBox1.Value Then Pass = "黄龙军" Call 打开演义目标()