Project

General

Profile

item (Data Type)

Description

This DataType includes data available to ISXEQ2 related to items.   (Additional information is available in the iteminfo datatype, which is accessible via the ToItemInfo member below.)

(Please note that all members of this datatype are available in memory at all times and never require a server or cache check.)

Aquisition

The best way to acquire an item datatype object is via the Inventory member or QueryInventory method of character.

Members

  • int Index
  • uint ID
  • int64 SerialNumber
  • string Name
  • string Location
    • Returns: Inventory, Equipment, Bank, Shared Bank, or Unknown
  • string ToLink
    • This will recreate the actual link used with in game chat channels (used typically with eq2echo or eq2execute).
  • int LinkID
  • int IconID
  • int Quantity
  • int EffectiveLevel
  • int Slot
    • Returns the current slot position for the item within its container, or within your inventory. So, if the item is in a bag that has 20 slots, it will return a number between 0 and 19. If the item (or container) is sitting in one of your six "real" inventory slots, it will return 0 to 5.
  • bool IsReady
    • Returns true if the IsActivatable == TRUE and the item is ready for use
  • float TimeUntilReady
    • Returns the time in seconds until the item is ready for use
  • bool InInventorySlot
    • In one of your 6 actual inventory slots
  • bool IsInventoryContainer
    • Is a container placed in one of your 6 actual inventory slots
  • bool IsBankContainer
    • Is a container placed in one of your 12 actual bank slots
  • bool IsSharedBankContainer
    • Is a container placed in one of your 8 actual shared bank slots
  • bool IsAutoConsumeable
  • bool AutoConsumeOn
  • bool CanBeRedeemed
  • bool IsFoodOrDrink
  • bool IsScribeable
  • bool IsUsable

