viewing paste Unknown #7237 | Autohotkey

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
^1::
{
    MouseGetPos tl_n_xpos, tl_n_ypos
    return 
}
^2::
{
    MouseGetPos br_n_xpos, br_n_ypos
    return
}
^3::
{
    MouseGetPos tl_w_xpos, tl_w_ypos
    return
}
^4::
{
    MouseGetPos br_w_xpos, br_w_ypos
    return
}
 
Home::
{
    WinGet mPID, PID, A
    SetKeyDelay -1
    SetControlDelay -1
    SetMouseDelay -1
    
    ; jokers = 0x8894F9
    ; porings = 0x8C94FF
    searchColor := 0x8C94FF
    
    ; jokers = 5
    ; porings = 0
    searchTolerance := 0
    
    loop
    {
        
        Sleep 100
 
 
        ; first, a nearby search of yourself
        ; i recommend 6 character widths wide and 3 character heights tall
        PixelSearch FoundX, FoundY, %tl_n_xpos%, %tl_n_ypos%, %br_n_xpos%, %br_n_ypos%, %searchColor%, %searchTolerance%, Fast  
        if ErrorLevel = 0
        {
            Cast(FoundX, FoundY)
        }
        else
        {
            ; a more wide search range. make sure no part of your ui is in range
            PixelSearch FoundX, FoundY, %tl_w_xpos%, %tl_w_ypos%, %br_w_xpos%, %br_w_ypos%, %searchColor%, %searchTolerance%, Fast  
            if ErrorLevel = 0
            {
                Cast(FoundX,  FoundY)
            }
            else        
            {
                ; TELEPORT
                ControlSend ,,{F5}, ahk_pid %mPID% ; teleport hotkey
                Sleep 900
            }
        }
        
        
        
        
    }
    
    return
 
 
Cast(x, y)
{
    global 
    ControlSend ,,{F6},ahk_pid %mPID% ; skill hotkey
    Sleep 50
    Click %x%, %y%
    Sleep 300
    return
}
 
 
}   
 
End::Pause
 
Viewed 719 times, submitted by Guest.