If Num<=5
PosY = PosY+(Num-1)*56
//VBSCall MessageBox (PosX)
//VBSCall MessageBox (PosY)
Else
PosY = PosY+(5-1)*56
EndIf
Return 商品坐标转换
//移动鼠标到指定点(以窗口为准参数PosX,PosY相对坐标)
Sub 移动鼠标
Plugin winRect=Window.GetClientRect(hwn)
winPoint = Split(winRect, "|", -1, 1)
AbsX = CInt(winPoint(0)) + PosX
AbsY = CInt(winPoint(1)) + PosY
MoveTo AbsX,AbsY
PosX = AbsX
PosY = AbsY
Delay 600
Return 移动鼠标
//等对话按钮出现
Sub 等按钮
StButton = 0
While StButton = 0
PosX = 635
PosY = 353
Gosub 坐标转换
IfColor PosX,PosY,FFFFFF,0
StButton = 1
Delay 500
Else
KeyPress 13,1
Delay 1000
EndIf
EndWhile
Return 等按钮
Sub 转向
//先定位鼠标,因为在聊天窗口是无法转向的
PosX = 399
PosY = 299
Gosub 移动鼠标
//判断是否需要复位后转向,或就以当前位置转向
//0为复位后转向1为不复位直接转向
If TurnReset = 0
RightClick 1
ElseIf TurnReset = 1
For 2
KeyPress 27,1
Delay 300
EndFor
Else
VBSCall MessageBox ("错误的转向复位参数!")
EndIf
Delay 1500
If TurnWay = "R"
KeyDown 17,1
KeyDown 39,1
Delay TurnAngle
KeyUp 17,1
KeyUp 39,1
Delay 100
ElseIf TurnWay = "L"
KeyDown 17,1
KeyDown 37,1
Delay TurnAngle
KeyUp 17,1
KeyUp 37,1
Delay 100
Else
VBSCall MessageBox ("错误转向参数!")
EndIf
Return 转向
Sub 快速入仓
If iWareHouse = 0
PosX = 354
PosY = 140
Gosub 移动鼠标
LeftClick 1
Delay 500
ElseIf iWareHouse = 1
PosX = 354
PosY = 280
Gosub 坐标转换
For 3
Gosub 最大量
PosY = PosY-70
EndFor
Else
VBSCall MessageBox ("错误的购入量参数!")
EndIf
Return 快速入仓
Sub 最大量
MaxOver = 0
While MaxOver = 0
IfColor PosX,PosY,BBBBBB,2
MoveTo PosX,PosY
Delay 600
LeftClick 1
Delay 500
Else
MaxOver = 1