Page 1 of 1
color trigger
Posted: 18 Apr 2021, 19:16
by vitorcastro
Code: Select all
#Persistent
SetTimer, Cura, 350
Return
Cura:
Sleep,350
PixelGetColor, Color,347, 45
If color = 0x0B0C0F
{
Send {F3}
}
Return
[Mod edit: [code][/code] tags added.]
I need help with this script instead of using the color I wanted him to give the command when the color chose was absent until the color returned to normal
Re: color trigger
Posted: 18 Apr 2021, 19:20
by vitorcastro
example i have a hp bar when i lose hp the bar changes into gray then the script trigger until the bar is fully red again
Re: color trigger
Posted: 18 Apr 2021, 19:26
by mikeyww
Code: Select all
#Persistent
SetTimer, Cura, 350
Cura:
PixelGetColor, color, 347, 45
If (color = 0x0B0C0F) {
SetTimer, Cura, Off
MsgBox, 64, Done, Done!
} Else Send {F3}
Return
Re: color trigger
Posted: 18 Apr 2021, 20:43
by vitorcastro
there is a box pop up lol saying done!
and its using potion when my hp is lost the scprit i post already do that i need one script when my hp is missing heal until the hp color is back again
Re: color trigger
Posted: 18 Apr 2021, 22:19
by vitorcastro
i need this if color not exist send f1 until the color get back and delay option
a pause key can be f5
Re: color trigger
Posted: 18 Apr 2021, 22:42
by vitorcastro
Code: Select all
loop {
PixelSearch,,, 340, 62, 340, 62, 0xA00415, 100
if (!ErrorLevel = 0)
{
Send {F2}
sleep 100
send {f2}
}
}
return
F10::exitapp
[Mod edit: [code][/code] tags added.]
this one is god but there's a problem this one still keeps spaming even if i close the game
Re: color trigger
Posted: 19 Apr 2021, 06:40
by mikeyww
Code: Select all
Gosub, Timer
WinWaitClose, ahk_exe game.exe
Done:
SetTimer, Check, Off
SoundBeep, 1000
ExitApp
Check:
SoundBeep, 1500
PixelSearch,,, 340, 62, 340, 62, 0xA00415, 100, Fast
If !ErrorLevel
Gosub, Done
Send {F2}
Sleep, 100
Send {F2}
Timer:
SetTimer, Check, -250
Return