//战斗时间大于最大战斗时间强制刷新,避免卡在无尽的战斗中
KeyPress 44,1
Gosub 刷新部分
EndIf
Gosub 检查是否战斗
//Gosub 防卡刷新60
EndWhile
//战斗结
//Gosub 防卡刷新重置
Gosub 检查战斗后宠物生命值
Gosub 检查战斗后角色生命法力值
AfterBattleRestoreHp=0
While Bhplow=1 and AfterBattleRestoreHp<10
//战斗后使用便价药恢复HP 键7
If MouseMode=1
MoveTo 750,635
LeftDoubleClick 1
Else
KeyPress 55,1
EndIf
Delay 1500
Gosub 检查战斗后角色生命法力值
AfterBattleRestoreHp=AfterBattleRestoreHp+1
EndWhile
AfterBattleRestoreMp=0
While Bmplow=1 and AfterBattleRestoreMp<10
//战斗后使用便价药恢复MP 键8
If MouseMode=1
MoveTo 782,631
LeftDoubleClick 1
Else
KeyPress 56,1
EndIf
Delay 1500
Gosub 检查战斗后角色生命法力值
AfterBattleRestoreMp=AfterBattleRestoreMp+1
EndWhile
Gosub BUG死亡复活
Gosub 宠物忠诚回复
Goto 打怪区
EndIf
//!!
If debugon=1
MessageBox place
EndIf
EndScript
//================================================
//================================================
//================================================
//================================================
//===================EndScript====================
//================================================
//================================================
//================================================
//================================================
//以下都是Sub
Sub 调整游戏登录的窗口位置
//----∨∨∨∨∨∨----
//调整窗口位置
Dim mlxtwinrect, strtemp, mlxtcolorx, mlxtcolory, chxydshxhw, MvWinR
Plugin mlxthw=Window.Foreground()
Plugin strtemp=Window.GetWindowRect(mlxthw)
mlxtwinrect=Split(strtemp,"|")
//得到新窗口位置
Delay 500
mlxtcolorx = 0
mlxtcolory = 0
MvWinR = 0
//Rem 重新移动刷新后的新窗口
FiCoWait = 0
While Abs(Abs(Int((CInt(mlxtwinrect(2))+CInt(mlxtwinrect(0)))/2)-mlxtcolorx)-21)>1 And FiCoWait<30
VBSCall FindColorEx(mlxtwinrect(0),mlxtwinrect(1),mlxtwinrect(2),mlxtwinrect(3),"8CC7F7",0,0.8,mlxtcolorx,mlxtcolory)
Delay 2000
FiCoWait = FiCoWait+1
EndWhile
If Abs(Abs(Int((CInt(mlxtwinrect(2))+CInt(mlxtwinrect(0)))/2)-mlxtcolorx)-21)<=1
//颜色出现,Loading完毕
MvWinR = 1
Else
MvWinR = 0
EndIf
Delay 500
MoveTo mlxtcolorx,mlxtcolory
Delay 500
chxydshxhw=0
While (mlxtcolorx<>525 or mlxtcolory<>147) And MvWinR>0 And chxydshxhw<10
mlxthwsubx=525-mlxtcolorx
mlxthwsuby=147-mlxtcolory
MoveTo mlxtwinrect(0)+50,mlxtwinrect(1)+10
Delay 200
LeftDown 1
Delay 200
//--先移一下
MoveTo 100,30
Delay 100
//--
If mlxtcolorx>0
MoveTo mlxtwinrect(0)+50+mlxthwsubx,mlxtwinrect(1)+10+mlxthwsuby
EndIf
Delay 100