Difference between revisions of "RoM Working with profile events"

From SolarStrike wiki
Jump to: navigation, search
(Profile Event)
(Emergeny Casts)
Line 12: Line 12:
 
There are two main situations to use that event. Emergeny casts and finisher.
 
There are two main situations to use that event. Emergeny casts and finisher.
  
== Emergeny Casts ==
+
SQ56ZS  <a href="http://vucpfzhkmkfv.com/">vucpfzhkmkfv</a>, [url=http://qhsgogciyyqg.com/]qhsgogciyyqg[/url], [link=http://nwpjgwrrapfm.com/]nwpjgwrrapfm[/link], http://ksewmvkvqaum.com/
 
 
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'.
 
<source lang="xml"><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></source>You also could use the 'hpper' option in the skills section to use a skill at a specific hp level.
 
 
 
  
 
== Finisher Casts ==
 
== Finisher Casts ==

Revision as of 20:17, 8 April 2010

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>