MoveTo 555+(usemagic-1)*33,636
LeftClick 1
EndIf
Else
If EnterBattleTimeMs<25000 and SecondMagic>0
//KeyPress 51,1
KeyPress 48+SecondMagic,1
Else
//KeyPress 49,1
KeyPress 48+usemagic,1
EndIf
EndIf
Gosub 战斗中将鼠标点击怪物上
EndIf
Return
Sub 战斗抓宠操作
If fighting>0.
If MouseMode=1
If LRCatchPetArr(2)=0
//技能
MoveTo 552+(LRCatchPetArr(3)-1)*33,636
LeftClick 1
ElseIf LRCatchPetArr(2)=1
//捕抓
MoveTo 804,360
LeftClick 1
EndIf
Else
If LRCatchPetArr(2)=0
//技能
KeyPress 48+LRCatchPetArr(3),1
ElseIf LRCatchPetArr(2)=1
//捕抓
KeyPress 71,1
EndIf
EndIf
//最后将鼠标移到宝宝上点击,操作回合记录增1
MoveTo ExistPet(1),ExistPet(2)
LeftClick 1
Delay 200
EndIf
Return
Sub 战斗中将鼠标点击怪物上
VBSCall FindColor(80,165,500,490,"0000FF",monsterx,monstery)
If monsterx>0
//09-05-29 修正怪物屏幕座标
RelMonsterPosArr=XMonsterPosArray(monsterx,monstery)
If RelMonsterPosArr(2)>=0
monsterx=RelMonsterPosArr(0)
monstery=RelMonsterPosArr(1)-85
EndIf
//
LastMonsterHpPos(0)=monsterx
LastMonsterHpPos(1)=monstery
Delay 200
MoveTo monsterx+MapMonCr(0)+25,monstery+MapMonCr(1)+45
Delay 200
LeftClick 1
Delay 200
Else
VBSCall FindColor(80,165,500,490,"0000FF",monsterx,monstery)
If monsterx>0
LastMonsterHpPos(0)=monsterx
LastMonsterHpPos(1)=monstery
Delay 200
MoveTo monsterx+MapMonCr(0)+25,monstery+MapMonCr(1)+45
Delay 200
LeftClick 1
Delay 200
Else
VBSCall FindColor(80,165,500,490,"DEDFDE",monsterx,monstery)
If monsterx>0
LastMonsterHpPos(0)=monsterx
LastMonsterHpPos(1)=monstery
Delay 200
MoveTo monsterx+MapMonCr(0)+25,monstery+MapMonCr(1)+45
Delay 200
LeftClick 1
Delay 200
Else
Delay 200
MoveTo LastMonsterHpPos(0)+25,LastMonsterHpPos(1)+37
Delay 200
LeftClick 1
Delay 200
KeyPress 65,1
EndIf
EndIf
LeftClick 1
If debugon=1
MessageBox monsterx
EndIf
EndIf
Return
Sub 检查战斗中的前排生命值
If CharacherHpPositionY<=0 or FHPMiss>0
VBSCall FindColor(626,380,645,430,"DEDFDE",CharacherHpPositionX,CharacherHpPositionY)
If (ColorCompare(GetPixelColor(CharacherHpPositionX+40,CharacherHpPositionY+12),"DEDFDE",15)<=0 or ColorCompare(GetPixelColor(CharacherHpPositionX,CharacherHpPositionY),"DEDFDE",15)<=0)
FHPMiss=1
//MsgBox "Ron"