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

“GuillaumeVDN的插件文档/QuestCreator/示例”的版本间的差异

来自Minecraft插件百科
跳转至: 导航搜索
(未显示同一用户的1个中间版本)
第1行: 第1行:
 
{{模板:VDNBox}}
 
{{模板:VDNBox}}
=从NPC处接取任务=
+
=NPC打工任务=
You can download the files here.
+
你可以点击[http://guillaumevdn.com/plugins/doc/files/example_npc_fetch.zip 这里]下载文件。
 
 
 
==内容==
 
==内容==
This example has a NPC activator and a quest.
+
该示例包含一个NPC激活器和一个任务。
  
 
激活器:
 
激活器:
  
* The NPC will display particles when the quest is available or in progress
+
* NPC会在玩家有可接受或进行中的任务时显示粒子效果
* Approach the NPC to get a little dialog, and get asked to confirm starting the quest with a GUI
+
* 玩家接近NPC会触发对话,对话结束后玩家可打开确认开始任务的GUI
 
任务内容:
 
任务内容:
  
* Farm some 20 stone and 20 dirt/grass
+
* 挖掘20块石头和20块泥土/草方块
* Interact with the NPC with 20 cobblestone and 20 dirt items
+
* 持有20块圆石和20块泥土与NPC交互
* Get $20 as a reward and throw a firework
+
* 获得$20的任务奖励并发射烟花火箭
 
其它:
 
其它:
  
* You can complete this quest at most 20 times
+
* 该任务最多只能完成20次
* There’s a 10 hours cooldown on success
+
* 任务冷却时间为10小时。
 
==激活器==
 
==激活器==
 
/quest_activators/npc_farmer.yml
 
/quest_activators/npc_farmer.yml
第33行: 第32行:
 
  sneak_click_cancel: true
 
  sneak_click_cancel: true
 
   
 
   
  required_gui_quests: 9999  # set it to a big number so it will never open\
+
  required_gui_quests: 9999  # 设置为较大的数字则永远不打开
 
   
 
   
 
==任务模型==
 
==任务模型==
第39行: 第38行:
 
  # -------------------- 显示设置 --------------------
 
  # -------------------- 显示设置 --------------------
 
   
 
   
  display_name: NPC fetch quest
+
  display_name: NPC打工任务
  description: ['You''ll have to farm 20 stone and 20 dirt for a NPC in this quest.']
+
  description: ['你需要挖掘20块石头和20块泥土并将掉落物带给NPC。']
 
   
 
   
 
  start_notify:
 
  start_notify:
   title: '&6Quest started'
+
   title: '&6任务开始'
   title_subtitle: '&7You started quest {quest} &7!'
+
   title_subtitle: '&7你开始了任务{quest}&7!'
 
   sound: ENTITY_PLAYER_LEVELUP
 
   sound: ENTITY_PLAYER_LEVELUP
 
   
 
   
第69行: 第68行:
 
   notify:
 
   notify:
 
     SUCCESS:
 
     SUCCESS:
       title: '&dQuest completed'
+
       title: '&d任务完成'
       title_subtitle: '&7You completed quest &a{quest} &7!'
+
       title_subtitle: '&7你完成了任务&a{quest}&7!'
 
       sound: ENTITY_PLAYER_LEVELUP
 
       sound: ENTITY_PLAYER_LEVELUP
 
     FAIL:
 
     FAIL:
       title: '&cQuest failed'
+
       title: '&c任务失败'
       title_subtitle: '&7You failed quest &c{quest} &7!'
+
       title_subtitle: '&7任务&c{quest}&7失败!'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
     CANCEL:
 
     CANCEL:
       title: '&cQuest cancelled'
+
       title: '&c任务取消'
       title_subtitle: '&7You cancelled quest &c{quest}'
+
       title_subtitle: '&7你取消了任务&c{quest}'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
   
 
   
第85行: 第84行:
 
   end_types: [SUCCESS]
 
   end_types: [SUCCESS]
 
   
 
   
  # -------------------- Activator settings --------------------
+
  # -------------------- 激活器设置 --------------------
 
   
 
   
 
  activators: [npc_farmer]
 
  activators: [npc_farmer]
 
   
 
   
 
  activators_dialog:
 
  activators_dialog:
   - '&6[Farmer] &7Hi ! Do you want to start my quest ? It''s just about getting some blocks.'
+
   - '&6[农民] &7想要来点任务吗?给我带点方块就行。'
   - ''  # empty line so the player needs to click again for the GUI to open
+
   - ''  # 该行留空,用于让玩家点击打开GUI
 
   
 
   
 
  activators_dialog_auto_start_distance: 3.5
 
  activators_dialog_auto_start_distance: 3.5
第99行: 第98行:
 
   reset_distance: 5.0
 
   reset_distance: 5.0
 
   reset_notify:
 
   reset_notify:
     message: '&6[Farmer] &7Okay then, rude D:'
+
     message: '&6[农民] &7好吧 D:'
 
   
 
   
  # -------------------- Quest content --------------------
+
  # -------------------- 任务内容 --------------------
 
   
 
   
 
  branches:
 
  branches:
第109行: 第108行:
 
     objects:
 
     objects:
 
   
 
   
       # ----- First object : the farm object. The player will have to go mine 20 stone and 20 dirt
+
       # ----- 第一个目标:挖掘目标。玩家需要挖掘20块石头和泥土。
 
   
 
   
 
       FARM:
 
       FARM:
 
         # display
 
         # display
         name_short: Farm some blocks
+
         name_short: 挖点方块
         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: '&7挖掘方块 | &7石头:&b{objective_progression:a}&7/&b{objective_goal:a} &7| 泥土:&b{objective_progression:b}&7/&b{objective_goal:b}'
 
         objective_detail_verbose: |
 
         objective_detail_verbose: |
           &7Farm some blocks
+
           &7挖点方块
           &7Stone : &b{objective_progression:a}&7/&b{objective_goal:a}
+
           &7石头:&b{objective_progression:a}&7/&b{objective_goal:a}
           &7Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}
+
           &7泥土:&b{objective_progression:b}&7/&b{objective_goal:b}
 
         start_notify:
 
         start_notify:
           message: '&6[Farmer] &7Wonderful ! I''ll be waiting for you then.'
+
           message: '&6[农民] &7太好了!我会等你回来的。'
 
         # blocks break settings
 
         # blocks break settings
 
         type: PLAYER_BLOCKS_BREAK
 
         type: PLAYER_BLOCKS_BREAK
第131行: 第130行:
 
             goal: 20.0
 
             goal: 20.0
 
         allow_player_blocks: false
 
         allow_player_blocks: false
         allow_player_blocks_error_message: '&cThis block was placed by a player, you can''t use it to progress your quest !'
