|
no. completely different numbering system. (and wandering off topic here...)
the number you see in your log is just used for item links. Its a hash (different kind of hash- hash as in crc type hash, not hash as in 'not an array'). An item can be refered to by a number of different numbers, depending on your relationship to it. If its a link, the number is a static number tied to that item in the link database.
If its in your inventory, it can be addressed by its index number. The problem is that, even though your calling an index number, leading you to belive the data is stored as an array (aka a numbered list), its only a list once you enter a zone. In the background, its stored in a hash (aka an associative array- the key is that the server uses a magical system to store data in the most effcient way possible. Meaning that the order or index number can and will change every time you call it). The point of all this is that those index numbers are dynamic- just because item X is in the number 1 position this time, doesnt mean it will be next time. Also, every time you touch an item, it consumes that index number and adds a new one to the end. So if item X was indeed at positon 1, and you moved it from one slot to another, its now in position 31 (assuming you had 31 items- indexes start counting at zero).
Equiped item is indexed by slot number. These are static, and also start counting at zero
Items for sale by NPCs can just be called by the number you see in the log (make sure you convert it to unsigned)
Items for sale on the broker, and items you sell, trade, etc (including to NPCs) are called by thier unique serial number.
OK- ways to interact with the data:
/info inventory <index> will pop up the examine window for that item. If its in the bank or house vault, you now have to be in a bank or vault session to retrive the data.
/inventory move <a series of 4 values, which I always get mixed up- they are in no order: the current item index number, the 'category (inventory, bank, shared, vault,), slot number (zero for auto), and quanity.
/inventory pop <index> removes item in overflow and auto inventories it
inventory destroy <index> self explainitory
/inventory equip <index> ditto
/equip use <index> use (for right clickies). /use_equipped <index> also works
/equip unequip <index> self explaintory
/buy_from_merchant <ID (the one you see in your log) <quanity> buys said item, assuming the vendor sells it
/buy_from_broker <serial number> <quanity> buys an item for sale on the broker
/info consignment <serial number> shows the examine info for any item that is for sale on the broker. This is the 'real' link- the one that lists the person who made it if crafted, etc, as opposed to the generic one
/sell_to_merchant <serial number> <quanity> sell an item from your inventory to a merchant
I don't recall atm if trading items between players is done via index or serial, but I belive its via index. Can check easily enough, though, if anyone really wants to know.
This is not an exaustive list by any means, just some examples to illustrate the different ways the client/server exchange takes place, and what I mean when I say that the items 'number' depends on your relationship with it.
At any rate- the inventoy index table is sent as a whole every time you zone. Whenever theres a change to your inventory, you get an update. I would assume that, the client has to keep that table in memory to know what index number to send to the server when the player does somthing- so it follows that a new fuction could be built into eq2service to keep tabs on that table, and be able to import that as a datatype. It would be useful to be able to, say for example, retrive the index number of any item matching a regex, so a harvestbot could automaticly delete everything but rares or specific items... or say for tradeskilling bots, to get the index for all items matching a regex, to manipulate and automate your inventory from the commandline...and so on.
|