# Conversation Properties

## Random Dialogue

If enabled, this conversation will select and send a random dialogue.

```yaml
random_dialogue: true
```

## Interrupt Actions

Here you can set actions to be executed if the player interrupts the conversation in any of the dialogues of the current conversation tree. Ways of interrupting a conversation: Leaving the server, using /int stop command, stopping the server, leaving the conversation radius. All actions [HERE](https://ajneb97.gitbook.io/interactions/actions).

```yaml
interrupt_actions:
- 'console_command: say %player% interrupted a conversation.'
- 'actionbar: &cConversation interrupted...;60'
```

## Dialogue

It refers to the multiple dialogues this conversation can have. Click [HERE](https://ajneb97.gitbook.io/interactions/dialogues-properties) for Dialogue properties.

```yaml
dialogue:
    dialogue1:
    ...
    dialogue2:
    ...
```

## Options

It refers to the multiple options this conversation can have. Click [HERE](https://ajneb97.gitbook.io/interactions/options-properties) for Options properties.

```yaml
options:
    option1:
    ...
    option2:
    ...
```

## Options in Dialogue

When this option is enabled, options will not be sent in the common format but instead you can add them as variables inside the **last dialogue** of this conversation. This allows you to write more dialogue text below the options.

```yaml
options_in_dialogue: true
```

<figure><img src="https://1449104054-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MQiBU9Cb692JapWmSwp%2Fuploads%2F6n7lCSGnRRT4pPvhMaEo%2F2024-09-17_14.48.16.png?alt=media&#x26;token=6a390618-beb6-48f0-9a0b-e49021ef7a42" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
**IMPORTANT** when this option is enabled:

* The last dialogue of this conversation must contain the `%option_X%` variable for each option you have defined.
* The last dialogue must also have a time of 0, so the options are sent along the dialogue.
  {% endhint %}

```yaml
# Example
# options_in_dialogue is enabled on conversation1.
# dialogue2 has %option_1% and %option_2% variables on the text.
# The time of dialogue is 0.
conversation:
  conversation1:
    dialogue:
      dialogue1:
        text:
        - '{centered}&8&m000                                                           &8&m000'
        - '{centered}#fffa9c&lHegror'
        - '{centered}#dbdbdbWelcome my friend! Welcome to the island!'
        - ' '
        - '{centered}&8&m000                                                           &8&m000'
        time: 6
        show_name: false
      dialogue2:
        text:
        - '{centered}&8&m000                                                           &8&m000'
        - '{centered}#fffa9c&lHegror'
        - '{centered}#dbdbdbIf I am not wrong, you are &b%player% #dbdbdbright?'
        - ' '
        - '                    %option_1%'
        - '                    %option_2%'
        - '{centered}&8&m000                                                           &8&m000'
        time: 0
        show_name: false
    options:
      option1:
        text: '&7Yes'
        start_conversation: conversation2
      option2:
        text: '&7No'
        start_conversation: conversation3
    options_in_dialogue: true
```
