I want to rest after combat if HP is low
Posted: Thu Aug 05, 2010 11:15 pm
My bot runs through a pretty dense area of non-aggressive mobs. The combination of them hitting me + dots + there being so many, I have a decent chance of dieing.
What I'd like to do is once a fight is finished, if my HP is under 80% use the hide skill, wait til HP is over 90%, and then continue doing whatever.
I tried this and it didn't work:
But that code doesn't work. I'm not very good at LUA, is there a loop..break..end type of code I could use?
Help?
What I'd like to do is once a fight is finished, if my HP is under 80% use the hide skill, wait til HP is over 90%, and then continue doing whatever.
I tried this and it didn't work:
Code: Select all
<onLeaveCombat><![CDATA[
sendMacro("ActionButtonUp(12)"); yrest(100);
if (80 > player.HP/player.MaxHP*100) then
repeat player.HP; yrest(1000) until player.HP > 13000
end
sendMacro("ActionButtonUp(12)"); yrest(100);
]]></onLeaveCombat>
Help?