> For the complete documentation index, see [llms.txt](https://mossuh.gitbook.io/projects/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mossuh.gitbook.io/projects/plugins/mopets/actions/default-actions.md).

# Default Actions

Rewards are executed after every requirement has been successfully completed. Each reward can also be executed using:

* `CHANCE`
* `CHANCE_PER_LEVEL`

## Commands

| Reward                 | Format                              |
| ---------------------- | ----------------------------------- |
| `CONSOLE_COMMAND`      | `CONSOLE_COMMAND -> <command>`      |
| `PLAYER_COMMAND`       | `PLAYER_COMMAND -> <command>`       |
| `PLAYER_COMMAND_AS_OP` | `PLAYER_COMMAND_AS_OP -> <command>` |

## Messages

| Reward              | Format                                   |
| ------------------- | ---------------------------------------- |
| `TITLE`             | `TITLE -> <title>::<subtitle>`           |
| `SOUND`             | `SOUND -> <sound>::<volume>::<pitch>`    |
| `BROADCAST_MESSAGE` | `BROADCAST_MESSAGE -> <message>`         |
| `BROADCAST_TITLE`   | `BROADCAST_TITLE -> <title>::<subtitle>` |
| `JSON`              | `JSON -> <json>`                         |
| `JSON_BROADCAST`    | `JSON_BROADCAST -> <json>`               |
| `MESSAGE`           | `MESSAGE -> <message>`                   |

## Effects

| Reward   | Format                                        |
| -------- | --------------------------------------------- |
| `EFFECT` | `EFFECT -> <effect>::<duration>::<amplifier>` |

```
Example: EFFECT -> SPEED:10:1
```

## Items

| Reward       | Format                           |
| ------------ | -------------------------------- |
| `WORLD_DROP` | `WORLD_DROP -> <code>[<amount>]` |
| `GIVE_ITEM`  | `GIVE_ITEM -> <code>[<amount>]`  |

{% hint style="info" %}
For this section, you can create items that aren't pets; they don't need to have rewards, a leveling system, etc. The item just needs to have a material in order to be registered by MoPets.
{% endhint %}

## Events

| Reward         | Format         |
| -------------- | -------------- |
| `CANCEL_EVENT` | `CANCEL_EVENT` |
| `CANCEL_DROPS` | `CANCEL_DROPS` |

## Actions

| Reward           | Format                       |
| ---------------- | ---------------------------- |
| `EXECUTE_ACTION` | `EXECUTE_ACTION -> <action>` |

{% hint style="info" %}
This action is used to execute another action that you have registered in the same PET.
{% endhint %}

## Experience

| Reward       | Format                |
| ------------ | --------------------- |
| `ADD_EXP`    | `ADD_EXP -> <exp>`    |
| `SET_EXP`    | `SET_EXP -> <exp>`    |
| `REMOVE_EXP` | `REMOVE_EXP -> <exp>` |

## Levels

| Reward         | Format                    |
| -------------- | ------------------------- |
| `ADD_LEVEL`    | `ADD_LEVEL -> <level>`    |
| `SET_LEVEL`    | `SET_LEVEL -> <level>`    |
| `REMOVE_LEVEL` | `REMOVE_LEVEL -> <level>` |

## Variables

| Reward            | Format                                |
| ----------------- | ------------------------------------- |
| `SET_VARIABLE`    | `SET_VARIABLE -> <variable>::<value>` |
| `REMOVE_VARIABLE` | `REMOVE_VARIABLE -> <variable>`       |

## Damage

| Reward       | Format                   |
| ------------ | ------------------------ |
| `SET_DAMAGE` | `SET_DAMAGE -> <damage>` |

## Examples

```yml
[CHANCE -> 100] CONSOLE_COMMAND -> say Hello World

[CHANCE -> 50] EFFECT -> SPEED:10:1

[CHANCE -> 100] GIVE_ITEM -> MagicApple[1]

[CHANCE -> 100] EXECUTE_ACTION -> SpeedBoost

[CHANCE_PER_LEVEL -> 2] ADD_EXP -> 50

[CHANCE -> 100] TITLE -> &aPet Level Up!::&7Congratulations!
```

```yml
# Combined rewards

[CHANCE -> 100] EFFECT -> POISON:5:1 && MESSAGE -> Speed activated!
[CHANCE -> 50] EFFECT -> SPEED:5:1 && MESSAGE -> Lucky! || MESSAGE -> Better luck next time!
```

### Chained Rewards

Rewards can be chained using `&&`.

```yml
[CHANCE -> 100] EFFECT -> SPEED::5::1 && MESSAGE -> Speed activated!
```

Multiple outcomes can be separated using `||`.

```yml
[CHANCE -> 50] EFFECT -> SPEED::5::1 && MESSAGE -> Lucky! || MESSAGE -> Better luck next time!
```

### Target Reward

> You can apply the rewards to your target adding TARGET next to the reward name.

```yml
# Reward applied to your TARGET (Living Entity) when you attack him (Event: PLAYER_ATTACK).
[CHANCE -> 25] EFFECT:TARGET -> POISON:3:2 && MESSAGE:TARGET -> &cYou've been poisoned!

# Reward applied to your TARGET (Block) when you break it (Event: BLOCK_BREAK).
[CHANCE -> 0.1] WORLD_DROP:TARGET -> Diamond[1] && MESSAGE -> &aDiamond dropped!
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://mossuh.gitbook.io/projects/plugins/mopets/actions/default-actions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
