zdxl(78,0)=X3+431:zdxl(78,1)=Y3+547:zdxl(78,2)="大观楼一层"
zdxl(79,0)=X3+660:zdxl(79,1)=Y3+530:zdxl(79,2)="大观园北"
//------------数组--------------
dim rw(13,3)
rw(0,0)=X3+590:rw(0,1)=Y3+522:rw(0,2)=1
rw(1,0)=X3+345:rw(1,1)=Y3+426:rw(1,2)=2
rw(2,0)=X3+538:rw(2,1)=Y3+359:rw(2,2)=3
rw(3,0)=X3+448:rw(3,1)=Y3+429:rw(3,2)=4
rw(4,0)=X3+747:rw(4,1)=Y3+446:rw(4,2)=5
rw(5,0)=X3+743:rw(5,1)=Y3+491:rw(5,2)=6
rw(6,0)=X3+622:rw(6,1)=Y3+410:rw(6,2)=7
rw(7,0)=X3+433:rw(7,1)=Y3+373:rw(7,2)=8
rw(8,0)=X3+735:rw(8,1)=Y3+518:rw(8,2)=9
rw(9,0)=X3+436:rw(9,1)=Y3+442:rw(9,2)=10
rw(10,0)=X3+466:rw(10,1)=Y3+594:rw(10,2)=11
rw(11,0)=X3+518:rw(11,1)=Y3+488:rw(11,2)=12
rw(12,0)=X3+723:rw(12,1)=Y3+463:rw(12,2)=13
//====================定义数组结束==============================
//★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
//★★★★★★★★★★★★★★★游戏代码主干★★★★★★★★★★★★★★★
Gosub 角色是否移动
If sfdl=1
    Gosub 登录游戏
    Gosub 选择角色
EndIf 
Gosub 村长任务汇总
//★★★★★★★★★★★★★★★游戏代码主干结束★★★★★★★★★★★★★★★
//★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
//====================用户自定义变量结束==============================
//====================获得窗口句柄及四角、大小==============================
Sub 获得窗口句柄
    MessageBox “现在请确定鼠标指针所在位置处于游戏窗口中。“ & vbcrlf &  ”确定后再按下回车键,切不可用鼠标点击确定。”
    //获取鼠标指向的窗口句柄
    Plugin yxck=Window.MousePoint()
    //定义一个数组,存放四个角的坐标
    Dim XY(4)
    //获得窗口四个角的坐标
    Plugin WRect=Window.GetWindowRect(yxck)
    i=1
    While i<=4
        WL=Len(WRect)
        LL=InStr(WRect,"|")
        If LL<>0
            XY(i)=left(WRect,LL-1)
            WRect=right(WRect,WL-LL)
        Else 
            XY(i)=WRect
        EndIf 
        i=i+1
    EndWhile 
    //MessageBox "窗口左上角坐标为:" & XY(1) & "," & XY(2) & vbcrlf & "窗口右下角坐标为:" & XY(3) & "," & XY(4)
    X1=XY(1)
    Y1=XY(2)
    X2=XY(3)
    Y2=XY(4)
    //----
    X=85
    Y=160
    X3=X1-85
    Y3=Y1-160
    //MessageBox “如果需要,可以最小化游戏窗口后再关闭本 ” & vbcrlf & “对话框。挂机仍将正常进行”
Return 获得窗口句柄
//====================登录游戏==============================
Sub 登录游戏
    MoveTo 1,1
    Rem 登录游戏
    i=0
    While i<5
        Delay 1000
        Gosub 清空屏幕对话框
        VBSCall FindPic(X1,Y1,X2,Y2,"Attachment:\起始定位图片.bmp",0.9,intX,intY)
        If intX>0 and intY>0
            MoveTo intX-X1+463,intY-Y1+471
            LeftClick 1
            Delay 50
            KeyDown 17,1
            KeyPress 65,1
            KeyUp 17,1
            Delay 50
            KeyPress 46,1
            Delay 50
            SayString admin
            Delay 50
            MoveTo intX-X1+463,intY-Y1+491
            LeftClick 1
            Delay 50
            KeyDown 17,1
            KeyPress 65,1
            KeyUp 17,1
            Delay 50
            KeyPress 46,1
            Delay 50
            SayString password
            Delay 50
            KeyPress 13,1
        EndIf 
        Delay 1500
        VBSCall FindPic(X1,Y1,X2,Y2,"Attachment:\与服务器连接关闭.bmp",0.9,intX,intY)
        If intX>0 and intY>0
            MoveTo intX+50,intY+61