Skip to main content

Elite Script Cooldowns

Cooldowns set the amount of time that must pass before the boss is eligible to do a both the same script or any other power*.

  • note: some powers are not currently affected by cooldowns.

Configuration Location

Cooldowns are configured within the Cooldowns section of an elite script:

eliteScript:
ScriptName:
Events:
- [event configuration]
Actions:
- [action configuration]
Cooldowns:
local: [value or range]
global: [value or range]

Note: Configuration keys are case-insensitive (local, Local, LOCAL all work).

Note on Units: All cooldown values are specified in ticks. In Minecraft, there are 20 ticks per second, so:

  • 20 ticks = 1 second
  • 60 ticks = 3 seconds
  • 100 ticks = 5 seconds
  • 99999 ticks ≈ 83 minutes

Default Values

If the Cooldowns section is omitted, both local and global default to 0, meaning the script bypasses the cooldown system entirely.

Cooldown Bypass

A script is only gated by the cooldown system when both local and global are greater than 0. If either one is missing or set to 0, the script runs on every matching event regardless of the boss's cooldown state.

local alone does not gate a script

Setting only local: 200 does not rate-limit the script -- the gate is skipped entirely because global is 0. Set both values (for example local: 200, global: 20) whenever you actually want the cooldown enforced.

The reverse is still true in one direction: the script's global value is applied to the boss when the script runs, so a script with global but no local will still hold back other powers even though nothing holds it back.

This bypass is deliberate -- it allows event-triggered behaviors that should always execute regardless of the boss's cooldown state.

Example:

eliteScript:
AlwaysTeleportOnLowHealth:
Events:
- EliteMobEnterCombatEvent
Actions:
- action: TELEPORT
Target:
targetType: SELF_SPAWN
# No Cooldowns section - script always executes when event fires

Cooldowns have two values:

local

local sets the time, in ticks, before the same script can happen again. Example:

Example

local: 60

Sets the power to be able to run again for 3 seconds.

global

global sets the time, in ticks, before any other script or power can happen again[1]. Example:

Example

global: 20

Sets all other powers to not be able to start for 1 second.

[1] global sets a boss-wide cooldown flag, so it holds back every other power on the same boss regardless of which system that power is written in. EliteMobs' own powers are now written as EliteScripts or as Lua powers, and a Lua power participates in the same boss-wide window by calling context.cooldowns:set_global(ticks) (and gating on context.cooldowns:global_ready()). Keep this in mind on script-heavy bosses: a short global on a frequently-triggered script can starve slower powers.

Note: by making the local cooldown longer and the global cooldown shorter, you can guarantee that the boss will alternate between its available powers! Never make the global cooldown longer, and I recommend leaving at least one second of local cooldown to give other powers a chance to trigger.

Additionally, if your power has a specific duration during which it is active, you should use this system to prevent other powers from running simultaneously and potentially ruining your power.

Randomization

Both local and global cooldowns support randomization using range syntax. This allows cooldown durations to vary, adding unpredictability to boss behavior.

Example:

Cooldowns:
local: 40~80
global: 10~30

Sets the local cooldown to randomly be between 40 and 80 ticks (2-4 seconds) and the global cooldown to randomly be between 10 and 30 ticks (0.5-1.5 seconds).

Note: Values are randomly selected each time the cooldown is applied.

Run Scripts Once with Cooldowns

To ensure scripts trigger only once while still using an Event that may occur multiple times during a fight, set the local cooldown to a high number, such as 99999. This example demonstrates the concept:

Example
eliteScript:
SetMeOnFireOnlyOnce:
Events:
- EliteMobDamagedByPlayerEvent
Actions:
- action: SET_ON_FIRE
duration: 60
Target:
targetType: DIRECT_TARGET
Cooldowns:
local: 99999
global: 1

In this scenario, the EliteMobDamagedByPlayerEvent triggers the SET_ON_FIRE action. Without cooldowns, the action would activate every time the player hits the mob.

With a local cooldown set to 99999, the action will only trigger once every 99999 ticks (83 minutes). Since combat rarely lasts that long, this effectively makes the script run only once per combat encounter.

global must also be above 0 here. Cooldowns are only enforced when both values are set, so local: 99999 on its own would be ignored and the script would fire on every hit. A global: 1 is enough to arm the gate while barely holding back the boss' other powers.

Troubleshooting

Invalid Cooldown Keys

If you use an unrecognized key in the Cooldowns section, a warning will appear in the server logs:

Failed to parse cooldown entry for script name [ScriptName] in config file [FileName]

Valid keys are: local, global (case-insensitive)