My name

From Kolmafia
Revision as of 21:31, 21 May 2010 by imported>Bale
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

string my_name()

Returns the name of the logged-in character (in all-lowercase).

Code Samples

This example imports different breakfast scripts depending on which character is running the script.

if (my_name() == "MyMain") {
  import <MainBreakfast.ash>;
else if (my_name() == "MyMulti") {
  import <MultiBreakfast.ash>;

Note that case doesn't matter for string comparisons, so the following two examples are functionally equivalent.

if (my_name() == "MyCharacter") {

if (my_name() == "mycharacter") {

See Also



When not logged in, this function returns an empty string.