this is the code:
Code: Select all
#SingleInstance, Force
CoordMode, Pixel, Screen ; need this since you are using screen coordinates
Loop
{
If WinActive("Pokemon Red")
{
PixelGetColor, HealarIco, 1282, 143, RGB
PixelGetColor, HealarGreatPot, 1261, 143, RGB
PixelGetColor, HealarUltimatePot, 1255, 143, RGB
PixelGetColor, ManaRuim, 1255, 157, RGB
If (HealarUltimatePot <= 0x434F6A) ; first priority
ControlSend,, {numpadmult}, Pokemon Red
Else If (HealarGreatPot <= 0x434F6A) ; second priority
ControlSend,, {-}, Pokemon Red
Else If (ManaRuim <= 0x555A65) ; third priority
ControlSend,, {f3}, Pokemon Red
Else If (HealarIco != 0xDB4F4F) ; fourth priority
ControlSend,, {=}, Pokemon Red
}
Sleep, 280
}
Return
Can someone help me ?
these two lines seem to me to be ignored
Code: Select all
If (HealarUltimatePot <= 0x434F6A) ;first priority
ControlSend,, {numpadmult}, Pokemon Red
Else If (HealarGreatPot <= 0x434F6A) ; second priority
ControlSend,, {-}, Pokemon Red
Code: Select all
Else If (ManaRuim <= 0x555A65) ; third priority
ControlSend,, {f3}, Pokemon Red
Else If (HealarIco != 0xDB4F4F) ; fourth priority
ControlSend,, {=}, Pokemon Red
I think I'm putting wrong expressions on the highest priority lines
and I need a lot of help to adjust this