#send out a helpful hint on how to continue, depending on the progress the player has made



#audio-visual cues
playsound minecraft:entity.experience_orb.pickup master @s ~ ~1 ~


#empty line before the help message
tellraw @s ["",{"text":""}]


#send out help based on the current progress
#house
execute if entity @s[tag=!plays_the_map] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Press the button in this starting room to start the map, once you have adjusted all your settings."}]
execute if entity @s[tag=ectoplasm_cluster_house_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Use your \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\" and follow the purple trail on the ground from the campfire towards the house. Enter it and use the stairs to go into the basement and find the utility room. Press the button on the power unit to reactivate it."}]
execute if entity @s[tag=ectoplasm_cluster_house_2] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Light switches (red dots on the walls) now work again, so turn on the lights in the rooms you vist. Use the \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\" again. The ghostly trail has changed, now that this goal is complete. Follow it from the utility room up towards the bathroom on the first floor. Now take the key from the kitchen on the first floor out of the middle-most oven and use it on the locked door of the bathroom. Go in and collect the item."}]
execute if entity @s[tag=ectoplasm_cluster_house_3] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Follow the ethereal trail into the \"Guest Dinning Room\" on the ground floor of the house. The chest, which shows up there when using the \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\", is locked. Go outside and head towards the huge windmill in the corn field. It's between the house and the blue stable. Get the key from there and open the chest in the \"Guest Dinning Room\"."}]
execute if entity @s[tag=ectoplasm_cluster_house_4] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Follow the ethereal trail to the \"Southern Balcony\" on the first floor of the house. Use your \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\" to show some blocks and use them to jump up onto the roof of the house. Head to the top and collect the item."}]

#stable
execute if entity @s[tag=ectoplasm_cluster_stable_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Jump off the roof and into the pond below. Follow the trail into the stables. Use the light switch to turn the lighs on. Enter the stable of \"Chompy\" on the ground floor and open the mule's chest (sneak+use or open inventory while ridding it). Get the item."}]
execute if entity @s[tag=ectoplasm_cluster_stable_2] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Follow the trail to the \"Saddle Storage\" room on the ground floor of the stables. Ideally, turn the lights on. The door is locked. Head upstairs onto the Terrace and towards the chairs and tables. Punch the key out of the plate (item frame) on the end of the closest table. Use it to open the door. Collect the item."}]
execute if entity @s[tag=ectoplasm_cluster_stable_3] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Head upstairs to the first floor of the stables and locate the \"Laundry\" room. The door has no handle. Go into the hayloft on the same floor and turn the lights on. Get the door handle from the barrel buried under the top of the biggest pile. Use it to open the door. Pick up the item."}]

#factory
execute if entity @s[tag=ectoplasm_cluster_factory_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Leave the stables and head over to the ruins of the factory. The doors are locked. While standing in front of the doors, locate the moon in the sky. Walk towards it. After around 30 blocks you will find an area with an ethereal chest. Get the \"Factory Ruins Lock Picks\" from it and use them to open the doors. Get the item."}]
execute if entity @s[tag=ectoplasm_cluster_factory_2] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Use your broom to swoop away (mine/break) the brown dust piles blocking the doors in the factory ruins. Activate the \"Factory Power Supply\" in one of the rooms. Then use the now powered machine in the other room to jump onto the wall. Walk through the arch, head right and over the arch. Jump onto the two pipes and platform over to the item. Use your \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\" to create the blocks to cross the two big gaps. Collect the item."}]

#canals
execute if entity @s[tag=ectoplasm_cluster_canals_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Jump down into the pond. Then jump down into the well. Follow the tunnels and break the brown dust piles with your broom when necessary. Use your \""},{"text":"Ethereal Lamp","italic":false,"color":"#AF88FF"},{"text":"\" to create blocks to jump over the big gap. Swim back up if you fall down. Grab the item."}]
execute if entity @s[tag=ectoplasm_cluster_canals_2] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Follow the trail into the pool. The ladder is gone, so you can't get out. Head back into the canals and follow the other path. Remove the dust piles with your broom and climb up the ladder into the pump room. Ideally, turn the lights on. The door is locked and can not be opened. Activate the \"Pool Water Pump\" to flood the pool. Head back into the canals and back to the pool to swim out. Pick up the item."}]

#ethereal castle
execute if entity @s[tag=ectoplasm_cluster_castle_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Head back outside and towards the big floating castle. Climb it and look up if stuck. The gate is closed by magic. Solve both riddles to open it."}]
execute if entity @s[tag=ectoplasm_cluster_castle_1] run tellraw @s ["",{"text":" - No. 1: Reach the end of the maze and get the \"Ethereal Door Piece No. 1\" and place it on one of the \uE503 blocks next to the gate."}]
execute if entity @s[tag=ectoplasm_cluster_castle_1] run tellraw @s ["",{"text":" - No. 2: Solve the invisible staircase. Look for the magenta particles to locate the next block. Climb it to the top and pick up the \"Ethereal Door Piece No. 2\" from the chest. Place it on the other \uE503 block next to the gate."}]
execute if entity @s[tag=ectoplasm_cluster_castle_1] run tellraw @s ["",{"text":"The gate now opens up. Collect the item at the end of the newly appeared walkway."}]

#quiz
execute if entity @s[tag=ectoplasm_cluster_quiz_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Follow the ghostly walkway to the top-most floor of the house. Now, correctly answer the 5 questions. If your answer was wrong, defeat the mini ghosts and try again."}]

#end
execute if entity @s[tag=ectoplasm_cluster_end_1] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" Leave the top-most floor of the house with the elevator or jump down into the small pond. Head back to the campfire site and talk with Henri."}]
execute if entity @s[tag=ectoplasm_cluster_end_2] run tellraw @s ["",{"text":"<","color":"dark_red"},{"text":"Mr. Help","color":"red"},{"text":">","color":"dark_red"},{"text":" You completed the map. Hooray!"}]


#empty line after the help message
tellraw @s ["",{"text":""}]