Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Wiki
    • Skills
  • Conditions

Last edited by Lxlp 5 days ago
Page history
This is an old version of this page. You can view the most recent version or browse the history.

Conditions

Introduction

Conditions are used to determine whether or not an action may execute.

Conditions can be used in [1]:

  • Skill Mechanics
  • Drop Tables
  • Spawners
  • Random Spawners

When applying multiple conditions, all of them must be met in order for the skill to be executed. Some conditions allow arrays that can be split by commas. Such conditions only require one of the strings in the array to match.

To see how to use the premium only in-line conditions, click here!

Usage

Types

Conditions can be broken into three types:

  1. Entity Conditions: These check the conditions of an entity.
  2. Location Conditions: These check the conditions at a location. If a location condition is used while an entity is targeted, it will check the conditions at the entity's location.
  3. Compare conditions: These check for certain conditions between two different "things". For example, "Cuboid" will return true if a target is within a cube where the corners are two coordinates, while "StringEquals" will return true or false depending on whether two strings match.

Conditions can also be used in three different places within a meta skill:

  1. Conditions: Conditions in this section check the conditions of the caster or the caster's location.
  2. TargetConditions: Conditions in this section check the conditions of the target or target location inherited from the skill's targeter.
  3. TriggerConditions: Conditions in this section check the conditions of the entity that triggered the skill.

Examples

Conditions:
- globalscore{objective=Test;v=>10}

In the example above, the globalscore condition will check the caster's global score.

TargetConditions:
  - globalscore{objective=Test;v=>10}

The example above uses the exact same condition, but here the globalscore condition will check the inherited target's global score. Since globalscore is an entity condition, it will only work if an entity is targeted.

Format:

SkillName:
  Conditions:
    - condition [variable]
  TargetConditions:
    - condition [variable] [action]
  TriggerConditions:
    - condition [variable] [action] [action_variable]
    - condition{variable1=value;variable2=value} [action] [action_variable]

These new "actions" control how the skill acts when a condition is met or not met. Here are some examples:

YourAwesomeSkill:
  Conditions:
    - day required
  TargetConditions:
    - stance defensive power 0.5
  TriggerConditions:
    - stance{stance=defensive} power 0.5
    - score{objective=test;value=>20} cancel
    - haspotioneffect{type=POISON;level=>0;duration=0to100} true

Ranged Values:
Ranged values use either the format #to# or #-#. You must use "to" instead of "-" if you want to use negative numbers in the range. For:

YourMagnificentSkill:
  Conditions:
    - altitude{a=1-5}
  TargetConditions:
    - distance{d=1to10} true
  TriggerConditions:
    - distance{d=1to10} true

Condition Actions

Condition Actions allow you to do additional things based off of conditions. The default condition action is true

Action Description
required (or true) The condition is required for the skill to run.
cancel (or false) The skill will not run if this condition is met.
power [multiplier] Modifies the skill's power (e.i. power 2.0 would double the skill's power)
cast [skill] Casts an additional skill if the condition is met.
castinstead [skill] Casts a different skill instead if the condition is met.
orElseCast [skill] Casts a different skill instead if the condition is not met. (4.12 MM)

Conditions

