question

Matthew avatar image
Matthew asked

Limited Item on sale

This is a question about the store in economy.

How can I set up the following item shops?
- "Items that can only be purchased once a day"
- "Items sold at a 50% discount only once a day"
- "Items that can only be bought 10 times during the season"
- "Items that are discounted only 10 times during the season"
The method I came up with is "The system updates the judgment counter in Playerdata (Title)". When the player enters the shop, it looks at the value and CloudScript does something.
But this method doesn't look beautiful.

game manager
10 |1200

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

Sarah Zhang avatar image
Sarah Zhang answered

As the answer of this thread - https://community.playfab.com/questions/860/210169488-Can-items-be-set-to-only-be-purchased-once-.html said, the simplest workaround of such features is to filter the items listed in your client’s UI. You can store the count of purchase during a certain period on the player read-only data. When the player enters the store or catalog, you can call the client API GetUserReadOnlyData on the client to obtain the purchase count, then determine whether you need to disable the item UI. If using this workaround, the hacked clients could still purchase more than one, but if them doesn't affect the balance of your game, it shouldn’t be an issue. For items with discounts, you can create separate items for their discounted prices. Then use the above logic to control the display of discounted items.

10 |1200

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

Matthew avatar image
Matthew answered

Thank you for great answer.

10 |1200

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

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.