question

Victor Guedez avatar image
Victor Guedez asked

ExecuteInventoryOperations items limit

Hello,

I'm trying to use Economy's ExecuteInventoryOperations with Subtract and Add operations, the problem is that it is limited to 250 items per request, and I need to add thousands, the item to add is somewhat random. What can I do to work around this items limit?

As a workaround I'm thinking of using PurchaseInventoryItems but it might have its own drawbacks (I have not use it yet).

In-Game Economy
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Xiao Zha avatar image
Xiao Zha answered

Sorry for the confusion, I want to clarify that the ExecuteInventoryOperations API limit of 250 items refers to the types of items, not the amount of the item.

Therefore, if you want to add thousands of the same type of Item (the Gold or the Gem you mentioned) to a player’s inventory at once, you can specify an Add operation with the Item Id and amount in the ExecuteInventoryOperations API request to add the item with the amount you want to the player’s inventory. And the PurchaseInventoryItems API works in a similar way, where you can specify the Item Id and amount to purchase thousands of the same type of Item. Additionally, you can also use the AddInventoryItems API to add thousands of the same type of Item by specifying the Item Id and quantity.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Victor Guedez avatar image Victor Guedez commented ·

Hello, thank you for your answer. Well, this is weird, some time ago I tried this and it failed to add 1k gold and 250 gems, tried with 250 between gold and gems and it succeeded, so I thought the limit was 250 items.

But I just tried again with two operations, 1 sub and 1 add, and it worked just fine with 10k gold. Could you answer your last comment so I can accept it?

Thank you for your time :)

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

The operation to add thousands different kind of Items to player’s inventory at a time is not a normal situation, may I know the scenario you want to achieve? Also, the PurchaseInventoryItems API can purchase one kind of item or bundle (and bundle has a limit to 50 items) a time, so, it cannot meet your requirement.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Victor Guedez avatar image Victor Guedez commented ·

For some reason I can't seem write an answer

The operation to add thousands different kind of Items to player’s inventory at a time is not a normal situation, may I know the scenario you want to achieve?

I want to clarify that the items are of type currency, maybe it can help out. So, we have a slot machine mini-game, it costs 10 Gold to roll, and rewards can be hundreds of Gold or thousands of Gems. I don't see how this should be an issue.

Also, the PurchaseInventoryItems API can purchase one kind of item or bundle (and bundle has a limit to 50 items) a time, so, it cannot meet your requirement.

Does that mean that we can't sell 10k Gold on a store?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.