EndIf Delay 500 PetHpLow=0 //宠物有治疗操作,生命值视为足够 petdeath=petdeath+1 //防止宠物死后持续治疗! ElseIf LRCatchPet>0 And ExistPet(0)>=0 //抓宠操作-未完善,宠物逃跑时可能会抓错... //只执行一次抓宠全过程 Gosub 战斗抓宠操作 If LRCatchPetArr(2)>=1 //抓宠过程完成 LRCatchPetArr(1)=LRCatchPetArr(1)+1 ExistPet(0)=-1 Delay 700 //抓宠操作时防御 MoveTo 764,458 LeftClick 1 Delay 500 Else //操作步骤增1 LRCatchPetArr(2) = LRCatchPetArr(2)+1 EndIf ElseIf usemagic>0 and fighting=1 Gosub 战斗人物操作魔法攻击 ElseIf fighting=1 Gosub 战斗操作普通攻 EndIf EndIf If fighting=3 //宠物操作 petdeath=-1 PetIsDeathB=-1 //2次角色治疗宠物无效且宠物不能操作则视为死亡! If PetHpLow>0 //-- If MouseMode=1 MoveTo 816,636 LeftClick 1 Else KeyPress 57,1 EndIf Delay 1000 If CharacherAtFont>0 If ColorCompare(GetPixelColor(769,460),"7BBEFF",20)<=0 MoveTo 734,517 EndIf Else MoveTo 650,459 EndIf Delay 500 LeftClick 1 Delay 500 PetHpLow=0 //-1则为跳过一次检查 ElseIf PetMpLow>0 If MouseMode=1 MoveTo 853,635 LeftClick 1 Else KeyPress 48,1 EndIf Delay 1000 If CharacherAtFont>0 MoveTo 743,496 Else MoveTo 650,459 EndIf Delay 500 LeftClick 1 Delay 500 PetMpLow=0 //-1则为跳过一次检查 - 已经更改,跳过检查失效! ElseIf LRCatchPet>0 And ExistPet(0)>=0 //抓宠操作时防御 MoveTo 764,458 LeftClick 1 Delay 500 ElseIf petusemagic>0 and petdefense<=0 //宠物使用魔法的操作 Gosub 战斗操作宠物魔法攻击 ElseIf petusemagic<=0 and petdefense<=0 //宠物普通攻击 Gosub 战斗操作普通攻 ElseIf petdefense>0 and PetHpLow<=0 //宠物防御 MoveTo 764,458 LeftClick 1 Delay 500 EndIf EndIf If fighting=2 //等待 If rere>=180 KeyPress 44,1 EndIf Delay 1000 EndIf //MessageBox EnterBattleTimeMs If EnterBattleTimeMs>MaxBattleTimeMs