ElseIf yxjz5 = 6 Then
Call 军机处
ElseIf yxjz5 = 7 Then
Call 兵营
ElseIf yxjz5 = 8 Then
Call 粮仓
ElseIf yxjz5 = 9 Then
Call 铸币厂
ElseIf yxjz5 = 10 Then
Call 驿站
Else
End If
Delay 1200

//建造队列6
If yxjz6 = 1 then
Call 民居
ElseIf yxjz6 = 2 Then
Call 校场
ElseIf yxjz6 = 3 Then
Call 商店
ElseIf yxjz6 = 4 Then
Call 银库
ElseIf yxjz6 = 5 Then
Call 账房
ElseIf yxjz6 = 6 Then
Call 军机处
ElseIf yxjz6 = 7 Then
Call 兵营
ElseIf yxjz6 = 8 Then
Call 粮仓
ElseIf yxjz6 = 9 Then
Call 铸币厂
ElseIf yxjz6 = 10 Then
Call 驿站
Else
End If
Delay 1200

Call 主城
Delay 1000

Call Plugin.Bkgnd.KeyPress(Hwnd, 13)


//时间等待
 Rem wait
 Delay 240000
 Next
 
 //征收脚本
Sub 征收
    If sfzs = 1 Then
    Call Plugin.Bkgnd.LeftClick(Hwnd, 65, 145)
    Delay 3000
    Call Plugin.Bkgnd.LeftClick(Hwnd, 505, 245)
    Delay 1000
    Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
    Delay 800
    //调用事件
    Call 事件
    Delay 1000
    ElseIf sfzs = 0 Then
    Delay 1000
    Else
    End If
    Call Plugin.Bkgnd.LeftClick(Hwnd, 815, 110)
End Sub 

//判断是否有事件
Sub 事件
    If zssj = 1 Then
        Call Plugin.Bkgnd.LeftClick(Hwnd, 300, 345)
        Delay 1000
        Call Plugin.Bkgnd.LeftClick(Hwnd, 315, 400)
        Delay 1000
    ElseIf zssj = 2 Then
        Call Plugin.Bkgnd.LeftClick(Hwnd, 300, 365)
        Delay 1000
        Call Plugin.Bkgnd.LeftClick(Hwnd, 315, 400)
        Delay 1000
    Else 
    End If
    End Sub

 
 
 Sub 武将训练1
 Call Plugin.Bkgnd.LeftClick(Hwnd, 440, 390)
 Delay 600
 Call Plugin.Bkgnd.LeftClick(Hwnd, 565, 335)
    Delay 3000
    If xl1 = 1 then
    Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 220)
        Delay 1200
        Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
        Delay 500
    ElseIf xl1 = 2 Then
    Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 240)
        Delay 1200