Skip to content
Yevhen Harasymchuk edited this page May 23, 2026 · 1 revision

Events

This addon registers custom Skript events that trigger during various MythicMobs lifecycles, injecting contextual values directly into your code blocks.

1. Mob Lifecycle Events

on mythicmob spawnevent

Triggered whenever a MythicMob successfully spawns in the world.

  • Event Values:
    • event-activemob (The spawned ActiveMob instance)
    • event-entity (The Bukkit Entity of the spawned mob)

Example:

on mythicmob spawnevent:
    if displayname of activemob event-activemob is "Boss Zombie":
        broadcast "&cThe Boss Zombie has spawned!"

on mythicmob deathevent

Triggered when a MythicMob dies. Perfect for running custom cleanup code or processing tailored requirements.

  • Event Values:
    • event-activemob (The dying ActiveMob instance)
    • event-entity (The Bukkit Entity that died)
    • event-location (The death location)
    • event-killer (The entity that killed the mob)
    • event-mobdrop (The collection of items slated to drop)

Example:

on mythicmob deathevent:
    send "You killed a MythicMob!" to event-killer
    if displayname of activemob event-activemob is "Super Zombie":
        loop all items of mobdrop event-mobdrop:
            if "%loop-mobitem%" contains "<do_not_drop>":
                remove mobitem loop-mobitem from mobdrop event-mobdrop

2. Spawning & Loot Events

on mythicspawner spawnevent

Triggered when a custom MythicMobs Spawner handles a spawn task.

  • Event Values:
    • event-mythicspawner (The Spawner object that ran)
    • event-activemob (The spawned ActiveMob instance)

Example:

on mythicspawner spawnevent:
    broadcast "A %displayname of activemob event-activemob% just spawned from a spawner!"

on mythicmob lootdrop

Fires right as a MythicMob is about to drop rewards. Allows you to wipe or append custom physical/intangible rewards.

  • Event Values:
    • event-activemob (The mob dropping loot)
    • event-killer (The entity that secured the kill)
    • event-lootbag (The LootBag holding the drops to modify)

Example:

on mythicmob lootdrop:
    set physical loot for event-lootbag to diamond sword named "Legendary Sword"
    set other loot for event-lootbag to "exp 1000"

3. Advanced Custom Events

on mythicmobs skriptskillevent (Deprecated - Use skfunction instead!)

Fires when a mob executes a skriptskill mechanic.

  • Event Values:
    • event-entity
    • skill-trigger
    • skill-name
    • skill-args
    • skill-targettype
    • skill-target
    • event-location

on mythicmobs skriptconditionevent

Fires when MythicMobs evaluates a skriptcondition, skriptspawncondition, or skripttargetcondition.

  • Event Values:
    • condition-activemob
    • condition-entity
    • condition-location
    • condition-name
    • condition-args
    • condition-meet (Must be set to true or false to change outcomes)
    • condition-targetentity
    • condition-targetlocation

Example:

on mythicmobs skriptconditionevent:
    if condition-name is "weather":
        if condition-args is "clear":
            if weather in world of condition-entity is clear:
                set condition-meet to true
            else:
                set condition-meet to false

Clone this wiki locally