Inventory To Variable
Description
Serializes the target player's entire inventory into an existing string variable, stored as an encoded string. Pair it with InventoryFromVariable to restore the inventory later.
The target must be a player. The target variable must already exist as a string variable: if it is unset, or is not a string variable, the mechanic does nothing. Initialize it first with MythicMobs' setvariable mechanic using type=STRING.
Attributes
| Attribute | Aliases | Description | Default |
|---|---|---|---|
| variable | var, name, n, key, k | The existing string variable to write the serialized inventory into. May include a scope prefix (e.g. global.stash) |
|
| scope | s | The variable scope to read the variable from | taken from the variable name |
Examples
Skills:
- setvariable{var=caster.stash;type=STRING;value=""} @self
- inventoryToVariable{variable=caster.stash} @self
Aliases
- serializeInventory
- inventoryToVar