Built-in modules
Takaro provides a set of built-in modules. These are created and maintained by the Takaro Team. You can configure and install these without having to write any code.
You can install modules by browsing to a gameserver and clicking the "Modules" link. From there you can configure and install modules.
Core modules
utils
A collection of useful commands
Commands
- $ping - Replies with pong, useful for testing if the connection works.
- $help - The text you are reading right now, displays information about commands.
teleports
A set of commands to allow players to set their own teleport points and teleport to them.
Commands
- $teleport - Teleports to one of your set locations.
- $tplist - Lists all your set locations.
- $settp - Sets a location to teleport to.
- $deletetp - Deletes a location.
- $setpublic - Sets a teleport to be public, allowing other players to teleport to it.
- $setprivate - Sets a teleport to be private, only the teleport owner can teleport to it.
- $setwaypoint - Creates a new waypoint.
- $deletewaypoint - Deletes a waypoint.
- $listwaypoints - Lists all waypoints.
- $teleportwaypoint - Placeholder command, this will not be used directly. The module will install aliases for this command corresponding to the waypoint names.
Config variables
- timeout number - The time one has to wait before teleporting again.
- allowPublicTeleports boolean - Players can create public teleports.
playerOnboarding
Collection of functions that are executed when a player joins the server. Helps with onboarding new players, like sending a welcome message.
Commands
- $starterkit - Get a starter kit, you can only execute this once on a server!
Hooks
- playerConnected - Regex: , Event Type:
player-connected
Config variables
- message string - The message to send to the player when they join the server.
- starterKitItems array - List of items a player will receive when they execute the starterkit command for the first time.
serverMessages
Send automated, rotated, configurable messages to players on the server.
Cron Jobs
- Automated message - Temporal Value: */30 * * * *
Config variables
- messages array - List of messages that will be sent to players on the server.
chatBridge
Connect chat to other services like Discord.
Hooks
- DiscordToGame - Regex: , Event Type:
discord-message
- GameToDiscord - Regex: , Event Type:
chat-message
- PlayerConnected - Regex: , Event Type:
player-connected
- PlayerDisconnected - Regex: , Event Type:
player-disconnected
Config variables
- sendPlayerConnected boolean - Send a message when a player connects.
- sendPlayerDisconnected boolean - Send a message when a player disconnects.
- onlyGlobalChat boolean - Only relay messages from global chat. (no team chat or private messages)
gimme
Randomly selects an item from a list of items.
Commands
- $gimme - Randomly selects item from a list of items and entities.
Config variables
- items array - List of items that a player can receive.
- commands array -
highPingKicker
Automatically kick players with high ping, with warnings and configurable thresholds.
Cron Jobs
- Ping check - Temporal Value: */5 * * * *
Config variables
- pingThreshold number - A ping value that is deemed too high and prompts a warning.
- warningsBeforeKick number - Number of warnings before a player is kicked.
economyUtils
A set of commands to allow players to manage their currency.
Commands
- $balance - Check your balance.
- $topCurrency - List of the 10 players with the highest balance.
- $grantCurrency - Grant money to a player. The money is not taken from your own balance but is new currency.
- $revokeCurrency - Grant money to a player. The money is not taken from your own balance but is new currency.
- $confirmTransfer - Confirms a pending transfer.
- $transfer - Transfer money to another player.
- $claim - Claim your pending shop orders.
- $shop - Browse the shop and view available items.
Config variables
- pendingAmount number - When a player transfers money, they must confirm the transfer when the amount is equal or above this value. Set to 0 to disable.
lottery
Players can buy tickets for a lottery, and the winner is chosen at random.
Commands
- $buyTicket - Buy a lottery ticket.
- $viewTickets - View your lottery tickets.
- $nextDraw - View when the next draw is.
Cron Jobs
- drawLottery - Temporal Value: 0 0 * * *
Config variables
- profitMargin number - The profit margin the server takes from the lottery.
geoBlock
Block players from certain countries from joining the server.
Hooks
- IPDetected - Regex: , Event Type:
player-new-ip-detected
Config variables
- mode string - If set to allow, only players from the specified countries will be allowed to join. If set to deny, players from the specified countries will be banned from the server.
- countries array - List of countries
- ban boolean - Ban players from the server when they are detected. When false, players will be kicked instead.
- banDuration number - Duration of the ban.
- message string - Message to send to the player when they are kicked or banned.
timedShutdown
Automatically shut down the server at a specific time.
Cron Jobs
- Shutdown - Temporal Value: 3 30 * * *
- warning - Temporal Value: 3 25 * * *
Config variables
- warningMessage string - Message to send to players before the server shuts down.
Community modules
This directory contains modules that are not part of the core suite of built in modules, but are contributed by the community. They are not officially supported, but are provided as-is for the community to use and improve.
We welcome contributions to this directory. If you have a module that you would like to contribute, please open a pull request.
Vote
DownloadTakaro Vote Module
Commands
- $vote - Vote for the server and give players rewards.
Config variables
- votekey string - Votekey from website
- didntvote string - Message to send to the player when voting site reports no vote was cast.
- alreadyvoted string - Message to send to the player when voting site reports the vote was already claimed.
- votednow string - Optional message to send to the player when vote is successful. Use "none" as the message if you want nothing to be sent instead.
- publicMessage string - Optional message to broadcast to all players online when vote is successful. Use {name} in the message to refer to the player name. Use "none" as the message if you want nothing to be sent instead.
- giveStuff array - Items to give to the player thru giveplus command. Must indicate quantities and, if applies, quality: <item name> <amount> [<quality> <usedTimes>] Item name has to be the exact name of an item as listed by "listitems". Quality is the quality of the dropped items for items that have a quality. usedTimes is the % that the item was used. The default value is giving 2 waters and a tier 6 stone axe with no use. If you are going to copy/paste, include the arguments.
- currency number - How much currency to add to the player in Takaro