Var1 "坐标值x" UserVar Var2 "坐标值y" UserVar k "精力值" Hwnd = Plugin.Window.MousePoint() Delay 1078 Rem a GetColor = Plugin.Bkgnd.GetPixelColor(Hwnd, 90+89*k/2000, 82)//精力值 If GetColor="2F84FC" Then Delay 500 Call Plugin.Bkgnd.LeftClick(Hwnd, Var1, Var2) Call 补兵 Call 钱 Else Delay 1000 MessageBox "脚本停止运行!" EndScript End If Goto a Sub 钱 GetColor = Plugin.Bkgnd.GetPixelColor(Hwnd, 615, 23) If GetColor="F7EAB4" Then Delay 2000 Else Call Plugin.Bkgnd.LeftClick(Hwnd, Var1, Var2) End If End Sub sub 补兵 s = Plugin.Bkgnd.GetPixelColor(Hwnd, 493, 235) If s="978915" Then Delay 500 Call Plugin.Bkgnd.LeftDoubleClick(Hwnd, 496, 320)//确定 Delay 500 Call Plugin.Bkgnd.KeyPress(Hwnd, 70)//征兵 delay 2000 Call Plugin.Bkgnd.LeftClick(Hwnd, 576, 323) Delay 1000 Call Plugin.Bkgnd.LeftClick(Hwnd, 579, 457) Delay 2000 Call Plugin.Bkgnd.KeyPress(Hwnd, 86)//配兵 Delay 2000 Call Plugin.Bkgnd.LeftClick(Hwnd, 647, 111) Delay 2000 Call Plugin.Bkgnd.KeyPress(Hwnd, 86) End If End Sub