I'm trying to do a functional script to "Kill" some character in-game when your life is low, but to this work fine, i need that script read how much life this character have.
Some like:
Code: Select all
F3::
loop:
if character_life <= 100 {
MouseMove, x, y, 0
Click right
} else {
Goto loop
}
Actually my AHK script search the life bar and then click, have some way to ImageSearch capture an image and convert in a number or another way to do this?
The game is league of legends, and i trying to do a last hit script.
Code: Select all
#Notenv
#SingleInstance force
~v::
lasthit:
ImageSearch, x, y, 1, 1, A_ScreenWidth, A_ScreenHeight, minionHP.png
if !ErrorLevel{
y:=y+30
MouseMove, x, y, 0
Click right
sleep 500
Goto lasthit
}
return
~F12::Suspend