Item drops array
Function Syntax
record [int] item_drops_array()
record [int] item_drops_array(monster m )
Returns an array of records with three fields:
record {
item drop;
int rate;
string type;
}
Since this is the first function to return a record, it cannot be stored to a variable, and thus the only way to access the data is by iterating over the elements in the array.
Code Samples
Prints all information Mafia has regarding the item drops of a certain monster.
void drops(monster mob){
print("Monster: " + mob);
foreach index, rec in item_drops_array(mob)
print("item: "+rec.drop+", drop rate: "+rec.rate+", type: "+rec.type);
}
See Also
Special
The zero-parameter form returns the last monster encountered (the current one, if used in combat).