effects:
- skill{s=fireball;damage=12} +onAttack @target # call a skill with a parameter
- delay 1s # pause the rest
- if{cond=var.phase >= 2;then=enrage} @self # branch
fireball:
- shootfireball{velocity=1.5} @target
- damage{a=<skill.damage>} @target
| Mechanic | Usage | What it does |
|---|---|---|
cancelskillalso cancel, return | cancelskill | Stops the rest of the current skill from running. To cancel the game event instead, use cancelevent. |
gcdalso globalcooldown, setgcd, setglobalcooldown | gcd{ticks=20} | Puts the caster on a global cooldown. Gate skills on it with the offGCD condition. |
ifalso branch | if{cond=<condition>;then=<effect id or {block}>;else=<effect id or {block}>} | Runs then when a condition holds, else else. Bodies are a skill id or an inline {…} block. |
logalso console, print, printf | log{message=<text>} | Writes a message to the server console. Useful while debugging a skill. |
loop | loop{effect=<effect id or {block}>;times=<count>;every=<ticks>} | Runs a body a number of times, back to back or one per every. |
printparenttree | printParentTree | Prints the caster’s parent/owner chain to the console, for debugging summons. |
pulse | pulse{onstart=<id>;ontick=<id>;onend=<id>;interval=1s;duration=10s;delay=0} | The full form of repeat, with explicit onstart, ontick and onend skills. |
randomskillalso randommeta, randomeffect, randomrun | randomskill{skills=<id>,<id>;fallbackskill=<id>} | Runs one of the listed skills, picked at random. fallbackskill runs when none can. |
removepulsealso stoprepeat, pulseremove | removepulse{name=<pulse name>} | Stops repeats and pulses on the target (by name, or all), running their onend. |
repeatalso every | repeat{effect=<effect id>;every=2s;for=30s|forever} | Runs a skill on each target on a timer: every how often, for how long (or forever). Give it a name to stop it. |
setskillcooldownalso skillcooldown, setskillcd, skillcd | setSkillCooldown{skill=<id>;seconds=5} | Sets the remaining cooldown of a skill on the target. |
signalalso sendsignal | signal{signal=<name>} | Sends a named signal to the target mob, firing its +onSignal:NAME lines. |
skillalso metaskill, meta, run, effect, metavariableskill, variableskill, vskill | skill{s=<skill id or [ - inline lines ]>;<param>=<value>} | Runs another skill, by id or as an inline [ - … ] list. Extra attributes become <skill.name> parameters inside it. run <id> is the short form. |
sudoskillalso sudo | sudoskill{skill=<id>} | Makes the target run a skill as if it were the caster. |
switch | switch{condition=<placeholder>;cases=case <value>=<skill> case <value>=<skill> case default=<skill>} | Compares a placeholder against cases and runs the skill of the first case that matches, or default. |
throwerror | throwError | Fails on purpose, for testing error reporting. |
var | var{hits+=1;phase=2;tmp=} | Sets variables: add, subtract, set, or unset with an empty value. Prefix a name with a scope (global., target., …). |
variableaddalso addvariable, varadd, addvar, incrementvariable | variableAdd{var=<name>;amount=1} | Adds to a numeric variable. The long form of var{name+=n}. |
variablemathalso varmath, mathvariable, mathvar | variableMath{var=<name>;equation=x*2} | Sets a variable to the result of an equation, where x is its current value. |
variablemovealso varmove | variablemove{from=<name>;to=<name>} | Copies a variable to another name and removes the original. |
variablesetalso setvariable, setvar | variableSet{var=<name>;value=<value>;scope=caster} | Sets a variable in the given scope. The long form of var{name=value}. |
variablesetlocationalso setvariablelocation, setvarloc | variableSetLocation{var=<name>;value=@self} | Stores a location (the target’s, by default) in a variable. |
variablesubtractalso variablesub, subtractvariable, subvar, reducevariable, varsubtract, varsub | variableSubtract{var=<name>;amount=1} | Subtracts from a numeric variable. The long form of var{name-=n}. |
variableunsetalso varunset, unsetvariable, unsetvar | variableUnset{var=<name>} | Removes a variable. |
waitalso delay, waituntil | wait{until=<condition>;interval=1;timeout=200;cancel=false} | With a duration, pauses the rest of the skill: delay 0.5s, wait 20 (ticks). With until, pauses until a condition holds, checking every interval ticks, giving up after timeout. Inside a called skill it pauses only that skill. |
while | while{cond=<condition>;effect=<effect id or {block}>;every=1s;max=100} | Runs a body every every while a condition holds, up to max times. |
Inline skill bodies
skill takes MythicMobs’ inline list, so a short skill doesn’t need a name:
- skill{s=[ - particlering{p=flame;radius=3} @self - damage{a=6} @playersRadius[3] ]} +onHurt
if, loop and while take the {…} block form instead; see Flow Control.
cancelskill and cancelevent
cancel is MythicMobs’ short name for cancelskill, which stops the skill. To stop the game event that fired it (the damage, the right-click, the creeper’s fuse), use cancelevent, before the first delay.