Case "9"
        Call Plugin.Bkgnd.LeftClick(Hwnd, 515, 345)
    Case "10"
        Call Plugin.Bkgnd.LeftClick(Hwnd, 375, 435)
    Case "11"
        Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 435)
    Case "12"
        Call Plugin.Bkgnd.LeftClick(Hwnd, 515, 435)
    Case Else
        //否则
    End Select
    Delay 1000
    //开始培养
    i=0
    While i < pycount
        //点培养
        Call Plugin.Bkgnd.LeftClick(Hwnd,753,370) 
        Delay 500
        //洗牌
        Call Plugin.Bkgnd.LeftClick(Hwnd,755,416)
        Delay 500
        //选牌
        Call Plugin.Bkgnd.LeftClick(Hwnd,878,248)
        Delay 500
        //没有属性确认
        Call Plugin.Bkgnd.LeftClick(Hwnd,646,386)
        Delay 500
        //属性确定
        Call Plugin.Bkgnd.LeftClick(Hwnd,641,398)
        Delay 500
        //确认
        Call Plugin.Bkgnd.LeftClick(Hwnd,639,384)
        Delay 1000
        //加按一下回车键,防止没有按到确认按键
        Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
        Delay 500
        i=i+1
    Wend
       
    pycount=0
End Sub


Sub 商队刷新()
    //进入跑商界面
    Call Plugin.Bkgnd.LeftClick(Hwnd,942,110)
    Call 商队A()
    Call 商队B()
    Delay 1000
    //判断在哪交易,然后继续跑商
    color_a = Plugin.Bkgnd.GetPixelColor(Hwnd,shanga_x+1,shanga_y+13)
    If color_a = "13ADFD" Then 
        Call 商队交易(shanga_x+1,shanga_y+13,Buy_a)
        Delay 200
        Call Plugin.Bkgnd.LeftClick(Hwnd,shangb_x,shangb_y)
        Delay 500
        Call Plugin.Bkgnd.LeftClick(Hwnd, 503, 410)
        Delay 500
    Else 
        color_b = Plugin.Bkgnd.GetPixelColor(Hwnd, shangb_x + 1, shangb_y + 13)
        If color_b = "13ADFD" Then 
            Call 商队交易(shangb_x + 1, shangb_y + 13,Buy_b)
            Delay 200
            Call Plugin.Bkgnd.LeftClick(Hwnd,shanga_x,shanga_y)
            Delay 500
            Call Plugin.Bkgnd.LeftClick(Hwnd, 503, 410)
            Delay 500
        End If
    End if
    Delay 1000
End Sub
Sub 刷赏金()
    Delay 1000
	h = Hour(Time)
m = Minute(time)
    If h = 15 and m >30 Then 
    	
        Call 进入城池()
        Call 进入探险地图()
        Call Plugin.Bkgnd.LeftClick(Hwnd, 414, 335)
        Delay 1000
        //打旦旦
        
        Call Plugin.Bkgnd.LeftClick(Hwnd, 844, 335)
      
        

        Delay 2000
        Call Plugin.Bkgnd.LeftClick(Hwnd, 817, 354)
        Delay 1000
        Call Plugin.Bkgnd.LeftClick(Hwnd, 696, 301)
        Delay 500

        Call Plugin.Bkgnd.LeftClick(Hwnd, 636, 398)

        Delay 1000
    End If
    shangjin=0
End Sub