Delay 70 VBSCall ReadMemory(bity,2,dqy) //msgbox dqx&"|"&dqy //检查是否还处于挂机范围 Delay 70 If abs(yd_x-dqx)>hit_xy/2 or abs(yd_y-dqy)>hit_xy/2 Delay 70 Gosub 回挂机范围 EndIf Goto s EndIf Else VBSCall FindColorEx(0,0,1280,600,glast,0,0.9,x,y) //模糊找色打怪 If x>0 and y>0 MoveTo x+20,y+50 Delay 50 RightClick 1 qg=now IfColor 538,41,ghong,2 Else MoveTo x+20,y+85 Delay 50 RightClick 1 EndIf IfColor 538,41,ghong,2 Rem check2 KeyPress jn,1 IfColor 538,41,ghong,2 Delay ys If datediff("s",qg,now)>qgtime Goto s EndIf Goto check2 Else Gosub 拾取方式 //拾取方式 两种 Rem checkxy VBSCall ReadMemory(bitx,2,dqx) Delay 70 VBSCall ReadMemory(bity,2,dqy) Delay 70 //msgbox dqx&"|"&dqy If abs(yd_x-dqx)>hit_xy/2 or abs(yd_y-dqy)>hit_xy/2 Delay 70 Gosub 回挂机范围 EndIf Goto s EndIf Else Delay 700 Goto s EndIf EndIf EndIf EndIf Goto s Sub 拾取方式 //分别为全部拾取和只拾取金币 If pick=1 For picknum KeyPress 32,1 Delay 350 EndFor EndIf If pick=2 For picknum VBSCall FindColorEx(0,0,1024,768,"0fdcfd",1,0.9,pickx,picky) If pickx>0 and picky>0 MoveTo pickx,picky Delay 100 LeftClick 1 EndIf Rem 是否拾取与游戏兼容性 //通过游戏坐标的变化判断是否已经拾取上 VBSCall ReadMemory(bitx,2,pick_x) Delay 70 VBSCall ReadMemory(bity,2,pick_y) Delay 100 VBSCall ReadMemory(bitx,2,pick_x1) Delay 70 VBSCall ReadMemory(bity,2,pick_y1) Delay 70 If pick_x=pick_x1 and pick_y=pick_y1 Goto 继续 Else Goto 是否拾取与游戏兼容性 EndIf Rem 继续 EndFor EndIf Return 拾取方式 //msgbox yd_x&"|"&yd_y Sub 回挂机范围 //回挂机范围以下用到坐标 通过收集可得到 主要是 移动的方向和坐标的增减 Rem pand VBSCall ReadMemory(bitx,2,dqx) Delay 70 VBSCall ReadMemory(bity,2,dqy) Delay 70