Skip to content

Run example dialog

toxicity188 edited this page Sep 3, 2023 · 1 revision

After install plugin, you can see that configuration in folder QuestAdder/dialogs

example_quest:
  name: "[Main] Hunt pig"
  class: quest
  item:
    type: book
    display: <color:gold><decoration:bold>[Main] <color:white>Hunt pig.
    lore:
      - Hunt three pig!
  recommend:
    - Faster is better.
  condition:
    1:
      condition: var('hunt_pig') >= 3
      lore: Hunt three pig <color:gray>(%var('hunt_pig')%/3)
  variable:
    1:
      event: kill{t=PIG}
      name: hunt_pig
      max: 3
      lore: Hunt three pig
  reward:
    money: 100
    exp: 50

example_dialog_1:
  talk:
    - <gradient:yellow-green>Let's take some quest!
  quest:
    - example_quest give
  check:
    - example_quest has example_dialog_2

example_dialog_2:
  talk:
    - <color:yellow>Success!
    - <gradient:blue-dark_purple>Congratulation!
  quest:
    - example_quest complete
    - example_quest remove
  check:
    - example_quest !complete example_dialog_3

example_dialog_3:
  talk:
    - you have to hunt more pig,*** to complete quest!

To run this dialog, you have to add this configuration.

example_npc: #The key of NPC. do not use duplicated key!
  class: npc #Define the class of this configuration. default is dialog because it had been written in dialog folder.
  name: example NPC #the display name in NPC.
  id: 5 #The Citizens id of NPC.
  dialog:
    - example_dialog_1 #Define the dialog that NPC will run.
  typing-sound: #Define the typing sound of NPC.
    name: "block.stone_button.click_on"
    volume: 1.0
    pitch: 0.7
  inventory:
    name: Talking with example npc #Define the inventory name.

Clone this wiki locally