Use skill: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
imported>StDoodle
mNo edit summary
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