Need adventure map help
The problem is that the player is the one who is running the command with JSON commands. One possible workaround is the /trigger
command:
Before anything else, once:
/scoreboard objectives add TalkToWoundedGuy trigger
/summon ArmorStand ~ ~ ~ {CustomName:"O"}
On a repeatingCommandBlock/chainCommandBlock loop, in order:
/scoreboard players enable @a TalkToWoundedGuy
/execute @p[score_TalkToWoundedGuy_min=1] ~ ~ ~ execute @e[name=O] ~ ~ ~ [all the 'say' commands you want, on different command blocks]
/execute @p[score_TalkToWoundedGuy_min=1] ~ ~ ~ [all the other commands you want, on different command blocks]
/scoreboard players set @a TalkToWoundedGuy 0
On the sign:
{Text1:"{\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/trigger TalkToWoundedGuy set 1\"}}"
You should use the /tellraw
command instead of /say
for greater control of content.
For example, you would cause the player to run the following command:
/tellraw @a {"text":"[Wounded Man]: A storm's coming I suggest you find shelter..."}
Output:
[Wounded Man]: A storm's coming I suggest you find shelter...
You /give
command would instead become:
/give @p sign 1 0 {BlockEntityTag: {Text1: "{\"text\":\"Wounded Man\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"tellraw @a {\\\"text\\\":\\\"[Wounded Man]: A storm's coming I suggest you find shelter...\\\"}\"}}",Text2: "{\"text\":\"Click to talk\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"say New Quest: Find Shelter\"}}",Text3: "{\"clickEvent\":{\"action\":\"run_command\",\"value\":\"particle fireworksSpark\"}}"},display: {Name: "Custom Sign"}}