droneTeleports
- community
- administration
- by Mad
- Takaro v0.1.5
- all
Drones aren't teleporting to players. Executes CPM - get drone after a teleport. 5 second delay.
Configuration 0
Settings you fill in when installing the module on a server.
This module takes no configuration.
Raw config schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": [],
"additionalProperties": false
} Raw UI schema
{} Commands 1
Chat commands players trigger in game.
-
helps
No help text available
Command source
import { data, takaro } from '@takaro/helpers'; async function main() { const {} = data; } await main();
Hooks 1
Code that runs in reaction to a game or Takaro event.
-
drone Teleport
Teleports the drone to the player a few seconds after teleporting
Hook source
import { data, takaro } from '@takaro/helpers'; async function main() { const { player, pog, gameServerId } = data; // The log message is provided by the Takaro event data. const logMessageFromTakaro = data.eventData.msg; // The regex to find and capture the CrossId. const match = logMessageFromTakaro.match(/CrossId='(EOS_.*?)'/); // Directly access the captured ID, since a match is guaranteed. const eosID = match[1]; console.log(`Found EOS ID: ${eosID}`); //eoc <Name/EntityId/SteamId> "command param1 param2" //getdrone ${eosID} await takaro.gameserver.gameServerControllerExecuteCommand(data.gameServerId, { command: `getdrone ${eosID}`, }); } await main();