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: