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.

ZombieRacing

by Limon

Zombie Racing

Zombie Racing is a Takaro community module that adds a configurable race betting mini-game to game servers with Takaro economy enabled. Players bet currency on a racer before the race starts, Takaro runs the race on a schedule or by admin command, then pays winning bets and posts the result in chat.
The default setup uses a zombie race theme, but server owners can rename the race, change racer labels, set payout odds, adjust commentary, and turn the same module into horse racing, robot racing, turtle racing, or another server event.
Zombie Racing chat result in Takaro

What it adds

  • Configurable racers with custom names, labels, odds, and weighted winner chances.
  • Currency betting through Takaro economy, including minimum and maximum bet limits.
  • Scheduled races through cron jobs, plus an admin command for manual starts.
  • Live race commentary messages for early, middle, and late race moments.
  • Player race stats, current bets, last race results, and a leaderboard.
  • Recovery logic for interrupted running races so race state, payouts, and stats stay consistent.

Configuration

Use the module configuration to set the race name, racer type labels, entrants, betting limits, payout odds, commentary lines, and race timing. Entrants use Name; Odds lines, for example Biker; 2, where the number controls the payout multiplier.
Zombie Racing user configuration in Takaro
System configuration controls the cron jobs, delayed finish hooks, commentary hooks, commands, and permissions used by the module.
Zombie Racing system configuration in Takaro

Commands

CommandPermissionPurpose
/racebet <racer> <amount>RACING_BETPlace or replace a bet for the next race.
/racersRACING_BETShow available racers, odds, next race timing, and bet limits.
/myracebetsRACING_BETShow your current or locked race bets.
/nextraceRACING_BETShow upcoming race status and your active bets.
/lastraceRACING_BETShow the latest race winner, standings, and your result.
/racestatsRACING_BETShow your personal betting statistics.
/raceleaderboardRACING_BETShow the top racing bettors by net winnings.
/startraceRACING_ADMINStart a race manually.

Hooks and cron jobs

announceRace and startRace handle scheduled announcements and race starts. The finish hooks complete scheduled or manually started races after the configured delay, and commentary hooks send live race updates. recoverRunningRace can finish or clean up a race that was interrupted while running.
Zombie Racing events in Takaro

Requirements

Enable Takaro economy before installing Zombie Racing. Grant RACING_BET to players who can place race bets and RACING_ADMIN to staff who can start races manually.
communityTakaro 0.0.0

Components Overview

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

Updated 5 Commands

May 21, 2026
Added 8 hooks: raceCommentaryEarlyAfterScheduledStart (cronjob-executed), raceCommentaryMiddleAfterScheduledStart (cronjob-executed), raceCommentaryLateAfterScheduledStart (cronjob-executed), raceCommentaryEarlyAfterManualStart (command-executed), raceCommentaryMiddleAfterManualStart (command-executed), raceCommentaryLateAfterManualStart (command-executed), finishRaceAfterScheduledStart (cronjob-executed), finishRaceAfterManualStart (command-executed). Added 2 scheduled tasks: startRace, recoverRunningRace. New configuration options: commentaryEarlyTemplates, commentaryMiddleTemplates, commentaryLateTemplates. Updated 5 command implementations.

New Module: ZombieRacing

NEW
April 29, 2026
Updated to version latest. Added 8 commands: raceleaderboard, racers, racestats, startrace, lastrace, nextrace, myracebets, racebet. Added 2 scheduled tasks: announceRace, runRace. Added 1 function: utils. New permissions: RACING_BET, RACING_ADMIN. New configuration options: minBet, maxBet, racerTypeLabel, racerTypePluralLabel, raceName, entrants.

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 (9)

minBetnumber
minBet

Minimum amount required to place a bet

Default: 50
Constraints: min: 1
maxBetnumber
maxBet

Maximum amount allowed for a bet

Default: 1000
Constraints: min: 1
racerTypeLabelstring
Racer type label

Singular label for racers in command output.

Default: zombie
racerTypePluralLabelstring
Racer type plural label

Plural label for racers in command output.

Default: zombies
raceNamestring
Race name

Display name for races.

Default: Zombie Race
entrantsarray
Entrants

List of racers. Format: Name; Odds (whole number) - one racer per line.

Default:Array of 6 items
"Biker; 2"
"Arlene; 3"
... and 4 more items
commentaryEarlyTemplatesarray
Early race commentary templates

Messages used for the first live race update. Supports {winner}, {leader}, {rival}, {raceName}, {racer}, and {racers}.

Default: ["{leader} jumps out first, but {winner} is staying close.","{leader} takes the early lead while {winner} waits for an opening.","{leader} is setting the pace. {winner} is right behind."]
commentaryMiddleTemplatesarray
Middle race commentary templates

Messages used for the second live race update. Supports {winner}, {leader}, {rival}, {raceName}, {racer}, and {racers}.

Default: ["{winner} is catching {leader} fast. {rival} is trying to keep pace.","{winner} closes the gap on {leader}; {rival} is still in the mix.","{leader} is under pressure now. {winner} is gaining ground."]
commentaryLateTemplatesarray
Late race commentary templates

Messages used for the final live race update before results. Supports {winner}, {leader}, {rival}, {raceName}, {racer}, and {racers}.

Default: ["{winner} overtakes {leader} in the final stretch.","{winner} surges past {leader}; the finish line is close.","{winner} finds another gear and takes the lead from {leader}."]

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.

raceleaderboard

/raceleaderboardTrigger Command

Description

Usage: /raceleaderboard

Function Implementation

raceleaderboard Function

JAVASCRIPT

Usage Example

Player types: /raceleaderboard

racers

/racersTrigger Command

Description

Usage: /racers

Function Implementation

racers Function

JAVASCRIPT

Usage Example

