KeyDown "Alt", 1 Delay 49 KeyPress "4", 1 Delay 51 KeyUp "Alt", 1 talt4=now Delay 100 End If Delay 100 If DateDiff("s", talt5, now) >= salt5 Then KeyDown "Alt", 1 Delay 49 KeyPress "5", 1 Delay 51 KeyUp "Alt", 1 talt5=now Delay 100 End If Delay 100 Rem 辨别 Call 延时() If DateDiff("s", tmax, now) >= maxtime Then //↑杀怪限时 tmax=now If bossk <> 1 Then //↑杀怪限时不能包括BOSS特殊情况 Goto 下一个 End If End If //↓测蓝色 bcolor = GetPixelColor(Lx + 278, Ty + 62) Call Plugin.Color.ColorToRGB(bcolor, R, G, B) //↑红色(R)、绿色(G)、蓝色(B) Call Plugin.Color.ColorToHSL(bcolor, H, S, L) //↑色调(H)、饱和度(S)、亮度(L) If B > 210 and S > 180 and L > 90 Then //↑测蓝色,如测到,则说明正在攻击自已 Goto 下一个 End If Delay 50 If Rx>1000 then //↓测攻击的"击" XY=Plugin.Color.FindShape(Lx + 260, Ty + 90,Lx + 650, Ty + 230,"1|0|0,-5|1|0,-4|1|0,-3|1|0,-2|1|0,-1|1|0,0|1|1,1|1|0,2|1|0,3|1|0,4|1|0,5|1|0,-5|2|0,-4|2|1,-3|2|1,-2|2|1,-1|2|1,0|2|1,1|2|1,2|2|1,3|2|1,4|2|1,5|2|0,-5|3|0,-4|3|0,-3|3|0,-2|3|0,-1|3|0,0|3|1,1|3|0,2|3|0,3|3|0,4|3|0,5|3|0,-6|4|0,-5|4|0,-4|4|0,-3|4|0,-2|4|0,-1|4|0,0|4|1,1|4|0,2|4|0,3|4|0,4|4|0,5|4|0,6|4|0,-6|5|0,-5|5|1,-4|5|1,-3|5|1,-2|5|1,-1|5|1,0|5|1,1|5|1,2|5|1,3|5|1,4|5|1,5|5|1,6|5|0,-6|6|0,-5|6|0,-4|6|0,-3|6|0,-2|6|0,-1|6|0,0|6|1,1|6|0,2|6|0,3|6|0,4|6|0,5|6|0,6|6|0,-5|7|0,-4|7|1,-3|7|0,-2|7|0,-1|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1,-3|8|0,-2|8|0,-1|8|0,0|8|1,1|8|0,2|8|0,3|8|0,4|8|1,5|8|0,-5|9|0,-4|9|1,-3|9|0,-2|9|0,-1|9|0,0|9|1,1|9|0,2|9|0,3|9|0,4|9|1,5|9|0,-5|10|0,-4|10|1,-3|10|1,-2|10|1,-1|10|1,0|10|1,1|10|1,2|10|1,3|10|1,4|10|1,5|10|0,-5|11|0,-4|11|0,-3|11|0,-2|11|0,-1|11|0,0|11|0,1|11|0,2|11|0,3|11|0,4|11|0,5|11|0",0.7) ZB = InStr(XY,"|") X = Clng(Left(XY, ZB - 1)): Y = Clng(Right(XY, Len(XY) - ZB)) If X > 0 and Y > 0 Then Goto 下一个 End If End If Delay 50 If killms = 1 Then //↑抢怪/引怪(只打红) //↓测红色(怪血条左上方,是否已由绿色转变为红色) rcolor = GetPixelColor(Lx + 279, Ty + 34) Call Plugin.Color.ColorToRGB(rcolor, R, G, B) //↑红色(R)、绿色(G)、蓝色(B) Call Plugin.Color.ColorToHSL(rcolor, H, S, L) //↑色调(H)、饱和度(S)、亮度(L) If R > 120 and G<15 and B < 10 and S > 210 Then Goto 下一个 End If End If //↓测黑色 hcolor = GetPixelColor(Lx + 278, Ty + 54) Call Plugin.Color.ColorToRGB(hcolor, R, G, B) //↑红色(R)、绿色(G)、蓝色(B) Call Plugin.Color.ColorToHSL(hcolor, H, S, L) //↑色调(H)、饱和度(S)、亮度(L) If R < 66 and S < 40 Then Goto 下一个 Else If R > 210 and B < 10 and H < 10 and S > 230 Then wrongn = 0 //↑记录测怪血条左端红色点失误次数 Goto 怪未死 Else wrongn = wrongn + 1 If wrongn >= 2 Then //↑允许测色连续失误次数为1次/怪 Goto 下一个 End If Goto 怪未死 End If End If If bossmode = 2 Then If bossk = 1 Then tboss = now pkboss = 2 //↑限定是出现过BOSS的标记 End If If DateDiff("s", tboss, now) >= 16 and pkboss = 1 Then pkboss = 0