Rampage

  • community
  • events
  • by Mad
  • Takaro v0.3.3
  • all
Version
View export JSON

A permission-based combat module that teleports players to a designated arena and spawns waves of hostile entities for intense PvE challenges.
Key Features

Permission-Gated Access: Only players with RAMPAGE_PERMISSION can activate
Arena Teleportation: Instantly transports players to configured combat coordinates
Random Entity Spawning: Spawns configurable entities around the arena with random positioning
Health Boosts: Provides temporary health increases during combat
Server Announcements: Broadcasts rampage notifications to all players

Configuration

Set custom arena coordinates (X, Y, Z)
Define which entities spawn during rampage mode
Control access through Takaro's permission system

Perfect for PvE challenges, special events, and rewarding VIP players with exclusive combat content.RetryClaude can make mistakes. Please double-check responses.

Configuration 4

Settings you fill in when installing the module on a server.

SettingTypeDefaultDescription
rLocationX required rLocationX string Teleport player location x
rLocationY required rLocationY string Height of teleport
rLocationZ rLocationZ string Teleport player location z
spawnEntities required spawnEntities array [] List of Bosses/zombies to spawn
Raw config schema
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "required": [
    "rLocationX",
    "rLocationY",
    "spawnEntities"
  ],
  "additionalProperties": false,
  "properties": {
    "rLocationX": {
      "title": "rLocationX",
      "description": "Teleport player location x",
      "type": "string"
    },
    "rLocationY": {
      "title": "rLocationY",
      "description": "Height of teleport",
      "type": "string"
    },
    "rLocationZ": {
      "title": "rLocationZ",
      "description": "Teleport player location z",
      "type": "string"
    },
    "spawnEntities": {
      "title": "spawnEntities",
      "description": "List of Bosses/zombies to spawn",
      "default": [],
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1,
      "maxItems": 100,
      "uniqueItems": true
    }
  }
}
Raw UI schema
{}

Commands 1

Chat commands players trigger in game.

  • rampage

    Calls in a crazy fight! Don't go alone

    Command source
    import { data, checkPermission, TakaroUserError, takaro } from '@takaro/helpers';
    
    async function main() {
        const { player, pog, gameServerId } = data;
    
        if (!checkPermission(pog, 'RAMPAGE_PERMISSION')) {
            throw new TakaroUserError('You do not have permission to use this command.');
        }
    
        // Announce Arena
        await takaro.gameserver.gameServerControllerSendMessage(gameServerId, {
            message: `[FFFF33] ${player.name} is on a RAMPAGE![-]`,
        });
    
        // These variables must match the 'properties' defined in your module's configSchema.
        const rLocationX = Number(data.module.userConfig.rLocationX);
        const rLocationY = Number(data.module.userConfig.rLocationY);
        const rLocationZ = Number(data.module.userConfig.rLocationZ);
    
        await takaro.gameserver.gameServerControllerTeleportPlayer(gameServerId, pog.playerId, {
            x: rLocationX,
            y: rLocationY,
            z: rLocationZ,
        });
    
        // --- Entity Spawning Loop ---
    
        // Get the array of entities to spawn from the module's user configuration.
        const entitiesToSpawn = data.module.userConfig.spawnEntities;
    
        // Check if the array exists and has items in it.
        if (!Array.isArray(entitiesToSpawn) || entitiesToSpawn.length === 0) {
            console.log('spawnEntities array is empty or not configured. Skipping entity spawn.');
            return;
        }
    
        await player.pm('Spawning entities...');
    
        // Loop through each entity name in the configured array.
        for (const entity of entitiesToSpawn) {
            // Generate a random offset between -10 and 10 for both X and Z coordinates.
            const offsetX = Math.floor(Math.random() * 21) - 10;
            const offsetZ = Math.floor(Math.random() * 21) - 10;
    
            // Calculate the final spawn coordinates.
            const spawnX = rLocationX + offsetX;
            const spawnZ = rLocationZ + offsetZ;
    
            // Construct the command to spawn the entity.
            const commandToExecute = `sea "${entity}" ${spawnX} 51 ${spawnZ}`;
    
            console.log(`Executing spawn command: ${commandToExecute}`);
    
            // Execute the command to spawn the entity.
            await takaro.gameserver.gameServerControllerExecuteCommand(gameServerId, {
                command: commandToExecute,
            });
    
            // Execute the 'th' command in every loop iteration.
            await takaro.gameserver.gameServerControllerExecuteCommand(gameServerId, {
                command: `th EOS_${player.epicOnlineServicesId} 10`,
            });
        }
    }
    
    await main();

Permissions 1

Roles you can grant to decide who may use what.

  • Rampage

    Rampaage module