Difference between revisions of "My name"

From Kolmafia
Jump to navigation Jump to search
imported>ZammyWarrior
imported>ZammyWarrior
Line 5: Line 5:
 
[[Category:Your Character | My name()]]
 
[[Category:Your Character | My name()]]
 
[[Category:Ash Functions |My name()]]
 
[[Category:Ash Functions |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.
 
<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.
 
#If name returns Hippymon it will import Hippymon Morning.ash script.

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>;
}