Skip to main content

TypedItemSetRandomOption

Callable


  • Sets a typed item's type to a random option, respecting prerequisites and option validation.


    Parameters

    • C: Character

      The character on whom the item is equipped

    • itemOrGroupName: AssetGroupName | Item

      The item whose type to set, or the group name for the item

    • optionalpush: boolean = false

      Whether or not appearance updates should be persisted (only applies if the character is the player) - defaults to false.

    • optionalC_Source: Character = null

      The character setting the new item option. If null, assume that it is not the player character.

    Returns string

    • undefined or an empty string if the type was set correctly. Otherwise, returns a string informing the player of the requirements that are not met.