AHK OW2 Mercy Autoheal

Onaylı Üye
Katılım
13 Kas 2021
Mesajlar
135
Tepki puanı
47
Ödüller
2
4 HİZMET YILI
DON'T BE A LEECHER AND LIKE THE POST

This works by checking a specific pixel to see if it's white or not. The specific pixel is where the healing healthbar will be for a 1920x1080 display. It sends a leftclick if the pixel stops being white (teammate took damage), and it lets go when they're healed. I added a dumb check to make sure the "while" doesn't spam lbutton down events, in case that flags your account.


This is for a damage-focused Mercy setup. That means you must have "Toggle Beam Connection" off. More info:

Other than that, look at the code to figure out what you need. If you can't figure out how to use this, you should probably practice your problem-solving skills.

This will send AHI.SendMouseButtonEvent(11, 0, 1) when the person you're healing isn't at >95% health. It doesn't spam it. It also lets go when healed.

You can press Mouse4 to switch targets.

AutoHotkey:
#NoEnv
#SingleInstance, Force
#IfWinActive, Overwatch
SetBatchLines, 100
SetWorkingDir, %A_ScriptDir%
CoordMode, Pixel, Screen
CoordMode, Tooltip, Screen
#include Lib\AutoHotInterception.ahk
global AHI := new AutoHotInterception()
 
global foundStaff := false
global foundTarget := false
global foundPoison := false
global foundHealth := false
global amDamage := false
global amHeal := false
global suspend := false
 
Loop
{
    checkStaff()
    if foundStaff
    {
        if !amHeal
        {
            if amDamage
            {
                stopDamage()
            }
            doHeal()
        }
        checkTarget()
        if foundTarget
        {
            checkPoison()
            if foundPoison
            {
                doDamage()
            }
            else
            {
                checkHealth()
                if foundHealth
                {
                    doDamage()
                }
                else
                {
                    stopDamage()
                    if !amHeal
                    {
                        doHeal()
                    }
                }
            }
        }
        else
        {
            if amDamage
            {
                stopDamage()
            }
        }
    }
    else
    {
        stopAll()
    }
}
return
 
checkStaff()
{
    rgb := getColor(1788, 1020)
    StringSplit, array, rgb, |
    if (array1 > 230) and (array2 > 103) and (array3 > 33)
    {
        if (array1 < 256) and (array2 < 184) and (array3 < 165)
        {
            global foundStaff := true
        }
        else
        {
            global foundStaff := false
        }
    }
    else
    {
        global foundStaff := false
    }
    return
}
 
checkTarget()
{
    sleep, 100
    rgb := getColor(932, 715)
    StringSplit, array, rgb, |
    if (array1 > 225) and (array2 > 225) and (array3 > 225)
    {
        global foundTarget := true
    }
    else
    {
        global foundTarget := false
    }
    return
}
 
checkPoison()
{
    rgb := getColor(950, 728)
    StringSplit, array, rgb, |
    if (array1 > 130) and (array2 > 5) and (array3 > 160)
    {
        if (array1 < 189) and (array2 < 132) and (array3 < 217)
        {
            global foundPoison := true
        }
        else
        {
            global foundPoison := false
        }
    }
    else
    {
        global foundPoison := false
    }
return
}
 
checkHealth()
{
    rgb := getColor(996, 700)
    StringSplit, array, rgb, |
    if (array1 > 220) or (array2 > 220) or (array3 > 220)
    {
        global foundHealth := true
    }
    else
    {
        global foundHealth := false
    }
    return
}
 
doDamage()
{
    if !amDamage
    {
        sendRightDown()
        global amDamage := true
    }
    return
}
 
doHeal()
{
    if amDamage
    {
        stopDamage()
    }
    if !amHeal
    {
        sendLeftDown()
        global amHeal := true
    }
    return
}
 
stopDamage()
{
    if amDamage
    {
        sendRightUp()
        global amDamage := false
    }
    return
}
 
