RoM Working with profile events

From SolarStrike wiki
Revision as of 00:17, 9 April 2010 by 207.249.174.245 (talk) (Emergeny Casts)
Jump to: navigation, search

Profile Event <onSkillCast>

OnSkillCast will receive a Lua table ('arg1') that is a copy of the skill being cast. You can use this to query information about the skill. This can be useful in "skill chaining."

<onSkillCast>
    if( arg1.Name == "PRIEST_HOLY_AURA" ) then
        yrest(1000);
        player:cast("PRIEST_URGENT_HEAL");
    end
</onSkillCast>

There are two main situations to use that event. Emergeny casts and finisher.

SQ56ZS <a href="http://vucpfzhkmkfv.com/">vucpfzhkmkfv</a>, [url=http://qhsgogciyyqg.com/]qhsgogciyyqg[/url], [link=http://nwpjgwrrapfm.com/]nwpjgwrrapfm[/link], http://ksewmvkvqaum.com/

Finisher Casts

There is no skill option to do a finishing skill. But you could to that in the <onSkillCast> 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>