ChooseRandomItem

Parameters
level integer

The 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. 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.00

Source
common.j
return type
integer
Source code
native ChooseRandomItem         takes integer level returns integer