Default Templates

Player Information

Optional Gender Parameters

Constant Description
CAAccount.GENDER_UNKNOWN Unknown Gender
CAAccount.GENDER_MALE Male
CAAccount.GENDER_FEMALE Female
// set player type, CP can customize it, like QQ, WeChat, or VIP1, VIP2
CAAccount.setAccountType(
    String accountType
);

// set player age
CAAccount.setAge(
    int age
);

// set player gender
CAAccount.setGender(
    int gender
);

// create a character
CAAccount.createRole(
    String roleID,      //character ID
    String userName,    //character name
    String race,        //character race
    String roleClass,   //character class
    String gameServer   //current server
);

// player level
CAAccount.setLevel(
    int level
);

Levels

// level start  
CALevels.begin(
    String level    // level name
);

// level completed
CALevels.complete(
    String level
);

// level failed
CALevels.failed(
    String level,
    String reason   // the cause of failure
);

Missions

The definitions of TaskType are as follows:

Constant Description
CATask.GuideLine Tutorial Mission
CATask.MainLine Main Mission
CATask.BranchLine Side Mission
CATask.Daily Daily Mission
CATask.Activity Activity
CATask.Other Other Missions, Default
// misison start
CATask.begin(
    String taskID,  // quest name
    int taskType    // quest type
);

// mission completed
CATask.complete(
    String taskID
);

// mission failed
CATask.failed(
    String taskID,
    String reason   // the cause of failure
);

Items

CAItem.buy(
    String itemID,      // item ID
    String itemType,    // item type
    int itemCount,      // item amount
    int virtualCoin,    // virtual currency used
    String virtualType, // virtual currency type
    String consumePoint // virtual currency purchased
);

CAItem.get(
    String itemID,
    String itemType,
    int itemCount,
    String reason       // the way to obtain
);

CAItem.consume(
    String itemID,
    String itemType,
    int itemCount,
    String reason       // the way to consume
);

Virtual Currencies

CAVirtual.setVirtualNum(
    String type,    // virtual currency type
    long count      // virtual currency amount
);

CAVirtual.get(
    String type,
    long count,
    String reason   // the way to obtain
);

CAVirtual.consume(
    String type,
    long count,
    String reason   // the way to consume
);

Advertisements

// advertising start (ad ID)
CAAdvertising.begin(String adID);

// advertising completed
CAAdvertising.complete(String adID);

// advertising faild
CAAdvertising.failed(
    String adID,
    String reason   // the cause of failure
);

results matching ""

    No results matching ""