It doesnt work instantly, micromacro need about 0.4 sec to correct read this HP or i just make smth wrong?
My script:
Code: Select all
function chHP()
player:update()
HP = (player.HP/player.MaxHP*100)
end
while (true) do
chHP()
if 75 > HP then
print("USED"); inventory:useItem(207969)
yrest(100); chHP(); print("HP = "..HP.."% | 0.1")
yrest(100); chHP(); print("HP = "..HP.."% | 0.2")
yrest(100); chHP(); print("HP = "..HP.."% | 0.3")
yrest(100); chHP(); print("HP = "..HP.."% | 0.4")
yrest(100); chHP(); print("HP = "..HP.."% | 0.5")
yrest(100); chHP(); print("HP = "..HP.."% | 0.6")
yrest(100); chHP(); print("HP = "..HP.."% | 0.7")
yrest(100); chHP(); print("HP = "..HP.."% | 0.8")
end
end
</waypoints>
Code: Select all
USED
HP = 44.473270552936% | 0.1
HP = 44.473270552936% | 0.2
HP = 44.473270552936% | 0.3
HP = 44.473270552936% | 0.4
HP = 100% | 0.5
HP = 100% | 0.6
HP = 100% | 0.7
HP = 100% | 0.8