mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2025-02-01 11:11:23 +01:00
Update Triggers
parent
e89b9b2a22
commit
49548bae88
18
Triggers.md
18
Triggers.md
@ -2,9 +2,25 @@
|
||||
|
||||
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% 1"}'
|
||||
- 'command{format="mmocore admin atr-realloc-points give %player% 3"}'
|
||||
```
|
||||
|
||||
|
||||
## Available Trigger Types
|
||||
| Trigger | Description | Format/Example |
|
||||
|------------|--------------------------------------|-----------------------------------------------------------|
|
||||
|---------|-------------|----------------|
|
||||
| from | Fires all the triggers defined in the corresponding section of `triggers.yml`. | `from{source=trigger-id}` |
|
||||
| message | Sends a message to the player. | `message{format="&aYour message here... "}` |
|
||||
| command | Makes the console perform a command. | `command{format="tellraw @a {"text":"Hello!"}"}` |
|
||||
| experience | Gives experience in a profession. | `exp{profession=<PROFESSION>;amount=<AMOUNT>}` |
|
||||
|
Loading…
Reference in New Issue
Block a user