In-combat Consulting: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>ZammyWarrior
No edit summary
imported>ZammyWarrior
No edit summary
Line 3: Line 3:


<p><strong>string attack()</strong><br />
<p><strong>string attack()</strong><br />
<p><strong>string runaway()</strong><br />
<strong>string runaway()</strong><br />
<p><strong>string use_skill(  skill touse )</strong><br />
<strong>string use_skill(  skill touse )</strong><br />
<p><strong>string throw_item(  item tothrow )</strong><br />
<strong>string throw_item(  item tothrow )</strong><br />
<p><strong>string throw_items(  item tothrow1,  item tothrow2 )</strong><br />
<strong>string throw_items(  item tothrow1,  item tothrow2 )</strong><br />
Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.</p>
Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.</p>


<p><strong>boolean use_skill( int count, skill touse )</strong><br />
<p><strong>boolean use_skill( int count, skill touse )</strong><br />
Will loop the specified number of times using the specified skill, never reconsulting the script until the loop is complete. This function is handled differently when not in battle.<br /></p>
Will loop the specified number of times using the specified skill, never reconsulting the script until the loop is complete. This function is handled differently when not in battle.<br />
See [[Skills and Effects]]
See [[Skills and Effects]]</p></br>


<p><strong>element monster_attack_element()</strong><br />
<p><strong>element monster_attack_element()</strong><br />
<p><strong>element monster_defense_element()</strong><br />
<strong>element monster_defense_element()</strong><br />
returns the element that the monster attacks with, or defends against accordingly.</p>
returns the element that the monster attacks with, or defends against accordingly.</p>


<p><strong>int monster_attack()</strong><br />
<p><strong>int monster_attack()</strong><br />
<p><strong>int monster_defense()</strong><br />
<strong>int monster_defense()</strong><br />
<p><strong>int monster_hp()</strong><br />
<strong>int monster_hp()</strong><br />
returns the (current?) attack, defense, and hp of the monster.</p>
returns the (current?) attack, defense, and hp of the monster.</p>


<p><strong>boolean will_usually_miss()</strong><br />
<p><strong>boolean will_usually_miss()</strong><br />
<p><strong>boolean will_usually_dodge()</strong><br />
<strong>boolean will_usually_dodge()</strong><br />
returns if you will normally miss, or will usually be missed in battle.</p>
returns if you will normally miss, or will usually be missed in battle.</p>

Revision as of 20:47, 9 September 2007

Part 6 - In-combat functions for consulting scripting

These functions are for use when handling a battle in a script using your custom combat settings. There is very little documentation of how to do this, and for most people these functions are useless.

string attack()
string runaway()
string use_skill( skill touse )
string throw_item( item tothrow )
string throw_items( item tothrow1, item tothrow2 )
Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.

boolean use_skill( int count, skill touse )
Will loop the specified number of times using the specified skill, never reconsulting the script until the loop is complete. This function is handled differently when not in battle.
See Skills and Effects


element monster_attack_element()
element monster_defense_element()
returns the element that the monster attacks with, or defends against accordingly.

int monster_attack()
int monster_defense()
int monster_hp()
returns the (current?) attack, defense, and hp of the monster.

boolean will_usually_miss()
boolean will_usually_dodge()
returns if you will normally miss, or will usually be missed in battle.