Player types: /racers

racestats

/racestatsTrigger Command

Description

Usage: /racestats

Function Implementation

racestats Function

JAVASCRIPT

Usage Example

Player types: /racestats

startrace

/startraceTrigger Command

Description

Usage: /startrace

Function Implementation

startrace Function

JAVASCRIPT

Usage Example

Player types: /startrace

lastrace

/lastraceTrigger Command

Description

Usage: /lastrace

Function Implementation

lastrace Function

JAVASCRIPT

Usage Example

Player types: /lastrace

nextrace

/nextraceTrigger Command

Description

Usage: /nextrace

Function Implementation

nextrace Function

JAVASCRIPT

Usage Example

Player types: /nextrace

myracebets

/myracebetsTrigger Command

Description

Usage: /myracebets

Function Implementation

myracebets Function

JAVASCRIPT

Usage Example

Player types: /myracebets

racebet

/racebetTrigger Command

Description

Usage: /racebet

Arguments (2)

racer
stringPosition 0
Help: Name of the racer you want to bet on
Default: ""
amount
numberPosition 1
Help: Amount of currency to bet
Default: "0"

Function Implementation

racebet Function

JAVASCRIPT

Usage Example

Player types: /racebet <racer> <amount>

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.

Hooks (8)

These hooks respond to various game events automatically. Each hook executes JavaScript code when its specific event type occurs, allowing modules to react to player actions, system changes, and more.

Player Events

4 hooks

raceCommentaryEarlyAfterManualStart

command-executedEvent Type
Description
Broadcast the first manual race commentary update
Function Implementation

raceCommentaryEarlyAfterManualStart Hook Function

JAVASCRIPT
Event Details
Event Type:command-executed
Trigger:Automatic
Category:Player Events

raceCommentaryMiddleAfterManualStart

command-executedEvent Type
Description
Broadcast the second manual race commentary update
Function Implementation

raceCommentaryMiddleAfterManualStart Hook Function

JAVASCRIPT
Event Details
Event Type:command-executed
Trigger:Automatic
Category:Player Events

raceCommentaryLateAfterManualStart

command-executedEvent Type
Description
Broadcast the final manual race commentary update before results
Function Implementation

raceCommentaryLateAfterManualStart Hook Function

JAVASCRIPT
Event Details
Event Type:command-executed
Trigger:Automatic
Category:Player Events

finishRaceAfterManualStart

command-executedEvent Type
Description
Finish a manually started race after the configured delay
Function Implementation

finishRaceAfterManualStart Hook Function

JAVASCRIPT
Event Details
Event Type:command-executed
Trigger:Automatic
Category:Player Events

Custom Events

4 hooks

raceCommentaryEarlyAfterScheduledStart

cronjob-executedEvent Type
Description
Broadcast the first scheduled race commentary update
Function Implementation

raceCommentaryEarlyAfterScheduledStart Hook Function

JAVASCRIPT
Event Details
Event Type:cronjob-executed
Trigger:Automatic
Category:Custom Events

raceCommentaryMiddleAfterScheduledStart

cronjob-executedEvent Type
Description
Broadcast the second scheduled race commentary update
Function Implementation

raceCommentaryMiddleAfterScheduledStart Hook Function

JAVASCRIPT
Event Details
Event Type:cronjob-executed
Trigger:Automatic
Category:Custom Events

raceCommentaryLateAfterScheduledStart

cronjob-executedEvent Type
Description
Broadcast the final scheduled race commentary update before results
Function Implementation

raceCommentaryLateAfterScheduledStart Hook Function

JAVASCRIPT
Event Details
Event Type:cronjob-executed
Trigger:Automatic
Category:Custom Events

finishRaceAfterScheduledStart

cronjob-executedEvent Type
Description
Finish a scheduled race after the configured delay
Function Implementation

finishRaceAfterScheduledStart Hook Function

JAVASCRIPT
Event Details
Event Type:cronjob-executed
Trigger:Automatic
Category:Custom Events

About Module Hooks

Hooks allow your module to respond automatically to game events like player actions, server status changes, and chat messages. Each hook has an event type that determines when it triggers, optional regex patterns for filtering specific events, and a JavaScript function that executes when the conditions are met. Hooks are grouped by category for better organization.

Scheduled Jobs (3)

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

announceRace

45 1-23/2 * * *Schedule

Description

Announce each upcoming two-hour race 15 minutes before it starts

Schedule Details

Cron Expression
45 1-23/2 * * *
Human-Readable Schedule

At minute 45 at 1 AM on every day of the month in every month on every day of the week

Function Implementation

announceRace 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).

startRace

0 */2 * * *Schedule

Description

Start the scheduled race every two hours

Schedule Details

Cron Expression
0 */2 * * *
Human-Readable Schedule

Every 2 hours

Function Implementation

startRace 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).

recoverRunningRace

* * * * *Schedule

Description

Recover races that remain running after their expected finish time

Schedule Details

Cron Expression
* * * * *
Human-Readable Schedule

Every minute

Function Implementation

recoverRunningRace 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.

Functions (1)

Reusable JavaScript functions that can be imported and used by other module components like commands, hooks, and cron jobs. These promote code reuse and modularity.

utils

functionReusable Component

Function Implementation

utils Function

JAVASCRIPT

Import Usage

Import: import { utils } from './utils';

About Module Functions

Functions are reusable JavaScript components that can be imported and used by commands, hooks, and cron jobs within your module. They promote code reuse, improve maintainability, and allow you to organize complex logic into modular pieces. Functions must be exported with proper ES6/CommonJS syntax to be importable by other components.

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

Racing Admin

RACING_ADMINPermission Key
Description

Allows the player to manage races

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

Place Racing Bets

RACING_BETPermission Key
Description

Allows the player to bet on races

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

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.