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.

economyUtils

A set of commands to allow players to manage their currency.
builtinTakaro >=0.0.1

Components Overview

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

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)

pendingAmountnumber
Pending amount

When a player transfers money, they must confirm the transfer when the amount is equal or above this value. Set to 0 to disable.

Default: 0
zombieKillRewardnumber
Zombie kill reward

The default amount of currency a player receives for killing a zombie. This can be overridden by roles.

Default: 1

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.

Commands (8)

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

balance

/balanceTrigger Command

Description

Check your balance.

Function Implementation

balance Function

JAVASCRIPT

Usage Example

Player types: /balance

topCurrency

/topcurrencyTrigger Command

Description

List of the 10 players with the highest balance.

Function Implementation

topCurrency Function

JAVASCRIPT

Usage Example

Player types: /topcurrency

grantCurrency

/grantcurrencyTrigger Command

Description

Grant money to a player. The money is not taken from your own balance but is new currency.

Arguments (2)

receiver
playerPosition 0
Help: The player to grant currency to.
Default: None
amount
numberPosition 1
Help: The amount of money.
Default: None

Function Implementation

grantCurrency Function

JAVASCRIPT

Usage Example

Player types: /grantcurrency <receiver> <amount>

revokeCurrency

/revokecurrencyTrigger Command

Description

Revokes money from a player. The money disappears.

Arguments (2)

receiver
playerPosition 0
Help: The player to revoke currency from.
Default: None
amount
numberPosition 1
Help: The amount of money.
Default: None

Function Implementation

revokeCurrency Function

JAVASCRIPT

Usage Example

Player types: /revokecurrency <receiver> <amount>

confirmTransfer

/confirmtransferTrigger Command

Description

Confirms a pending transfer.

Function Implementation

confirmTransfer Function

JAVASCRIPT

Usage Example

Player types: /confirmtransfer

transfer

/transferTrigger Command

Description

Transfer money to another player.

Arguments (2)

receiver
playerPosition 0
Help: The player to transfer money to.
Default: None
amount
numberPosition 1
Help: The amount of money to transfer.
Default: None

Function Implementation

transfer Function

JAVASCRIPT

Usage Example

Player types: /transfer <receiver> <amount>

claim

/claimTrigger Command

Description

Claim your pending shop orders.

Arguments (1)

all
booleanPosition 0
Help: If true, claim ALL pending orders. If false, claim only the first one.
Default: "false"

Function Implementation

claim Function

JAVASCRIPT

Usage Example

Player types: /claim <all>

shop

/shopTrigger Command

Description

Browse the shop and view available items.

Arguments (3)

page
numberPosition 0
Help: Display more items from the shop by specifying a page number.
Default: "1"
item
numberPosition 1
Help: Select a specific item to view more details.
Default: "0"
action
stringPosition 2
Help: Perform an action on the selected item. Currently only "buy" is supported.
Default: "none"

Function Implementation

shop Function

JAVASCRIPT

Usage Example

Player types: /shop <page> <item> <action>

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.

zombieKillReward

*/5 * * * *Schedule

Schedule Details

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

Every 5 minutes

Function Implementation

zombieKillReward 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

Manage currency

ECONOMY_UTILS_MANAGE_CURRENCYPermission Key
Description

Allows players to manage currency of other players. This includes granting and revoking currency.

Permission Details
Full Key:ECONOMY_UTILS_MANAGE_CURRENCY
Can Have Count:No
Category:General

Zombie kill reward override

ZOMBIE_KILL_REWARD_OVERRIDEPermission KeyCountable
Description

Allows a role to override the amount of currency a player receives for killing a entity.

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