//相对11而言,利用SayString简化输入
count=5
Yanshi=10
counttime=1
Randomize
SaveMousePos
Gosub 窗口最大化
RestoreMousePos
Gosub 超时重新登陆
Gosub 新手帮助框处理
deltaX=Int(Rnd*300-150)
deltaY=Int(Rnd*300-150)
Gosub 相对移动
Gosub 位置判断
Gosub 战门处理
counttime=2
Gosub 回到原点
Gosub 位置判断
Gosub 战门处理
RestoreMousePos
LeftClick 1
Delay Yanshi
Goto FinishScript
//下面是相关的子程序
Sub 战门处理
warcount=0
While true
Guai1=0
Guai2=0
Chong=0
Ren=0
Delay 1000
IfColor 186,216, d2d2d2, 0
Guai1=1
EndIf
IfColor 116,268, d2d2d2, 0
Guai2=1
EndIf
IfColor 481,428, d2d2d2, 0
Chong=1
EndIf
IfColor 556,428, d2d2d2, 0
Ren=1
EndIf
If Guai1=1 or Guai2=1 or Chong=1 or Ren=1
warcount=warcount+1
If warcount<100
MoveTo 740,325
LeftDoubleClick count
Delay 500
Else
//战斗时间过长,遇到了超级BOSS
//点掉自动战斗框
MoveTo 400,400
LeftDoubleClick 2
Delay 500
Rem WaitWarFlag
//等待战斗控制栏出现
While true
VBSCall FindPic(691,477,759,524,"Attachment:\001.bmp",0.9,x1,y1)
If x1>=0 and y1>=0
Goto StartRun
Else
Delay 1000
EndIf
EndWhile
Rem StartRun
While
//人逃跑
MoveTo 717,500
LeftDoubleClick count
Delay 5000
//宠防御
MoveTo 737,400
LeftDoubleClick count
Delay 5000
RGuai1=1
RGuai2=1
RChong=1
RRen=1
IfColor 186,216, d2d2d2, 1
RGuai1=0
EndIf
IfColor 116,268, d2d2d2, 1
RGuai2=0
EndIf
IfColor 481,428, d2d2d2, 1
RChong=0
EndIf
IfColor 556,428, d2d2d2, 1
RRen=0
EndIf
//逃跑成功
If RGuai1=0 and RGuai2=0 and RChong=0 and RRen=0
Goto StopWar
Else
//不成功则准备下次逃跑
Goto WaitWarFlag
EndIf
EndWhile