Get power

From Kolmafia
Revision as of 03:35, 14 January 2015 by imported>Eliteofdelete
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Function Syntax

int get_power(item it )

  • it is the item to check for.

Returns the power of the item it or 0 if the item doesn't have a power

Code Samples

Lists out the current power of the gear you are wearing.

int total;
item thing;
foreach it in $slots[] {
   thing = equipped_item(it);
   if (thing != $item[none])
      print("The "+thing+" worn in the "+it+" slot has a power rating of "+get_power(thing)+".", "blue");
      total += get_power(thing);
}
print("The total power of your gear is "+total+".", "green");