- 欢迎来到Minecraft插件百科!
- 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
- 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
GuillaumeVDN的插件文档/QuestCreator/示例
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 object.' 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 # post-object 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
See the other quest models in downloads above (they’re the same, with different names and variables).
# -------------------- 显示设置 -------------------- display_name: Farm wheat I description: ['Youll have to farm {gvariable:farm_wheat_1_goal} wheat in this quest.'] 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: # ----- Main object:the player will have to mine X wheat (defined in a global variable) FARM: # display name_short: Farm some wheat objective_detail: '&7Farm wheat | &b{objective_progression}&7/&b{objective_goal}' # blocks break settings 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] Congratulations ! Heres a ${gvariable:farm_wheat_1_reward} reward !' goto: QUEST_SUCCESS # -------------------- 奖励设置 -------------------- end_objects: SUCCESS: a: type: SERVER_LOGIC_MONEY currency: VAULT value_formula: {value} + {gvariable:farm_wheat_1_reward} # takes the current money amount and add the 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