Difference between revisions of "In-combat Consulting"

From Kolmafia
Jump to navigation Jump to search
imported>MagiNinjA
m (made link neater)
imported>Bale
(dad_sea_monkee_weakness)
 
(36 intermediate revisions by 12 users not shown)
Line 1: Line 1:
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.
+
For general information on In-Combat Consulting, see [[Custom_Combat_Script#Consult_Scripts|Consult Scripts]]
  
<code>'''string attack()'''</code><br />
+
{{Flink|buffer|attack}}
<code>'''string runaway()'''</code><br />
+
{{Flink|buffer|steal}}
<code>'''string use_skill(  skill touse )'''</code><br />
+
{{Flink|buffer|runaway}}
<code>'''string throw_itemitem tothrow )'''</code><br />
+
{{Flink|buffer|throw_item|item}}
<code>'''string throw_itemsitem tothrow1,  item tothrow2 )'''</code><br />
+
{{Flink|buffer|throw_items|item|item|desc=These five functions return the html response from sending the appropriate url request for the associated action while in battle.}}
Returns a string containing the html response from sending the appropriate url request for the associated action while in battle.
+
{{Flink|buffer|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|element|monster_element|desc=Returns the element that the monster is aligned with.}}
<code>'''boolean use_skill( int count, skill touse )'''</code><br />
+
{{Flink|int|monster_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|int|monster_defense}}
See [[Skills and Effects]]
+
{{Flink|int|monster_hp}}
 
+
{{Flink|int|monster_initiative|desc=Returns the specified (current?) stat of the monster.}}
<code>'''element monster_attack_element()'''</code><br />
+
{{Flink|phylum|monster_phylum|desc=Returns the phylum of the monster.}}
<code>'''element monster_defense_element()'''</code><br />
+
{{Flink|buffer|get_ccs_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]}}
returns the element that the monster attacks with, or defends against accordingly.
+
{{Flink|boolean|will_usually_miss}}
 
+
{{Flink|boolean|will_usually_dodge|desc=Returns if you will normally miss or be missed in battle.}}
<code>'''int monster_attack()'''</code><br />
+
{{Flink|int|expected_damage|desc=Returns the amount of damage you are expected to take each round.}}
<code>'''int monster_defense()'''</code><br />
+
{{flink|familiar|my_effective_familiar|desc=If familiar is mutable, this is its current form.}}
<code>'''int monster_hp()'''</code><br />
+
{{flink|familiar|my_discomomentum|desc=Current value of disco momentum built up in combat by Disco Dancing as a Disco Bandit.}}
returns the (current?) attack, defense, and hp of the monster
+
{{Flink|skill|stun_skill|desc=Character's skill to use for stunning a monster.}}
 
+
{{Flink|element|dad_sea_monkee_weakness|int|desc=Returns the elemental weakness of {{kolwiki|Dad Sea Monkee}} for a given round of combat.}}
<code>'''boolean will_usually_miss()'''</code><br />
+
[[Category:Scripting]]
<code>'''boolean will_usually_dodge()'''</code><br />
 
returns if you will normally miss, or will usually be missed in battle.
 

Latest revision as of 05:10, 13 November 2014

For general information on In-Combat Consulting, see Consult Scripts

buffer attack()

buffer steal()

buffer runaway()

buffer throw_item( item )

buffer throw_items( item, item )

These five functions return the html response from sending the appropriate url request for the associated action while in battle.

buffer use_skill( [int], skill )

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

element monster_element()

Returns the element that the monster is aligned with.

int monster_attack()

int monster_defense()

int monster_hp()

int monster_initiative()

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

phylum monster_phylum()

Returns the phylum of the monster.

buffer get_ccs_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.

int expected_damage()

Returns the amount of damage you are expected to take each round.

familiar my_effective_familiar()

If familiar is mutable, this is its current form.

familiar my_discomomentum()

Current value of disco momentum built up in combat by Disco Dancing as a Disco Bandit.

skill stun_skill()

Character's skill to use for stunning a monster.

element dad_sea_monkee_weakness( int )

Returns the elemental weakness of Dad Sea Monkee for a given round of combat.