Condition Type Description
Altitude Entity Tests how far above the ground the target entity is
Biome Location Tests if the target is within the given list of biomes
BiomeType Location Tests for the biome category at a location.
BlockType Location Tests the material type present at the target location
Blocking Entity Tests if the targeted player is blocking with a shield
BowTension Meta Checks the bow tension of when an entity shoots from a bow
Burning Entity Whether or not the target entity is on fire
Chance Meta The chance that the metaskill has to be executed
Children Entity Tests how many children the caster has
Color Entity Tests the entity's colors
Crouching Entity Whether or not the target entity is crouching
Cuboid Compare Whether the target is within the given cuboid between location1 x location2
DamageAmount Entity Checks for a range of damage taken
DamageCause Entity Checks the type of the damage cause
Dawn Location If the time is dawn, from 22000 to 2000 in-game time
Day Location If the time is day, from 2000 to 10000 in-game time
Distance Compare Whether the distance between the caster and target is within the given range
DistanceFromTrackedLocation Location Whether the distance from the tracked location to the target is within the given range
DistanceFromSpawn Location Whether the distance from the world's spawn point to the target is within the given range
Dusk Location If the time is dusk, from 14000 to 18000 in-game time.
EnchantingLevel Entity Checks the entity experience level
EnderDragonPhase Entity Checks if the ender dragon is in a phase or phases
EntityType Entity Tests the entity type of the target
Faction Entity Tests for the targets faction
FallSpeed Entity If the fall speed of the target is within the given range
FieldOfView Compare Tests if the target is within the given angle from where the caster is looking
FoodLevel Entity Checks if the target has food within the range
FoodSaturation Entity Checks if the target has food within the range
Gliding Entity If the target is gliding
GlobalScore Entity Checks a global scoreboard value
HasAura Entity Checks if the target entity has the given aura
HasAuraStacks Entity Tests if the target has the given range of stacks from an aura
HasCurrency Entity If the target has the given amount of vault currency
HasInventorySpace Entity If the target has the given amount of empty inventory space
HasItem Entity Tests if the target player has the given number of given material
HasOwner Entity Tests if the target mob has an owner
HasParent Entity Tests if the target mob has a parent
HasPassenger Entity Checks if the target entity has a passenger
HasGravity Entity Tests if the target mob has gravity
HasPotionEffect Entity Tests if the target entity has a potion effect
HasTag Entity Tests if the target has a scoreboard tag
HasPermission Entity Tests if the target player has a permission
Health Entity Matches the target's health
Height Location Checks if the target's Y location is within a range
HeightAbove Location Checks if the target's Y location is above a value
HeightBelow Location Checks if the target's Y location is below a given value
Holding Entity Checks if the target is holding a given material(support MythicMobs and MMOItems)
InBlock Location Checks the material at the target location
InCombat Entity If the target mob is considered in combat
Inside Location Checks if the target has a block over their head
isCaster Entity Checks if the target is the caster
isChild Entity Checks if the target is a child of the caster
isFlying Entity Checks if the target player is flying
isLiving Entity Checks if the target is a living entity
isLeashed Entity Checks if the target has been leashed
isMonster Entity Checks if the target is a monster
isPlayer Entity Checks if the target is a player
isSprinting Entity Checks if the target Player is sprinting
ItemIsSimilar Entity Checks that targeted player's inventory slot if it's similar to an item
ItemRecharging Entity Checks if the target's weapon is recharging
LastDamageCause Entity Checks the target's last damage cause
LastSignal Entity Matches the last signal received by the target mob
Level Entity Checks the target MythicMob's level
LightLevel Location Tests the light level at the target location
LineOfSight Compare Tests if the target is within line of sight of the caster
LunarPhase Location Checks the target world's lunar phase
MobsInRadius Location Checks how many mobs are in a given radius
MobsInChunk Location Matches a range to how many mobs are in the target location's chunk
MobsInWorld Location Matches a range to how many mobs are in the target world
MotionX Entity Checks the X motion of the target entity against a range.
MotionY Entity Checks the Y motion of the target entity against a range.
MotionZ Entity If the target has a velocity greater than zero
Mounted Entity If the target entity is riding a mount/vehicle
Moving Entity If the target has a velocity greater than zero
MythicMobType Entity Checks the MythicMob type of the target mob
Name Entity Checks against the entity's name
NearClaim Location If the target location is near any GriefPrevention claims
Night Location If the time is night, from 14000 to 22000 in-game time
NotInRegion Location If the target location is not within the given WorldGuard region
OffGCD Entity Checks if the target mob has an active Global Cooldown
OnBlock Location Matches the block the target entity is standing on
OnGround Entity If the target entity is standing on solid ground
Outside Location If the target has open sky above them
Owner Compare Checks if the target entity is the owner of the caster
OwnerIsOnline Entity Checks if the owner of the target mob is online, if the owner is a player
Pitch Entity Checks if the pitch of the target entity is within a range
PlayerKills Entity Matches how many players the target mob has killed
PlayersInRadius Entity Checks how many players are in a radius
PlayerNotWithin Location Checks if any players are within a radius of the target
PlayerWithin Location Checks if any players are within a radius of the target
Raining Location If it's raining in the target world
Region Location If the target is within the given WorldGuard region
SameFaction Entity Tests if the caster and target are in the same faction
Score Entity Checks a scoreboard value of the target entity
Mob Size Entity Checks the size of the target entity
PlayersOnline Meta Matches the number of players online
Stance Entity Checks the stance of the target mob
StringEquals Meta Checks if value1 equals value2. Both values can use variables and placeholders.
Sunny Location If the weather is sunny in the target world.
TargetInLineOfSight Entity Tests if the target has line of sight to their target
TargetNotInLineOfSight Entity Tests if the target doesn't have line of sight to their target
TargetWithin Entity Tests if the target's target is within a certain distance
TargetNotWithin Entity Tests if the target's target is not within a certain distance
Targets Meta Tests if the number of inherited targets from the parent skilltree matches the given range.
Thundering Location If it's thundering in the target world
VariableInRange Meta Checks if the given numeric variable is within a certain range.
VariableIsSet Meta Checks if the given variable is set.
VariableEquals Meta Checks if the given variable has a particular value.
Wearing Entity Tests what the target entity has equipped.
World Location Checks the name of the target world.
WorldTime Location Matches a range against the target location's world's time.
Yaw Entity Checks the yaw of the target entity against a range.
yDiff Entity Checks the difference in Y between the targeted entity and the caster.

More Examples

FlameShock:
  Cooldown: 1
  Conditions:
  - targetwithin 15
  - targetinlineofsight true
  - incombat
  - stance aggressive
  - onblock GRASS
  - offgcd
  Skills:
  - gcd{t=60}
  - message{m="<mob.name> begins casting a spell"}
  - potion{t=SLOW;d=60;l=7}
  - delay 60
  - message{m="<target.name> &ecombusts"}
  - effect:particles{p=flame;a=20;hS=3;vS=1;s=0;y=2}
  - potion{t=HARM;d=1;l=1}

[1] Not all conditions may be applicable everywhere.

Clone repository
Home
Changelogs
Premium Features
Commands and Permissions
FAQ / Common Issues
Mythic Add-ons
Compatible Plugins
API Information
Packs
Mobs
  • Mob Options
  • Mob Levels
  • Mob Factions
  • Power Scaling
  • Damage Modifiers
  • Equipment
  • BossBar
  • Custom AI
  • Custom Kill Messages
  • Threat Tables
  • Immunity Tables
  • Extra: Disguises
  • Extra: ModelEngine
Skills
  • Mechanics
  • Effects
  • Targeters
    • Filters
  • Triggers
  • Conditions
    • In-line conditions
  • Placeholders
  • Variables
  • Math
Items
  • Options
  • Attributes
  • Enchantments
  • Potions
  • Banner Layers
  • Firework
Drops & DropTables
  • Drop Types
Spawning
  • Spawners
  • Random Spawns
Examples