按键精灵——针对个人练度的12-4挂机脚本 最终版

前言

与第一次发的最初版本相比,最终版所做的最大的改进就是对于延迟的处理

最终版代码(核心循环部分)

Delay 2000
i=0
For i = 0 To 1
    Delay 200
    FindPic 0, 0, 1920, 1080, "Attachment:\三星.bmp", 0.8, z, q
    Delay 200
    If z > 0 And q > 0 Then
        MoveTo z+40, q+80
        LeftClick 1
        Delay 1000
    End If
    Delay 200
    FindPic 0, 0, 1920, 1080, "Attachment:\二星.bmp", 0.8, g, h
    Delay 200
    If g > 0 And h > 0 Then
        MoveTo g+40, h+80
        LeftClick 1
        Delay 1000
    End If
    Delay 200
    While True
        FindPic 0, 0, 1920, 1080, "Attachment:\shengli.bmp", 0.8, a, b
        Delay 200
        If a > 0 And b > 0 Then 
            Delay 200
            MoveTo a, b
            LeftClick 1
            Delay 1000
            MoveTo a+100, b+100
            LeftClick 1
            Delay 200
        End If
        Delay 200
        FindPic 0, 0, 1920, 1080, "Attachment:\精锐.bmp", 0.8, intX, intY
        Delay 200
        If intX > 0 And intY > 0 Then
            MoveTo 1445, 422
            LeftClick 1
            Delay 2000
        End If
        Delay 200
        FindPic 0, 0, 1920, 1080, "Attachment:\确定.bmp", 0.8, e, f
        Delay 200
        If e > 0 And f > 0 Then
            MoveTo e, f
            LeftClick 1
            Delay 8000
            FindPic 0, 0, 1920, 1080, "Attachment:\支线.bmp", 0.8, j, k
            Delay 200
            If j > 0 And k > 0 Then 
                MoveTo e, f
                LeftClick 1
                Delay 1000
                Goto k
            End If
            Goto k
            Delay 200
        End If
        Delay 200
    Wend
    Rem k
    Delay 200    
Next
Delay 3000
KeyPress "F1", 1
Delay 200
KeyPress "F6", 1

最终版的效率相比最初版本,提升的可不是一星半点

古德拜~么么(^.ペ)γ

你可能感兴趣的:(脚本,碧蓝航线,游戏)