按键精灵制作网页游戏《傲剑》脚本的问题!
UserVar sfkj=DropList{"科技1":"1"|"科技2":"2"|"科技3":"3"|"科技 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
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl1 = 3 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 260)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl1 = 4 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 280)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl1 = 5 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 300)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Else
End If
Delay 800
End Sub
Sub 武将训练2
Delay 1000
If xl2 = 1 then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 220)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl2 = 2 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 240)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl2 = 3 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 260)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl2 = 4 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 280)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl2 = 5 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 300)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Else
End If
Delay 800
End Sub
Sub 武将训练3
Delay 1000
If xl3 = 1 then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 220)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl3 = 2 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 240)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl3 = 3 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 260)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl3 = 4 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 280)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Delay 500
ElseIf xl3 = 5 Then
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 300)
Delay 1200
Call Plugin.Bkgnd.LeftClick(Hwnd, 730, 415)
Else
End If
Delay 800
End Sub
//武将突飞
Sub 武将突飞
Delay 1000
//突飞武将
If tufei = 1
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 220)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 700, 470)
Delay 1000
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 500
ElseIf tufei = 2
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 240)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 700, 470)
Delay 1000
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 500
ElseIf tufei = 3
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 260)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 700, 470)
Delay 1000
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 500
ElseIf tufei = 4
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 280)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 700, 470)
Delay 1000
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 500
ElseIf tufei = 5
Call Plugin.Bkgnd.LeftClick(Hwnd, 320, 300)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 700, 470)
Delay 1000
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 500
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 500
ElseIf tufei = 0
Call Plugin.Bkgnd.LeftClick(Hwnd, 810, 110)
Delay 1000
Else
End If
End Sub
//建设脚本
Sub 建设判断
GetColor = Plugin.Bkgnd.GetPixelColor(Hwnd, 56, 200)
GetColor1 = Plugin.Bkgnd.GetPixelColor(Hwnd, 56, 220)
GetColor2 = Plugin.Bkgnd.GetPixelColor(Hwnd, 56, 240)
GetColor3 = Plugin.Bkgnd.GetPixelColor(Hwnd, 56, 260)
GetColor4 = Plugin.Bkgnd.GetPixelColor(Hwnd, 56, 280)
If GetColor = "31CF63" or GetColor1 = "31CF63" or GetColor2 = "31CF63" or GetColor3 = "31CF63" or GetColor4 = "31CF63" or GetColor = "33CC66" or GetColor1 = "33CC66" or GetColor2 = "33CC66" or GetColor3 = "33CC66" or GetColor4 = "33CC66"then
Delay 800
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Else
Goto wait
End If
End sub
//建设子程序
//建设民居
Sub 民居
Call 建设判断
Call 民居1
Delay 800
Call 建设判断
Call 民居2
Delay 800
Call 建设判断
Call 民居3
Delay 800
Call 建设判断
Call 民居4
Delay 800
Call 建设判断
Call 民居5
Delay 800
Call 建设判断
Call 民居6
Delay 800
Call 建设判断
Call 民居7
Delay 800
Call 建设判断
Call 民居8
Delay 800
End Sub
Sub 民居1
Call Plugin.Bkgnd.LeftClick(Hwnd, 500, 165)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居2
Call Plugin.Bkgnd.LeftClick(Hwnd, 580, 220)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居3
Call Plugin.Bkgnd.LeftClick(Hwnd, 650, 260)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居4
Call Plugin.Bkgnd.LeftClick(Hwnd, 710, 305)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居5
Call Plugin.Bkgnd.LeftClick(Hwnd, 645, 345)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居6
Call Plugin.Bkgnd.LeftClick(Hwnd, 565, 85)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居7
Call Plugin.Bkgnd.LeftClick(Hwnd, 640, 130)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 民居8
Call Plugin.Bkgnd.LeftClick(Hwnd, 710, 215)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 银库
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 430, 205)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 粮仓
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 365, 250)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 市场
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 300, 300)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 商店
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 370, 335)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 校场
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 440, 390)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 兵营
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 520, 425)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 军机处
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 580, 380)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 账房
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 360, 125)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 铸币厂
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 290, 210)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 驿站
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 305, 395)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
Sub 主城
Call 建设判断
Call Plugin.Bkgnd.LeftClick(Hwnd, 500, 300)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 445, 350)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub
// 征兵
Sub 征兵
Call Plugin.Bkgnd.LeftClick(Hwnd, 520, 425)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 655, 330)
Delay 800
Call Plugin.Bkgnd.KeyPress(Hwnd, 13)
Delay 800
Call Plugin.Bkgnd.LeftClick(Hwnd, 680, 196)
End Sub 多谢 采纳