EliteScript
EliteScript is a comprehensive scripting system for MagmaGuy's Plugins, providing advanced customization options for creating dynamic behaviors for bosses and other entities in Minecraft.
Overview
EliteScript allows server administrators to create complex, event-driven behaviors for custom bosses and mobs. The scripting system is built on five core components:
- Events: Triggers that start script execution (damage, spawn, death, etc.)
- Conditions: Requirements that must be met for actions to execute
- Actions: The behaviors to perform (damage, teleport, spawn particles, etc.)
- Targets: What entities or locations the actions affect
- Zones: Defined areas in the world for targeting and detection
- Cooldowns: Time restrictions to prevent script spam
Elite Scripts can be added as standalone power files or directly into custom boss configuration files.
Quick Start Example
Here is a simple EliteScript that makes a boss strike lightning at players when damaged:
eliteScript:
LightningStrike:
Events:
- EliteMobDamagedByPlayerEvent
Actions:
- action: STRIKE_LIGHTNING
Target:
targetType: DIRECT_TARGET
repeatEvery: 20
times: 3
Cooldowns:
local: 60
global: 20
This script triggers when a player damages the boss, then strikes lightning at the player 3 times (once per second), with a 60-tick cooldown before it can trigger again.
Script Components
EliteScript provides extensive customization through its component system. For detailed information about each component, see the following pages:
Core Components
- Events - 13 event types including damage, death, spawn, combat, and zone-based triggers
- Actions - 35 action types for creating complex behaviors
- Targets - 17 target types for selecting entities and locations
- Conditions - Filtering and blocking conditions with multiple check types
- Zones - 8 zone shapes (spheres, cylinders, cuboids, rays, cones, etc.)
- Cooldowns - Local and global cooldown systems
- Relative Vectors - Advanced positioning and movement
Common Use Cases
EliteScript is commonly used for:
- Phase-based boss fights: Different attack patterns at different health percentages
- Arena mechanics: Zone-based damage, buffs, or spawns in specific areas
- Custom attacks: Unique particle effects, projectiles, and area attacks
- Environmental hazards: Periodic lightning, falling blocks, or fire
- Interactive mechanics: Teleportation, mob spawning, and world modification
- Player communication: Messages, titles, action bars, and boss bars
- Conditional behaviors: Different actions based on player count, location, or boss state
Implementation
Scripts can be implemented in two ways:
- Power Files: Create standalone
.ymlfiles in~/plugins/EliteMobs/powers/ - Custom Boss Files: Add
eliteScript:sections directly to custom boss configurations
For detailed instructions on creating powers and custom bosses, see:
Performance Considerations
When creating scripts, keep these best practices in mind:
- Use cooldowns to prevent performance issues from rapid-fire scripts
- Zone-based events (ZoneEnterEvent, ZoneLeaveEvent) are computationally expensive - use small zones and appropriate cooldowns
- Use filtering conditions to reduce unnecessary checks
- Test scripts thoroughly before deploying to production servers
Next Steps
To start creating your own EliteScripts:
