Advertisement

Call the following methods if you want to show ads in your game,

Interstitial ads

To show an interstitial ad, call WatchAd.

Put adType.Interstitial in the ad_type parameter.

  • The placed_at parameter is used for recording when the ad will be placed.

  • The ad_status parameter is used for recording the status of the ad or whether the ad has been watched.

Method

Parameter

Type

Required

Notes

1. Show ad
(After cool down)

2. Start ad watch

WatchAdd

player_uuid

string

Required

character_uuid

string

Required

TentuPlayKeyword._DUMMY_CHARACTER_ID_

ad_slug

string

Required

Ad ID

ad_type

Required

adType.Interstitial

placed_at

Required

entity:StageStart

ad_status

Required

adStatus.Ready

adStatus.Start

placed_at_slug

string

Optional

Play

Method

Parameter

Type

Required

Notes

3. Finished watching ad

4. Quit out of ad

WatchAdd

player_uuid

string

Required

character_uuid

string

Required

TentuPlayKeyword._DUMMY_CHARACTER_ID_

ad_slug

string

Required

Ad ID

ad_type

Required

adType.Interstitial

placed_at

Required

entity:StageStart

ad_status

Required

adStatus.End

adStatus.Quit

placed_at_slug

string

Optional

Play

Rewarded ads

To show a rewarded ad, call the following methods.

  • Call the WatchAd methods by ad view stages.

    Put adType.Reward in the ad_type parameter.

    Method

    Parameter

    Type

    Required

    Notes

    1. Show ad
    (After cool down)

    2. Start ad watch

    WatchAdd

    player_uuid

    string

    Required

    character_uuid

    string

    Required

    TentuPlayKeyword._DUMMY_CHARACTER_ID_

    ad_slug

    string

    Required

    Ad ID

    ad_type

    Required

    adType.Reward

    placed_at

    Required

    entity:StageStart

    ad_status

    Required

    adStatus.Ready

    adStatus.Start

    placed_at_slug

    string

    Optional

    Play

    Method

    Parameter

    Type

    Required

    Notes

    3. Finished watching ad

    4. Quit out of ad

    WatchAdd

    player_uuid

    string

    Required

    character_uuid

    string

    Required

    TentuPlayKeyword._DUMMY_CHARACTER_ID_

    ad_slug

    string

    Required

    Ad ID

    ad_type

    Required

    adType.Reward

    placed_at

    Required

    entity:StageStart

    ad_status

    Required

    adStatus.End

    adStatus.Quit

    placed_at_slug

    string

    Optional

    Play

  • If a user is rewarded for ad view, call GetBonus because it is not acquired through in-game play.

    Method Parameter Type Required Notes

    GetBonus

    player_uuid

    string

    Required

    character_uuid

    string

    Required

    TentuPlayKeyword._DUMMY_CHARACTER_ID_

    bonus_slug

    string

    Required

    Free Gold Ad

    bonus_category_slug

    string

    Required

    Free Gold Ad

    is_automated

    boolean

    Optional

    FALSE

  • Depending on the reward type, call the corresponding methods

    • If the reward for ad view is a currency, call GetCurrency.

    • If the reward is not a currency but another object like Token or Material, call the Get{ Object } method (for example, GetToken, GetMaterial).

Method Parameter Type Required Notes

GetCurrency

player_uuid

string

Required

character_uuid

string

Required

TentuPlayKeyword._DUMMY_CHARACTER_ID_

currency_slug

string

Required

gold

currency_quantity

float

Required

30

currency_total_quantity

float

Optional

215

from_entity

Optional

entity.Bonuses

from_category_slug

string

Optional

Free Gold Ad

from_slug

string

Optional

Free Gold Ad