MoveTo intA, intB If shape = 1053591638 Then intA = intA + 1 Delay 5 End If shape = GetCursorShape(0) Loop //将鼠标向左移动到鱼漂右方恰好变形状的位置 Do While shape <> 1053591638 MoveTo intA, intB If shape <> 1053591638 Then intA = intA - 1 j = j + 1 If j > 30 Then //15次未找到则认为出错,提出循环 Exit Do End If Delay 50 End If xx2=intA shape = GetCursorShape(0) Loop intA = (xx2 - xx1) / 2 + xx1 //将鼠标向上移动到鱼漂最上方恰好不变形状的位置 Do While shape = 1053591638 MoveTo intA, intB If shape = 1053591638 Then intB = intB - 1 Delay 5 End If shape = GetCursorShape(0) Loop //将鼠标向下移动到鱼漂上方恰好变形状的位置 Do While shape <> 1053591638 MoveTo intA, intB If shape <> 1053591638 Then intB = intB + 1 i = i + 1 If i > 15 Then //15次未找到位置则认为出错,退出循环 Exit Do End If Delay 50 End If shape = GetCursorShape(0) Loop //根据鱼漂形状改变判断鱼漂是否下沉 shape = GetCursorShape(0) Do While shape = 1053591638 shape = GetCursorShape(0) Delay 100 Loop //向左下方移动鼠标点击右键拾取鱼儿 Delay 500 MoveTo intA - 20, intB + 20 UnlockMouse RightClick 1 数量 = 数量 + 1 Goto fish End Sub Rem GM警报 //获取指定点颜色,GM警报 GetColor = GetPixelColor(758 + rect(0), 90 + rect(1)) for 60 GetColor1 = GetPixelColor(758 + rect(0), 90 + rect(1)) If GetColor1 <> GetColor Then //下面这句是音阶(标准(M))音符(DO(1))节拍(1/16拍) Call Plugin.Media.Beep(523, 200) //下面这句是音阶(标准(M))音符(RE(2))节拍(1/16拍) Call Plugin.Media.Beep(578, 200) //下面这句是音阶(标准(M))音符(MI(3))节拍(1/16拍) Call Plugin.Media.Beep(659, 200) //下面这句是音阶(标准(M))音符(FA(4))节拍(1/16拍) Call Plugin.Media.Beep(698, 200) //下面这句是音阶(标准(M))音符(SO(5))节拍(1/16拍) Call Plugin.Media.Beep(784, 200) //下面这句是音阶(标准(M))音符(LA(6))节拍(1/16拍) Call Plugin.Media.Beep(880, 200) //下面这句是音阶(标准(M))音符(SI(7))节拍(1/16拍) Call Plugin.Media.Beep(988, 200) StopThread 开始线程 StopThread 计时线程 Call Plugin.Bkgnd.KeyPress(Hwnd,32) EndScript End If Delay 1000 Next Goto GM警报