Тема: AHK: восстановление хп
Немного накидал скрипт для восстановления ХП при достижении 20%, но он, почему-то, не работает. Помогите разобраться
loop {
SendMessage, 0x50,, 0x4190419,, A
health := GetPlayerHealth()
if ( health <= 20 )
{
SendChat("/id Ivan_Ivanov")
restorelog()
sleep 100
FileRead, Str, other\done\chatlog.txt
StringReplace, Str, Str, `r`n, `n, 1
StringReplace, Str, Str, `r, `n, 1
RegExMatch("`n" Str "`n", "i).*\n\[\d+:\d+:\d+] (.*) {66CC66}id (\d+)", result)
SendChat("/hp " result2 " 100")
}
}