Equipment
Scripting with the Equipment class.
The Equipment
class serves as the settings and functionality of the inventory's equipment section. All fields listed in the Equipment tab of the Inventool editor window are public and can be changed at runtime.
NOTE: Runtime edits of the equipment are not saved automatically. This would need to be done manually.
When making edits to the equipment, relevant parts of the Inventool Window may need to be refreshed.
Accessing the Equipment
You can access the player's equipment with Inventool.Equipment
.
Fields & Properties
rotationType
The character viewer rotation type.
Equipment.RotationType
public
slots
A list of all created equipment slots.
List<EquipmentSlot>
public
Equipment Slots
The equipment uses Equipment Slot as it's slots.
Adding Slots
Getting Slots
You can access the full list of slots with the slots
field.
Check If A Slot Exists
Get Slot By Name
Get Slot At Position
Get Slot With A Specific Item Stack
Get First Slot of An Item Type
Removing Slots
Equipping
Checking Item Equipped State
The IsEquipped
method checks if an Item Stack or Item is currently equipped at any slot.
Equip An Item
The TryEquip
method attempts to equip an ItemStack
at the first slot possible. This method returns true if the item was successfully equipped. This may fail if there isn't a slot that can equip the item.
Unequipping
Unequip An Item
The TryUnequip
method attempts to unequip an ItemStack
. This method returns true if the item was successfully unequipped. This will only fail if the item stack was not equipped.
Unequip All
The UnequipAll
method unequips all item stacks from all slots.
Last updated