Difference between revisions of "In-combat Consulting"

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
imported>MagiNinjA
m
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.
 
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()'''<br />
+
<code>'''string attack()'''</code><br />
'''string runaway()'''<br />
+
<code>'''string runaway()'''</code><br />
'''string use_skill(  skill touse )'''<br />
+
<pre><code>'''string use_skill(  skill touse )'''</code><br />
'''string throw_item(  item tothrow )'''<br />
+
<code>'''string throw_item(  item tothrow )'''</code><br />
'''string throw_items(  item tothrow1,  item tothrow2 )'''<br />
+
<code>'''string throw_items(  item tothrow1,  item tothrow2 )'''</code><br />
 
Returns a string containing 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.
  
'''boolean use_skill( int count, skill touse )'''<br />
+
<code>'''boolean use_skill( int count, skill touse )'''</code><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 />
 
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 [[%28ASHRM%29_Skills_and_Effects]]
 
See [[%28ASHRM%29_Skills_and_Effects]]
  
'''element monster_attack_element()'''<br />
+
<code>'''element monster_attack_element()'''</code><br />
'''element monster_defense_element()'''<br />
+
<code>'''element monster_defense_element()'''</code><br />
 
returns the element that the monster attacks with, or defends against accordingly.
 
returns the element that the monster attacks with, or defends against accordingly.
  
'''int monster_attack()'''<br />
+
<code>'''int monster_attack()'''</code><br />
'''int monster_defense()'''<br />
+
<code>'''int monster_defense()'''</code><br />
'''int monster_hp()'''<br />
+
<code>'''int monster_hp()'''</code><br />
 
returns the (current?) attack, defense, and hp of the monster
 
returns the (current?) attack, defense, and hp of the monster
  
'''boolean will_usually_miss()'''<br />
+
<code>'''boolean will_usually_miss()'''</code><br />
'''boolean will_usually_dodge()'''<br />
+
<code>'''boolean will_usually_dodge()'''</code><br />
 
returns if you will normally miss, or will usually be missed in battle.
 
returns if you will normally miss, or will usually be missed in battle.

Revision as of 21:15, 8 May 2007

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 (ASHRM)_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.