question

Lheo Mendoza avatar image
Lheo Mendoza asked

How to make Virtual Currency to recharge at specific server time?

I want to refresh a certain currency at 12 midnight server time. Is that possible?

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.

1 Answer

·
Sarah Zhang avatar image
Sarah Zhang answered

You can create a CloudScript function that calls the server API AddUserVirtualCurrency on CloudScrip, then use PlayFab Scheduled Task to run the action to execute this function to implement this feature. Please navigate to the docs -- Scheduled tasks quickstart for the quick start of using Scheduled Tasks with CloudScript. Besides, there is a sample of RegeneratingCurrency on our sample page. You can check the CloudScript code in this sample for references.

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.