Get monsters: Difference between revisions
Jump to navigation
Jump to search
imported>StDoodle mNo edit summary |
imported>Bale mNo edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 6: | Line 6: | ||
FunctionPage| | FunctionPage| | ||
name={{#var:name}}| | name={{#var:name}}| | ||
function1={{Function| | function1={{Function| | ||
Line 17: | Line 16: | ||
}}| | }}| | ||
function_description=This function returns a map of every monster in a given location. Useful for iterating over for more specific information on an area.| | function_description=This function returns a map of every monster in a given location. Useful for iterating over for more specific information on an area. Be aware that this also includes monsters that result from choice adventures, such as the Clownlord Beelzebozo, the Guy Made of Bees, etc.| | ||
code1={{CodeSample| | code1={{CodeSample| | ||
Line 40: | Line 39: | ||
special=When not logged in, this function returns $monster[none] ?? | special=When not logged in, this function returns $monster[none] ?? | ||
}} | }} | ||
[[Category:Adventuring]] |
Latest revision as of 22:21, 21 May 2010
Function Syntax
monster [int] get_monsters(location loc )
- loc is the location you want to get the monsters for.
This function returns a map of every monster in a given location. Useful for iterating over for more specific information on an area. Be aware that this also includes monsters that result from choice adventures, such as the Clownlord Beelzebozo, the Guy Made of Bees, etc.
Code Samples
This function returns predicted meat drop rates for a specified location.
monster [int] monster_list = get_monsters($location[giant castle]);
float total_meat = 0;
int counter = 0;
foreach int in monster_list {
total_meat = total_meat + meat_drop(monster_list[int]);
counter = counter + 1;
}
float final = total_meat / counter;
print(final);
See Also
Special
When not logged in, this function returns $monster[none] ??