Skip to content

๐Ÿ”ง Triggers โ€‹

WARNING

This feature will be merged in a near future with MythicLib script mechanics (this update will be backwards compatible). This page will be deleted and moved over to the MythicLib wiki.

This is a very technical feature, you will not learn anything by reading this page on its own (out of context). It should only be read if other wiki pages redirect you to this page.

Triggers are used by MMOCore to execute actions when certain conditions are met. They are used for both quests and professions, and each has a set of actions or objectives that can "trigger" them.

Trigger Tables (Since 1.9.5) โ€‹

Since 1.9.5, you can define trigger tables in triggers.yml. You can reference each trigger list with its id which will fire all the corresponding triggers.

#Example
test-trigger:
 - 'command{format="broadcast Triggered!"}'
 #Will fire the 2 commands in test-trigger-2
 - 'from{source="test-trigger-2"}'


test-trigger-2:
 - 'command{format="mmocore admin skill-points give %player_name% 1"}'
 - 'command{format="mmocore admin atr-realloc-points give %player_name% 3"}'

Available Trigger Types โ€‹

TriggerDescriptionFormat/Example
statGives a permanent stat to the player. FLAT type just adds the amount to the stat. Relative makes it have a % increase for the stat.stat{stat=<STAT_NAME>;amount=<amount>;type=FLAT/RELATIVE}
skill_buffGives a permanent buff for all the skills matching the formula by changing the value of a certain modifier (cooldown, damage, mana...). More info on skill buffs here.skill_buff{formula="<FORMULA>";modifier=<MODIFIER>;amount=<amount>;type=FLAT/RELATIVE}
unlock_skillUnlocks a skill for the player. More about skill unlocking here.unlock_skill{skill=FIREBALL}
unlock_slotUnlocks a specific skill slot for the player.unlock_slot{slot="<SLOT>"}
bind_skillBinds a skill to a specific slot.bind_skill{skill=FIREBALL;slot=10}
levelup_skillIncreases the player's skill level.levelup_skill{skill=<NAME>;amount=1}
messageSends a message to the player.message{format="&aYour message here... "}
commandMakes the console perform a command.command{format="tellraw @a {"text":"Hello!"}"}
experienceGives experience in a profession.exp{profession=<PROFESSION>;amount=<AMOUNT>}
experienceGives main class experience.exp{amount=<AMOUNT>}
soundBroadcasts a sound to the player.sound{sound=<SOUND_NAME>;volume=<VOLUME>;pitch=<PITCH>}
itemGives an item to the player.item{type=DIAMOND;amount=3}
mmoitemGives an mmoitem to the player.mmoitem{type=SWORD;id=FALCON_BLADE;amount=2}
manaGive/take/set player mana.mana{operation=<GIVE/SET/TAKE>;amount=2-3}
staminaGive/take/set player stamina.stamina{operation=<GIVE/SET/TAKE>;amount=2-3}
stelliumGive/take set player stellium.stellium{operation=<GIVE/SET/TAKE>;amount=2-3}
mmskillCast a MythicMobs skill.mmskill{id=MythicMobsSkillInternalName}
moneyGive/take/set player balance.money{operation=<GIVE/SET/TAKE>;amount=2-3}

Most of these types and triggers are shown in the default config with how to properly use them. The message and command triggers support placeholders from PlaceholderAPI.

Powered by VitePress