332: Villager dialogue using clickable tellraw. [Minecraft Map Making]

Subscribers:
3,590
Published on ● Video Link: https://www.youtube.com/watch?v=-aaV5ezVxuE



Minecraft
Game:
Minecraft (2011)
Category:
Vlog
Duration: 1:12:33
404 views
23


Ep332: Title says it, description too long already.

00:00 Introduction
03:00 Setup
13:40 Proximity
19:30 Bob Dialogue
37:20 Bob Triggers
47:00 Tom stuff

Version: 1.20.6

Old version: https://youtu.be/omPCJzYfdU4

Requested by: WhosTigerCub

Some commands used:

Summon Villager:
IUN: summon villager ~ ~ ~3 {Tags:["NPC", "Bob"], Invulnerable:true, CustomName:'{"text":"Bob"}', VillagerData:{profession:"librarian", type:"plains", level:99}}
CUA: scoreboard players set @e[tag=Bob] villager_id 1

Controller Proxmity:
RUA: scoreboard players set @a[scores={villager_id=1..}] villager_id 0
CUA: execute as @a at @s if entity @e[type=villager, tag=NPC, distance=0..3, limit=1] run scoreboard players operation @s villager_id = @e[type=villager, tag=NPC, distance=0..3, limit=1] villager_id
CUA: execute as @a[scores={has_talked=1..}] at @s unless entity @e[type=villager, tag=NPC, distance=..3, limit=1] run scoreboard players reset @s has_talked

Controller Chat:
RUA: execute as @a[scores={villager_id=1, has_talked=1..}] run setblock ~2 ~ ~ redstone_block

Dialogue Bob:
IUN: execute as @a[scores={has_talked=1.., villager_id=1}] unless score @s chat_progress_1 matches 1.. run tellraw @s [{"text":"Bob ", "color":"aqua"}, {"text":"Hello. :)", "color":"green"}]
CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=1}] run tellraw @s [{"text":"Bob ", "color":"aqua"}, {"text":"What would you like to know about?", "color":"green"}]
CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=1}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"Tell me about Tom.", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_bob set 1"}}]
CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=1}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"Where is Tom?", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_bob set 2"}}]
CUA: scoreboard players set @a[scores={has_talked=1.., villager_id=1, chat_progress_1=1}] chat_progress_1 -1

CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=2}] run tellraw @s [{"text":"Bob ", "color":"aqua"}, {"text":"Will Tom give back my emerald?", "color":"green"}]
CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=2}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"I didn't ask.", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_bob set 3"}}]
CUA: execute as @a[scores={has_talked=1.., villager_id=1, chat_progress_1=2}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"He said no.", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_bob set 4"}}]
CUA: scoreboard players set @a[scores={has_talked=1.., villager_id=1, chat_progress_1=2}] chat_progress_1 0

CUA: scoreboard players add @a[scores={has_talked=1.., villager_id=1}] chat_progress_1 1
CUA: scoreboard players reset @a has_talked

Controller Bob Trigger
RUA: execute as @a[scores={trigger_bob=1}] run setblock ~2 ~ ~ redstone_block

Options Bob 1:
IUN: tellraw @a[scores={trigger_bob=1}] [{"text":"Bob ", "color":"aqua"}, {"text":"Tom has my Emerald. Go and get it!", "color":"green"}]
CUA: scoreboard players reset @a trigger_bob
CUA: scoreboard players enable @a trigger_bob

Dialogue Tom:
IUN: execute as @a[scores={has_talked=1.., villager_id=2}] unless score @s chat_progress_2 matches 1.. run tellraw @s [{"text":"Tom ", "color":"aqua"}, {"text":"Hey.", "color":"green"}]
CUA: execute as @a[scores={has_talked=1.., villager_id=2, chat_progress_2=1}] run tellraw @s [{"text":"Tom ", "color":"aqua"}, {"text":"How can I help you?", "color":"green"}]
CUA: execute as @a[scores={has_talked=1.., villager_id=2, chat_progress_2=1}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"Do you have Bob's emerald?", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_tom set 1"}}]
CUA: execute as @a[scores={has_talked=1.., villager_id=2, chat_progress_2=1}] run tellraw @s [{"text":"Option: ", "color":"gray"}, {"text":"Can I have it?", "color":"gold", "clickEvent":{"action":"run_command","value":"/trigger trigger_tom set 2"}}]
CUA: scoreboard players set @a[scores={has_talked=1.., villager_id=2, chat_progress_2=1}] chat_progress_2 -1
CUA: scoreboard players add @a[scores={has_talked=1.., villager_id=2}] chat_progress_2 1
CUA: scoreboard players reset @a has_talked

Controller Bob Trigger
RUA: execute as @a[scores={trigger_tom=1}] run setblock ~2 ~ ~ redstone_block
CUA: execute as @a[scores={trigger_tom=2}] run setblock ~2 ~ ~ redstone_block

Options Tom 1:
IUN: tellraw @a[scores={trigger_tom=1}] [{"text":"Tom ", "color":"aqua"}, {"text":"I do. It's mine now.", "color":"green"}]
CUA: scoreboard players set @a[scores={trigger_tom=1}] chat_progress_1 2
CUA: scoreboard players reset @a trigger_tom
CUA: scoreboard players enable @a trigger_tom




Other Videos By Infernal Device


2024-06-07342: Detecting weather. [Minecraft Map Making]
2024-06-06341: Top down camera view, remote controlled entity with button detection. [Minecraft Map Making]
2024-06-05340: Moving mechanical chain decoration. [Minecraft Map Making]
2024-06-04339: Rotating room. [Minecraft Map Making]
2024-06-03338: Tool for detecting and counting hidden ores. [Minecraft Map Making]
2024-06-02337: Concept: Magic staff with homing missiles. [Minecraft Map Making]
2024-05-31336: Checking light levels at the players position. [Minecraft Map Making]
2024-05-30335: UPDATED: Run command every n ticks to player near tagged entity. [Minecraft Map Making]
2024-05-30334: Waystones. [Minecraft Map Making]
2024-05-29333: Text display force fields. [Minecraft Map Making]
2024-05-29332: Villager dialogue using clickable tellraw. [Minecraft Map Making]
2024-05-27331: Run command every n ticks to player near tagged entity. [Minecraft Map Making]
2024-05-26330: Fireflies in a jar as a light source. [Minecraft Map Making]
2024-05-24329: Placing saved structures with commands. [Minecraft Map Making]
2024-05-23327: Updated: Will o the wisp that leads players to a POI. [Minecraft Map Making]
2024-05-23326: Alternate: Entity following entity. [Minecraft Map Making]
2024-05-23CoppitCraft Castle 049: Cannons and crenellations.
2024-05-23328: Command that has a random chance to run using a Predicate. [Minecraft Map Making]
2024-05-23325: Two quick tips for faster building. [Minecraft Map Making]
2024-05-22324: Will o the wisp that leads players to a POI. [Minecraft Map Making]
2024-05-21323: Playing with particles. [Minecraft Map Making]



Tags:
minecraft
adventure map
map making
commands
command blocks
1.18
custom commands
redstone
map ideas
map suggesstions
custom maps
1.19



Other Statistics

Minecraft Statistics For Infernal Device

At present, Infernal Device has 181,722 views spread across 860 videos for Minecraft, accounting for over 10 days of watchable video on his channel. This is 94.82% of the total watchable video for Minecraft on Infernal Device's YouTube channel.