y10=cy/2
//计算中心点坐标
//怪物坐标,x,y
xx=x-x10
xy=y-y10
//得到坐标错值
x12=x10-xx
y12=y10-xy
//得到返回的坐标
Delay 50
Return back1
Sub zaoguai
//坐立旋转视角找怪
Delay 300
KeyPress 49,1
Delay 800
KeyDownH 38,1
Delay 500
KeyUpH 38,1
Delay 200
KeyDownH 39,1
Delay 200
Rem 不起
Delay 100
VBSCall FindColorEx(135,50,860,700,Bcolor0,1,0.8,x,y)
//区域模煳找色 0,0,1024,768为区域范围 "121212"为颜色 1为查找方式(中间向外) 0.8为模煳值 x,y为找到颜色后的坐标变量
If x>0 and y>0
If x>=485 and x<=538
If y>=358 and y<=410
Goto 不起
EndIf
EndIf
UnlockMouse
//如果找到颜色 比如找到颜色就会赋值给坐标变量 通过判断坐标变量可以知道有没有找到怪
MoveTo x,y
//把鼠标移动到该色的坐标 如果找的是怪名字或血条 可能移动不到怪身上 这时就要用鼠标偏移 如:MoveTo x+10 y+10
//延时
LeftClick 1
//左键单击进行攻击
MoveTo 0,0
Delay 100
LockMouse 1
Delay 100
IfColor 458,27,000CB2,2
KeyUpH 39,1
Delay 100
MoveTo 0,0
Delay 100
LockMouse
Delay 100
KeyDownH 40,1
Delay 2000
KeyUpH 40,1
Delay 100
ai=0
KeyPress 49,1
Delay 600
Gosub daguai
EndIf
EndIf
Goto 不起
Return zaoguai
Sub zg0
//站立打怪.当循环五十次没找到怪后转到ZAOGUAI
MoveTo 0,0
Delay 100
LockMouse 1
Delay 100
Rem zaog
ai=ai+1
Delay 100
If ai>=50
Gosub zaoguai
EndIf
VBSCall FindColorEx(135,50,860,700,Bcolor0,1,0.8,x,y)
//区域模煳找色 0,0,1024,768为区域范围 "121212"为颜色 1为查找方式(中间向外) 0.8为模煳值 x,y为找到颜色后的坐标变量
If x>0 and y>0
If x>=485 and x<=538
If y>=358 and y<=410
Delay 200
Goto zaog
EndIf
EndIf
UnlockMouse
Delay 100
Gosub back1
//如果找到颜色 比如找到颜色就会赋值给坐标变量 通过判断坐标变量可以知道有没有找到怪
MoveTo x,y
//把鼠标移动到该色的坐标 如果找的是怪名字或血条 可能移动不到怪身上 这时就要用鼠标偏移 如:MoveTo x+10 y+10
//延时
LeftClick 1
Delay 100
MoveTo 0,0
Delay 100
LockMouse 1
Delay 100
//左键单击进行攻击
IfColor 458,27,000CB2,2
Gosub daguai
Else