Elemental resistance

From Kolmafia
Revision as of 22:34, 28 February 2010 by imported>Grotfang (Conform to template)
Jump to navigation Jump to search



Function Syntax

float elemental_resistance(element $element[] can be hot, cold, stench, sleaze, spooky. )

  • Y

Returns your current resistance for a specified element in the form of a floating point integer.

Code Samples

Checks that you have a resistance greater than 20 for the element "hot".

boolean hot_check() {
   if(elemental_resistance($element[hot]) > 20) {
      return true;
   }
   return false;
}

Special

When not logged in the function returns 0 (needs spading).