Achievements #

Read more about the Achievements system in Hiro here.

Get all achievements #

Get all achievements with progress accumulated by the player.

1
2
const achievementList = await hiroClient.achievementsGet(session);
console.log(achievementList);

Claim achievements #

Claim one or more achievements which have completed their progress.

1
2
3
4
5
6
const request = new AchievementsClaimRequest();
request.ids = ["achievement_1", "achievement_2"];
request.claim_total_reward = true;

const updateAck = await hiroClient.achievementsClaim(session, request);
console.log(updateAck);

Update achievement progress #

Update one or more achievements with the same progress amount.

1
2
3
4
5
6
const request = new AchievementsUpdateRequest();
request.ids = ["achievement_1", "achievement_2"];
request.amount = 1;

const achievementsAck = await hiroClient.achievementsUpdate(session, request);
console.log(achievementsAck);