Class modifier: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee m Added some spacing for legibility purposes. |
imported>Bale mNo edit summary |
||
Line 5: | Line 5: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 46: | Line 45: | ||
more_info= See [http://kolmafia.us/showthread.php?802 this thread] for details.| | more_info= See [http://kolmafia.us/showthread.php?802 this thread] for details.| | ||
}} | }} | ||
[[Category:Modifier Functions]] |
Latest revision as of 05:24, 22 May 2010
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" );
print(cls);
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.