Skip to content

Conditions

muhahahahe edited this page Feb 6, 2018 · 73 revisions

Use the listed conditions the same way it is discribed on the conditions manual of MythicMobs

General Conditions:

- biomefix{b=[SINGLE/ARRAY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the casters or targets biome
example: - biomefix{b=DESERT,PLAINS;action=true}

- comparenbt{nbt=[NBT];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the casters or targets NBT, with the ability to ignore NBT by adding id:ignore
example: - cmpnbt{nbt=(ArmorItems:[(),(),(id:ignore),(id:"minecraft:diamond_helmet",Count:1)])}

- crouching{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted player is crouching
example: - crouching{action=true}

- eir{types=[SINGLE/ARRAY/ALL];amount=[VALUE/VALUE-RANGE];radius=[VALUE];insameblock/isb=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the amount of entities are in the given range
example: - eir{types=ARMOR_STAND;amount=1;radius=5;action=true}

- facingdirection{d=[CARDINAL-POINT];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target looks in a specific direction
example: - facingdirection{f=SOUTH_WEST;action=true}

- factionsflag{flag=[SINGLE/ARRAY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the faction has a specific flag set or unset
example: - factionsflag{flag=firespread;action=false}

- getbowtension{range=[VALUE/VALUE-RANGE];debug=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the current bow tension
example: - getbowtension{range=1;action=true}

- getindicator{value=[VALUE/VALUE-RANGE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the attack indicator of a player
0 = no indicator, 1 = full indicator
NOTE: *Only usefull for ~onTimer skills.*
example: - getindicator{value=<0.51;action=true}

- hasspawner{names=[SINGLE/ARRAY/ANY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the MythicMob comes from that spawner
example: - hasspawner{names=MySpawner;action=true}

- hastarget{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster has a target
NOTE: *This only works on the caster, if you use it
            in a TargetConditions it will throw an error!*
example: - hastarget{action=true}

- hasvehicle{types=[SINGLE/ARRAY/ANY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the MythicMob has a vehicle
example: - hasvehicle{types=BOAT;action=true}

- health{p=[NUMERIC];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the targets health in percent from 1 to 100
example: - health{p=>50;action=true}

- infaction{faction=[STRING/ARRAY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster is in the faction or one of the factions
NOTE: only works on a MythicMob
example: - infaction{faction=MyFaction;action=true}

- inmobarena
checks if the caster, target, or location is in a Mob Arena
Requires the MobArena Plugin

- inmotion{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target is in motion
wont work on non-living entities
example: - inmotion{action=true}

- insolidblock{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted entity or location is in a solid block
example: - insolidblock{action=true}

- jumping{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted entity is jumping
example: - jumping{action=true}

- lastbowtension{range=[VALUE/VALUE-RANGE];debug=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks with how much tension the bow was shot
example: - lastbowtension{range=>0.7;action=true}

- lastdamagecause{cause=[BukkitDamageCause];damager=[BukkitEntityType];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the last damage event on the caster or target
Note: entity for check must be a MythicMob
example: - lastdamagecause{cause=PROJECTILE;damager=PLAYER;action=true}

- lastindicator{value=[VALUE/VALUE-RANGE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the attack indicator of a player
0 = no indicator, 1 = full indicator
NOTE: *Will get the indicator right before skill usage for ~onAttack,~onDamaged... skills.*
example: - getindicator{value=<0.51;action=true}

- leir{types=[SINGLE/ARRAY/ALL];amount=[VALUE/VALUE-RANGE];radius=[VALUE];insameblock/isb=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks for the living entities in the given range
example: - leir{types=ZOMBIE,SQUID;amount=2;radius=15;action=true}

- mobsinradius{mobtypes=[SINGLE/ARRAY/ALL];a=[NUMERIC/NUMERIC-RANGE];r=[NUMERIC];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the amount of mobs in a given area around the caster/target/location
example: - mobsinradius{m=ALL;a=5to10;r=20;action=TRUE}

- motiondirection{directions=[MOTIONDIRECTIONTPYE/MOTIONDIRECTIONTYPES];store=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks in which direction the target is moving
example: - motiondirection{directions=FORWARD;store=false;action=true}

- movespeed{range=[VALUE/VALUE-RANGE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the movementspeed of the targeted living entity
example: - movespeed{range=>0.1}

- oncooldown{value=[VALUE/VALUE-Range];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the players item is on cooldown
example: - oncooldown{value=1to10;action=true}

- owneralive{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the owner is online, alive or in the same world
example: - owneralive{action=true}

- pir{amount=[VALUE/VALUE-RANGE];radius=[VALUE];insameblock/isb=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the amount of players are in the given range
example: - pir{amount=5;radius=10;action=true}

- playertime{time=[VALUE/VALUE-RANGE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the targeted player's time only
use it with playertime mechanic
example: - playertime{time=0to12000;action=true}

- playerweather{weather=[WEATHERTYPE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the targeted player's weather only
use it with playerweather mechanic
example: - playerweather{weather=CLEAR;action=true}

- running{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted player is running/sprinting
example: - running{action=true}

- sleeping{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted player is sleeping
example: - sleeping{action=true}

- testfor{vc="[valid_testfor_stuff]";action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the caster or target with valid testfor stuff
example: - testfor{vc="XpLevel:20";action=true}

- wgdenyspawnflag{types=[BukkitEntityType];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the region has denied the spawning of defined entities(usually used in randomspawns)
example: - wgdenyspawnflag{types=ZOMBIE,SKELETON;action=false}

- wgstateflag{flag=[WorldGuardFlag];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the region has set the defined flag
example: - wgstateflag{flag=mob-spawning;action=false}


Compare Conditions:

- attackable{cause=[BukkitEntityDamageEvent];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target is attackable by the caster with this DamageEvent
example: - attackable{cause=PROJECTILE;action=false}

- behind{view=[ANGLE_VALUE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster is behind of its target
example: - behind{view=90;action=true}

- damageable{cause=[BukkitEntityDamageEvent];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target is damageable with this DamageEvent
example: - damageable{cause=PROJECTILE;action=true}

- hasmeta{meta="tag=[TAGNAME];value=[TAGVALUE];type=[BOOLEAN/NUMERIC/STRING]";compareself=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
compares the meta of 2 entities, can also used on caster itself
can check multiple metas (seperated by && for AND or || for OR)
example: - hasmeta{meta="tag=lastdamagedentity;value=<target.uuid>;
                  type=STRING";cs=true;action=true}

- hasmetasimple{tag=[TAGNAME];value=[TAGVALUE];type=[BOOLEAN/NUMERIC/STRING]";compareself=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
same as hasmeta but can only compare 1
example: - hasmetasimple{tag=lastdamagedentity;value=<target.uuid>;
                  type=STRING;cs=true;action=true}

- infront{view=[ANGLE-VALUE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster is infront of its target
example: - infront{view=10;action=false}

- isburning{range=[VALUE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted entity is burning
when a range is provided checks if the amount of ticks provided matches with FIRE_TICKSexample: - isburning{action=true}

- isgoggling{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the player is looking at something
example: - isgoggling{action=true}

- ispresent{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if an entity is present
example: - ispresent{action=true}

- isspinning{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the player is spinning
use with the playerspin mechanic
example: - isspinning{action=true}

- isstunned{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster or target is stunned
This works also as TargetConditions: keep in mind to set the right targeter
example: - isstunned{action=true}

- isvehicle{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target is the vehicle of the caster
example: - isvehicle{action=true}

- lookatme{fov=[DOUBLE];yo=[DOUBLE];debug=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the target is looking at the caster
the example uses the default values that are fine for almost any entity
with debug set to true you will get a console output with the fov and yo
example: - lookatme{fov=1.999;yo=-0.4}

- onsolidblock{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the targeted entity or location is on a solid block
example: - onsolidblock{action=true}

- ownsitem{list="where=[ANY/HAND/ARMOR/INVENTORY];material=[ANY/MATERIALTYPE];amount=[VALUE/VALUE-RANGE];lore=[LORETEXT]";action=[BOOLEAN/CAST/CASTINSTEAD]}
checks one or multiple slots (seperated by && for AND or || for OR)
of the target if it has an item or material
example: - ownsitem{list="where=HAND;material=DIAMOND_SWORD;amount=1 && where=INVENTORY;material=DIAMOND_SWORD;amount=1to2";action=true}

- ownsitemsimple{where=[ANY/HAND/ARMOR/INVENTORY];material=[ANY/MATERIALTYPE];amount=[VALUE/VALUE-RANGE];lore=[LORETEXT];action=[BOOLEAN/CAST/CASTINSTEAD]}
same as ownsitem but can only check 1 slot
example: - ownsitemsimple{where=HAND;material=SAND;amount=1;action=true}

- parsedstance{s="<variable>";cs=[BOOLEAN];action=[BOOLEAN/CAST/CASTINSTEAD]}
this condition can check if a variable is set as a stance
usefull with parsedstance mechanic
(NOTE: if cs is set to true it will always check the caster)
example: - parsedstance{s="<target.uuid>";cs=true;action=true}

- relativedirection{angle=[VALUE/VALUE-RANGE];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the direction to the target from the caster
example: - relativedirection{angle=90;action=false}

- samefaction{faction=[STRING/ARRAY];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster and target are in the same faction or one of the factions
NOTE: only works on a MythicMob
example: - samefaction{faction=MyFaction;action=true}

- samespawner{action=[BOOLEAN/CAST/CASTINSTEAD]}
checkes if the target MythicMob comes from the same spawner as the caster
example: - samespawner{action=true}

- sameworld{action=[BOOLEAN/CAST/CASTINSTEAD]}
checks if the caster and targeted entity or location are in the same world
example: - sameworld{action=true}

- vdistance{d=[NUMERIC];action=[BOOLEAN/CAST/CASTINSTEAD]}
checks the height between target and caster
example: - vdistance{d=2to3;action=true}
Clone this wiki locally