• 欢迎来到Minecraft插件百科!
  • 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
  • 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289

GuillaumeVDN的插件文档/QuestCreator/示例

来自Minecraft插件百科
Qsefthuopq讨论 | 贡献2020年10月24日 (六) 14:46的版本 (创建页面,内容为“{{模板:VDNBox}} =示例任务= You can download the files here. ==内容== This example has a NPC activator and a quest. 激活器: * The NPC will display par…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航搜索
GuillaumeVDN的插件文档
页面

GuillaumeVDN的插件文档 · 迁移

所有插件都有的常见内容

配置 · 杂项 · 关联

QuestCreator

基础内容 · 示例 · 详细特性 · 高级内容 · 关联

示例任务

You can download the files here.

内容

This example has a NPC activator and a quest.

激活器:

  • The NPC will display particles when the quest is available or in progress
  • Approach the NPC to get a little dialog, and get asked to confirm starting the quest with a GUI

任务内容:

  • Farm some 20 stone and 20 dirt/grass
  • Interact with the NPC with 20 cobblestone and 20 dirt items
  • Get $20 as a reward and throw a firework

其它:

  • You can complete this quest at most 20 times
  • There’s a 10 hours cooldown on success

激活器

/quest_activators/npc_farmer.yml

type: CITIZENS_NPCS
npcs: [0]

particles:
  AVAILABLE: notify_1
  PROGRESS: notify_2

particles_location:
  vertical_offset: 2.5

sneak_click_cancel: true

required_gui_quests: 9999  # set it to a big number so it will never open\

任务模型

/quest_models/example_npc_fetch.yml

# -------------------- Display settings --------------------

display_name: NPC fetch quest
description: ['Youll have to farm 20 stone and 20 dirt for a NPC in this quest.']

start_notify:
  title: '&6Quest started'
  title_subtitle: '&7You started quest {quest} &7!'
  sound: ENTITY_PLAYER_LEVELUP

progress_notify:
  actionbar: '&a{quest} &7| {objective}'
progress_notify_scoreboard: true

all_status_item:
  type: STONE
  name: '&6{quest}'
  lore: |
    &7{description}
    {completions}
    {last_completion}
    {cooldown}
    {detailed_progression}
    {detailed_errors}
    {controls}

# -------------------- Post-quest settings --------------------

completion:
  max_completions: 20
  notify:
    SUCCESS:
      title: '&dQuest completed'
      title_subtitle: '&7You completed quest &a{quest} &7!'
      sound: ENTITY_PLAYER_LEVELUP
    FAIL:
      title: '&cQuest failed'
      title_subtitle: '&7You failed quest &c{quest} &7!'
      sound: BLOCK_ANVIL_DESTROY
    CANCEL:
      title: '&cQuest cancelled'
      title_subtitle: '&7You cancelled quest &c{quest}'
      sound: BLOCK_ANVIL_DESTROY

cooldown:
  duration: 10 HOUR
  end_types: [SUCCESS]

# -------------------- Activator settings --------------------

activators: [npc_farmer]

activators_dialog:
  - '&6[Farmer] &7Hi ! Do you want to start my quest ? Its just about getting some blocks.'
  -   # empty line so the player needs to click again for the GUI to open

activators_dialog_auto_start_distance: 3.5

activators_dialog_reset:
  reset_delay: 30 SECOND
  reset_distance: 5.0
  reset_notify:
    message: '&6[Farmer] &7Okay then, rude D:'

# -------------------- Quest content --------------------

branches:

  MAIN:
    starts_at: FARM
    objects:

      # ----- First object : the farm object. The player will have to go mine 20 stone and 20 dirt

      FARM:
        # display
        name_short: Farm some blocks
        objective_detail: '&7Farm blocks | &7Stone : &b{objective_progression:a}&7/&b{objective_goal:a} &7| Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}'
        objective_detail_verbose: |
          &7Farm some blocks
          &7Stone : &b{objective_progression:a}&7/&b{objective_goal:a}
          &7Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}
        start_notify:
          message: '&6[Farmer] &7Wonderful ! Ill be waiting for you then.'
        # blocks break settings
        type: PLAYER_BLOCKS_BREAK
        blocks:
          a:
            types: [STONE]
            goal: 20.0
          b:
            types: [DIRT,GRASS_BLOCK]
            goal: 20.0
        allow_player_blocks: false
        allow_player_blocks_error_message: '&cThis block was placed by a player, you cant use it to progress your quest !'
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[&a{quest}&7] Youre all done with the mining ! You can deliver the items to the farmer now.'
        goto: OBJECT DELIVER

      # ----- Second object : the NPC delivery object. The player will have to interact with the NPC to give him
      #                       the 20 cobblestones and 20 dirt (and they will be taken from their inventory)

      DELIVER:
        # display
        name_short: Deliver your items to the farmer
        objective_detail: '&7Deliver items | Cobblestone : &b{objective_progression:a}&7/&b{objective_goal:a} &7| Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}'
        objective_detail_verbose: |
          &7Deliver your items to the farmer
          &7Stone : &b{objective_progression:a}&7/&b{objective_goal:a}
          &7Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}
        # npc deliver settings
        type: PLAYER_CITIZENS_NPC_DELIVER_ITEMS
        npc: 0
        items:
          a:
            item:
              type: COBBLESTONE
            goal: 20.0
            take: true
          b:
            item:
              type: DIRT
            goal: 20.0
            take: true
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&6[Farmer] &7Thats so amazing ! Thanks a lot. Heres a $20 reward :D'
        goto: QUEST_SUCCESS

# -------------------- Rewards settings --------------------

end_objects:
  SUCCESS:
    a:
      type: SERVER_LOGIC_MONEY
      currency: VAULT
      value_formula: {value} + 20.0  # takes the current money amount and add 20$
    b:
      type: SERVER_FIREWORKS_LAUNCH
      effects:
        1:
          type: CREEPER
          colors: |
            AQUA
            BLUE
          fade_colors: |
            AQUA
            BLUE
          flicker: true
          trail: true
      count: 1
      position:
        type: PLAYER_RELATIVE_SINGLE
        location:
          distance: 3.0
          vertical_offset: 1.0