tag @s add llama_seek
execute as @a[distance=..250] if score @s real_ID = @n[tag=llama_seek] real_ID run tag @s[gamemode=!spectator] add llama_target

execute if score @s generic_timer matches ..50 anchored eyes facing entity @n[tag=llama_target] eyes positioned ^ ^ ^0.1 rotated as @s positioned ^ ^ ^5 facing entity @s eyes facing ^ ^ ^-1 positioned as @s run tp @s ^ ^ ^1 ~ ~
execute if score @s generic_timer matches 51.. anchored eyes facing entity @n[tag=llama_target] eyes positioned ^ ^ ^0.75 rotated as @s positioned ^ ^ ^5 facing entity @s eyes facing ^ ^ ^-1 positioned as @s run tp @s ^ ^ ^0.5 ~ ~

execute positioned ~-0.5 ~-0.5 ~-0.5 as @n[type=player,dx=1,dy=1,dz=1,tag=llama_target] at @s run function pctf:logic/items/lucky_block/outcomes/rare/llama_strike/collide

execute unless entity @a[tag=llama_target] run kill @s

tag @a[tag=llama_target] remove llama_target
tag @s remove llama_seek

execute positioned ~ ~1 ~ run particle flame ^ ^ ^-1 0 0 0 0.1 10 force @a
execute positioned ~ ~1 ~ run particle smoke ^ ^ ^-1 0 0 0 0.1 10 force @a

scoreboard players add @s generic_timer2 1
execute if score @s generic_timer2 matches 4 run playsound minecraft:entity.llama.ambient hostile @a ~ ~ ~ 1 0.75
execute if score @s generic_timer2 matches 1..2 run playsound minecraft:block.fire.extinguish hostile @a ~ ~ ~ 1 2
execute if score @s generic_timer2 matches 4.. run scoreboard players set @s generic_timer2 0

scoreboard players add @s generic_timer 1

execute if score @s generic_timer matches 600.. run kill @s