ISXEQ2 now supports manipulation/automation of the broker consignment system in EverQuest 2. I will provide a brief explanation and examples of each concept below.
Before I begin, let me give a few definitions. First, I call the entire system of selling items on the broker the consignment system, and items that are for sale are called consignment (this is different than merchandise, which is what you sell to an NPC vendor). Containers that you place in the consignment system to hold your consignment items I call vendor containers.
Also, please note that this document does not contain all of the members/methods that were added (just the ones that are the most useful for scripting). If there is other information you need, please check the patch notes and/or the wiki.
I. Placing a vendor container
To place a vending container (for the purposes of our examples, we will use a 'sturdy backpack') on the broker to become a part of your consignment system use the following method:
This method will place the sturdy backpack into the first slot that is available. If no slots are available, it will do nothing.
II. Vending Container Information
ISXEQ2 has a datatype now called 'vendingcontainer'. This datatype will allow you to access information and perform methods on vending containers that exist in your consignment system. Again, we are going to use the 'study backpack' that we placed earlier for our examples below:
Please note that the 'vendingcontainer' datatype is accessed via the 'Vending' member of the 'character' datatype (ie, ${Me.Vending[]})
One of the interesting things about the new consignment system is that coin is actually contained within the individual containers. Therefore, you could actually withdrawl coin from a specific vending container like this:
There is also another method in isxeq2 that will allow you to remove all the money from all of your vending containers at once:
Finally, if you wanted to remove the sturdy backpack from your consignment system, then all you would need to do is this:
III. Adding an item to your consignment system for selling
Now that you have a vending container on the broker, you need to add items to the system for selling. Using 'maple lumber' as an example, this can be done with any item in your inventory with the following method:
IV. Manipulating and getting information about items you are selling
Items for sell in the current vending container are accessed via the Consignment member of the 'vendingcontainer' datatype. You can access this using the item's name or it's index within the item array. (ie, if there are 6 items for sell, then ${Me.Vending[name].Consignment[5]} will access the 5th one.)
Here are some common things that you might want to know about items you are selling:
And here are some things you might want to do with your consignment items while they're in the system:
V. Iterating through your consignment items (advanced)
To iterate through all of your consignment items, you would use the following member of the vendingcontainer datatype:
You could do something similar to this to iterate through all the items you have for sale on all of your vending containers and print the name of each item:
VI. Miscellaneous
Here are some other information that you might find useful:
--------------------------
That's it for now! Please do not post on this thread unless you have additional examples or tutorials related to Using the Consignment System (Selling). Please post comments or questions on the general discussion board.
Before I begin, let me give a few definitions. First, I call the entire system of selling items on the broker the consignment system, and items that are for sale are called consignment (this is different than merchandise, which is what you sell to an NPC vendor). Containers that you place in the consignment system to hold your consignment items I call vendor containers.
Also, please note that this document does not contain all of the members/methods that were added (just the ones that are the most useful for scripting). If there is other information you need, please check the patch notes and/or the wiki.
I. Placing a vendor container
To place a vending container (for the purposes of our examples, we will use a 'sturdy backpack') on the broker to become a part of your consignment system use the following method:
Code:
[B]Me.Inventory[sturdy backpack]:InstallAsVendingContainer[/B]
II. Vending Container Information
ISXEQ2 has a datatype now called 'vendingcontainer'. This datatype will allow you to access information and perform methods on vending containers that exist in your consignment system. Again, we are going to use the 'study backpack' that we placed earlier for our examples below:
Please note that the 'vendingcontainer' datatype is accessed via the 'Vending' member of the 'character' datatype (ie, ${Me.Vending[]})
Code:
[B]echo ${Me.Vending[sturdy backpack].UsedCapacity[/B]
-- returns the number of items currently in the backpack
[B]echo ${Me.Vending[sturdy backpack].TotalCapacity[/B]
-- returns the number of items that the backpack can hold total
[B]echo ${Me.Vending[study backpack].CurrentCoin[/B]
-- returns the amount of coin that the backpack has
made and contains currently (in silver pieces).
Code:
[B]Me.Vending[sturdy backpack]:TakeCoin[20.06][/B]
-- withdraws 20 SILVER and 6 COPPER from your backpack.
[B]Me.Vending[sturdy backpack]:TakeCoin[${Me.Vending[sturdy backpack].CurrentCoin}][/B]
-- withdraws all the money from the sturdy container
Code:
[B]Me:TakeAllVendingCoin[/B]
Code:
[B]Me.Vending[sturdy backpack]:Remove[/B]
Now that you have a vending container on the broker, you need to add items to the system for selling. Using 'maple lumber' as an example, this can be done with any item in your inventory with the following method:
Code:
[B]Me.Inventory[maple lumber]:AddToConsignment[20][/B]
-- Adds 20 maple lumbers to your consignment system for selling
IV. Manipulating and getting information about items you are selling
Items for sell in the current vending container are accessed via the Consignment member of the 'vendingcontainer' datatype. You can access this using the item's name or it's index within the item array. (ie, if there are 6 items for sell, then ${Me.Vending[name].Consignment[5]} will access the 5th one.)
Here are some common things that you might want to know about items you are selling:
Code:
[B]echo ${Me.Vending[Sturdy Backpack].Consignment[maple lumber].Value}[/B]
-- The amount, in silver pieces, that an NPC vendor would buy this from you.
[B]echo ${Me.Vending[Sturdy Backpack].Consignment[maple lumber].Quantity}[/B]
-- Number of maple lumber still for sale in this stack
[B]echo ${Me.Vending[Sturdy Backpack].Consignment[maple lumber].Price}[/B]
-- Your current price of an individual piece of maple lumber, in silver pieces.
Code:
[B]Me.Vending[Sturdy Backpack].Consignment[maple lumber]:SetPrice[10][/B]
-- Sets the price of maple lumber to 10 silver pieces each.
[B]Me.Vending[Sturdy Backpack].Consignment[maple lumber]:Unlist[/B]
-- Unlists the maple lumber (ie, it will not be 'for sale')
[B]Me.Vending[Sturdy Backpack].Consignment[maple lumber]:List[/B]
-- Lists the maple lumber for sale.
[B]Me.Vending[Sturdy Backpack].Consignment[maple lumber]:Remove[10][/B]
-- Removes 10 maple lumber from the consignment system to your inventory
[B]Me.Vending[Sturdy Backpack].Consignment[maple lumber:Remove[${Me.Consignment[maple lumber].Quantity}][/B]
-- Removes all of the maple lumber from the consignment system to your inventory
V. Iterating through your consignment items (advanced)
To iterate through all of your consignment items, you would use the following member of the vendingcontainer datatype:
Code:
[B]echo ${Me.Vending[sturdy backpack].NumItems}[/B]
or
[B]echo ${Me.Vending[1].NumItems}[/B]
Code:
function main()
{
declare i int script
declare j int script
i:Set[1]
j:Set[1]
ISXEQ2:ResetInternalVendingSystem
do
{
if (${Me.Vending[${i}](exists)})
{
echo Displaying items for sale in ${Me.Vending[${i}]}...
do
{
echo ${j}. ${Me.Vending[${i}].Consignment[${j}].Name}
}
while ${j:Inc} <= ${Me.Vending[${i}].NumItems}
j:Set[1]
wait 2
}
}
while ${i:Inc} <= 6
}
Here are some other information that you might find useful:
Code:
[B]echo ${Me.TotalVendingCapacity}[/B]
-- returns the number of items that you can have in your consignment system TOTAL.
[B]echo ${Me.VendingCapacityUse}[/B]
-- returns the number of item (stacks) that you currently are using
[B]echo ${Me.VendingCapacityFree}[/B]
-- returns the number of consignment system slots you have available to use for items to sell.
That's it for now! Please do not post on this thread unless you have additional examples or tutorials related to Using the Consignment System (Selling). Please post comments or questions on the general discussion board.