<onSkillCast> problem /loop
Posted: Thu Sep 03, 2009 5:24 am
I want to use the <onSkillCast> event for my emergency skills. Simply because if I use the normal skill casting round, it takes very often to long to use the emergency skills. So my idea is, to check for an emergency situation after every cast.
Problems seems now, that the bot also use the '<onSkillCast>' event if he casts allready within <onSkillCast>. So he loop endless.
If I find a little more time, I would/will try to look for a solution.
btw: I couldn't get that coding to work with the '<' symbol. So I turn it around as '>' query.
Code: Select all
<onSkillCast>
if( 15 > player.HP/player.MaxHP*100 ) then
player:cast("PRIEST_SOUL_SOURCE");
elseif( 25 > player.HP/player.MaxHP*100 ) then
player:cast("PRIEST_HOLY_AURA");
player:cast("PRIEST_URGENT_HEAL");
player:cast("PRIEST_URGENT_HEAL");
end;
</onSkillCast>
If I find a little more time, I would/will try to look for a solution.
btw: I couldn't get that coding to work with the '<' symbol. So I turn it around as '>' query.