time40=time41 Else If(time41-time40)<0 time40=time41 EndIf GetLastKey Mykey EndWhile EndScript Sub CatchET //扫描小地图的有效范围(能直接点击怪) VBSCall FindCenterColor(MapA(0),MapA(1),MapA(2),MapA(3),"FF",xa,ya) If xa>=0 and ya>=0 xb=(xa-PosA(0))*20+PosB(0) yb=(ya-PosA(1))*20+PosB(1) MoveTo xb yb Delay 300 LeftClick 1 Delay 300 IfColor 263 43 9aff 2 //如果有血条 //进一步判断,点中的是否为怪 //脚下有暗红色光环?通过取颜色值来判断。 VBSCall FindColorEx(xb-45,yb-30,xb+45,yb+60,"41C6",1,0.8,vx,vy) If vx>=0 and vy>=0 SelectedET=1 Else //按下ESC,取消选择。 //KeyPress 27 1 SKILL_NUM=3 Gosub SkillA SelectedET=0 EndIf Else //没血条时 //可能小地图的绿点已经不在中央位置 Gosub ComeBack SelectedET=0 EndIf Else //有效范围找不到红点 VBS time1=timer Gosub StepToET //扩大小地图查找范围 SelectedET=0 EndIf Return //技能 Sub SkillA //定时辅助技能 If SKILL_NUM=9 time1_skill=time2_skill KeyPress 57 1 Delay 1000 //打怪技能 ElseIf SKILL_NUM=3 If Busy=0 KeyPress 51 1 Delay 300 EndIf ElseIf SKILL_NUM=4 //补血技能 KeyPress 52 2 Delay 300 KeyPress 51 1 Delay 300 EndIf Return Sub CheckMyBlood //指定点为黑色(大约余血为3/5左右) IfColor 143 43 0 2 MyBlood=BLOOD_LOW Else MyBlood=BLOOD_HI EndIf Return //对整个小地图进行查找怪 Sub StepToET VBSCall FindCenterColor(670,20,798,149,"0000FF",x,y) If x>0 and y>0 If x<MapA(0) or x>MapA(2) or y>MapA(3) or y<MapA(1) x=x-PosA(0) y=y-PosA(1) If x<0 mx=-100 Else mx=100 EndIf my=mx*y/x If my>120 my=90 ElseIf my<-100 my=-90 EndIf xb=mx+PosB(0) yb=my+PosB(1) MoveTo xb yb Delay 400 LeftClick 1 Delay 400 EndIf