summon arrow ~ ~1.5 ~ {damage:0.01d,Tags:["EB","attack","arrow_based","unspellable","init","nonlocking"],Silent:1b,Color:10590081,CustomPotionEffects:[{Id:18b,Amplifier:0b,Duration:0}]}

summon armor_stand ~ ~.5 ~ {Tags:["EB","attack","arrow_based","unspellable","init","nonlocking"],Marker:1b,Invisible:1b,Pose:{RightArm:[0f,0f,0f]},HandItems:[{id:"flint",Count:1b,tag:{CustomModelData:0}},{}],Rotation:[0.0f,0.0f]}

tp @e[type=armor_stand,tag=init,tag=visual,limit=1] ~ ~.5 ~ facing entity @p[gamemode=!spectator]

execute as @e[type=arrow,tag=arrow_based,tag=init,limit=1] run function olink:ch1/new_link
execute as @e[type=armor_stand,tag=arrow_based,tag=init,limit=1] run function olink:ch1/join_link

execute as @e[type=arrow,tag=arrow_based,tag=init,limit=1] at @s run function attacks:0_generic/launch/at_nearest_p

scoreboard players set @e[type=armor_stand,tag=arrow_based,tag=init,limit=1] countdown 1

playsound custom.object.throw hostile @a ~ ~ ~