inventory open

From Arx Libertatis Wiki
Jump to navigation Jump to search

The inventory open script command is used to open the inventory in the HUD for an entity. This command does not have any effect if the calling entity did not have an inventory created using inventory create or if the calling entity's inventory is already open.

If another entity's inventory is opened it is first closed as if inventory close was used, synchronously sending the inventory2_close event from the player to that entity.

This command synchronously sends the inventory2_open event from the player to the calling entity and does nothing (except for closing any previously open inventory) if that event ends with refuse.

Entities set to act as a shop using setshop will have their inventory automatically sorted when opened with matching items being combined into stacks if possible. The player will also be restricted in how they can interact with the inventory.

The inventory will automatically close once the player is 350 units away from the inventory owner unless the player is has the Telekinesis (Spacium Rune (field)Comunicatum Rune (control)) spell active in which case the maximum distance is 900 units. The player can also close the inventory from the HUD or scripts can use inventory close to manually close the inventory again.


inventory open

Context: Any Entity