Use skill

From Kolmafia
Revision as of 09:48, 29 December 2009 by 58.175.86.180 (talk) (Created Page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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));