Elemental resistance

From Kolmafia
Revision as of 14:20, 22 February 2010 by imported>Grotfang (First draft - created page. Example is simplistic, but I figured that's the idea)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

elemental_resistance( element )

Returns your current resistance for a specified element in the form of a float.

The following function returns true if you have a resistance greater than 20 for the element "hot".

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

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