onSkillCast and onLeaveCombat problem
Posted: Wed Dec 08, 2010 4:54 pm
Hey there,
i have a problem with a.m. part in my profile.
i wrote two functions whitch shall heal me after a fight/after a cast when fighting against stronger mobs.
functions:
onSkillCast
onLeaveCombat
error in log.txt
any ideas what i did wrong?
i have a problem with a.m. part in my profile.
i wrote two functions whitch shall heal me after a fight/after a cast when fighting against stronger mobs.
functions:
Code: Select all
function heal_after_cast()
if(50 > player.HP/player.MaxHP*100 ) then
player:cast("PRIEST_URGENT_HEAL");
player:cast("PRIEST_REGENERATE");
player:cast("PRIEST_URGENT_HEAL");
player:cast("PRIEST_URGENT_HEAL");
end
end
function full_heal()
while (99 > (Player.HP/player.MaxHP*100))
do
player:cast("PRIEST_URGENT_HEAL");
end;
endonSkillCast
Code: Select all
<onSkillCast>
heal_after_cast();
</onSkillCast>Code: Select all
<onLeaveCombat>
full_heal();
</onLeaveCombat>error in log.txt
Code: Select all
Wed Dec 08 22:50:10 2010 : Bot addon 'heal' successfully loaded.
Wed Dec 08 22:50:10 2010 : Bot addon 'Rock5s_Mail_Functions' successfully loaded.
Wed Dec 08 22:50:10 2010 : Language: english
Wed Dec 08 22:50:11 2010 : Using static char address 0x9B5284, player address 0x35A76900
In main thread:
stack traceback:
.../Desktop/micromacro/scripts/rom/settings.lua:673: in function 'loadOnSkillCastEvent'
.../Desktop/micromacro/scripts/rom/settings.lua:883: in function 'loadProfile'
scripts\rom/bot.lua:165: in function 'foo'
...\Desktop\micromacro\lib\lib.lua:510: in function <...\Desktop\micromacro\lib\lib.lua:508>
----------TRACEBACK END----------
Wed Dec 08 22:50:11 2010 : .../Desktop/micromacro/scripts/rom/settings.lua:673: Failed to compile and run Lua code for onSkillCast in character profile.
Wed Dec 08 22:50:11 2010 : Execution error: Runtime errorany ideas what i did wrong?