Stacking items? - Number in a stack?

mycroft

Script Author: MyPrices
Is there an equivalent of the following for the broker so I can read how many of an item listed can be bought from a broker at once?

* Added a new Datatype called "merchandise".
- MaxQuantity (int type) [returns 1 for items that are non stackable]
 

Amadeus

The Maestro
Staff member
This is how I buy items from the broker:

Code:
                if (${Vendor.Item[${i}].Quantity} > 1)
                {
                    do
                    {
                        variable int CurrentQuantity
                        CurrentQuantity:Set[${Vendor.Item[${i}].Quantity}]
                        Vendor.Item[${i}]:Buy[1]  
                        wait 200 ${Vendor.Item[${i}].Quantity} != ${CurrentQuantity}
                        wait 5
                    }
                    while ${Vendor.Item[${i}].Quantity} > 0
                }
                else
                    Vendor.Item[${i}]:Buy[1]
 

mycroft

Script Author: MyPrices
I was looking for some way to read what the stack size of each named item was.

At the moment I either buy stacks of upto 100 or 200 depending if an item listed is a harvest (200) or a 'standard' stack (100).

But I've hit a snag with some player made items that show as stacked on the broker but can only bought as singles.

I have been trying to avoid buying lots of single items as sometimes I buy over 1,000 raws at a time , doing 1 at a time might bring attention to someone.

I'll see if I can find a work around.
 

wired203

Active Member
Mycroft I think your script has the base to handle this. Since you have the harvest checkmark use that to purchase 200 stacks, and if it's not checked on a item purchase singles.
 

Amadeus

The Maestro
Staff member
What I posted should buy the largest stack possible at a time of whatever is available. It is the best way to do buying.
 

mycroft

Script Author: MyPrices
Mycroft I think your script has the base to handle this. Since you have the harvest checkmark use that to purchase 200 stacks, and if it's not checked on a item purchase singles.
Yes , I've added a small workaround that will buy singles if the initial purchase fails.
 
Top Bottom