tag @s[tag=!alkhRegDone,tag=!team:abyssal] add quest:alkhregister
tag @s[tag=alkhRegDone] remove quest:alkhregister
tellraw @s[tag=quest:alkhregister,hasitem={item=material:nightessence,quantity=25..}] {"rawtext":[{"text":"<Tavernkeeper> Ah, finally! For that hardwork I'll give ya this §l§aLetter§r that you can bring to the §l§aDirector§r of §l§aQUINX§r, head to their facility and do what I said. Goodluck."}]}
give @s[tag=quest:alkhregister,hasitem={item=material:nightessence,quantity=25..}] item:letter 1 0 {"minecraft:keep_on_death":{}}
scoreboard players add @e[tag=quest:alkhregister,hasitem={item=material:nightessence,quantity=25..}] reputation 1
tag @s[tag=quest:alkhregister,hasitem={item=material:nightessence,quantity=25..}] add alkhRegDone
clear @s[tag=alkhRegDone,hasitem={item=material:nightessence,quantity=25..}] material:nightessence 25
tag @s[tag=alkhRegDone] remove quest:alkhregister