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

Scripts without a Cooldowns section, or with both local and global set to 0, will completely bypass the cooldown system. This allows for 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] Note: This applies to legacy power implementations (not EliteScripts). All EliteScript-based powers properly support global cooldowns. Some of the older powers are currently unaffected by this, it is a work in progress.

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: 20 # Optional: Prevent other powers for 1 second

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

However, 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.

The global cooldown is optional in this case - if omitted or set to 0, it won't prevent other powers from running.

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)