My class: Difference between revisions
Jump to navigation
Jump to search
imported>Grotfang m moved My class() to My class: Conformity |
imported>Bale mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|my_class}} | {{ | ||
{{#vardefine:return_type|class}} | #vardefine:name|my_class}}{{ | ||
{{FunctionPage| | #vardefine:return_type|class}}{{ | ||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
Line 24: | Line 25: | ||
special=When not logged in, this function returns $[[class]][none]. | special=When not logged in, this function returns $[[class]][none]. | ||
}} | }} | ||
[[Category:Your Character]] |
Latest revision as of 21:32, 21 May 2010
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].