
#Stuff for the rooms before the lobby

execute as @a[tag=!veinbound] run gamemode adventure @s
tp @a[tag=!veinbound] 0 185 0 90 0
clear @a[tag=!veinbound]
advancement grant @a[tag=!veinbound] only minecraft:end/levitate
execute as @a[tag=!veinbound] at @s run playsound minecraft:tcoll.welcome master @s ~ ~ ~ 1 1
tag @a[tag=!veinbound] add veinbound
advancement grant @a[tag=!veinbound] everything
advancement revoke @a[tag=!veinbound] only rm:kill_ravager

#SKELETONS HIT :

# TUTO 1

#execute as @a at @s if entity @e[type=minecraft:interaction,tag=tuto1,distance=..3] run tellraw @s {text:"Hi",color:"green"}
# execute as @e[tag=tuto1] on target as @s[nbt={Inventory:[{id:"minecraft:air"}]}] run say hi
execute as @e[tag=tuto1] on target run tp @s -12 185 0 90 0
execute as @e[tag=tuto1] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto1] on attacker run tp @s -12 185 0 90 0
execute as @e[tag=tuto1] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto1] run data remove entity @s interaction
execute as @e[tag=tuto1] run data remove entity @s attack


# TUTO 2

execute as @e[tag=tuto2] on target run tp @s -24 185 0 90 0
execute as @e[tag=tuto2] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto2] on attacker run tp @s -24 185 0 90 0
execute as @e[tag=tuto2] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto2] run data remove entity @s interaction
execute as @e[tag=tuto2] run data remove entity @s attack

execute if block -17 186 -2 warped_button[powered=true] run tellraw @a [{text: "[OPEN CHAT AND CLICK ME]", bold: 1b, color: "green", click_event: {action: "open_url", url: "https://share.azrlog.dev/peto/VEINBOUND_Resource_Pack.zip"}}, {text: " Resource Pack", color: "green", click_event: {action: "open_url", url: "https://share.azrlog.dev/peto/VEINBOUND_Resource_Pack.zip"}}]
execute if block -17 186 -2 warped_button[powered=true] run playsound minecraft:block.note_block.xylophone master @a 1 115 62 2 2
execute if block -17 186 -2 warped_button[powered=true] run setblock -17 186 -2 warped_button[face=floor]

# TUTO 3

execute as @e[tag=tuto3] on target run tp @s -36 185 0 90 0
execute as @e[tag=tuto3] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto3] on attacker run tp @s -36 185 0 90 0
execute as @e[tag=tuto3] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto3] run data remove entity @s interaction
execute as @e[tag=tuto3] run data remove entity @s attack

# TUTO 4

execute as @e[tag=tuto4] on target run tp @s -48 185 0 90 0
execute as @e[tag=tuto4] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto4] on attacker run tp @s -48 185 0 90 0
execute as @e[tag=tuto4] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto4] run data remove entity @s interaction
execute as @e[tag=tuto4] run data remove entity @s attack

# TUTO 5

execute as @e[tag=tuto5] on target run tp @s -60 185 0 90 0
execute as @e[tag=tuto5] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto5] on attacker run tp @s -60 185 0 90 0
execute as @e[tag=tuto5] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto5] run data remove entity @s interaction
execute as @e[tag=tuto5] run data remove entity @s attack

# TUTO 6

execute as @e[tag=tuto6] on target run tp @s -72 185 0 90 -10
execute as @e[tag=tuto6] on target at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1
execute as @e[tag=tuto6] on attacker run tp @s -72 185 0 90 -10
execute as @e[tag=tuto6] on attacker at @s run playsound minecraft:ui.button.click master @s ~ ~ ~ 1 1

execute as @e[tag=tuto6] run data remove entity @s interaction
execute as @e[tag=tuto6] run data remove entity @s attack


# TUTO 7

execute as @e[tag=tuto7] on target run tp @s 7 113.5 66 90 -10
execute as @e[tag=tuto7] on target at @s run title @s title {text:"\uE000"}
execute as @e[tag=tuto7] on target at @s run playsound minecraft:tcoll.success master @s ~ ~ ~ 1 1
execute as @e[tag=tuto7] on attacker run tp @s 7 113.5 66 90 -10
execute as @e[tag=tuto7] on attacker at @s run title @s title {text:"\uE000"}
execute as @e[tag=tuto7] on attacker at @s run playsound minecraft:tcoll.success master @s ~ ~ ~ 1 1

execute as @e[tag=tuto7] run data remove entity @s interaction
execute as @e[tag=tuto7] run data remove entity @s attack

