My class

From Kolmafia
Revision as of 13:28, 1 March 2010 by imported>Grotfang (moved My class() to My class: Conformity)
Jump to navigation Jump to search


Function Syntax

class my_class()

Returns the current class of the logged-in character.

Code Sample

The following decides how many big rocks to acquire based on the character's class:

int rocks = 1;

if (my_class() == $class[seal clubber] || my_class() == $class[turtle tamer] || my_class() == $class[disco bandit]) {
   rocks = 2
}

Special

When not logged in, this function returns $class[none].