equip

From Arx Libertatis Wiki
Jump to navigation Jump to search

The equip script command is used to make the player equip or unequip the caller for an entity. The slot that caller is equipped in depends on the caller's equipment type.

equip -r sends the equipout event from the player to the caller and then if the item was actually unequipped sends it from the caller to the player and again from the player to the caller. The player will start dragging the unequipped entity if not already dragging anything, even if the mouse is not held down. Otherwise the unequipped item is added to the player inventory. If the item does not fit into the player inventory or cannot be put into inventories then it is dropped in front of the player instead.

equip without -r sends the equipin event from the player to the caller and then unequips any existing equipment in the same slot as if equip -r was called by that entity and equips the new entity. For rings there are two slots and equip will prefer the left slot if empty, otherwise use the right slot if empty if both are full alternates between the two slots.

This command can only change the player equipment. To have an NPC equip a weapon use setweapon.

Usage

equip [-r] player

Context: Any Entity

Flags:

 -r: Unequip the calling entity instead of equipping it