promotional bannermobile promotional banner

Equip

Abandoned
Equip
<p>A guide for what each equip slot is named (in my code) and an example of the bag index layout (showing page 2 of the bag inventory).
</p>

A guide for what each equip slot is named (in my code) and an example of the bag index layout (showing page 2 of the bag inventory).

Description

Name: Equip

Author: nbanyan

Version: 1.3


/equip <equipSlot> <itemName>

Attempts to equip an item with itemName in it's name to the specified equipSlot

<equipSlot> is where to equip the item: head, gloves, boots, shirt, pants, cloak, belt, shoulder, necklace, ammo, bow, rightring, leftring, rightearring, leftearring, mainhand, offhand, trinket, talisman1, talisman2, talisman3

<itemName> is part of the name of the item to equip (one word only, no spaces or quotes)


/equip <equipSlot> <invNum>

Same as above, except that it attempts to equip the item at the specified inventory slot

<invNum> is a number from 1 to 180


/equip <equipSlot>

Unequips whatever is in the equipment slot


Function list:

eq.help()

Basic help printout


eq.EquipSearch(slot, item)

"slot" is equip slot on character, item is part of the name of the item to equip.

ex. eq.EquipSearch("head","hat") tries to equip the first item with hat in the name to the helmet slot


eq.getEquipSlot(slot)

Returns the game's index number of the corrisponding equipment slot.

ex. eq.getEquipSlot("mainhand") = 16


eq.Equip(slot, item)

"slot" is equip slot on character, "item" is inventory slot number.

ex. eq.Equip("head", 1) attempts to equip whatever is in inventory slot 1 (first slot in first inventory bag) to the helmet slot. if that inventory slot is empty, any equiped helmet is unequiped anyway.


eq.unequip(slot)

Unequips anything that's in the chosen equipment slot


eq.EquipIndex(slot, item)

Equip the item in inventory slot "item" into equipment slot "slot"


eq.iSearch(str,num)

Finds the inventory slot of the first item with the name containing "str". Search starts from inventory slot "num"

"num" defaults to 0 if not specified (start search from beginning of inventory


eq.commandparse(str)

Returns an array containing the contents of "str" as follows:

Index 0 is the size of the array (number of arguments)

The rest of the elements are parts of "str" as they where seperated by whitespaces (quotes not implemented)

ex. str = "head 3 stuff" return = {[3]["head"]["3"]["stuff"]}


History

1.3

Added Slash commands

Added Unequip function

Added basic inventory search

Isolated functions into a common object group (ALL FUNCTION NAMES CHANGED)


1.2

Added the talisman slots and the trinket slot (trinket is untested; please let me know if it works)


1.1

Added support for all the equip slots except the trinket and non-offhand talisman slots.

Added a picture reference for the names I use for these slots.


1.0

Initial release. (offhand and arrow as seperate functions)

The Equip Team

profile avatar
  • 3
    Projects
  • 7.6K
    Downloads

More from _ForgeUser2050634