I tried to detect the color of the HP bar so that my character can sit when it is almost die. Somehow I don't know what I am doing wrong. I would be grateful if anyone can point out the mistakes . Thanks Here are the codes:
CODE
SetActiveWindow Nostale
delay 2000
LoadRGB 152, 26 // this coordinate is where my HP bar located
constants
green = 0
end
Procedure attack //this is my attack sequence
keys {SPACE}
keys 1
delay 1000
keys 6
delay 6000
keys q
delay 500
keys q
delay 1000
keys 6
end
keys w // this is my buff
delay 1000
loop 99999999
if {RGBGreen} = 200
setconst green = 200
else
setconst green = {RGBGreen}
end
if $green = 231
call attack
else
keys t // t is my hotkey for sitting down
delay 30000
keys t
delay 1000
keys w
delay 1000
end
end



Nvm, I got the code fixed, its working perfectly now.
Nv