Skip to content

Expressions

Yevhen Harasymchuk edited this page May 25, 2026 · 2 revisions

Expressions

Expressions allow you to retrieve data from MythicMobs objects to use in your scripts.

1. Obtaining ActiveMobs

  • activemob of %entity%: Gets the ActiveMob wrapper from a Bukkit entity.
  • activemob by uuid %string%: Gets an ActiveMob using its unique ID.
  • all activemobs [in world %world%]: Loops through all active mobs.
loop all activemobs in world "world":
    broadcast "%displayname of activemob loop-activemob%"

2. ActiveMob Data

  • displayname of activemob %activemob%
  • mobtype of activemob %activemob%
  • location of activemob %activemob%
  • world of activemob %activemob%
  • uuid of activemob %activemob%
  • level of activemob %activemob%
  • faction of activemob %activemob%
  • stance of activemob %activemob%
  • [max]health of activemob %activemob%
  • owner[uuid] of activemob %activemob%
  • toptarget of activemob %activemob%: Returns the current target.
  • lastaggro of activemob %activemob%: Returns the entity that last damaged it.

3. Threat Data

  • get threattable of activemob %activemob%: Returns a list of all entities in the threat table.
  • get threatvalue of %entity% from activemob %activemob%: Returns the threat score of a specific entity.

4. Targeters

  • mythicmobs targeter %string%: Creates a targeter instance (e.g., @PIR{r=30}).
  • target[entities/locations] of %entity% for targeter %skilltargeter%: Evaluates a targeter relative to an entity and returns the results.
set {_targeter} to mythicmobs targeter "@PIR{r=10}"
set {_targets::*} to targetentities of event-entity for targeter {_targeter}

5. Loot & Items

  • itemstack of mythicitem %string%: Generates an ItemStack from a MythicMobs item configuration.
set {_sword} to itemstack of mythicitem "MyEpicSword"
give {_sword} to player
  • mythicitem of name %string%: Gets the mythicitem object.
  • physical/other drops of [lootbag] %lootbag%: Retrieves current drops.
  • all items of mobdrop %mobdrop%: Loops through the drops in a deathevent.
  • [the] mythic type of %itemstack%: Returns the internal MythicMobs name of an item as a string, or nothing if the item is not a MythicItem.
on right click:
    set {_type} to mythic type of player's tool
    if {_type} is set:
        send "You are holding: %{_type}%"
    else:
        send "This item has no MythicMobs type."
  • [the] amount of mythic item %string% (in|of) %player%['s inventory]: Returns the total count (integer) of a specific MythicItem in a player's inventory across all slots.
on right click on emerald block:
    set {_count} to amount of mythic item "DragonShard" in player
    send "You have %{_count}% Dragon Shards."

6. MythicSpawners

  • mythicspawner of %activemob%
  • all mythicspawners [in world %world%]
  • location/world/mobtype/moblevel of mythicspawner %mythicspawner%
  • [remaining]cooldown/warmup of mythicspawner %mythicspawner%
  • all activemobs of mythicspawner %mythicspawner%

7. Skill Metadata

When working with skfunction:

  • caster of skilldata %skilldata%
  • cause of skilldata %skilldata%
  • trigger of skilldata %skilldata%
  • origin of skilldata %skilldata%
  • power of skilldata %skilldata%
  • entitytargets/locationtargets of skilldata %skilldata%

Clone this wiki locally