Plugin a1=File.SelectDirectory()
VBSCall un=InputBox("输入你的账号")
VBSCall pw=InputBox("输入你的密码")
VBSCall dm=InputBox("请输入你的新区代码:" &"“数字”" & vbtab & "0:浔阳楼 1:紫帽山 2:天塔湖 3:醉白池 4:天桥沟")
MessageBox "OK!点确定后不要进行任何操作!我们开始!"
If a1=0
a1="G:\梦幻西游\my.exe"
Else
a1=a1 & "\my.exe"
EndIf
Rem 9
KeyDown 91,1
Delay 100
KeyPress 82,1
Delay 100
KeyUp 91,1
SayString a1
Delay 100
KeyPress 13,1
Rem 5
Plugin A=Window.Find("WSGAME","梦幻西游ONLINE")
If A=0
Delay 100
Goto 5
EndIf
Plugin Window.Active(A)
Plugin s = Window.GetClientRect(A)
MyArray = Split(s, "|", -1, 1)
x1=MyArray(0)
y1=MyArray(1)
x5=781-215+x1
y5=322-130+y1
x6=790-215+x1
y6=537-130+y1
MoveTo x5,y5
LeftClick 1
Delay 200
MoveTo x6,y6
LeftClick 1
Delay 200
If dm="1"
xq=431-236+x1
yq=311-46+y1
xf=368-236+x1
yf=412-46+y1
ElseIf dm="2"
xq=431-236+273+x1
yq=311-46-104+y1
xf=368-236+340+x1
yf=412-46-26+y1
ElseIf dm="3"
xq=431-236+135+x1
yq=311-46-80+y1
xf=368-236+340+x1
yf=412-46-26+y1
ElseIf dm="4"
xq=431-236+204+x1
yq=311-46-104+y1
xf=368-236+136+x1
yf=412-46+y1
Else
xq=431-236+x1
yq=311-46-24+y1
xf=368-236+273+x1
yf=412-46+y1
EndIf
MoveTo xq,yq
LeftClick 1
Delay 100
MoveTo xf,yf
LeftClick 1
Delay 100
IfColor 277+x1,290+y1,20bce0,2
Goto 2
Else
MoveTo 938-309+x1,95-104+y1
LeftClick 1
Delay 300
MoveTo 532-309+x1,358-104+y1
LeftClick 1
Goto 9
EndIf
If a<>0
Rem 2
MoveTo xf,yf
LeftClick 1
Delay 40
IfColor 277+x1,290+y1,20bce0,2
MoveTo x1+356,y1+307
LeftClick 1
Delay 30
LeftClick 1
Delay 20
Goto 2
Else
Goto 4
EndIf
Else
EndIf
Rem 4
Delay 80
IfColor 277+x1,290+y1,20bce0,2
Goto 2
EndIf
SayString un
Delay 100
KeyPress 9,1
SayString pw
KeyPress 13,1