Class modifier

From Kolmafia
Jump to navigation Jump to search

Function Syntax

class class_modifier(item check_me ,string modifier_name )

class class_modifier(string check_me ,string modifier_name )

Returns a class if check_me is class specific. modifier_name should be "Class".

Code Sample

Prints the class which benefits from using a chintzy saucepan earring:

class cls = class_modifier( $item[chintzy saucepan earring] , "Class" );

This prints the chintzy item corresponding to your class:

foreach it in $items[chintzy seal pendant, chintzy turtle brooch,
                     chintzy noodle ring, chintzy saucepan earring,
                     chintzy disco ball pendant, chintzy accordion pin]
   if ( class_modifier( it, "Class" ) == my_class() )
      print("Your class chintzy item is the " + it +".") ;

More Information

See this thread for details.