守望先锋2天使自动奶人光束切换AHK脚本3.0
原文:守望先锋2天使自动奶人光束切换AHK脚本2.0 - 守望先锋 - 黑米辅助游戏论坛丨热爱你的热爱 - www.steamhm.cn#NoEnv
#IfWinActive, Overwatch
#KeyHistory 0
ListLines 0
SetBatchLines, 50ms
CoordMode, Pixel, Screen
CoordMode, Tooltip, Screen
#include Lib\AutoHotInterception.ahk
global AHI := new AutoHotInterception()
global xpos:=994
global ypos:=708
global xposAlive:=930
global yposAlive:=715
global c:=0
global cr:=0
global cg:=0
global cb:=0
global ca:=0
global cra:=0
global cga:=0
global cba:=0
global TargetAlive:=0
global FullHealth:=0
global Healing:=0
~*RButton::
{
Sleep, 80
while GetKeyState("RButton", "P")
{
checkAlive()
if TargetAlive
{
checkHealth()
if !FullHealth
{
heal()
}
else if FullHealth
{
stopHeal()
}
}
}
if Healing
{
stopHeal()
}
}
Return
checkHealth()
{
getColor()
if (cr > 226 || cg > 226 || cb > 226)
{
global FullHealth:=1
}
Else
{
global FullHealth:=0
}
}
Return
getColor()
{
PixelGetColor, c, xpos, ypos
global cb:="0x" SubStr(c,3,2)
global cb:=cb+0
global cg:="0x" SubStr(c,5,2)
global cg:=cg+0
global cr:="0x" SubStr(c,7,2)
global cr:=cr+0
}
Return
checkAlive()
{
getColorAlive()
if (cra > 226 || cga > 226 || cba > 226)
{
global TargetAlive:=1
}
Else
{
global TargetAlive:=0
}
}
getColorAlive()
{
PixelGetColor, ca, xposAlive, yposAlive
global cba:="0x" SubStr(ca,3,2)
global cba:=cba+0
global cga:="0x" SubStr(ca,5,2)
global cga:=cga+0
global cra:="0x" SubStr(ca,7,2)
global cra:=cra+0
}
heal()
{
if Healing = 0
{
global Healing:=1
AHI.SendMouseButtonEvent(11, 0, 1)
}
}
Return
stopHeal()
{
if Healing = 1
{
global Healing:=0
AHI.SendMouseButtonEvent(11, 0, 0)
}
}
Return
页:
[1]