stopHeal()
{
    if amHeal
    {
        sendLeftUp()
        global amHeal := false
    }
    return
}
 
sendLeftDown()
{
    AHI.SendMouseButtonEvent(11, 0, 1)
    return
}
 
sendLeftUp()
{
    AHI.SendMouseButtonEvent(11, 0, 0)
    return
}
 
sendRightDown()
{
    AHI.SendMouseButtonEvent(11, 1, 1)
    return
}
 
sendRightUp()
{
    AHI.SendMouseButtonEvent(11, 1, 0)
    return
}
 
stopAll()
{
    if amDamage
    {
        sendRightUp()
        global amDamage := false
    }
    if amHeal
    {
        sendLeftUp()
        global amHeal := false
    }
    return
}
 
getColor(x, y)
{
    PixelGetColor, color, %x%, %y%
    blue := color & 0xFF
    green := (color >> 8) & 0xFF
    red := (color >> 16) & 0xFF
    return blue "|" green "|" red
}
 
checkSuspend()
{
    if GetKeyState("LButton", "P")
    {
        global suspend := true
    }
    else
    {
        global suspend := false
    }
    return
}
 
~*LButton UP::
{
    if amHeal
    {
        global amHeal := false
    }
}
return
 
~*RButton UP::
{
    if amDamage
    {
        global amDamage := false
    }
}
return
 
XButton1:: ;; Switch targets
{
    stopAll()
    sleep, 50
}

Installation:
Download and install Interception driver from their github and restart the PC.
Download AutoHotInterception from the github.
Open the AutoHotInterception folder go to Lib and paste the x64 and x86 folder from Interception rar into the Lib
Create an .ahk into the main folder of AutoHotIntrception
Edit the ahk, in line 8
Kod:
#include type the directory of location \Lib\AutoHotInterception.ahk
 
Son düzenleme:
Onaylı Üye
Katılım
28 Eyl 2022
Mesajlar
73
Tepki puanı
8
Ödüller
2
Yaş
32
3 HİZMET YILI
you are an angel my friend, you saved a lot.very well explained, keep it up. I didn't even think I could do that.
 
Süper Üye
Katılım
2 Haz 2022
Mesajlar
636
Çözümler
2
Tepki puanı
44
Ödüller
3
Yaş
29
4 HİZMET YILI
Very interesting, I had never seen anything like it.. It will be very useful in my gameplay
 
𝕄𝕒𝕤𝕥𝕖𝕣 𝕠𝕗 𝕎𝕒𝕥𝕔𝕙
Ultra Üye
Katılım
20 May 2020
Mesajlar
1,956
Tepki puanı
261
Ödüller
9
6 HİZMET YILI
Thanks for sharing the details with us dude
 
ABOBA
Seçkin Üye
Katılım
22 Mar 2022
Mesajlar
302
Çözümler
3
Tepki puanı
11
Ödüller
3
4 HİZMET YILI
A really convenient script for the game, thank you
 
Zoro Hack
Süper Üye
Katılım
3 Mar 2021
Mesajlar
608
Çözümler
2
Tepki puanı
49
Ödüller
3
Yaş
29
Sosyal
5 HİZMET YILI
thanks for sharing that source, it was very helpful
 
Son düzenleme:
Seçkin Üye
Katılım
26 Ağu 2021
Mesajlar
408
Tepki puanı
55
Ödüller
5
Yaş
26
4 HİZMET YILI
every one dont use it overwatch baned using mouse events sins 2016 bro u shoud put warning man what are you doing ahk are dtc able on overwatch
 
Onaylı Üye
Katılım
13 Kas 2021
Mesajlar
135
Tepki puanı
47
Ödüller
2
4 HİZMET YILI
ok but isnt the interception driver bannable?
at the moment no, even if they try to ban it there will be error trigger that it will say to uninstall it like Vanguard does (probably)
edit:// I am playing since release with the colorbot interception driver and still no ban