In-combat Consulting: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
imported>StDoodle
No edit summary
Line 1: Line 1:
== Part 6 - In-combat functions for consulting scripting ==
==This is probably where someone could post useful tips.==
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.


<p><strong>string attack()</strong><br />
INFO HERE PLOX.
<strong>string runaway()</strong><br />
<strong>string use_skill(  skill touse )</strong><br />
<strong>string throw_item(  item tothrow )</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>


<p><strong>boolean use_skill( int count, skill touse )</strong><br />
{{Flink|string|attack}}
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 />
{{Flink|string|runaway}}
See [[Skills and Effects]]</p><br />
{{Flink|string|use_skill|{{opt|int}}|skill|desc=Will loop the specified number of times using the specified skill, never reconsulting the script until the loop is complete.}}
 
{{Flink|string|throw_items|item|{{opt|item}}|desc=Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.}}
<p><strong>element monster_attack_element()</strong><br />
{{Flink|element|monster_attack_element|desc=Returns the element that the monster attacks with.}}
<strong>element monster_defense_element()</strong><br />
{{Flink|monster_defense_element|desc=Returns the element that the monster defends against.}}
returns the element that the monster attacks with, or defends against accordingly.</p>
{{Flink|int|monster_attack}}
 
{{Flink|int|monster_defense}}
<p><strong>int monster_attack()</strong><br />
{{Flink|int|monster_hp|desc=Returns the specified (current?) stat of the monster.}}
<strong>int monster_defense()</strong><br />
{{Flink|string|get_css_action|int|desc=Returns the specified line from the CCS section appropriate for the monster currently being fought. [http://kolmafia.us/showthread.php?p=9705#post9705]}}
<strong>int monster_hp()</strong><br />
{{Flink|boolean|will_usually_miss}}
returns the (current?) attack, defense, and hp of the monster.</p>
{{Flink|boolean|will_usually_dodge|desc=Returns if you will normally miss or be missed in battle.}}
<strong>string get_ccs_action( int round )</strong><br />
Returns the specified line from the CCS section appropriate for the monster currently being fought. [http://kolmafia.us/showthread.php?p=9705#post9705]
 
<p><strong>boolean will_usually_miss()</strong><br />
<strong>boolean will_usually_dodge()</strong><br />
returns if you will normally miss, or will usually be missed in battle.</p>

Revision as of 23:16, 2 March 2010

This is probably where someone could post useful tips.

INFO HERE PLOX.

string attack()

string runaway()

string use_skill( [int], skill )

Will loop the specified number of times using the specified skill, never reconsulting the script until the loop is complete.

string throw_items( item, [item] )

Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.

element monster_attack_element()

Returns the element that the monster attacks with.

monster_defense_element [[{{{2}}}|{{{2}}}()]]

Returns the element that the monster defends against.

int monster_attack()

int monster_defense()

int monster_hp()

Returns the specified (current?) stat of the monster.

string get_css_action( int )

Returns the specified line from the CCS section appropriate for the monster currently being fought. [1]

boolean will_usually_miss()

boolean will_usually_dodge()

Returns if you will normally miss or be missed in battle.