Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// MINECRAFT VERSION 1.12.1 ///
- //scoreboards for variation 1 (Display Custom Message With Options)
- > /scoreboard objectives add c1 dummy
- > /scoreboard objectives add talk stat.talkedToVillager
- //test if player is within 5 blocks of NPC Henry and tellraw
- > /execute @e[name=Henry,tag=guy1] ~ ~ ~ /scoreboard players add @p[score_talk_min=1,r=5] c1 1
- > /tellraw @a[score_c1_min=1,score_c1=1,score_talk_min=1,score_talk=1] {"text":"Henry: ","color":"gold","extra":[{"text":"You got any water?","color":"white"}]}
- > /tellraw @a[score_c1_min=1,score_c1=1,score_talk_min=1,score_talk=1] ["",{"text":"Yes","color":"green","clickEvent":{"action":"run_command","value":"/tellraw @a [\"\",{\"text\":\"Liar!\",\"color\":\"white\"}]"}}]
- > /tellraw @a[score_c1_min=1,score_talk_min=1,score_talk=1] ["",{"text":"No","color":"red","clickEvent":{"action":"run_command","value":"/tellraw @a [\"\",{\"text\":\"Aw :(\",\"color\":\"white\"}]"}}]
- //reset scoreboards
- > /scoreboard players remove @a[score_talk_min=1] talk 1
- > /scoreboard players set @a c1 0
- //scoreboards for variation 2 (Display Just Custom Message)
- > /scoreboard objectives add c2 dummy
- > /scoreboard objectives add talk2 stat.talkedToVillager
- //test if player is within 5 blocks of NPC Ryan and tellraw
- > /execute @e[name=Ryan,tag=guy2] ~ ~ ~ /scoreboard players add @p[score_talk2_min=1,r=5] c2 1
- > /tellraw @a[score_c2_min=1,score_c2=1,score_talk2_min=1,score_talk2=1] {"text":"Ryan: ","color":"gold","extra":[{"text":"Me found diamonds!","color":"white"}]}
- //reset scoreboards
- > /scoreboard players remove @a[score_talk2_min=1] talk2 1
- > /scoreboard players set @a c2 0
- //scoreboards for variation 3 (Display Multiple Custom Messages)
- > /scoreboard objectives add c3 dummy
- > /scoreboard objectives add talk3 stat.talkedToVillager
- //test if player is within 5 blocks of NPC Kevin and tellraw
- > /execute @e[name=Kevin,tag=guy3] ~ ~ ~ /scoreboard players add @p[score_talk3_min=1,r=5] c3 1
- > /tellraw @a[score_c3_min=1,score_c3=1,score_talk3_min=1,score_talk3=1] {"text":"Kevin: ","color":"gold","extra":[{"text":"This mineshaft...","color":"white"}]}
- > /tellraw @a[score_c3_min=2,score_c3=2,score_talk3_min=1,score_talk3=1] {"text":"Kevin: ","color":"gold","extra":[{"text":"Dark...","color":"white"}]}
- > /tellraw @a[score_c3_min=3,score_c3=3,score_talk3_min=1,score_talk3=1] {"text":"Kevin: ","color":"gold","extra":[{"text":"Scary...","color":"white"}]}
- //reset scoreboards
- > /scoreboard players remove @a[score_talk3_min=1] talk3 1
- > /scoreboard players set @a[score_c3_min=3] c3 0
Advertisement
Add Comment
Please, Sign In to add comment