+
         allow_player_blocks_error_message: '&c该方块是玩家放置的,无法增加任务进度!'
 
         # post-object
 
         # post-object
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&7[&a{quest}&7] You''re all done with the mining ! You can deliver the items to the farmer now.'
+
           message: '&7[&a{quest}&7] 已达成任务目标!你可以将物品交付给农民了。'
 
         goto: OBJECT DELIVER
 
         goto: OBJECT DELIVER
 
   
 
   
       # ----- Second object : the NPC delivery object. The player will have to interact with the NPC to give him
+
       # ----- 第二个目标:NPC交付目标。
       #                       the 20 cobblestones and 20 dirt (and they will be taken from their inventory)
+
       #                   玩家需要持有20块圆石和泥土并与NPC交互(这些物品将从玩家背包中取走)
 
   
 
   
 
       DELIVER:
 
       DELIVER:
         # display
+
         # 显示
         name_short: Deliver your items to the farmer
+
         name_short: 交付物品
         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: '&7交付物品 | 圆石:&b{objective_progression:a}&7/&b{objective_goal:a} &7| 泥土:&b{objective_progression:b}&7/&b{objective_goal:b}'
 
         objective_detail_verbose: |
 
         objective_detail_verbose: |
           &7Deliver your items to the farmer
+
           &7将以下物品交给农民:
           &7Stone : &b{objective_progression:a}&7/&b{objective_goal:a}
+
           &7圆石:&b{objective_progression:a}&7/&b{objective_goal:a}
           &7Dirt : &b{objective_progression:b}&7/&b{objective_goal:b}
+
           &7泥土:&b{objective_progression:b}&7/&b{objective_goal:b}
         # npc deliver settings
+
         # NPC交付设置
 
         type: PLAYER_CITIZENS_NPC_DELIVER_ITEMS
 
         type: PLAYER_CITIZENS_NPC_DELIVER_ITEMS
 
         npc: 0
 
         npc: 0
第166行: 第165行:
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&6[Farmer] &7That''s so amazing ! Thanks a lot. Here''s a $20 reward :D'
+
           message: '&6[农民] &7太棒了!这$20是你的奖励 :D'
 
         goto: QUEST_SUCCESS
 
         goto: QUEST_SUCCESS
 
   
 
   
第176行: 第175行:
 
       type: SERVER_LOGIC_MONEY
 
       type: SERVER_LOGIC_MONEY
 
       currency: VAULT
 
       currency: VAULT
       value_formula: {value} + 20.0  # takes the current money amount and add 20$
+
       value_formula: {value} + 20.0  # 添加20$
 
     b:
 
     b:
 
       type: SERVER_FIREWORKS_LAUNCH
 
       type: SERVER_FIREWORKS_LAUNCH
第196行: 第195行:
 
           distance: 3.0
 
           distance: 3.0
 
           vertical_offset: 1.0
 
           vertical_offset: 1.0
=NPC跑腿任务=
+
=NPC交付任务=
 +
