TPStashEvent.PlayQuest

public int PlayQuest(
    string player_uuid,
    string character_uuid,
    string quest_slug,
    string quest_status,
    [string quest_category_slug = null]
);

Description

PlayQuest collects the data of the character’s progress in a quest. It needs to be called when the character accepts a given quest and ends or completes the quest.

The quest system can be defined as a system where a character accomplishes certain conditions given, such as missions, duties, or quests, and receives predetermined rewards (for example, daily quest, scenario completion quest, event dungeon).

It returns 1 for success and -1 for failure. If -1 is returned, you can see the following message in the Unity editor console in TentuPlay debug mode:

TPError||ERROR inserting table_name: exception_error_message

Parameters

Name Description Required

player_uuid

Player’s unique ID (not a character’s ID) such as Steam user ID and Google Play user ID

Required

character_uuid

Player’s character’s unique lD

If there is no character in the game or If you want to use it for the player, not a character, set character_uuid to TentuPlayKeyword._DUMMY_CHARACTER_ID_.

Required

quest_slug

Unique identifier of the quest

Required

quest_status

Quest progress

public enum questStatus {
    Accept,
    Clear,
    Fail,
    Abandon,
    Timeover
}
  • Accept: Active acceptance of the quest

  • Clear: Quest completion

  • Fail: Quest failure

  • Abandon: Active abandonment of the quest

  • Timeover: Used when the quest is automatically considered "failed" or "cancelled" due to time constraints (for example, "Complete the quest in five minutes", daily quest)

Required

quest_category_slug

Category of the quest

Optional