RoM Working with profile events
From SolarStrike wiki
Revision as of 09:05, 19 October 2009 by 95.115.63.201 (talk)
Profile Event <onSkillCast>
There are two main situations to use that event. Emergeny casts and finisher.
Emergeny Casts
Using the onSkillCast event has the advantage that the emergency situation is checked after every skill use and not only after every 'skill using round'.
<onSkillCast>
if( 20 > player.HP/player.MaxHP*100 ) then
player:cast("PRIEST_SOUL_SOURCE");
elseif( 30 > player.HP/player.MaxHP*100 ) then
player:cast("PRIEST_HOLY_AURA");
player:cast("PRIEST_URGENT_HEAL");
player:cast("PRIEST_URGENT_HEAL");
end;
</onSkillCast>
Finisher Casts
There is no skill option to do a finishing skill. But you could to that in the <onCast> event. Insert the skill into your profile, assign a hotkey and set it to autouse=false:
<skill name="MAGE_FIREBALL" hotkey="VK_R" autouse="false" />
and in the event add the coding:
<onSkillCast>
local target = player:getTarget();
if( 20 > target.HP/target.MaxHP*100 ) then
player:cast("MAGE_FIREBALL");
end;
</onSkillCast>