Difference between pages "In-combat Consulting" and "My name"

From Kolmafia
(Difference between pages)
Jump to navigation Jump to search
imported>StDoodle
m
 
imported>ZammyWarrior
 
Line 1: Line 1:
For general information on In-Combat Consulting, see [[Custom_Combat_Script#Consult_Scripts|Consult Scripts]]
+
[[string]] [[my_name()]]
  
{{Flink|buffer|attack}}
+
This function returns the logged-in character's name as a [[string]].
{{Flink|buffer|steal}}
+
 
{{Flink|buffer|runaway}}
+
[[Category:Your Character | My name()]]
{{Flink|buffer|throw_item|item}}
+
[[Category:Ash Functions |My name()]]
{{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.}}
+
<pre>#Script checks players name. If your name returns ZammyWarrior it will import Zammy Morning.ash script.
{{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.}}
+
#If name returns Hippymon it will import Hippymon Morning.ash script.
{{Flink|element|monster_element|desc=Returns the element that the monster is aligned with.}}
+
#Great script for one with multiple accounts as a "breakfast script".
{{Flink|int|monster_attack}}
+
if(my_name() == "ZammyWarrior"){
{{Flink|int|monster_defense}}
+
import <Zammy Morning.ash>;
{{Flink|int|monster_hp|desc=Returns the specified (current?) stat of the monster.}}
+
}
{{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]}}
+
else if(my_name() == "Hippymon"){
{{Flink|boolean|will_usually_miss}}
+
import <Hippy Morning.ash>;
{{Flink|boolean|will_usually_dodge|desc=Returns if you will normally miss or be missed in battle.}}
+
}
 +
</pre>

Revision as of 23:59, 16 November 2007

string my_name()

This function returns the logged-in character's name as a string.

#Script checks players name. If your name returns ZammyWarrior it will import Zammy Morning.ash script.
#If name returns Hippymon it will import Hippymon Morning.ash script.
#Great script for one with multiple accounts as a "breakfast script".
if(my_name() == "ZammyWarrior"){
import <Zammy Morning.ash>;
}
else if(my_name() == "Hippymon"){
import <Hippy Morning.ash>;
}