MoveTo L+119,M
Delay 300
LeftClick 1
Delay 500
    i=0
    While i=0
    if Price=True 
        If checkC() = True Then
        Delay 300
        MoveTo L+71,T+210
        Delay 300
        LeftClick 1
        Delay 300
        PS_Items=PS_Items+1
        Delay 300
        KeyPress "Esc", 1
        Delay 300
        Else
        Delay 300
        KeyPress "Esc", 1
        M=M+21 
        End If
    i=1
    Else 
    Go_LB
    End If    
    Wend       
End If
Next
End Function 
//去NPC马柯交任务
Function Go_MK()
M=T+242
N=2-PS_Items
If PS_Items > 1 Then
MoveTo L+668,T+209
Delay 300
LeftClick 1
Delay 300
    If OpenNPC_MK = True Then
    Delay 300
    MoveTo L+119,M
    Delay 300
    LeftClick 1
    Delay 500
            i=0
            While i=0
            if Price=True  
                If checkC() = True Then
                Delay 300
                MoveTo L+71,T+210
                Delay 300
                LeftClick 1
                PS_Items=PS_Items+1
                Delay 300
                KeyPress "Esc", 1
                Delay 300
                Else
                Delay 300
                KeyPress "Esc", 1
                End If
            i=1
            Else 
            Go_MK
            End If    
            Wend      
    End If       
Else
For j=0 to N
MoveTo L+668,T+209
Delay 300
LeftClick 1
Delay 300
    If OpenNPC_MK = True Then
    Delay 300
    MoveTo L+119,M
    Delay 300
    LeftClick 1
    Delay 500
        i=0
        While i=0
        if Price=True 
            If checkC() = True Then
            Delay 300
            MoveTo L+71,T+210
            Delay 300
            LeftClick 1
            PS_Items=PS_Items+1
            Delay 300
            KeyPress "Esc", 1
            Else
            Delay 300
            KeyPress "Esc", 1
            M=M+21
            End If
        i=1
        Else 
        Go_MK
        End If    
        Wend