|
原文:守望先锋2天使自动奶人光束切换AHK脚本2.0 - 守望先锋 - 黑米辅助游戏论坛丨热爱你的热爱 - [url]www.steamhm.cn[/url]
- #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
复制代码
|
黑米论坛免责声明
黑米论坛所有内容均来自网络分享,仅供会员进行学习研究用,本网站仅提供存储服务,所有资源请勿用于商业行为!转载文章请注明来源,版权归属于原作者!如若本站内容侵犯了原著者的合法权益请联系站长,我们将及时处理。
|