Takaro module library

Takaro Modules

Takaro is a game server management platform for running, automating, and moderating multiplayer communities. These modules install into Takaro to add server automation, Discord workflows, economy systems, and moderation tools.

PlaytimeReward

by Limon
Reward players automatically for time spent on the server. This module helps communities recognize active players, encourage return visits, and connect playtime to currency or item rewards.
Use this module to:
  • Track playtime-based reward eligibility.
  • Send player-facing messages when rewards are available.
  • Configure recurring retention rewards through Takaro.
communityTakaro v0.0.24
(2 versions available)

Components Overview

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

New Module: PlaytimeReward

NEW
August 6, 2025
Updated to version latest. Added 1 command: playtime. Added 1 scheduled task: rewardOnlinePlaytime. New permissions: PLAYTIME_REWARD_OVERRIDE, PLAYTIME_ITEM_CHANCE_OVERRIDE. New configuration options: rewardInterval, baseReward, possibleItems, itemChance, 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 (5)

rewardIntervalnumberduration
rewardInterval

Give rewards every X minutes of playtime

Default: 1200000
baseRewardnumber
baseReward

Currency given per reward

Default: 0
possibleItemsarrayitem
Items

Items that can be randomly awarded

Constraints: uniqueItems
itemChancestring
itemChance

Chance to receive an item (1-100)

Constraints: minLength: 1, maxLength: 100
rewardMessagestring
rewardMessage

Message with placeholders {minutes}, {currency}, {item}

Default: "You've been online for {minutes} minutes! Reward: {currency} currency and {item}.

UI Schema

No configuration properties defined. This module uses default settings.

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.

Commands (1)

These commands can be executed by players in-game. Each command has a trigger word, optional arguments, and executes JavaScript code on the server.

playtime

/playtimeTrigger Command

Description

Check your playtime statistics

Function Implementation

playtime Function

JAVASCRIPT

Usage Example

Player types: /playtime

About Module Commands

Commands allow players to interact with your module through chat. Each command has a trigger word that players type (prefixed with /), optional arguments for parameters, and a JavaScript function that executes when the command is used. Arguments are automatically validated and passed to the function.

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

*/5 * * * *Schedule

Description

Set the cronjob value to check for online playtime. */5 * * * * means every five minutes. Please change the interval as well to align the messages.

Schedule Details

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

Every 5 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 (2)

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

2 permissions

Playtime Item Chance Override

PLAYTIME_ITEM_CHANCE_OVERRIDEPermission KeyCountable
Description

Override the chance to receive an item. Count value is the percentage (0-100).

Permission Details
Full Key:PLAYTIME_ITEM_CHANCE_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.

Playtime Reward Override

PLAYTIME_REWARD_OVERRIDEPermission KeyCountable
Description

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

Permission Details
Full Key:PLAYTIME_REWARD_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.