ChooseRandomItemEx
- Parameters
whichType itemtypeThe classification of items to choose from.
level integerThe level of the items to choose from. Passing a level of -1 is equivalent to any level.
- comment
Returns the rawcode ID of a random item of the specified level and item type. Passing a level of -1 will return an item of any level. If there are no items of the specified level, the id returned will be 0.
- note
The item returned is not chosen from preplaced items on the map, but rather any item of that level.
- patch
1.07
- Source
- common.j (suggest an edit or discuss on Github)
- return type
integer- Source code
native ChooseRandomItemEx takes itemtype whichType, integer level returns integer