• 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.

    Parameters

    • whichType: HandleHolder<"itemtype">

      The classification of items to choose from.

    • level: number

      The level of the items to choose from. Passing a level of -1 is equivalent to any level.

    Returns number

    Note

    The item returned is not chosen from preplaced items on the map, but rather any item of that level.

Generated using TypeDoc