# Configuration

Here is an example Dialogue configuration:

dialogues/Welcome.yml
npc: 11
sound: BLOCK_WOOD_BREAK
actions:
  - "say: Hi! Welcome to the island, it looks like you might be lost..."
  - "say: ...I think I might be able to help you!"
  - "sound: ENTITY_EXPERIENCE_ORB_PICKUP"
  - "cmd: /eco give %player% 1000"
  - "say: You will need money in order to survive..."
  - "say: Now let's bring you to your new home"
  - "cmdp: /is home"

The sound option is the sound that will be played when the letters are being written. (Optional)
The npc option refers to a Citizens NPC ID, when the NPC is right-clicked the dialogue will start. (Optional)
The actions option is a list of actions that will be part of the dialogue.

Action Description
say This action sends a message to the player and wait for it to press the F (hand-swap) key.
cmd This action runs the specified command as the console. It supports the %player% placeholder in order to set the player name in the command if needed.
cmdp This action runs the specified command as the player.
sound This action plays the specified sound for the player.

# Example Dialogue Flow

This would be the dialogue flow for the given example:

  1. Sends Hi! Welcome to the island, it looks like you might be lost... to the user letter by letter and waits for the F key.

  2. Sends ...I think I might be able to help you! to the user letter by letter and waits for the F key.

  3. Plays the sound ENTITY_EXPERIENCE_ORB_PICKUP and continues to the next action.

  4. Runs the command /eco give %player% 1000 as the console and continues to the next action.

  5. Sends You will need money in order to survive... to the user letter by letter and waits for the F key.

  6. Sends Now let's bring you to your new home to the user letter by letter and waits for the F key.

  7. Runs the command /is home as the player and continues to the next action.

  8. (end)

As you can see, with those simple instructions you can make your server a lot more attractive to players due to the added life you can bring to your NPCs.