Skip to main content

Elite Script Events

EliteScripts are event-based. This means that they are launched when a specific event is triggered. The following are the currently valid events:

EventDetailsDirect Target [?]
EliteMobDamagedByEliteMobEventElite damaged by another eliteDamaging elite's living entity
EliteMobDamagedByPlayerEventElite damaged by a playerDamaging player
EliteMobDamagedEventElite damaged by anything❌
EliteMobDeathEventElite death❌
EliteMobEnterCombatEventElite enter combat with playerEngaging player
EliteMobExitCombatEventElite exit combat❌
EliteMobHealEventElite heal (including full heal)❌
EliteMobSpawnEventElite spawn❌
EliteMobTargetPlayerEventElite target playerTargeted player
PlayerDamagedByEliteMobEventElite damage playerDamaged player
ElitePhaseSwitchEventBoss spawn from phase switch❌
ZoneEnterEvent (ScriptZoneEnterEvent)Entity enters zone. Requires a zone to be set!Entity that entered the zone
ZoneLeaveEvent (ScriptZoneLeaveEvent)Entity leaves zone. Requires a zone to be set!Entity that left the zone

"Elite" means an entity tracked as an EliteMobs elite, including bosses and elite reinforcements. Note: ZoneEnterEvent and ZoneLeaveEvent are computationally expensive to run so please use these sparingly!

Direct Target is used by the Script Targets, more on that here.

In YAML, write ZoneEnterEvent and ZoneLeaveEvent. The parenthesized ScriptZoneEnterEvent and ScriptZoneLeaveEvent names are the underlying Java events, not accepted YAML aliases. Cancelling a cancellable event stops subsequent scripts and Lua powers in that event's dispatch order; it does not stop the remaining actions of the script already running. Zone enter/leave events themselves are not cancellable.

EliteMobDamagedEvent covers damage from any source; EliteMobDamagedByPlayerEvent and EliteMobDamagedByEliteMobEvent cover their specific sources. They are separate event dispatches, not mutually exclusive alternatives. Listing both a generic and a specific damage event can run the same script more than once for one hit when cooldowns allow. Damage already cancelled before the generic listener runs does not trigger it.

Note: event names are matched exactly, character for character. elitemobdeathevent or ELITEMOBDEATHEVENT are rejected with a console warning; only EliteMobDeathEvent works. The script-level section names are also case-sensitive: Events, Actions, Zone, Conditions and Cooldowns must be spelled exactly like that. A Conditions block nested under an action is read in any case. Everything inside those sections (targetType, radius, borderRadius, isAlive, Target, ...) is case-insensitive, and every enum value is a conventional exact-case UPPER_SNAKE_CASE constant.

These also drive Lua on_zone_enter / on_zone_leave

Listing ZoneEnterEvent or ZoneLeaveEvent here is what starts the per-tick zone listener on the boss. That listener is the only thing that fires the top-level on_zone_enter / on_zone_leave hooks in a Lua power on the same boss. A Lua power's own context.zones:watch_zone(...) does not fire them.

ZoneEnterEvent and ZoneLeaveEvent trigger actions when entities enter or leave the union of the script's generated zone shapes. Their DIRECT_TARGET is the entity that entered or left. The scanner itself has no direct target, so do not use DIRECT_TARGET to define its zone. Fixed locations and SELF / SELF_SPAWN are straightforward zone origins. A selector such as NEARBY_PLAYERS can also resolve origins without a direct target, but then the zone moves with those selected players and entry/exit reflects membership in the combined moving area.

The zone listener scans every tick even while script cooldowns prevent actions from starting. Cooldowns reduce action executions, not the cost of detecting zone membership. A newly started listener treats entities already inside its first scan as entering.

Zone events identify the boss and crossing entity, but not the originating script or zone. A transition detected by one script's listener is dispatched to all matching scripts and Lua powers on that boss. Separate listeners can therefore cause repeated or cross-zone activations. The zone's filter controls which living entities are scanned; its default is PLAYER.

Use one Events section per script, listing as many supported triggers as needed. A script without events has no automatic event trigger, but can still be called by another script:

Example
eliteScript:
Example:
Events:
- EliteMobDamagedByPlayerEvent
- EliteMobTargetPlayerEvent
Actions:
- action: PUSH
Target:
targetType: SELF
vValue: 0,.3,0
Cooldowns:
local: 60
global: 20

This script would make the elite jump when hit by a player or when targeting a player.