Quests: bring and receive a reward

Datapacks

Bring items - get a rewardLearn more

For up to five assignments, "Searchs 32 - Get Bread", the datepack will notice that the player has picked up, picked up the items and gave the award. The list of tasks is /trigger Quests. For Minecraft 1.21.11 - 26.3, without plagins.

My game select version

We'll remember in this browser and set up where your version is available. Open link settings are more important than this choice; the Vicki versions do not change.

Task 1

Task 2

Task 3

Task 4

Task 5

Quests

Example · Datepak · 1.21.11 - 26.3
  1. Oak log ×32 Bread x 8
  2. Iron rod x 16 Diamond ×1 + 5 uh.
  3. Diamond ×5 Elite ×1 + 30 Ur.

The player opens the list

/trigger quests
Download datapack
What's inside the archive - 9 files

data/minecraft/tags/function/load.json

Load tag: the game calls these functions when loading the world and after /reload.

{
  "values": [
    "quests:load"
  ]
}

data/minecraft/tags/function/tick.json

Tick tag: these functions run every tick - 20 times per second.

{
  "values": [
    "quests:tick"
  ]
}

data/quests/function/load.mcfunction

When loading the world: count, list trigger and check once per second.

scoreboard objectives add quests dummy
scoreboard objectives add quests trigger "Задания"
schedule function quests:check 1s

data/quests/function/tick.mcfunction

Each tick: /trigger quests opens a list.

scoreboard players enable @a quests
execute as @a[scores={quests=1..}] run function quests:list

data/quests/function/done/1.mcfunction

Job 1 surrendered: pick up 32, give the award.

clear @s minecraft:oak_log 32
give @s minecraft:bread 8
tag @s add quests_done_1
playsound minecraft:ui.toast.challenge_complete master @s
tellraw @a ["",{"selector":"@s"},{"text":" выполнил задание: Принеси: Дубовое бревно ×32 → Хлеб ×8","color":"green"}]

data/quests/function/done/2.mcfunction

Task 2 surrendered: To take 16, to give the award.

clear @s minecraft:iron_ingot 16
give @s minecraft:diamond 1
experience add @s 5 levels
tag @s add quests_done_2
playsound minecraft:ui.toast.challenge_complete master @s
tellraw @a ["",{"selector":"@s"},{"text":" выполнил задание: Принеси: Железный слиток ×16 → Алмаз ×1 и 5 ур. опыта","color":"green"}]

data/quests/function/done/3.mcfunction

Job 3 surrendered: pick up five, give the award.

clear @s minecraft:diamond 5
give @s minecraft:elytra 1
experience add @s 30 levels
tag @s add quests_done_3
playsound minecraft:ui.toast.challenge_complete master @s
tellraw @a ["",{"selector":"@s"},{"text":" выполнил задание: Принеси: Алмаз ×5 → Элитры ×1 и 30 ур. опыта","color":"green"}]

data/quests/function/check.mcfunction

Once per second: whether there are enough items for unfinished tasks.

execute as @a[tag=!quests_done_1] store result score @s quests run clear @s minecraft:oak_log 0
execute as @a[tag=!quests_done_1,scores={quests=32..}] run function quests:done/1
execute as @a[tag=!quests_done_2] store result score @s quests run clear @s minecraft:iron_ingot 0
execute as @a[tag=!quests_done_2,scores={quests=16..}] run function quests:done/2
execute as @a[tag=!quests_done_3] store result score @s quests run clear @s minecraft:diamond 0
execute as @a[tag=!quests_done_3,scores={quests=5..}] run function quests:done/3
schedule function quests:check 1s

data/quests/function/list.mcfunction

/trigger quests - list of quests with check marks.

scoreboard players set @s quests 0
tellraw @s {"text":"Задания:","bold":true}
execute if entity @s[tag=quests_done_1] run tellraw @s {"text":"✔ Принеси: Дубовое бревно ×32 → Хлеб ×8","color":"green"}
execute unless entity @s[tag=quests_done_1] run tellraw @s {"text":"• Принеси: Дубовое бревно ×32 → Хлеб ×8"}
execute if entity @s[tag=quests_done_2] run tellraw @s {"text":"✔ Принеси: Железный слиток ×16 → Алмаз ×1 и 5 ур. опыта","color":"green"}
execute unless entity @s[tag=quests_done_2] run tellraw @s {"text":"• Принеси: Железный слиток ×16 → Алмаз ×1 и 5 ур. опыта"}
execute if entity @s[tag=quests_done_3] run tellraw @s {"text":"✔ Принеси: Алмаз ×5 → Элитры ×1 и 30 ур. опыта","color":"green"}
execute unless entity @s[tag=quests_done_3] run tellraw @s {"text":"• Принеси: Алмаз ×5 → Элитры ×1 и 30 ур. опыта"}

How to install

  1. Download the datapack

    No need to unpack: the game reads it directly from the zip.

  2. Put it into the world

    In single player - saves/<world>/datapacks, on the server - world/datapacks, then /reload.

  3. Collect

    If you have what you need in your inventory, in a second the items will be picked up and you will receive a reward and a message in the chat.

What you need to know

  • Each task - once. The player's handover is marked, and it cannot be turned in a second time for the same reward.
  • Takes exactly as much as needed. Extra items remain in inventory.
  • Items - in Russian or id. "Oak Log" and oak_log are the same thing. Only those that are also in 1.21.11: otherwise the pack will not load on the old version.

A more interesting reward - an item with an enchantment and a name - will be collected Generator /give, and the menu with buttons is Generator /dialog.

Frequently asked questions

How to make quests in Minecraft without plugins?

Datapack: enter what to bring and what to give as a reward. Puck himself will notice what the player has accumulated, take the items and give a reward.

How can a player view tasks?

Using the /trigger quests command - a list of quests with checkmarks for those submitted. It does not require operator rights.

Can I submit an assignment twice?

No: the dealt item is marked with the player; it cannot be turned in a second time for the same reward.