Containers

  • int ContainerID
  • bool IsContainer
  • bool InContainer
  • int InContainerID
  • IsSlotOpen[#]
  • item ItemInSlot[#]
  • int NextSlotOpen
  • int NumSlots
  • int NumSlotsFree

Item Details

  • bool IsItemInfoAvailable
    • If the item "details" are not already stored in a cache, then this will return FALSE until it is available.  Script writers are encouraged to utilize the logic shown in the sample included with the Knowledgebase article "Iterating Inventory and Handling 'iteminfo' Aquisition".
  • iteminfo ToItemInfo
    • If the item "details" are not already stored in a cache, then this will return NULL until it is available.  Script writers are encouraged to utilize the logic shown in the sample included with the Knowledgebase article "Iterating Inventory and Handling 'iteminfo' Aquisition".
    • (Note:   Due to how ISXEQ2 handles the acquisition of iteminfo, script writers should check IsItemInfoAvailable until it's TRUE before using ToItemInfo (as opposed to checking ToItemInfo until it's not NULL.)    This methodology will avoid spamming the server with requests.)

    Technical Notes on ItemInfo Acquisition and Use

  • The iteminfo datatype is almost always used with UI elements by the EverQuest 2 client.   Therefore, there are some limitations on how well ISXEQ2 can manage dealing with data that changes (e.g., iteminfo.Condition).    Basically, IsItemInfoAvailable only indicates that ToItemInfo is currently VALID, not that it's the most up-to-date information!   So, script writers are encouraged to give the game a few seconds to update when retrieving data from iteminfo that may change.   For example, when checking the Condition of an item, a script might check IsItemInfoAvailable; then, if it's TRUE, check ToItemInfo.Condition once then wait a few seconds and check it again.   If the values are different, then it means that the "Condition" of the item has recently changed.    (Please note that this is only an issue for iteminfo members that change.   For most things, it only matters that IsItemInfoAvailable is TRUE.)

Member Examples

  • ${Me.Inventory[Query, Name =- "sewn"].IsSlotOpen[5]}
  • ${Me.Inventory[Query, Name =- "sewn"].ItemInSlot[5].Name}
  • ${Me.Inventory[Query, Name =- "sewn"].NextSlotOpen
  • ${Me.Inventory[Query, Name =- "sewn"].IsSlotOpen[${Me.Inventory[Query, Name =- "sewn"].NumSlots}]}
    • ^ a useful one to see if a bag is full
  • eq2echo ${Me.Equipment[Head].ToLink}
  • eq2execute guildsay ${Me.Equipment[Head].ToLink[My kickass Hat]}!

Methods

  • DestroyWithConf
  • Destroy
  • Sacrifice
  • Sacrifice[With Confirmation]
    • The above two methods require that you have the sacrifice window open and that the item be in your inventory and be an acceptable offering.
  • Transmute
    • Note: You may wish to use the RewardWindow TLO to accept the reward after transmuting.
  • Salvage
  • Refine
  • ReclaimAdornments
  • Equip
  • UnEquip
  • Consume
  • ToggleAutoConsume
    • Works for anything that can be 'auto consumed' including food/drink.
  • Examine
  • Open
    • containers only
  • Use
    • 'Activate' will work for this as well
  • Move[#,#]
    • Parameters for this command are BagSlot# and (ContainerID#/LocationID#) respectively.
  • Move[NextFreeNonBank,#]
    • The second parameter of this command is the quantity that you wish to move. This command will move that quantity of the given item to the first available slot in your on-character inventory. (Note: For those items that do not have a 'quantity' simply use 0.)
  • Move[NextFreeInBank,#]
    • The second parameter of this command is the quantity that you wish to move. This command will move that quantity of the given item to the first available slot in your bank or shared bank. (Note: For those items that do not have a 'quantity' simply use 0.)
  • Move[#,#,#]
    • Parameters for this command are BagSlot#(ContainerID#/LocationID#), and Quantity respectively.
  • AddToDepot[ID#]
    • Will add the entire 'stack' to the depot with Depot ID#
  • AddToDepot[ID#,Qty#]
    • Adds Qty# to the depot with Depot ID#
  • RemoveFlag[#]
    • Removes a bit flag on a custom inventory array item
  • SendAsGift[Quantity]
    • Must be in EQ2Mail[compose] already
    • Quantity defaults to 1 if not given
    • Only works for items in your inventory
  • AddToConsignment
    • Moves the entire item/stack to the first available vendor
  • AddToConsignment[Qty#]
    • Qty# = Quantity to be added -- moves to the first available vendor
  • AddToConsignment[Qty#, Vendor#]
    • Vendor# = 1 to 6: the index of the vendor/vendingcontainer
  • AddToConsignment[Qty#, Vendor#, StackWithSerial#]
    • StackWithSerial# = SerialNumber of the consignment with which you want to stack this addition
Note:  The AddToConsignment method will only work if the item is in your inventory and if your broker window is up.
  • InstallAsVendingContainer
    • Adds the item (which must be a vending container and must be in your inventory) to your consignment system.
    • It will place the vending container into the first free slot that is available. If you have no free slots, it will fail with an error message.

Methods Examples

  • Me.Inventory[Query, Name =- "fishbone"]:Equip
  • Me.Inventory[Query, Location =- "Equipment" && Name =- "fishbone"]:Use
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "strange black ore"]:Examine
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "carp"]:Consume
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "Briarwood Scraps"]:Destroy
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "Shroud"]:Open
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "Azure"]:Move[${Me.Inventory[Query, Location =- "Inventory" && Name =- "Briarwood Lumber"].Slot}+1,${Me.Inventory[Query, Location =- "Inventory" && Name =- "Briarwood Lumber"].InContainerID}]
    • move your azure shard to the next slot down from your briarwood lumber
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[${Me.Inventory[Query, Location =- "Inventory" && Name =- "Azure"].Slot}+1,${Me.Inventory[Query, Location =- "Inventory" && Name =- "Azure"].InContainerID}]
    • move a stack of crude broadcloth thread next to your azure shard
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[${Me.Inventory[Query, Location =- "Inventory" && Name =- "Azure"].Slot}+1,${Me.Inventory[Query, Location =- "Inventory" && Name =- "Azure"].InContainerID},3]
    • ​move only 3 of those crude broadcloth threads instead of the entire stack
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[${Me.Inventory[Query, Location =- "Inventory" && Name =- "Collector's"].NextSlotOpen},${Me.Inventory[Query, Location =- "Inventory" && Name =- "Collector's"].ContainerID}]
    • ​move that stack of crude broadcloth thread to the first available open slot in the collector's pouch
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[${Me.Inventory[Query, Location =- "Inventory" && Name =- "Collector's"].NextSlotOpen},${Me.Inventory[Query, Location =- "Inventory" && Name =- "Collector's"].ContainerID},4]
    • ​move only 4 of them instead...
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[NextFreeNonBank,4]
    • ​move four of our crude broadcloth threads to the first available open slot in inventory
  • Me.Inventory[Query, Location =- "Inventory" && Name =- "crude broadcloth thread"]:Move[NextFreeInBank,4]
    • ​move our thread to the first slot in our bank (given that the bank window is currently open)

Technical Notes

  • The ReclaimAdornments, RefineSalvage and Transmute methods no longer activate the ability.  Rather, these methods now only "click the item" for you after the ability has been used.   For example, to transmute an item, you might use something like this:
       Me.Ability[Query, ID == "3943362837"]:Use
       wait 5
       Me.Inventory[Query, Name =- "ITEM_NAME"]:Transmute  
  • The RefineReclaimAdornmentsTransmute and Salvage methods are safe at all times.  If the ReadyToRefineTransmuteOrSalvage member of the eq2 datatype happens to be false when you use the method, it will simply do nothing.   Also, the "wait 5" in the snippet above is at your discretion -- it is there to mimic human interaction.   Finally, for reference, the AbilityID# for Transmute is 3943362837, for Salvage is 2266640201 and for Refine is 427735786.
    • Also, please note that ReadyToRefineTransmuteOrSalvage is a valid check when using ReclaimAdornments as well.