Meat drop: Difference between revisions
Jump to navigation
Jump to search
imported>Heeheehee Small article, slightly modified from meat_drop_modifier()'s page. |
imported>Bale mNo edit summary |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#vardefine:name|meat_drop}} | {{ | ||
{{#vardefine:return_type|int}} | #vardefine:name|meat_drop}}{{ | ||
#vardefine:return_type|int}}{{ | |||
FunctionPage| | |||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 11: | Line 11: | ||
parameter1={{Param|monster|m}}| | parameter1={{Param|monster|m}}| | ||
return_type={{#var:return_type}}| | return_type={{#var:return_type}}| | ||
return_also={{#var:return_also}} | return_also={{#var:return_also}}| | ||
}}| | }}| | ||
Line 21: | Line 21: | ||
code= | code= | ||
<syntaxhighlight> | <syntaxhighlight> | ||
float monster_drop( | float monster_drop(monster mob) { | ||
int monster_drop = meat_drop( | int monster_drop = meat_drop(mob); | ||
float adjust_drop = monster_drop * (meat_drop_modifier() / 100); | float adjust_drop = monster_drop * (meat_drop_modifier() / 100.0 + 1); | ||
return adjust_drop; | |||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 32: | Line 31: | ||
see_also={{SeeAlso|meat_drop_modifier|item_drops}}| | see_also={{SeeAlso|meat_drop_modifier|item_drops}}| | ||
}} | }} | ||
[[Category:Item Management]] |
Latest revision as of 21:51, 21 May 2010
Function Syntax
Returns the base meat drop of the monster specified by m.
Code Samples
Uses your current meat drop modifier to determine how much you can expect to get, on average, from a monster.
float monster_drop(monster mob) {
int monster_drop = meat_drop(mob);
float adjust_drop = monster_drop * (meat_drop_modifier() / 100.0 + 1);
return adjust_drop;
}