In-game prizes

This feature is deprecated. Apply for “Play a game” task instead

One of possible prizes in Сундучок application is an in-game prize user can then acquire in a specific game.

For user to get an in-game prize it takes following steps:

  • user wins an in-game prize as a reward in Сундучок application;
  • user launches your game;
  • a specific parameter is passed to a game if user has a reward to get;
  • your game checks if user is actually can be rewarded with users.checkFlag API method;
  • game rewards a player with a prize;
  • game resets reward option with users.resetFlag API method.

In-game rewards in “Сундучок”

In-game prize is one of possible rewards in Сундучок application.

At the moment feature is still in testing. If you want to participate in it - please contact OK Game Platform Team.

If user has won an in-game prize following layer will be shown to him:

Then he can acquire his reward by launching a game from this layer or by any other way possible on our platform.

Checking reward flag

When such a user launches a game a specific parameter prize=1 is passed to a game.

If parameter is present you can check if reward is actually available for user with API:

For example, you can call a method like this:

FAPI.Client.call(
    {
        method: "users.checkFlag", 
        flag: "prize"
    }, 
    function (status, data, error) {
     // callback function
    }
);

If a reward is available for user you’ll get a following response:

{
    "success": true
}

After that you can reward a player with his well deserved prize.

Rewarding a player and resetting an option

How to reward a player and display this process in your game is up to you. But after player is rewarded it is required to reset a prize option with API:

For example:

FAPI.Client.call(
    {
        method: "users.resetFlag", 
        flag: "prize"
    }, 
    function (status, data, error) {
     // callback function
    }
);

If flag was reset you’ll get a following response:

{
    "success": true
}