TypedItemSetOptionByName
Callable
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
optionName: string
The name of the option to set
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.refresh: boolean = true
Whether to refresh the character. This should generally be
true
, with custom script hooks being a potential exception.
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.
Sets a typed item's type and properties to the option whose name matches the provided option name parameter.