Difference between revisions of "My name"

From Kolmafia
Jump to navigation Jump to search
imported>Efilnikufecin
imported>ZammyWarrior
Line 6: Line 6:
 
[[Category:Ash Functions |My name()]]
 
[[Category:Ash Functions |My name()]]
 
[[Category:Needs Code Samples | My name()]]
 
[[Category:Needs Code Samples | My name()]]
 +
<pre>#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>;
 +
}
 +
</pre>

Revision as of 03:39, 31 August 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>;
}