Item drop modifier: Difference between revisions

From Kolmafia
Jump to navigation Jump to search
imported>StDoodle
mNo edit summary
imported>StDoodle
mNo edit summary
Line 1: Line 1:
{{#vardefine:name|item_drop_modifier}}
{{
{{#vardefine:return_type|float}}
#vardefine:name|item_drop_modifier}}{{
#vardefine:return_type|float}}{{


{{FunctionPage|
FunctionPage|
name={{#var:name}}|
name={{#var:name}}|
function_category=Your Character|
function_category=Your Character|
Line 34: Line 35:


see_also={{SeeAlso|meat_drop_modifier|item_drops}}|
see_also={{SeeAlso|meat_drop_modifier|item_drops}}|
special=Returns 0 when not logged in.
special=Returns 0.0 when not logged in.
}}
}}

Revision as of 15:11, 8 March 2010

needs(better_code_samples);

Function Syntax

float item_drop_modifier()

Returns the percentage modification on item drops as a result of your equipment, effects (including familiar) and area modifiers (such as in the sea).

Code Samples

Shows your current item drop percentages for each of a monster's item drops.

void item_drop() {
   int[item] monster_items = item_drops($monster[alphabet giant]);
   foreach item in monster_items {
      float drop_rate = monster_items[item];
      float modified = drop_rate * (item_drop_modifier()/100);
      float your_rate = drop_rate + modified;
      print( item + ": " + your_rate );
   }
}

See Also

meat_drop_modifier() | item_drops()

Special

Returns 0.0 when not logged in.