- 欢迎来到Minecraft插件百科!
- 对百科编辑一脸懵逼?帮助:快速入门带您快速熟悉百科编辑!
- 因近日遭受攻击,百科现已限制编辑,有意编辑请加入插件百科企鹅群:223812289
GuillaumeVDN的插件文档/QuestCreator/示例
| GuillaumeVDN的插件文档 | |
|---|---|
| 页面 | |
| 所有插件都有的常见内容 | |
| QuestCreator | |
从NPC处接取任务
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_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}
# -------------------- 任务结束设置 --------------------
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
# -------------------- 奖励设置 --------------------
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
NPC跑腿任务
内容
This example has a NPC activator and a quest.
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
- Approach the NPC to get a little dialog, and get asked to confirm starting the quest with a GUI
任务内容:
- Interact with the NPC with 64 wheat in your hand
- Get $150 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_deliver.yml
# -------------------- 显示设置 --------------------
display_name: NPC deliver quest
description: ['Youll have to deliver some wheat to 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}
# -------------------- 任务结束设置 --------------------
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 ? I need some wheat.'
- # 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: DELIVER
objects:
# ----- Main object : the farm object. The player will have to interact with the NPC holding 64 wheat in their hand.
DELIVER:
start_notify:
message: '&6[Farmer] &7Wonderful ! So, I need you to bring me 64 wheat. Ill be waiting for you then.'
# display
name_short: Deliver 64 wheat to the farmer
objective_detail: '&7Deliver wheat : &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[Farmer] &7So, hows your search for my wheat going ? Remember, I need 64 of it.'
# post-object
complete_notify:
sound: ENTITY_PLAYER_LEVELUP
message: '&6[Farmer] &7Thats so amazing ! Thanks a lot. Heres a $150 reward :D'
goto: QUEST_SUCCESS
# -------------------- 奖励设置 --------------------
end_objects:
SUCCESS:
a:
type: SERVER_LOGIC_MONEY
currency: VAULT
value_formula: {value} + 150.0 # takes the current money amount and add 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
选择(任务分支)
你可以点击这里下载文件。
内容
This example contains all the available diverge objects, as well as most of their settings.
任务模型
/quest_models/example_choice.yml
# -------------------- 显示设置 --------------------
display_name: Choice example
description: ['This is just an example on how to use the diverge objects.']
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}
# -------------------- 任务结束设置 --------------------
completion:
max_completions: -1
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
# -------------------- Quest content --------------------
branches:
MAIN:
starts_at: CHAT
objects:
# ----- First object : chat choice
CHAT:
# display
name_short: Make a choice
start_notify:
message: |
&r--------------------
&6[System] Please make a choice in the chat. You just need to click one of the options.
&r
# diverge chat
type: DIVERGE_CHAT
repeat_delay: 30 SECOND
choices:
a:
text: '&6(a) &aI want to test the DIVERGE_CHAT object.'
redo_text: '&6(a) &7I want to test the DIVERGE_CHAT object (again).'
goto: OBJECT CHAT
b:
text: '&6(b) &aI want to test the DIVERGE_GUI object.'
redo_text: '&6(b) &7I want to test the DIVERGE_GUI object (again).'
goto: OBJECT GUI
c:
text: '&6(c) &aI want to test the DIVERGE_OBJECTS object.'
redo_text: '&6(c) &7I want to test the DIVERGE_OBJECTS object (again).'
goto: OBJECT OBJECTS
d:
text: '&6(d) &aThis option will only be clickeable if you have $10. Click to restarts this object.'
redo_text: '&6(d) &7This option will only be clickeable if you have $10. Click to restarts this object (again).'
unavailable_text: '&6(d) &8This option will only be clickeable if you have $10.'
conditions:
conditions:
a:
type: LOGIC_MONEY
currency: VAULT
logic: '{money} >= 10'
goto: OBJECT CHAT
e:
text: '&6(e) &eThis choice can only be clicked once. It restarts this object.'
max_completions: 1
goto: OBJECT CHAT
f:
text: '&6(f) &aIm out ! (stop the quest)'
redo_text: '&6(f) &7Im out ! (stop the quest, again)'
goto: QUEST_SUCCESS
# post-object
complete_notify:
sound: ENTITY_PLAYER_LEVELUP
message: '&7[System] You made a choice in the chat, congrats!'
# ----- Second object : GUI choice
GUI:
# display
name_short: Make a choice
start_notify:
message: '&6[System] Please make a choice in the GUI. You just need to click one of the options.'
# diverge chat
type: DIVERGE_GUI
reopen_delay: 5 SECOND
choices:
a:
slot: 10
item:
type: GREEN_WOOL
name: '&aI want to test the DIVERGE_CHAT object.'
redo_item:
type: GRAY_WOOL
name: '&7I want to test the DIVERGE_CHAT object (again).'
goto: OBJECT CHAT
b:
slot: 11
item:
type: GREEN_WOOL
name: '&aI want to test the DIVERGE_GUI object.'
redo_item:
type: GRAY_WOOL
name: '&7I want to test the DIVERGE_GUI object (again).'
goto: OBJECT GUI
c:
slot: 12
item:
type: GREEN_WOOL
name: '&aI want to test the DIVERGE_OBJECTS object.'
redo_item:
type: GRAY_WOOL
name: '&7I want to test the DIVERGE_OBJECTS object (again).'
goto: OBJECT OBJECTS
d:
slot: 13
item:
type: GREEN_WOOL
name: '&aThis option will only be clickeable if you have $10. Click to restarts this object.'
redo_item:
type: GRAY_WOOL
name: '&7This option will only be clickeable if you have $10. Click to restarts this object (again).'
unavailable_item:
type: RED_WOOL
name: '&8This option will only be clickeable if you have $10.'
conditions:
conditions:
a:
type: LOGIC_MONEY
currency: VAULT
logic: '{money} >= 10'
goto: OBJECT GUI
e:
slot: 14
item:
type: ORANGE_WOOL
name: '&aThis choice can only be clicked once. It restarts this object.'
max_completions: 1
goto: OBJECT GUI
f:
slot: 15
item:
type: GREEN_WOOL
name: '&aIm out ! (stop the quest)'
redo_item:
type: GRAY_WOOL
name: '&7Im out ! (stop the quest, again)'
goto: QUEST_SUCCESS
# post-object
complete_notify:
sound: ENTITY_PLAYER_LEVELUP
message: '&7[System] You made a choice in the GUI, congrats!'
# ----- Third object : objects choice
OBJECTS:
# display
name_short: Make a choice
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.'
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.'
update_notify_delay: 30 SECOND
# diverge chat
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[System] You made a choice using objects, congrats!'
OBJECTS_RESTART:
type: PLAYER_JUMP
goal: 3
OBJECTS_STOP:
type: PLAYER_CHAT
whitelist: ['goodbye']
error_message: '&7If youre trying to stop the quest, the thing to say is "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
内容
任务:
- Five farming quests where you need to break X blocks of grown wheat
- You get X dollars as a reward and throw a firework
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
GUI :
- The main GUI is configured to display all five quests, depending on their status
- There’s also an extra item with overriden clicks that will display chat messages on click (left/right/other)
全局变量
/global_variables.yml
# Farm goals and rewards for the wheat farming quests 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: '&aThe farming 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: '&7Click me!'
lore: |
&7Left, right, or any other click type.
override_clicks:
LEFT: COMMANDS_AS_PLAYER say &bI just made a left click!
RIGHT: COMMANDS_AS_PLAYER say &bI just made a right click!
DEFAULT: COMMANDS_AS_PLAYER say &bI just made another click!
第一个任务模型
/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: '&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: 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: '&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
# -------------------- Quest content --------------------
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