Delay 1000
                            Gosub 等按钮
                        EndIf 
                    EndIf 
                EndIf 
            EndIf 
        EndIf 
    EndWhile 
Return 查找码头导航员
Sub 查找交易所老板
    //Delay 1000
    NPC_Find = 0
    KeyDown 27,1
    Delay 600
    While NPC_Find = 0
        KeyPress 9,1
        Delay 2000
        PosX = 634
        PosY = 328
        Gosub 坐标转换
        IfColor PosX,PosY,FFFFFF,2
            PosX = 653
            PosY = 328
            Gosub 坐标转换
            IfColor PosX,PosY,FFFFFF,2
                PosX = 669
                PosY = 328
                Gosub 坐标转换
                IfColor PosX,PosY,FFFFFF,2
                    PosX = 679
                    PosY = 328
                    Gosub 坐标转换
                    IfColor PosX,PosY,FFFFFF,2
                        PosX = 699
                        PosY = 328
                        Gosub 坐标转换
                        IfColor PosX,PosY,FFFFFF,2
                            NPC_Find = 1
                            KeyUp 27,1
                            Delay 600
                            KeyPress 13,1
                            Delay 1000
                            Gosub 等按钮
                        EndIf 
                    EndIf 
                EndIf 
            EndIf 
        EndIf 
    EndWhile 
Return 查找交易所老板
Sub 查找银行职员
    //Delay 1000
    NPC_Find = 0
    KeyDown 27,1
    Delay 600
    While NPC_Find = 0
        KeyPress 9,1
        Delay 2000
        PosX = 630
        PosY = 328
        Gosub 坐标转换
        IfColor PosX,PosY,FFFFFF,2
            PosX = 654
            PosY = 328
            Gosub 坐标转换
            IfColor PosX,PosY,FFFFFF,2
                PosX = 670
                PosY = 328
                Gosub 坐标转换
                IfColor PosX,PosY,FFFFFF,2
                    PosX = 683
                    PosY = 328
                    Gosub 坐标转换
                    IfColor PosX,PosY,FFFFFF,2
                        NPC_Find = 1
                        KeyUp 27,1
                        Delay 600
                        KeyPress 13,1
                        Delay 3000
                        //Gosub 等按钮
                        KeyPress 13,1
                        Delay 3000
                    EndIf 
                EndIf 
            EndIf 
        EndIf 
    EndWhile 
Return 查找银行职员
//======================================================================================
//坐标转换(参数PosX,PosY)
Sub 坐标转换
    Plugin winRect=Window.GetClientRect(hwn)
    winPoint = Split(winRect, "|", -1, 1)
    AbsX = CInt(winPoint(0)) + PosX
    AbsY = CInt(winPoint(1)) + PosY
    PosX = AbsX
    PosY = AbsY
Return 坐标转换
//商品坐标转换
Sub 商品坐标转换