Difference between revisions of "Use skill"

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
m (moved Use skill() to Use skill)
imported>StDoodle
m
Line 11: Line 11:
 
use_skill(my_mp()/mp_cost(to_skill(chosen)),to_skill(chosen));
 
use_skill(my_mp()/mp_cost(to_skill(chosen)),to_skill(chosen));
 
</pre></p>
 
</pre></p>
 +
{{Format}}

Revision as of 17:44, 7 March 2010

string use_skill(skill touse)
boolean use_skill(int count, skill touse)

Attempts to use the skill listed as 'touse'.

The one returning a string is more helpful for battle as it will return the page html. Whereas the second will just say whether you have the skill or not.

This example will attempt to cast the specified skill as many times as it can with the MP the character has left.

effect chosen = $effect[Empathy];
use_skill(my_mp()/mp_cost(to_skill(chosen)),to_skill(chosen));

Formatting Needed