Use skill

From Kolmafia
Revision as of 22:33, 2 March 2010 by imported>StDoodle (moved Use skill() to Use skill)
Jump to navigation Jump to search

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));