PlaytimeEarner

by Mad
Rewards players with currency for being online.

How it Works

  • A cronjob runs periodically (default: every 10 minutes)
  • All online players receive currency silently each time it runs
  • Simple and straightforward

Configuration

  • currencyReward: Amount of currency given each time the cronjob runs (default: 10)

System Config

  • Cronjob frequency: Configure how often the cronjob runs (default: */10 * * * * = every 10 minutes)

Permissions

  • PLAYTIME_CURRENCY_OVERRIDE: Override currency amount for specific players/roles (uses count value)

Example

  • Cronjob runs every 10 minutes
  • currencyReward = 17
  • Result: Players get 17 currency every 10 minutes = 102 currency per hour
communityTakaro v0.4.10

Components Overview

1
config
0
commands
0
hooks
1
Cron Jobs
0
functions
1
permissions

New Module: PlaytimeEarner

NEW
January 23, 2026
Updated to version latest. Added 1 scheduled task: rewardOnlinePlaytime. New permission: PLAYTIME_CURRENCY_OVERRIDE. New configuration options: currencyReward, rewardMessage.

Configuration

Configure this module using the schemas below. The JSON schema defines the data structure, while the UI schema customizes how the configuration form is displayed.

Configuration Schema

Configuration Properties (2)

currencyRewardnumber
Currency Reward

Currency given each time the cronjob runs

Default: 10
rewardMessagestring
Reward Message

Message broadcast for each player. Use {name}, {currency}, and {role} placeholders.

Default: {name} received {currency} for being online!

UI Schema

No UI schema defined. Configuration form will use default rendering.

About Configuration Schemas

The Configuration Schema defines the structure and validation rules for module settings. The UI Schema customizes how the configuration form is displayed in the Takaro interface, including field ordering, labels, and input types.

Scheduled Jobs (1)

These jobs run automatically on a schedule defined by cron expressions. Each job executes JavaScript code at specific times or intervals.

rewardOnlinePlaytime

*/10 * * * *Schedule

Description

Rewards online players with currency based on playtime

Schedule Details

Cron Expression
*/10 * * * *
Human-Readable Schedule

Every 10 minutes

Function Implementation

rewardOnlinePlaytime Function

JAVASCRIPT

Cron Expression Format

minute hour day-of-month month day-of-week

Each field can contain numbers, ranges (1-5), lists (1,3,5), or wildcards (*). Use */n for intervals (e.g., */5 for every 5 units).

About Scheduled Jobs

Cron jobs allow your module to execute code automatically on a schedule. Each job has a cron expression that defines when it runs, and a JavaScript function that executes at those times. Jobs run server-side and can perform maintenance tasks, send notifications, or update game state automatically.

Permissions (1)

These permissions control who can access different features of this module. Administrators can assign these permissions to roles, allowing fine-grained access control.

General Permissions

1 permission

Playtime Currency Override

PLAYTIME_CURRENCY_OVERRIDEPermission KeyCountable
Description

Override the base currency reward for playtime. Count value determines the reward amount.

Permission Details
Full Key:PLAYTIME_CURRENCY_OVERRIDE
Can Have Count:Yes
Category:General
Countable Permission

This permission supports numeric values/levels. For example, you could grant someone "10" of this permission to limit their usage or set permission levels.

About Module Permissions

Permissions control access to module features and functionality. Each permission has a unique key for identification, a friendly name for display, and a description explaining what it allows. Some permissions are countable, meaning they can have numeric values or limits assigned. Administrators assign these permissions to user roles to control who can use different module features.