Delay 500
MoveTo 60+cx,545+cy
Delay 96
LeftClick 1
Delay 128
Gosub 检查数值
Gosub 检查背包空格
While ObjN(2)>3 and ObjN(1)>0 and isPacFull=0
Delay 5000
Gosub 取消PK
Gosub 检查数值
Gosub 检查背包空格
EndWhile
KeyPress 37,1
Delay 96
KeyPress 39,1
Delay 96
Gosub 关闭窗口
Gosub 打开购物窗口
Gosub 卖裤子
If ObjN(1)=0
Gosub 买剪刀
EndIf
Gosub 关闭窗口
EndWhile
Return
Sub 走到小贩旁边
tx=-1:ty=-1
While tx<0 and ty<0
Gosub 取消PK
Gosub 打开宁海城地图
MoveTo cx+396,cy+469
Delay 96
LeftClick 1
Delay 128
KeyPress asc(keys(6)),1
KeyPress asc("M"),1
t=Timer
While ((Timer-t+86400) mod 86400)<15
Delay 500
EndWhile
KeyDown 39,1
Delay 500
KeyUp 39,1
KeyPress 123,1
VBSCall FindPic(242+cx,175+cy,cx+820,cy+670,"Attachment:\NPC_货.bmp",0.8,tx,ty)
EndWhile
Return
Sub 打开购物窗口
KeyPress 123,1
Delay 1000
tx=-1:ty=-1
While tx<0 and ty<0
While tx<0 and ty<0
Gosub 取消PK
VBSCall FindPic(242+cx,175+cy,cx+820,cy+670,"Attachment:\NPC_货.bmp",0.8,tx,ty)
If tx<0 and ty<0
Gosub 走到小贩旁边
EndIf
EndWhile
MoveTo tx+10,ty+132
Delay 96
LeftClick 1
Delay 2000
VBSCall FindPic(107+cx,141+cy,cx+640,cy+168,"Attachment:\选项_购买.bmp",0.8,tx,ty)
EndWhile
MoveTo tx+36,ty+115
Delay 96
LeftClick 1
Delay 3000
Return
Sub 买剪刀
Gosub 取消PK
tx=-1:ty=-1
While tx<0 and ty<0
VBSCall FindPic(10+cx,200+cy,cx+660,cy+450,"Attachment:\物品_剪刀.bmp",0.8,tx,ty)
EndWhile
MoveTo tx+10,ty+10
Delay 96
RightClick 1
Delay 1000
Return
Sub 买弓箭
Gosub 取消PK
Gosub 检查数值
If ObjN(0)<nGongJian
Gosub 打开购物窗口
tx=-1:ty=-1
While tx<0 and ty<0
VBSCall FindPic(10+cx,200+cy,cx+660,cy+450,"Attachment:\物品_弓箭.bmp",0.8,tx,ty)
EndWhile
MoveTo tx+10,ty+10
Delay 96
i=nGongJian-ObjN(0)
For i
RightClick 1
Delay 2000
EndFor
EndIf
Return