⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 天下聪明.ent

📁 天下2近身职业自动打怪脚本
💻 ENT
📖 第 1 页 / 共 2 页
字号:
            Loop
            KeyUpH "W"
            Call wt_move(fx1,fy1,fx2,fy2,1,1)
        End If
    ElseIf fx1>fx2 And fy1<fy2 Then      '第二象限
        KeyPressH "d",int((p+90)/jd_one)  '顺转90+p
        Delay 50
        If fy<fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=fx1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move(fx1,fy1,fx2,fy2,0,2)
        ElseIf fy>=fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_y))>=fy1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move (fx1,fy1,fx2,fy2,1,2)
        End If
    ElseIf fx1>fx2 And fy1>fy2 Then      '第三象限
        KeyPressH "d",int((90-p)/jd_one)  '顺转90-p
        Delay 50
        If fy<fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=fx1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move(fx1,fy1,fx2,fy2,0,3)
        ElseIf fy>=fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=fy1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move (fx1,fy1,fx2,fy2,1,3)
        End If
    ElseIf fx1<fx2 And fy1>fy2 Then       '第四象限
        KeyPressH "a",int((90-p)/jd_one)  '逆转90-p
        Delay 50
        If fy<fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_x))>=fx1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move(fx1,fy1,fx2,fy2,0,4)
        ElseIf fy>=fx Then
            KeyDownH "W"
            gotime=GetTime
            Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=fy1
                Delay 75
                If NOT IsColor(12,18,&H225599,1)=1 Then
                    Exit Function
                End If
                If GetTime-gotime>15000 Then  Exit Function
                'Call  zuai()
            Loop
            KeyUpH "W"
            Call wt_move(fx1,fy1,fx2,fy2,1,4)
        End If
    End If
End Function

'(wx1,wy1)为目标坐标,(wx2,wy2)为跑到微调处的起始坐标,(wx3,wy3)为微调当前坐标
'wt为象限,dx表示两直角边大小,0表示y<x,1表示y>=x
Function wt_move(wx1,wy1,wx2,wy2,dx,wt)    '微调直走到目标坐标函数
    
    wx3=cint(HMEM.Read4Float(Hwnd,zuobiao_x))   '东
    wy3=cint(HMEM.Read4Float(Hwnd,zuobiao_y))   '南
    wy=abs(wy2-wy3)
    wx=abs(wx2-wx3)
    If wx=0 And wy3<wy1 Then
        q=0
    ElseIf wx=0 And wy3>wy1 Then
        q=180
    Else
        q=(atn((abs(wy/wx)))*180/3.14)
    End If
    runtime1=GetTime
    If wt=1 Then                        '第一象限
        If dx=0 Then                    'y<x
            If  wy3<wy1 Then
                KeyPressH "d",int((90+q)/jd_one)  '顺转90+q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wy3>wy1 Then
                KeyPressH "a",int((90-q)/jd_one)  '逆转90-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))>=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        ElseIf dx=1 Then
            If wx3>wx1 Then
                KeyPressH "d",int(q/jd_one)  '顺转q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))>=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wx3<wx1 Then
                KeyPressH "a",int((180-q)/jd_one)  '逆转180-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        End If
    ElseIf wt=2 Then                '第二象限
        If dx=0 Then                    'y<x
            If  wy3<wy1 Then
                KeyPressH "a",int((90+q)/jd_one)  '逆转90+q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wy3>wy1 Then
                KeyPressH "d",int((90-q)/jd_one)  '顺转90-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))>=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        ElseIf dx=1 Then
            If wx3>wx1 Then
                KeyPressH "d",int((180-q)/jd_one)  '顺转180-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))>=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wx3<wx1 Then
                KeyPressH "a",int(q/jd_one)  '逆转q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        End If
    ElseIf wt=3 Then                    '第三象限
        If dx=0 Then                    'y<x
            If  wy3<wy1 Then
                KeyPressH "a",int((90-q)/jd_one)  '逆转90-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wy3>wy1 Then
                KeyPressH "d",int((90+q)/jd_one)  '顺转90+q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))>=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        ElseIf dx=1 Then
            If wx3>wx1 Then
                KeyPressH "a",int((180-q)/jd_one)  '逆转180-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))>=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wx3<wx1 Then
                KeyPressH "d",int(q/jd_one)  '顺转q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        End If
    ElseIf wt=4 Then                     '第四象限
        If dx=0 Then                    'y<x
            If  wy3<wy1 Then
                KeyPressH "d",int((90-q)/jd_one)  '顺转90-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))<=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wy3>wy1 Then
                KeyPressH "a",int((90+q)/jd_one)  '逆转90+q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_y))>=wy1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        ElseIf dx=1 Then
            If wx3>wx1 Then
                KeyPressH "a",int(q/jd_one)  '逆转q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))>=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            ElseIf wx3<wx1 Then
                KeyPressH "d",int((180-q)/jd_one)  '顺转180-q
                Delay 50
                KeyDownH "w"
                gotime=GetTime
                Do While int(HMEM.Read4Float(hwnd,zuobiao_x))<=wx1
                    Delay 75
                    If NOT IsColor(12,18,&H225599,1)=1 Then
                        Exit Function
                    End If
                    If GetTime-gotime>15000 Then  Exit Function
                    Call zuai1()
                Loop
                KeyUpH "W"
            End If
        End If
    End If
End Function


Function zuai()  '小障碍饶过
    If GetTime-runtime>150000 And  GetTime-runtime<16000 Or GetTime-runtime>17000 And  GetTime-runtime<18000 Then
        'KeyPressH "A",1
        'Delay 50
        
    End If
End Function

Function zuai1()
    If GetTime-runtime1>15000 And  GetTime-runtime1<16000 Or GetTime-runtime1>17000 And  GetTime-runtime1<18000 Then
        'KeyPressH "A",1
        'Delay 50
    End If
End Function
[MainEnd]
[VBSLib]
\MyLib\Default.Txt
[EndVBSLib]
[PublicVar]

[EndPublicVar]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -