Reward Schedulers API
Integration of reward schedulers through SDK. Methods of operation.
List of methods
Actions:
ss.schedulers.register()
- registration in scheduler. +1 Requestss.schedulers.claimDay()
- claim reward for the day. +Lazy Sync Requestss.schedulers.claimDayAdditional()
- claim reward for the day for additional activity. +Lazy Sync Requestss.schedulers.claimAllDay()
- claim reward for the day for all activities. +Lazy Sync Requestss.schedulers.claimAllDays()
- claim reward for all completed days at once. +Lazy Sync Request
Properties:
ss.schedulers.list
- list of schedulers. FREEss.schedulers.activeList
- list of player's active schedulers in which they are enrolled. FREEss.schedulers.getScheduler()
- get information about a scheduler by ID or tag. FREEss.schedulers.getSchedulerDay()
- get information about a specific day of the scheduler by ID or tag. FREEss.schedulers.getSchedulerCurrentDay()
- get information about the current day of the scheduler by ID or tag. FREE
Checks:
ss.schedulers.isRegistered()
- check if the player is participating in the scheduler. FREEss.schedulers.isTodayRewardClaimed()
- check if the reward for today has been claimed. FREEss.schedulers.canClaimDay()
- check if the reward for the day can be claimed. FREEss.schedulers.canClaimDayAdditional()
- check if the reward for additional activity for the day can be claimed. FREEss.schedulers.canClaimAllDay()
- check if the reward for any activity for the day can be claimed. FREE
Events:
ss.schedulers.on('register')
- subscribe to player registration in the scheduler. FREEss.schedulers.on('error:register')
- subscribe to error during registration in the scheduler. FREEss.schedulers.on('claimDay')
- subscribe to claim reward for the day event.ss.schedulers.on('error:claimDay')
- subscribe to error event when claiming reward for the day.ss.schedulers.on('claimDayAdditional')
- subscribe to claim reward for the day for additional activity event.ss.schedulers.on('error:claimDayAdditional')
- subscribe to error event when claiming reward for the day for additional activity.ss.schedulers.on('claimAllDay')
- subscribe to claim reward for the day for all activities event.ss.schedulers.on('error:claimAllDay')
- subscribe to error event when claiming reward for the day for all activities.ss.schedulers.on('claimAllDays')
- subscribe to claim reward for all days event.ss.schedulers.on('error:claimAllDays')
- subscribe to error event when claiming reward for all days.
Types:
Scheduler
- scheduler fields.PlayerScheduler
- player's scheduler fields. Personal information about the scheduler.SchedulerInfo
- current progress status of the scheduler.SchedulerDayInfo
- current progress status of the scheduler day.SchedulerType
- scheduler type.
Tips for working with schedulers
Subscribing to reward acceptance events
Depending on the method of accepting rewards, callbacks will be called in order.
If you accept a reward for the day ss.schedulers.claimDay()
, then the callback will be triggered:
If you accept all rewards for the day ss.schedulers.on('claimAllDay')
, then the following callbacks will be triggered:
If you accept all rewards for all days ss.schedulers.claimAllDays()
, then callbacks will be triggered for each day and a general callback for all days:
ss.schedulers.on('claimDay')
ss.schedulers.on('claimDayAdditional')
ss.schedulers.on('claimAllDay')
ss.schedulers.on('claimAllDays')
Callbacks will be triggered if you can receive a reward for the day / trigger / entire day. If a reward cannot be obtained, then the callback will be skipped for that day / trigger or entire day.
Example of rendering a reward scheduler
Let's imagine that we need to implement a reward scheduler like the one in the image:
- Mark reached days as colored
- Mark all days for which a reward has been received with a checkmark
- Mark the remaining days as gray
- Add a "claim reward" button
// When a reward is claimed - update the reward scheduler view
ss.schedulers.on('claimDay', () => renderScheduler('DAILY_7'));
// Function for rendering the scheduler
function renderScheduler(schedulerTag) {
const { scheduler } = ss.schdulers.getScheduler(schedulerTag);
// Iterate over each day of the scheduler
for (let day = 1; day <= scheduler.days; day++) {
// Get information about the day
const schedulerDayInfo = ss.schdulers.getSchedulerDay(
schedulerTag,
day
);
const { isDayReached, isDayClaimed, canClaimDay, bonuses } =
schedulerDayInfo;
// Take the first bonus to draw the image
const [firstBonus] = bonuses;
// Draw the reward
const drawnBonus = myGame.drawBonus(firstBonus);
// Mark the day as reached if reached (black and white if not reached)
drawnBonus.setColored(isDayReached);
// Mark the reward as claimed if it is claimed (not marked if not claimed)
drawnBonus.setChecked(isDayClaimed);
// If the reward can be claimed - draw the claim button
if (canClaimDay) {
const drawnButton = drawnBonus.drawClaimButton();
// When the button is clicked - claim the reward
drawnButton.onClick(() =>
ss.schedulers.claimDay(scheduler.id, day)
);
}
}
}
renderScheduler('DAILY_7');
Actions
Registration in Scheduler
+1 RequestBy default, players are automatically registered in the scheduler when they enter the game, and their countdown begins. If there is a need to enable different schedulers, you can disable automatic registration and register the player at the desired moment.
Examples of scenarios:
- Special reward scheduler during an event.
- After completing the main scheduler for all hardcore players, provide more substantial rewards.
- Different schedulers for different audiences. For example, activate an additional reward scheduler when segmenting players or purchasing VIP.
- JavaScript
- Unity
// By ID
ss.schedulers.register({ id: 123 });
// By tag
ss.schedulers.register({ tag: 'DAILY_30' });
// By ID or tag
SS_Schedulers.Register("DAILY_30");
The method returns the current status of the scheduler.
- JavaScript
- Unity
const schedulerInfo = await ss.schedulers.register({ tag: 'DAILY_30' });
// Not implemented.
// To get scheduler info check:
Claim reward for the day
+Lazy Sync Request- JavaScript
- Unity
ss.schedulers.claimDay(idOrTag, day);
SS_Schedulers.ClaimDay(string idOrTag, int day);
This method returns the current status of the scheduler day.
- JavaScript
- Unity
// By ID
const schedulerDayInfo = await ss.schedulers.claimDay(123, 3);
// By Tag
const schedulerDayInfo = await ss.schedulers.claimDay('DAILY_30', 3);
// Not implemented.
// To get scheduler day info check:
Claim reward for the day for additional activity
+Lazy Sync Request- JavaScript
- Unity
ss.schedulers.claimDayAdditional(idOrTag, day, triggerIdOrTag);
SS_Schedulers.ClaimDayAdditional(string idOrTag, int day, string triggerIdOrTag);
This method returns the current status of the scheduler day.
- JavaScript
- Unity
// By ID
const schedulerDayInfo = await ss.schedulers.claimDayAdditional(
123,
3,
'PLAYTIME_30_DAY_3'
);
// By Tag
const schedulerDayInfo = await ss.schedulers.claimDayAdditional(
'DAILY_30',
3,
'PLAYTIME_30_DAY_3'
);
// Not implemented.
// To get scheduler day info check:
Claim reward for all activities on the day
+Lazy Sync Request- JavaScript
- Unity
ss.schedulers.claimAllDay(idOrTag, day);
SS_Schedulers.ClaimAllDay(string idOrTag, int day);
This method returns the current status of the scheduler day.
- JavaScript
- Unity
// By ID
const schedulerDayInfo = await ss.schedulers.claimAllDay(123, 3);
// By Tag
const schedulerDayInfo = await ss.schedulers.claimAllDay('DAILY_30', 3);
// Not implemented.
// To get scheduler day info check:
Claim reward for all completed days
+Lazy Sync Request- JavaScript
- Unity
ss.schedulers.claimAllDays(idOrTag);
SS_Schedulers.ClaimAllDays(string idOrTag, int day);
This method returns the current status of the scheduler.
- JavaScript
- Unity
// By ID
const schedulerInfo = await ss.schedulers.claimAllDays(123);
// By Tag
const schedulerInfo = await ss.schedulers.claimAllDays('DAILY_30');
// Not implemented.
// To get scheduler info check:
Properties
List of schedulers
FREEYou have access to the entire list of schedulers when the game starts. See scheduler fields.
- JavaScript
- Unity
ss.schedulers.list.forEach((scheduler) => {
// scheduler.id
// scheduler.tag
// scheduler.type
// scheduler.days
// scheduler.isRepeat
// scheduler.triggers
});
SchedulerData[] schedulerData = SS_Schedulers.List();
foreach (SchedulerData data in schedulerData)
{
Debug.Log("ID: " + data.id);
Debug.Log("Tag: " + data.tag);
Debug.Log("Days: " + data.days);
}
List of player active schedulers
FREEYou have access to the entire list of schedulers that the player is registered in when the player is ready. See player scheduler fields.
- JavaScript
- Unity
ss.schedulers.activeList.forEach((playerScheduler) => {
// playerScheduler.schedulerId
// playerScheduler.stats.activeDays
// playerScheduler.stats.activeDaysConsecutive
});
PlayerScheduler[] schedulerData = SS_Schedulers.ActiveList();
foreach (PlayerScheduler data in schedulerData)
{
Debug.Log("ID: " + data.schedulerId);
Debug.Log("Active Days: " + data.stats.activeDays);
}
Get scheduler information
FREE- JavaScript
- Unity
ss.schedulers.getScheduler(idOrTag);
SS_Schedulers.GetScheduler(string idOrTag);
This method returns the current status of the scheduler.
- JavaScript
- Unity
// By ID
const schedulerInfo = ss.schedulers.getScheduler(123);
// By Tag
const schedulerInfo = ss.schedulers.getScheduler('DAILY_30');
const { scheduler, isRegistered, stats, daysClaimed, currentDay } =
schedulerInfo;
// The scheduler may not exist, make sure it exists
if (scheduler) {
console.info(scheduler.id, isRegistered, stats.activeDays);
}
SchedulerInfo data = SS_Schedulers.GetScheduler("DAILY_30");
Debug.Log("ID: " + data.scheduler.id);
Debug.Log("Type: " + data.scheduler.type);
Debug.Log("Current Day: " + data.currentDay);
Debug.Log("Active Days: " + data.stats.activeDays);
Debug.Log("Days claimed: " + string.Join(",", data.daysClaimed));
Debug.Log("Is Registered: " + data.isRegistered);
Get scheduler day information
FREE- JavaScript
- Unity
ss.schedulers.getSchedulerDay(idOrTag, day);
SS_Schedulers.GetSchedulerDay(string idOrTag, int day);
This method returns the current status of the scheduler day.
- JavaScript
- Unity
// By ID
const schedulerDayInfo = ss.schedulers.getSchedulerDay(123, 3);
// By Tag
const schedulerDayInfo = ss.schedulers.getSchedulerDay('DAILY_30', 3);
const {
scheduler,
day,
isDayReached,
isDayComplete,
isDayClaimed,
isAllDayClaimed,
canClaimDay,
canClaimAllDay,
bonuses,
triggers
} = schedulerDayInfo;
// The scheduler may not exist, make sure it exists
if (scheduler) {
console.info(scheduler.id, day, canClaimDay);
}
SchedulerDayInfo data = SS_Schedulers.GetSchedulerDay("DAILY_30", 3);
Debug.Log("ID: " + data.scheduler.id);
Debug.Log("Day: " + data.day);
Debug.Log("Day Reached: " + data.isDayReached);
Debug.Log("Day Claimed: " + data.isDayClaimed);
Debug.Log("Day Complete: " + data.isDayComplete);
Get information about the current scheduler day
FREE- JavaScript
- Unity
ss.schedulers.getSchedulerCurrentDay(idOrTag);
SS_Schedulers.GetSchedulerCurrentDay(string idOrTag);
This method returns the current status of the scheduler day.
- JavaScript
- Unity
// By ID
const schedulerDayInfo = ss.schedulers.getSchedulerCurrentDay(123);
// By Tag
const schedulerDayInfo = ss.schedulers.getSchedulerCurrentDay('DAILY_30');
const {
scheduler,
day,
isDayReached,
isDayComplete,
isDayClaimed,
isAllDayClaimed,
canClaimDay,
canClaimAllDay,
bonuses,
triggers
} = schedulerDayInfo;
// The scheduler may not exist, make sure it exists
if (scheduler) {
console.info(scheduler.id, day, canClaimDay);
}
SchedulerDayInfo data = SS_Schedulers.GetSchedulerCurrentDay("DAILY_30");
Debug.Log("ID: " + data.scheduler.id);
Debug.Log("Day: " + data.day);
Debug.Log("Day Reached: " + data.isDayReached);
Debug.Log("Day Claimed: " + data.isDayClaimed);
Debug.Log("Day Complete: " + data.isDayComplete);
Checks
Player participates in the scheduler
FREE- JavaScript
- Unity
ss.schedulers.isRegistered(idOrTag);
SS_Schedulers.IsRegistered(string idOrTag);
- JavaScript
- Unity
// By ID
const isRegistered = ss.schedulers.isRegistered(123);
// By Tag
const isRegistered = ss.schedulers.isRegistered('DAILY_30');
// Check
if (isRegistered) {
// Player participates in the DAILY_30 scheduler
}
bool isRegistered = SS_Schedulers.IsRegistered("DAILY_30");
Today's reward claimed
FREE- JavaScript
- Unity
ss.schedulers.isTodayRewardClaimed(idOrTag);
SS_Schedulers.IsTodayRewardClaimed(string idOrTag);
Check if today's reward has been claimed in the selected scheduler.
- JavaScript
- Unity
// By ID
const isClaimed = ss.schedulers.isTodayRewardClaimed(123);
// By Tag
const isClaimed = ss.schedulers.isTodayRewardClaimed('DAILY_30');
// Check
if (isClaimed) {
// Today's login reward has already been claimed in the DAILY_30 scheduler
}
// By ID or Tag
bool isClaimed = SS_Schedulers.IsTodayRewardClaimed("DAILY_30");
// Check
if (isClaimed) {
// Today's login reward has already been claimed in the DAILY_30 scheduler
}
Can claim reward for the day
FREE- JavaScript
- Unity
ss.schedulers.canClaimDay(idOrTag, day);
SS_Schedulers.CanClaimDay(string idOrTag, int day);
Check if the reward for the day can be claimed in the selected scheduler.
- JavaScript
- Unity
// By ID
const canClaim = ss.schedulers.canClaimDay(123, 15);
// By Tag
const canClaim = ss.schedulers.canClaimDay('DAILY_30', 15);
// Check
if (canClaim) {
// The reward for day 15 can be claimed in the DAILY_30 scheduler
}
// By ID or Tag
bool canClaim = SS_Schedulers.CanClaimDay("DAILY_30", 15);
// Check
if (canClaim) {
// The reward for day 15 can be claimed in the DAILY_30 scheduler
}
Can claim reward for additional activity for the day
FREE- JavaScript
- Unity
ss.schedulers.canClaimDayAdditional(idOrTag, day, triggerIdOrTag);
SS_Schedulers.CanClaimDayAdditional(string idOrTag, int day, string triggerIdOrTag);
Check if the reward for additional activity (trigger) for the day can be claimed in the selected scheduler.
- JavaScript
- Unity
// By ID
const canClaim = ss.schedulers.canClaimDayAdditional(
123,
3,
'PLAYTIME_30_DAY_3'
);
// By Tag
const canClaim = ss.schedulers.canClaimDayAdditional(
'DAILY_30',
3,
'PLAYTIME_30_DAY_3'
);
// Check
if (canClaim) {
// The reward for day 3 in the DAILY_30 scheduler can be claimed based on the PLAYTIME_30_DAY_3 trigger
}
// By ID or Tag
bool canClaim = SS_Schedulers.CanClaimDayAdditional("DAILY_30", 3, "PLAYTIME_30_DAY_3");
// Check
if (canClaim) {
// The reward for day 3 in the DAILY_30 scheduler can be claimed based on the PLAYTIME_30_DAY_3 trigger
}
Can claim rewards for all activities for the day
FREE- JavaScript
- Unity
ss.schedulers.canClaimAllDay(idOrTag, day);
SS_Schedulers.CanClaimAllDay(string idOrTag, int day);
Check if the reward for any activity for the day can be claimed.
- JavaScript
- Unity
// By ID
const canClaim = ss.schedulers.canClaimAllDay(123, 15);
// By Tag
const canClaim = ss.schedulers.canClaimAllDay('DAILY_30', 15);
// Check
if (canClaim) {
// The reward for day 15 can be claimed in the DAILY_30 scheduler for login or completed activity
}
// By ID or Tag
bool canClaim = SS_Schedulers.CanClaimAllDay("DAILY_30", 15);
// Check
if (canClaim) {
// The reward for day 15 can be claimed in the DAILY_30 scheduler for login or completed activity
}
Events
Player Registered in Scheduler
The callback returns the current status of the scheduler:
- JavaScript
- Unity
ss.schedulers.on('register', (schedulerInfo) => {
// access the current status of the scheduler
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerRegister += OnSchedulerRegister;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerRegister -= OnSchedulerRegister;
}
//Process the event
private OnSchedulerRegister(SchedulerInfo data)
{
Debug.Log("Scheduler Register");
Debug.Log("Is Registered: " + data.isRegistered);
}
Failed to Register in Scheduler
The callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:register', (err) => {
// handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerRegisterError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerRegisterError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Reward for the day claimed
Callback returns current status of the scheduler day:
- JavaScript
- Unity
ss.schedulers.on('claimDay', (schedulerDayInfo) => {
// Current status of the scheduler day is accessible
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimDay += OnSchedulerClaimDay;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimDay -= OnSchedulerClaimDay;
}
//Process the event
private void OnSchedulerClaimDay(SchedulerDayInfo data)
{
Debug.Log("Scheduler Claim");
Debug.Log("ID: " + data.scheduler.id);
Debug.Log("Day: " + data.day);
Debug.Log("Day Reached: " + data.isDayReached);
Debug.Log("Day Claimed: " + data.isDayClaimed);
Debug.Log("Day Complete: " + data.isDayComplete);
Debug.Log(" ");
}
Failed to claim reward for the day
Callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:claimDay', (err) => {
// Handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimDayError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimDayError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Reward for additional activity for the day claimed
Callback returns current status of the scheduler day:
- JavaScript
- Unity
ss.schedulers.on('claimDayAdditional', (schedulerDayInfo) => {
// Current status of the scheduler day is accessible
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimDayAdditional += OnSchedulerClaimDayAdditional;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimDayAdditional -= OnSchedulerClaimDayAdditional;
}
//Process the event
private void OnSchedulerClaimDayAdditional(SchedulerDayInfo data)
{
Debug.Log("Scheduler Claim Additional");
Debug.Log(JsonUtility.ToJson(data));
}
Failed to claim reward for additional activity for the day
Callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:claimDayAdditional', (err) => {
// Handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimDayAdditionalError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimDayAdditionalError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Reward for all activities for the day claimed
Callback returns current status of the scheduler day:
- JavaScript
- Unity
ss.schedulers.on('claimAllDay', (schedulerDayInfo) => {
// Current status of the scheduler day is accessible
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimAllDay += OnSchedulerClaimAllDay;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimAllDay -= OnSchedulerClaimAllDay;
}
//Process the event
private void OnSchedulerClaimAllDay(SchedulerDayInfo data)
{
Debug.Log("Scheduler Claim All Day");
Debug.Log(JsonUtility.ToJson(data));
}
Failed to claim reward for all activities for the day
Callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:claimAllDay', (err) => {
// Handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimAllDayError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimAllDayError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Rewards for all days claimed
Callback returns current status of the scheduler:
- JavaScript
- Unity
ss.schedulers.on('claimAllDays', (schedulerDayInfo) => {
// Current status of the scheduler is accessible
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimAllDays += OnSchedulerClaimAllDays;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimAllDays -= OnSchedulerClaimAllDays;
}
//Process the event
private void OnSchedulerClaimAllDay(SchedulerDayInfo data)
{
Debug.Log("Scheduler Claim All Day");
Debug.Log(JsonUtility.ToJson(data));
}
Failed to claim rewards for all days
Callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:claimAllDays', (err) => {
// Handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerClaimAllDaysError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerClaimAllDaysError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Player joined the event
Callback returns scheduler event and player scheduler event:
- JavaScript
- Unity
ss.schedulers.on('join', ({ scheduler, playerScheduler }) => {
// Scheduler event and player scheduler event are accessible
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerJoin += OnSchedulerJoin;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerJoin -= OnSchedulerJoin;
}
//Process the event
private void OnSchedulerJoin(PlayerScheduler data)
{
Debug.Log("Scheduler Join");
Debug.Log(JsonUtility.ToJson(data));
}
Failed to join the event
Callback returns an error. See error codes:
- JavaScript
- Unity
ss.schedulers.on('error:join', (err) => {
// Handle errors
});
//Subscribe to event
private void OnEnable()
{
SS_Schedulers.OnSchedulerJoinError += OnSchedulerError;
}
//Unsubscribe from event
private void OnDisable()
{
SS_Schedulers.OnSchedulerJoinError -= OnSchedulerError;
}
//Process the event
private void OnSchedulerError(string error)
{
Debug.Log("Error: " + error);
}
Types
Scheduler Fields
Field | Type | Description | Example |
---|---|---|---|
id | number | Scheduler ID | 115 |
tag | string | Tag for reference. Can be used instead of ID | DAILY_30 |
type | SchedulerType | Scheduler type (by number of days or consecutive days) | ACTIVE_DAYS |
days | number | Number of days in the scheduler | 30 |
isRepeat | boolean | Repeatable? After completing the cycle, it starts over from day 1 | true |
isAutoRegister | boolean | The player is automatically registered in the scheduler upon game startup. | true |
triggers | Trigger[] | List of scheduler triggers | [] |
Player Scheduler Fields
Field | Type | Description | Example |
---|---|---|---|
schedulerId | number | Event ID | 115 |
daysClaimed | number[] | List of days for which rewards have been claimed | [1,2,3,4] |
stats | PlayerStats | Player's stats in the scheduler | { activeDays: 4, activeDaysConsecutive: 3} |
Scheduler Information Fields
Field | Type | Description | Example |
---|---|---|---|
scheduler | Scheduler | The scheduler | |
stats | PlayerStats | Player's stats in the scheduler | { activeDays: 4, activeDaysConsecutive: 3} |
daysClaimed | number[] | List of days for which rewards have been claimed | [1,2,3,4] |
isRegistered | boolean | Whether the player is participating in the scheduler | true |
currentDay | number | The current day in the player's scheduler | true |
Scheduler Day Information Fields
Field | Type | Description | Example |
---|---|---|---|
scheduler | Scheduler | The scheduler | |
day | number | Selected day | 4 |
isDayReached | boolean | Whether the player has reached this day | true |
isDayComplete | boolean | Whether all day activities are completed (login + all triggers) | true |
isDayClaimed | boolean | Whether the reward for logging in on this day has been claimed | true |
isAllDayClaimed | boolean | Whether all rewards for the day have been claimed | true |
canClaimDay | boolean | Whether the reward for logging in can be claimed | true |
canClaimAllDay | boolean | Whether all rewards for the day can be claimed | true |
bonuses | Bonus[] | List of login bonuses | [] |
triggers | Trigger[] | List of triggers for the selected day | [] |
Scheduler Type
Type | Description |
---|---|
ACTIVE_DAYS | By number of active days |
ACTIVE_DAYS_CONSECUTIVE | By number of consecutive active days |
Error Codes
Error | Error Description |
---|---|
player_not_found | Player not found |
empty_id_or_tag | Empty ID or tag passed |
scheduler_not_found | Scheduler with provided ID or tag not found |
wrong_day | Invalid day provided |
day_not_reached | Player hasn't reached this day yet |
day_already_claimed | Reward for the day has already been claimed |
nothing_to_claim | No rewards to claim (already claimed or not found) |
failed_to_claim | Failed to claim reward (check console for details) |
trigger_not_found | Trigger with provided ID or tag not found |
trigger_not_activated | Trigger not activated |
trigger_already_claimed | Reward for the trigger has already been claimed |
undefined | Unexpected error occurred (check console for details) |
Stay in Touch
Other documents of this chapter available Here. To get started, welcome to the Tutorials chapter.
SpellSync Community Telegram
: @spellsync.
For your suggestions e-mail
: [email protected]
We Wish you Success!