[http://guillaumevdn.com/plugins/doc/files/example_npc_deliver.zip 点击这里]下载配置文件
 
==内容==
 
==内容==
This example has a NPC activator and a quest.
+
该示例包含一个NPC激活器和一个任务。
  
It uses a different object than the npc fetch example, where the player must hold the item in their hand, and deliver everything at once.
+
这份示例使用了不同于上一个示例的任务目标——玩家必须手持并一次性交付物品。
  
 
激活器:
 
激活器:
  
* The NPC will display particles when the quest is available or in progress
+
* NPC会在玩家有可接受或进行中的任务时显示粒子效果
* Approach the NPC to get a little dialog, and get asked to confirm starting the quest with a GUI
+
* 玩家接近NPC会触发对话,对话结束后玩家可打开确认开始任务的GUI
 
任务内容:
 
任务内容:
  
* Interact with the NPC with 64 wheat in your hand
+
* 手持64个小麦与NPC交互
* Get $150 as a reward and throw a firework
+
* 获得$150的奖励并发射烟花火箭
 
其它:
 
其它:
* You can complete this quest at most 20 times
+
* 该任务最多可完成20次
* There’s a 10 hours cooldown on success
+
* 任务冷却时间为10小时
 
==激活器==
 
==激活器==
 
/quest_activators/npc_farmer.yml
 
/quest_activators/npc_farmer.yml
第227行: 第227行:
 
  sneak_click_cancel: true
 
  sneak_click_cancel: true
 
   
 
   
  required_gui_quests: 9999  # set it to a big number so it will never open
+
  required_gui_quests: 9999  # 设置为较大的数字则永远不会打开
 
   
 
   
  
第234行: 第234行:
 
  # -------------------- 显示设置 --------------------
 
  # -------------------- 显示设置 --------------------
 
   
 
   
  display_name: NPC deliver quest
+
  display_name: NPC交付任务
  description: ['You''ll have to deliver some wheat to a NPC in this quest.']
+
  description: ['你需要带给NPC64个小麦。']
 
   
 
   
 
  start_notify:
 
  start_notify:
   title: '&6Quest started'
+
   title: '&6任务开始'
   title_subtitle: '&7You started quest {quest} &7!'
+
   title_subtitle: '&7你开始了任务{quest}&7!'
 
   sound: ENTITY_PLAYER_LEVELUP
 
   sound: ENTITY_PLAYER_LEVELUP
 
   
 
   
第264行: 第264行:
 
   notify:
 
   notify:
 
     SUCCESS:
 
     SUCCESS:
       title: '&dQuest completed'
+
       title: '&d任务完成'
       title_subtitle: '&7You completed quest &a{quest} &7!'
+
       title_subtitle: '&7你完成了任务&a{quest}&7!'
 
       sound: ENTITY_PLAYER_LEVELUP
 
       sound: ENTITY_PLAYER_LEVELUP
 
     FAIL:
 
     FAIL:
       title: '&cQuest failed'
+
       title: '&c任务失败'
       title_subtitle: '&7You failed quest &c{quest} &7!'
+
       title_subtitle: '&7任务&c{quest}&7失败!'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
     CANCEL:
 
     CANCEL:
       title: '&cQuest cancelled'
+
       title: '&c任务取消'
       title_subtitle: '&7You cancelled quest &c{quest}'
+
       title_subtitle: '&7你取消了任务&c{quest}'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
   
 
   
第280行: 第280行:
 
   end_types: [SUCCESS]
 
   end_types: [SUCCESS]
 
   
 
   
  # -------------------- Activator settings --------------------
+
  # -------------------- 激活器设置 --------------------
 
   
 
   
 
  activators: [npc_farmer]
 
  activators: [npc_farmer]
 
   
 
   
 
  activators_dialog:
 
  activators_dialog:
   - '&6[Farmer] &7Hi ! Do you want to start my quest ? I need some wheat.'
+
   - '&6[农民] &7我有任务要给你。我需要点小麦。'
   - ''  # empty line so the player needs to click again for the GUI to open
+
   - ''  # 该行留空,用于让玩家点击打开GUI
 
   
 
   
 
  activators_dialog_auto_start_distance: 3.5
 
  activators_dialog_auto_start_distance: 3.5
第294行: 第294行:
 
   reset_distance: 5.0
 
   reset_distance: 5.0
 
   reset_notify:
 
   reset_notify:
     message: '&6[Farmer] &7Okay then, rude D:'
+
     message: '&6[农民] &7好吧 D:'
 
   
 
   
  # -------------------- Quest content --------------------
+
  # -------------------- 任务内容 --------------------
 
   
 
   
 
  branches:
 
  branches:
第304行: 第304行:
 
     objects:
 
     objects:
 
   
 
   
       # ----- Main object : the farm object. The player will have to interact with the NPC holding 64 wheat in their hand.
+
       # ----- 主要目标:获取物品目标。玩家必须手持64个小麦与NPC交互。
 
   
 
   
 
       DELIVER:
 
       DELIVER:
 
         start_notify:
 
         start_notify:
           message: '&6[Farmer] &7Wonderful ! So, I need you to bring me 64 wheat. I''ll be waiting for you then.'
+
           message: '&6[农民] &7太好了!我需要你带给我64个小麦。我会在这里等你的。'
 
         # display
 
         # display
         name_short: Deliver 64 wheat to the farmer
+
         name_short: 将64个小麦交给农民
         objective_detail: '&7Deliver wheat : &b{objective_progression}&7/&b{objective_goal}'
+
         objective_detail: '&7交付小麦:&b{objective_progression}&7/&b{objective_goal}'
 
         # npc deliver settings
 
         # npc deliver settings
 
         type: PLAYER_CITIZENS_NPC_INTERACT
 
         type: PLAYER_CITIZENS_NPC_INTERACT
第323行: 第323行:
 
           in_hand: true
 
           in_hand: true
 
           take: true
 
           take: true
           error_message: '&6[Farmer] &7So, how''s your search for my wheat going ? Remember, I need 64 of it.'
+
           error_message: '&6[农民] &7你找到多少小麦了?记住,我要的是64个。'
 
         # post-object
 
         # post-object
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&6[Farmer] &7That''s so amazing ! Thanks a lot. Here''s a $150 reward :D'
+
           message: '&6[农民] &7不错,这是你的$150奖励 :D'
 
         goto: QUEST_SUCCESS
 
         goto: QUEST_SUCCESS
 
   
 
   
第337行: 第337行:
 
       type: SERVER_LOGIC_MONEY
 
       type: SERVER_LOGIC_MONEY
 
       currency: VAULT
 
       currency: VAULT
       value_formula: {value} + 150.0  # takes the current money amount and add 150$
+
       value_formula: {value} + 150.0  # 添加150$
 
     b:
 
     b:
 
       type: SERVER_FIREWORKS_LAUNCH
 
       type: SERVER_FIREWORKS_LAUNCH
第358行: 第358行:
 
           vertical_offset: 1.0
 
           vertical_offset: 1.0
 
            
 
            
=选择(任务分支)=
+
=抉择(分支目标)=
 
你可以[http://guillaumevdn.com/plugins/doc/files/example_choice.zip 点击这里]下载文件。
 
你可以[http://guillaumevdn.com/plugins/doc/files/example_choice.zip 点击这里]下载文件。
 
==内容==
 
==内容==
This example contains all the available diverge objects, as well as most of their settings.
+
该示例包含全部可用的分支目标及其大部分设置。
 
==任务模型==
 
==任务模型==
 
/quest_models/example_choice.yml
 
/quest_models/example_choice.yml
 
  # -------------------- 显示设置 --------------------
 
  # -------------------- 显示设置 --------------------
 
   
 
   
  display_name: Choice example
+
  display_name: 分支示例
  description: ['This is just an example on how to use the diverge objects.']
+
  description: ['这是一份演示分支目标的示例配置。']
 
   
 
   
 
  start_notify:
 
  start_notify:
   title: '&6Quest started'
+
   title: '&6任务开始'
   title_subtitle: '&7You started quest {quest} &7!'
+
   title_subtitle: '&7你开始了任务{quest}&7!'
 
   sound: ENTITY_PLAYER_LEVELUP
 
   sound: ENTITY_PLAYER_LEVELUP
 
   
 
   
第396行: 第396行:
 
   notify:
 
   notify:
 
     SUCCESS:
 
     SUCCESS:
       title: '&dQuest completed'
+
       title: '&d任务完成'
       title_subtitle: '&7You completed quest &a{quest} &7!'
+
       title_subtitle: '&7你完成了任务&a{quest}&7!'
 
       sound: ENTITY_PLAYER_LEVELUP
 
       sound: ENTITY_PLAYER_LEVELUP
 
     FAIL:
 
     FAIL:
       title: '&cQuest failed'
+
       title: '&c任务失败'
       title_subtitle: '&7You failed quest &c{quest} &7!'
+
       title_subtitle: '&7任务&c{quest}&7失败!'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
     CANCEL:
 
     CANCEL:
       title: '&cQuest cancelled'
+
       title: '&c任务取消'
       title_subtitle: '&7You cancelled quest &c{quest}'
+
       title_subtitle: '&7你取消了任务&c{quest}'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
   
 
   
  # -------------------- Quest content --------------------
+
  # -------------------- 任务内容 --------------------
 
   
 
   
 
  branches:
 
  branches:
第416行: 第416行:
 
     objects:
 
     objects:
 
   
 
   
       # ----- First object : chat choice
+
       # -----第一个目标:聊天抉择
 
   
 
   
 
       CHAT:
 
       CHAT:
         # display
+
         # 显示
         name_short: Make a choice
+
         name_short: 作出抉择
 
         start_notify:
 
         start_notify:
 
           message: |
 
           message: |
 
             &r--------------------
 
             &r--------------------
             &6[System] Please make a choice in the chat. You just need to click one of the options.
+
             &6[系统] 请点击聊天框内的抉择项。
 
             &r
 
             &r
         # diverge chat
+
         # 分支聊天消息
 
         type: DIVERGE_CHAT
 
         type: DIVERGE_CHAT
 
         repeat_delay: 30 SECOND
 
         repeat_delay: 30 SECOND
 
         choices:
 
         choices:
 
           a:
 
           a:
             text: '&6(a) &aI want to test the DIVERGE_CHAT object.'
+
             text: '&6(a) &aDIVERGE_CHAT目标测试文本。'
             redo_text: '&6(a) &7I want to test the DIVERGE_CHAT object (again).'
+
             redo_text: '&6(a) &7DIVERGE_CHAT目标测试文本。'
 
             goto: OBJECT CHAT
 
             goto: OBJECT CHAT
 
           b:
 
           b:
             text: '&6(b) &aI want to test the DIVERGE_GUI object.'
+
             text: '&6(b) &aDIVERGE_GUI目标测试文本。'
             redo_text: '&6(b) &7I want to test the DIVERGE_GUI object (again).'
+
             redo_text: '&6(b) &7DIVERGE_GUI目标测试文本。'
 
             goto: OBJECT GUI
 
             goto: OBJECT GUI
 
           c:
 
           c:
             text: '&6(c) &aI want to test the DIVERGE_OBJECTS object.'
+
             text: '&6(c) &aDIVERGE_OBJECTS目标测试文本。'
             redo_text: '&6(c) &7I want to test the DIVERGE_OBJECTS object (again).'
+
             redo_text: '&6(c) &7DIVERGE_OBJECTS目标测试文本。'
 
             goto: OBJECT OBJECTS
 
             goto: OBJECT OBJECTS
 
           d:
 
           d:
             text: '&6(d) &aThis option will only be clickeable if you have $10. Click to restarts this object.'
+
             text: '&6(d) &a该选项只在你有$10时可用。点击重启该目标。'
             redo_text: '&6(d) &7This option will only be clickeable if you have $10. Click to restarts this object (again).'
+
             redo_text: '&6(d) &7该选项只在你有$10时可用。 点击重启该目标。'
             unavailable_text: '&6(d) &8This option will only be clickeable if you have $10.'
+
             unavailable_text: '&6(d) &8该选项只在你有$10时可用。'
 
             conditions:
 
             conditions:
 
               conditions:
 
               conditions:
第454行: 第454行:
 
             goto: OBJECT CHAT
 
             goto: OBJECT CHAT
 
           e:
 
           e:
             text: '&6(e) &eThis choice can only be clicked once. It restarts this object.'
+
             text: '&6(e) &e该选项只能点击一次。它会重启该目标。'
 
             max_completions: 1
 
             max_completions: 1
 
             goto: OBJECT CHAT
 
             goto: OBJECT CHAT
 
           f:
 
           f:
             text: '&6(f) &aI''m out ! (stop the quest)'
+
             text: '&6(f) &a我可溜了!(停止任务)'
             redo_text: '&6(f) &7I''m out ! (stop the quest, again)'
+
             redo_text: '&6(f) &7我可溜了!(停止任务)'
 
             goto: QUEST_SUCCESS
 
             goto: QUEST_SUCCESS
 
         # post-object
 
         # post-object
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&7[System] You made a choice in the chat, congrats!'
+
           message: '&7[系统] 你成功地在聊天框内作出抉择!'
 
   
 
   
       # ----- Second object : GUI choice
+
       # ----- 第二个目标:GUI抉择
 
   
 
   
 
       GUI:
 
       GUI:
         # display
+
         # 显示
         name_short: Make a choice
+
         name_short: 作出抉择
 
         start_notify:
 
         start_notify:
           message: '&6[System] Please make a choice in the GUI. You just need to click one of the options.'
+
           message: '&6[系统] 请在GUI内作出抉择。你只需点击其中一个选项。'
         # diverge chat
+
         # 分支聊天消息
 
         type: DIVERGE_GUI
 
         type: DIVERGE_GUI
 
         reopen_delay: 5 SECOND
 
         reopen_delay: 5 SECOND
第481行: 第481行:
 
             item:
 
             item:
 
               type: GREEN_WOOL
 
               type: GREEN_WOOL
               name: '&aI want to test the DIVERGE_CHAT object.'
+
               name: '&aDIVERGE_CHAT目标测试文本。'
 
             redo_item:
 
             redo_item:
 
               type: GRAY_WOOL
 
               type: GRAY_WOOL
               name: '&7I want to test the DIVERGE_CHAT object (again).'
+
               name: '&7DIVERGE_CHAT目标测试文本。'
 
             goto: OBJECT CHAT
 
             goto: OBJECT CHAT
 
           b:
 
           b:
第490行: 第490行:
 
             item:
 
             item:
 
               type: GREEN_WOOL
 
               type: GREEN_WOOL
               name: '&aI want to test the DIVERGE_GUI object.'
+
               name: '&aDIVERGE_GUI目标测试文本。.'
 
             redo_item:
 
             redo_item:
 
               type: GRAY_WOOL
 
               type: GRAY_WOOL
               name: '&7I want to test the DIVERGE_GUI object (again).'
+
               name: '&7DIVERGE_GUI目标测试文本。'
 
             goto: OBJECT GUI
 
             goto: OBJECT GUI
 
           c:
 
           c:
第499行: 第499行:
 
             item:
 
             item:
 
               type: GREEN_WOOL
 
               type: GREEN_WOOL
               name: '&aI want to test the DIVERGE_OBJECTS object.'
+
               name: '&aDIVERGE_OBJECTS目标测试文本'
 
             redo_item:
 
             redo_item:
 
               type: GRAY_WOOL
 
               type: GRAY_WOOL
               name: '&7I want to test the DIVERGE_OBJECTS object (again).'
+
               name: '&7DIVERGE_OBJECTS目标测试文本。'
 
             goto: OBJECT OBJECTS
 
             goto: OBJECT OBJECTS
 
           d:
 
           d:
第508行: 第508行:
 
             item:
 
             item:
 
               type: GREEN_WOOL
 
               type: GREEN_WOOL
               name: '&aThis option will only be clickeable if you have $10. Click to restarts this object.'
+
               name: '&a该选项只在你有$10时可用。 点击重启该目标。'
 
             redo_item:
 
             redo_item:
 
               type: GRAY_WOOL
 
               type: GRAY_WOOL
               name: '&7This option will only be clickeable if you have $10. Click to restarts this object (again).'
+
               name: '&7该选项只在你有$10时可用。 点击重启该目标。'
 
             unavailable_item:
 
             unavailable_item:
 
               type: RED_WOOL
 
               type: RED_WOOL
               name: '&8This option will only be clickeable if you have $10.'
+
               name: '&8该选项只在你有$10时可用。'
 
             conditions:
 
             conditions:
 
               conditions:
 
               conditions:
第526行: 第526行:
 
             item:
 
             item:
 
               type: ORANGE_WOOL
 
               type: ORANGE_WOOL
               name: '&aThis choice can only be clicked once. It restarts this object.'
+
               name: '&a该选项只能点击一次。 它会重启该目标。'
 
             max_completions: 1
 
             max_completions: 1
 
             goto: OBJECT GUI
 
             goto: OBJECT GUI
第533行: 第533行:
 
             item:
 
             item:
 
               type: GREEN_WOOL
 
               type: GREEN_WOOL
               name: '&aI''m out ! (stop the quest)'
+
               name: '&a我可溜了!(停止任务)'
 
             redo_item:
 
             redo_item:
 
               type: GRAY_WOOL
 
               type: GRAY_WOOL
               name: '&7I''m out ! (stop the quest, again)'
+
               name: '&7我可溜了!(停止任务)'
 
             goto: QUEST_SUCCESS
 
             goto: QUEST_SUCCESS
 
         # post-object
 
         # post-object
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&7[System] You made a choice in the GUI, congrats!'
+
           message: '&7[系统] 你在GUI中作出了抉择。'
 
   
 
   
       # ----- Third object : objects choice
+
       # ----- 第三个目标:目标抉择
 
   
 
   
 
       OBJECTS:
 
       OBJECTS:
         # display
+
         # 显示
         name_short: Make a choice
+
         name_short: 作出抉择
 
         start_notify:
 
         start_notify:
           message: '&6[System] Please make a choice. Here, you can either jump 3 times to restart the quest, or say "goodbye" in the chat to stop the quest.'
+
           message: '&6[系统] 请作出抉择。你可以跳跃3次重启任务或在聊天框输入“goodbye”停止任务。'
 
         update_notify:
 
         update_notify:
           message: '&6[System] Please make a choice. Here, you can either jump 3 times to restart the quest, or say "goodbye" in the chat to stop the quest.'
+
           message: '&6[系统] 请作出抉择。你可以跳跃3次重启任务或在聊天框输入“goodbye”停止任务。'
 
         update_notify_delay: 30 SECOND
 
         update_notify_delay: 30 SECOND
         # diverge chat
+
         # 分支聊天消息
 
         type: DIVERGE_OBJECTS
 
         type: DIVERGE_OBJECTS
 
         choices:
 
         choices:
第562行: 第562行:
 
             object: OBJECTS_STOP
 
             object: OBJECTS_STOP
 
             goto: QUEST_SUCCESS
 
             goto: QUEST_SUCCESS
         # post-object
+
         # 完成目标前
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&7[System] You made a choice using objects, congrats!'
+
           message: '&7[系统] 你用目标作出了抉择。'
 
   
 
   
 
       OBJECTS_RESTART:
 
       OBJECTS_RESTART:
第574行: 第574行:
 
         type: PLAYER_CHAT
 
         type: PLAYER_CHAT
 
         whitelist: ['goodbye']
 
         whitelist: ['goodbye']
         error_message: '&7If you''re trying to stop the quest, the thing to say is "goodbye".'
+
         error_message: '&7如果你想要停止任务,请输入“goodbye”。'
 
   
 
   
 
  # -------------------- 奖励设置 --------------------
 
  # -------------------- 奖励设置 --------------------
第601行: 第601行:
 
            
 
            
 
=农场任务组 + GUI=
 
=农场任务组 + GUI=
 +
[http://guillaumevdn.com/plugins/doc/files/example_gui_group_farm.zip 点击下载配置文件]
 
==内容==
 
==内容==
 
任务:
 
任务:
  
* Five farming quests where you need to break X blocks of grown wheat
+
* 在这5个农场任务中,你需要破坏X个成熟的小麦
* You get X dollars as a reward and throw a firework
+
* 你会获得X元的奖励并发射烟花火箭
Global variables :
+
全局变量
  
* There are global variables to define the goals and rewards of the quest
+
* 全局变量可定义任务的目标和奖励
Group :
+
组:
  
* It contains all five quests, and require them to be completed in order
+
* 该任务组包含5个玩家需要按顺序完成的任务
  
GUI :
+
GUI:
  
* The main GUI is configured to display all five quests, depending on their status
+
* 主GUI会根据任务状态显示全部5个任务
* There’s also an extra item with overriden clicks that will display chat messages on click (left/right/other)
+
* GUI里还有点击可显示聊天消息的物品
 
==全局变量==
 
==全局变量==
 
/global_variables.yml
 
/global_variables.yml
  # Farm goals and rewards for the wheat farming quests
+
  # 耕种小麦任务的目标和奖励
 
   
 
   
 
  farm_wheat_1_goal: 25
 
  farm_wheat_1_goal: 25
第642行: 第643行:
 
==GUI==
 
==GUI==
 
/guis/main.yml
 
/guis/main.yml
  name: '&aThe farming GUI'
+
  name: '&a农场GUI'
 
  type: CHEST_1_ROW
 
  type: CHEST_1_ROW
 
   
 
   
第677行: 第678行:
 
     icon:
 
     icon:
 
       type: NETHER_STAR
 
       type: NETHER_STAR
       name: '&7Click me!'
+
       name: '&7点我!'
 
       lore: |
 
       lore: |
         &7Left, right, or any other click type.
+
         &7左击、右击或其它点击类型。
 
     override_clicks:
 
     override_clicks:
       LEFT: COMMANDS_AS_PLAYER say &bI just made a left click!
+
       LEFT: COMMANDS_AS_PLAYER say &b你按了鼠标左键!
       RIGHT: COMMANDS_AS_PLAYER say &bI just made a right click!
+
       RIGHT: COMMANDS_AS_PLAYER say &b你按了鼠标右键!
       DEFAULT: COMMANDS_AS_PLAYER say &bI just made another click!
+
       DEFAULT: COMMANDS_AS_PLAYER say &b你按了鼠标的其它键!
 
        
 
        
 
==第一个任务模型==
 
==第一个任务模型==
 
/quest_models/farm_wheat_1.yml
 
/quest_models/farm_wheat_1.yml
  
See the other quest models in downloads above (they’re the same, with different names and variables).
+
其它任务模型请点击上方的下载链接查看(这些模型只有名称和变量名不一样)。
 
  # -------------------- 显示设置 --------------------
 
  # -------------------- 显示设置 --------------------
 
   
 
   
  display_name: Farm wheat I
+
  display_name: 收割小麦 I
  description: ['You''ll have to farm {gvariable:farm_wheat_1_goal} wheat in this quest.']
+
  description: ['你需要收割、{gvariable:farm_wheat_1_goal}个小麦。']
 
   
 
   
 
  start_notify:
 
  start_notify:
   title: '&6Quest started'
+
   title: '&6任务开始'
   title_subtitle: '&7You started quest {quest} &7!'
+
   title_subtitle: '&7你开始了任务{quest}&7!'
 
   sound: ENTITY_PLAYER_LEVELUP
 
   sound: ENTITY_PLAYER_LEVELUP
 
   
 
   
第730行: 第731行:
 
   notify:
 
   notify:
 
     SUCCESS:
 
     SUCCESS:
       title: '&dQuest completed'
+
       title: '&d任务完成'
       title_subtitle: '&7You completed quest &a{quest} &7!'
+
       title_subtitle: '&7你完成了任务&a{quest}&7!'
 
       sound: ENTITY_PLAYER_LEVELUP
 
       sound: ENTITY_PLAYER_LEVELUP
 
     FAIL:
 
     FAIL:
       title: '&cQuest failed'
+
       title: '&c任务失败'
       title_subtitle: '&7You failed quest &c{quest} &7!'
+
       title_subtitle: '&7任务&c{quest}&7失败!'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
     CANCEL:
 
     CANCEL:
       title: '&cQuest cancelled'
+
       title: '&c任务取消'
       title_subtitle: '&7You cancelled quest &c{quest}'
+
       title_subtitle: '&7你取消了任务&c{quest}'
 
       sound: BLOCK_ANVIL_DESTROY
 
       sound: BLOCK_ANVIL_DESTROY
 
   
 
   
  # -------------------- Quest content --------------------
+
  # -------------------- 任务内容 --------------------
 
   
 
   
 
  branches:
 
  branches:
第750行: 第751行:
 
     objects:
 
     objects:
 
   
 
   
       # ----- Main object : the player will have to mine X wheat (defined in a global variable)
+
       # -----主要目标:玩家需要收割X个小麦(在全局变量中设定)
 
   
 
   
 
       FARM:
 
       FARM:
         # display
+
         # 显示
         name_short: Farm some wheat
+
         name_short: 收割小麦
         objective_detail: '&7Farm wheat | &b{objective_progression}&7/&b{objective_goal}'
+
         objective_detail: '&7收割小麦 | &b{objective_progression}&7/&b{objective_goal}'
         # blocks break settings
+
         # 方块破坏设置
 
         type: PLAYER_BLOCKS_BREAK
 
         type: PLAYER_BLOCKS_BREAK
 
         blocks:
 
         blocks:
第766行: 第767行:
 
         complete_notify:
 
         complete_notify:
 
           sound: ENTITY_PLAYER_LEVELUP
 
           sound: ENTITY_PLAYER_LEVELUP
           message: '&7[&a{quest}&7] Congratulations ! Here''s a ${gvariable:farm_wheat_1_reward} reward !'
+
           message: '&7[&a{quest}&7] 恭喜你!这是你的奖励:${gvariable:farm_wheat_1_reward}'
 
         goto: QUEST_SUCCESS
 
         goto: QUEST_SUCCESS
 
   
 
   
第776行: 第777行:
 
       type: SERVER_LOGIC_MONEY
 
       type: SERVER_LOGIC_MONEY
 
       currency: VAULT
 
       currency: VAULT
       value_formula: {value} + {gvariable:farm_wheat_1_reward}  # takes the current money amount and add the reward
+
       value_formula: {value} + {gvariable:farm_wheat_1_reward}  # 货币奖励
 
     b:
 
     b:
 
       type: SERVER_FIREWORKS_LAUNCH
 
       type: SERVER_FIREWORKS_LAUNCH

2020年11月24日 (二) 15:50的版本

GuillaumeVDN的插件文档
页面

GuillaumeVDN的插件文档 · 迁移

所有插件都有的常见内容

配置 · 杂项 · 关联

QuestCreator

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

NPC打工任务

你可以点击这里下载文件。

内容

该示例包含一个NPC激活器和一个任务。

激活器:

  • NPC会在玩家有可接受或进行中的任务时显示粒子效果
  • 玩家接近NPC会触发对话,对话结束后玩家可打开确认开始任务的GUI

任务内容:

  • 挖掘20块石头和20块泥土/草方块
  • 持有20块圆石和20块泥土与NPC交互
  • 获得$20的任务奖励并发射烟花火箭

其它:

  • 该任务最多只能完成20次
  • 任务冷却时间为10小时。

激活器

/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  # 设置为较大的数字则永远不打开

任务模型

/quest_models/example_npc_fetch.yml

# -------------------- 显示设置 --------------------

display_name: NPC打工任务
description: ['你需要挖掘20块石头和20块泥土并将掉落物带给NPC。']

start_notify:
  title: '&6任务开始'
  title_subtitle: '&7你开始了任务{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}

# -------------------- 任务结束设置 --------------------

completion:
  max_completions: 20
  notify:
    SUCCESS:
      title: '&d任务完成'
      title_subtitle: '&7你完成了任务&a{quest}&7!'
      sound: ENTITY_PLAYER_LEVELUP
    FAIL:
      title: '&c任务失败'
      title_subtitle: '&7任务&c{quest}&7失败!'
      sound: BLOCK_ANVIL_DESTROY
    CANCEL:
      title: '&c任务取消'
      title_subtitle: '&7你取消了任务&c{quest}'
      sound: BLOCK_ANVIL_DESTROY

cooldown:
  duration: 10 HOUR
  end_types: [SUCCESS]

# -------------------- 激活器设置 --------------------

activators: [npc_farmer]

activators_dialog:
  - '&6[农民] &7想要来点任务吗?给我带点方块就行。'
  -   # 该行留空,用于让玩家点击打开GUI

activators_dialog_auto_start_distance: 3.5

activators_dialog_reset:
  reset_delay: 30 SECOND
  reset_distance: 5.0
  reset_notify:
    message: '&6[农民] &7好吧 D:'

# -------------------- 任务内容 --------------------

branches:

  MAIN:
    starts_at: FARM
    objects:

      # ----- 第一个目标:挖掘目标。玩家需要挖掘20块石头和泥土。

      FARM:
        # display
        name_short: 挖点方块
        objective_detail: '&7挖掘方块 | &7石头:&b{objective_progression:a}&7/&b{objective_goal:a} &7| 泥土:&b{objective_progression:b}&7/&b{objective_goal:b}'
        objective_detail_verbose: |
          &7挖点方块
          &7石头:&b{objective_progression:a}&7/&b{objective_goal:a}
          &7泥土:&b{objective_progression:b}&7/&b{objective_goal:b}
        start_notify:
          message: '&6[农民] &7太好了!我会等你回来的。'
        # 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: '&c该方块是玩家放置的,无法增加任务进度!'
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[&a{quest}&7] 已达成任务目标!你可以将物品交付给农民了。'
        goto: OBJECT DELIVER

      # ----- 第二个目标:NPC交付目标。
      #                   玩家需要持有20块圆石和泥土并与NPC交互(这些物品将从玩家背包中取走)

      DELIVER:
        # 显示
        name_short: 交付物品
        objective_detail: '&7交付物品 | 圆石:&b{objective_progression:a}&7/&b{objective_goal:a} &7| 泥土:&b{objective_progression:b}&7/&b{objective_goal:b}'
        objective_detail_verbose: |
          &7将以下物品交给农民:
          &7圆石:&b{objective_progression:a}&7/&b{objective_goal:a}
          &7泥土:&b{objective_progression:b}&7/&b{objective_goal:b}
        # NPC交付设置
        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[农民] &7太棒了!这$20是你的奖励 :D'
        goto: QUEST_SUCCESS

# -------------------- 奖励设置 --------------------

end_objects:
  SUCCESS:
    a:
      type: SERVER_LOGIC_MONEY
      currency: VAULT
      value_formula: {value} + 20.0  # 添加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

NPC交付任务

点击这里下载配置文件

内容

该示例包含一个NPC激活器和一个任务。

这份示例使用了不同于上一个示例的任务目标——玩家必须手持并一次性交付物品。

激活器:

  • NPC会在玩家有可接受或进行中的任务时显示粒子效果
  • 玩家接近NPC会触发对话,对话结束后玩家可打开确认开始任务的GUI

任务内容:

  • 手持64个小麦与NPC交互
  • 获得$150的奖励并发射烟花火箭

其它:

  • 该任务最多可完成20次
  • 任务冷却时间为10小时

激活器

/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  # 设置为较大的数字则永远不会打开

任务模型

/quest_models/example_npc_deliver.yml

# -------------------- 显示设置 --------------------

display_name: NPC交付任务
description: ['你需要带给NPC64个小麦。']

start_notify:
  title: '&6任务开始'
  title_subtitle: '&7你开始了任务{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}

# -------------------- 任务结束设置 --------------------

completion:
  max_completions: 20
  notify:
    SUCCESS:
      title: '&d任务完成'
      title_subtitle: '&7你完成了任务&a{quest}&7!'
      sound: ENTITY_PLAYER_LEVELUP
    FAIL:
      title: '&c任务失败'
      title_subtitle: '&7任务&c{quest}&7失败!'
      sound: BLOCK_ANVIL_DESTROY
    CANCEL:
      title: '&c任务取消'
      title_subtitle: '&7你取消了任务&c{quest}'
      sound: BLOCK_ANVIL_DESTROY

cooldown:
  duration: 10 HOUR
  end_types: [SUCCESS]

# -------------------- 激活器设置 --------------------

activators: [npc_farmer]

activators_dialog:
  - '&6[农民] &7我有任务要给你。我需要点小麦。'
  -   # 该行留空,用于让玩家点击打开GUI

activators_dialog_auto_start_distance: 3.5

activators_dialog_reset:
  reset_delay: 30 SECOND
  reset_distance: 5.0
  reset_notify:
    message: '&6[农民] &7好吧 D:'

# -------------------- 任务内容 --------------------

branches:

  MAIN:
    starts_at: DELIVER
    objects:

      # ----- 主要目标:获取物品目标。玩家必须手持64个小麦与NPC交互。

      DELIVER:
        start_notify:
          message: '&6[农民] &7太好了!我需要你带给我64个小麦。我会在这里等你的。'
        # display
        name_short: 将64个小麦交给农民
        objective_detail: '&7交付小麦:&b{objective_progression}&7/&b{objective_goal}'
        # npc deliver settings
        type: PLAYER_CITIZENS_NPC_INTERACT
        npc: 0
        items_needed:
          items:
            a:
              item:
                type: WHEAT
              goal: 64
          in_hand: true
          take: true
          error_message: '&6[农民] &7你找到多少小麦了?记住,我要的是64个。'
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&6[农民] &7不错,这是你的$150奖励 :D'
        goto: QUEST_SUCCESS

# -------------------- 奖励设置 --------------------

end_objects:
  SUCCESS:
    a:
      type: SERVER_LOGIC_MONEY
      currency: VAULT
      value_formula: {value} + 150.0  # 添加150$
    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
          

抉择(分支目标)

你可以点击这里下载文件。

内容

该示例包含全部可用的分支目标及其大部分设置。

任务模型

/quest_models/example_choice.yml

# -------------------- 显示设置 --------------------

display_name: 分支示例
description: ['这是一份演示分支目标的示例配置。']

start_notify:
  title: '&6任务开始'
  title_subtitle: '&7你开始了任务{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}

# -------------------- 任务结束设置 --------------------

completion:
  max_completions: -1
  notify:
    SUCCESS:
      title: '&d任务完成'
      title_subtitle: '&7你完成了任务&a{quest}&7!'
      sound: ENTITY_PLAYER_LEVELUP
    FAIL:
      title: '&c任务失败'
      title_subtitle: '&7任务&c{quest}&7失败!'
      sound: BLOCK_ANVIL_DESTROY
    CANCEL:
      title: '&c任务取消'
      title_subtitle: '&7你取消了任务&c{quest}'
      sound: BLOCK_ANVIL_DESTROY

# -------------------- 任务内容 --------------------

branches:

  MAIN:
    starts_at: CHAT
    objects:

      # -----第一个目标:聊天抉择

      CHAT:
        # 显示
        name_short: 作出抉择
        start_notify:
          message: |
            &r--------------------
            &6[系统] 请点击聊天框内的抉择项。
            &r
        # 分支聊天消息
        type: DIVERGE_CHAT
        repeat_delay: 30 SECOND
        choices:
          a:
            text: '&6(a) &aDIVERGE_CHAT目标测试文本。'
            redo_text: '&6(a) &7DIVERGE_CHAT目标测试文本。'
            goto: OBJECT CHAT
          b:
            text: '&6(b) &aDIVERGE_GUI目标测试文本。'
            redo_text: '&6(b) &7DIVERGE_GUI目标测试文本。'
            goto: OBJECT GUI
          c:
            text: '&6(c) &aDIVERGE_OBJECTS目标测试文本。'
            redo_text: '&6(c) &7DIVERGE_OBJECTS目标测试文本。'
            goto: OBJECT OBJECTS
          d:
            text: '&6(d) &a该选项只在你有$10时可用。点击重启该目标。'
            redo_text: '&6(d) &7该选项只在你有$10时可用。 点击重启该目标。'
            unavailable_text: '&6(d) &8该选项只在你有$10时可用。'
            conditions:
              conditions:
                a:
                  type: LOGIC_MONEY
                  currency: VAULT
                  logic: '{money} >= 10'
            goto: OBJECT CHAT
          e:
            text: '&6(e) &e该选项只能点击一次。它会重启该目标。'
            max_completions: 1
            goto: OBJECT CHAT
          f:
            text: '&6(f) &a我可溜了!(停止任务)'
            redo_text: '&6(f) &7我可溜了!(停止任务)'
            goto: QUEST_SUCCESS
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[系统] 你成功地在聊天框内作出抉择!'

      # ----- 第二个目标:GUI抉择

      GUI:
        # 显示
        name_short: 作出抉择
        start_notify:
          message: '&6[系统] 请在GUI内作出抉择。你只需点击其中一个选项。'
        # 分支聊天消息
        type: DIVERGE_GUI
        reopen_delay: 5 SECOND
        choices:
          a:
            slot: 10
            item:
              type: GREEN_WOOL
              name: '&aDIVERGE_CHAT目标测试文本。'
            redo_item:
              type: GRAY_WOOL
              name: '&7DIVERGE_CHAT目标测试文本。'
            goto: OBJECT CHAT
          b:
            slot: 11
            item:
              type: GREEN_WOOL
              name: '&aDIVERGE_GUI目标测试文本。.'
            redo_item:
              type: GRAY_WOOL
              name: '&7DIVERGE_GUI目标测试文本。'
            goto: OBJECT GUI
          c:
            slot: 12
            item:
              type: GREEN_WOOL
              name: '&aDIVERGE_OBJECTS目标测试文本'
            redo_item:
              type: GRAY_WOOL
              name: '&7DIVERGE_OBJECTS目标测试文本。'
            goto: OBJECT OBJECTS
          d:
            slot: 13
            item:
              type: GREEN_WOOL
              name: '&a该选项只在你有$10时可用。 点击重启该目标。'
            redo_item:
              type: GRAY_WOOL
              name: '&7该选项只在你有$10时可用。 点击重启该目标。'
            unavailable_item:
              type: RED_WOOL
              name: '&8该选项只在你有$10时可用。'
            conditions:
              conditions:
                a:
                  type: LOGIC_MONEY
                  currency: VAULT
                  logic: '{money} >= 10'
            goto: OBJECT GUI
          e:
            slot: 14
            item:
              type: ORANGE_WOOL
              name: '&a该选项只能点击一次。 它会重启该目标。'
            max_completions: 1
            goto: OBJECT GUI
          f:
            slot: 15
            item:
              type: GREEN_WOOL
              name: '&a我可溜了!(停止任务)'
            redo_item:
              type: GRAY_WOOL
              name: '&7我可溜了!(停止任务)'
            goto: QUEST_SUCCESS
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[系统] 你在GUI中作出了抉择。'

      # ----- 第三个目标:目标抉择

      OBJECTS:
        # 显示
        name_short: 作出抉择
        start_notify:
          message: '&6[系统] 请作出抉择。你可以跳跃3次重启任务或在聊天框输入“goodbye”停止任务。'
        update_notify:
          message: '&6[系统] 请作出抉择。你可以跳跃3次重启任务或在聊天框输入“goodbye”停止任务。'
        update_notify_delay: 30 SECOND
        # 分支聊天消息
        type: DIVERGE_OBJECTS
        choices:
          a:
            object: OBJECTS_RESTART
            goto: OBJECT CHAT
          b:
            object: OBJECTS_STOP
            goto: QUEST_SUCCESS
        # 完成目标前
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[系统] 你用目标作出了抉择。'

      OBJECTS_RESTART:
        type: PLAYER_JUMP
        goal: 3

      OBJECTS_STOP:
        type: PLAYER_CHAT
        whitelist: ['goodbye']
        error_message: '&7如果你想要停止任务,请输入“goodbye”。'

# -------------------- 奖励设置 --------------------

end_objects:
  SUCCESS:
    a:
      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
          

农场任务组 + GUI

点击下载配置文件

内容

任务:

  • 在这5个农场任务中,你需要破坏X个成熟的小麦
  • 你会获得X元的奖励并发射烟花火箭

全局变量

  • 全局变量可定义任务的目标和奖励

组:

  • 该任务组包含5个玩家需要按顺序完成的任务

GUI:

  • 主GUI会根据任务状态显示全部5个任务
  • GUI里还有点击可显示聊天消息的物品

全局变量

/global_variables.yml

# 耕种小麦任务的目标和奖励

farm_wheat_1_goal: 25
farm_wheat_2_goal: 50
farm_wheat_3_goal: 100
farm_wheat_4_goal: 150
farm_wheat_5_goal: 250

farm_wheat_1_reward: 100
farm_wheat_2_reward: 200
farm_wheat_3_reward: 400
farm_wheat_4_reward: 600
farm_wheat_5_reward: 1000

任务组

/quest_groups/group_farm.yml

max_concurrent: 1
execution_order: true

models: [farm_wheat_1,farm_wheat_2,farm_wheat_3,farm_wheat_4,farm_wheat_5]

GUI

/guis/main.yml

name: '&a农场GUI'
type: CHEST_1_ROW

contents:
  0:
    type: QUESTS
    quests: [farm_wheat_1]
    locations:
      - 0,0
  1:
    type: QUESTS
    quests: [farm_wheat_2]
    locations:
      - 0,1
  2:
    type: QUESTS
    quests: [farm_wheat_3]
    locations:
      - 0,2
  3:
    type: QUESTS
    quests: [farm_wheat_4]
    locations:
      - 0,3
  4:
    type: QUESTS
    quests: [farm_wheat_5]
    locations:
      - 0,4
  8:
    type: NONE
    locations:
      - 0,8
    icon:
      type: NETHER_STAR
      name: '&7点我!'
      lore: |
        &7左击、右击或其它点击类型。
    override_clicks:
      LEFT: COMMANDS_AS_PLAYER say &b你按了鼠标左键!
      RIGHT: COMMANDS_AS_PLAYER say &b你按了鼠标右键!
      DEFAULT: COMMANDS_AS_PLAYER say &b你按了鼠标的其它键!
      

第一个任务模型

/quest_models/farm_wheat_1.yml

其它任务模型请点击上方的下载链接查看(这些模型只有名称和变量名不一样)。

# -------------------- 显示设置 --------------------

display_name: 收割小麦 I
description: ['你需要收割、{gvariable:farm_wheat_1_goal}个小麦。']

start_notify:
  title: '&6任务开始'
  title_subtitle: '&7你开始了任务{quest}&7!'
  sound: ENTITY_PLAYER_LEVELUP

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

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

status_item:
  UNAVAILABLE:
    type: BEDROCK
    name: '&c{quest}'
    lore: |
      &7{description}
      {detailed_errors}
      {controls}

# -------------------- 任务结束设置 --------------------

completion:
  max_completions: 1
  notify:
    SUCCESS:
      title: '&d任务完成'
      title_subtitle: '&7你完成了任务&a{quest}&7!'
      sound: ENTITY_PLAYER_LEVELUP
    FAIL:
      title: '&c任务失败'
      title_subtitle: '&7任务&c{quest}&7失败!'
      sound: BLOCK_ANVIL_DESTROY
    CANCEL:
      title: '&c任务取消'
      title_subtitle: '&7你取消了任务&c{quest}'
      sound: BLOCK_ANVIL_DESTROY

# -------------------- 任务内容 --------------------

branches:

  MAIN:
    starts_at: FARM
    objects:

      # -----主要目标:玩家需要收割X个小麦(在全局变量中设定)

      FARM:
        # 显示
        name_short: 收割小麦
        objective_detail: '&7收割小麦 | &b{objective_progression}&7/&b{objective_goal}'
        # 方块破坏设置
        type: PLAYER_BLOCKS_BREAK
        blocks:
          a:
            types: [WHEAT]
            states: [AGE 7]
            goal: {gvariable:farm_wheat_1_goal}
        # post-object
        complete_notify:
          sound: ENTITY_PLAYER_LEVELUP
          message: '&7[&a{quest}&7] 恭喜你!这是你的奖励:${gvariable:farm_wheat_1_reward}。'
        goto: QUEST_SUCCESS

# -------------------- 奖励设置 --------------------

end_objects:
  SUCCESS:
    a:
      type: SERVER_LOGIC_MONEY
      currency: VAULT
      value_formula: {value} + {gvariable:farm_wheat_1_reward}  # 货币奖励
    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