BTC Give Reward
Adds a reward to a player's pending queue (with optional cron scheduling)
Felder
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
artifact | Ref<RewardsArtifactEntry> | — | Artifact for reward storage |
reward | Ref<RewardDefinitionEntry> | — | Reward definition to give |
customData | String | {} | Custom data to attach to this reward instance (JSON format) |
useCron | Boolean | false | Enable cron-based scheduling (e.g., daily, weekly rewards) |
cronExpression | CronExpression | — | Cron expression for scheduled rewards (e.g., '0 0 0 * * *' for daily at midnight). Only used if useCron is true. |
Gemeinsame TypeWriter-Felder (criteria, modifiers, triggers)
| Feld | Typ | Standard | Beschreibung |
|---|---|---|---|
criteria | List<Criteria> | empty | — |
modifiers | List<Modifier> | empty | — |
triggers | List<Ref<TriggerableEntry>> | empty | — |
How to use it
Link artifact and reward; without them nothing is queued. customData is stored with the queued record and handed to the Reward Claimed event as REWARD_CUSTOM_DATA.
With useCron on, the action remembers when it last granted for each player (per action entry). It grants again only once the next time matching cronExpression has passed, so 0 0 0 * * * gives at most one reward per day. Each action entry has its own memory: duplicate the action for another schedule.