## Check if we've already used an item
execute if score @s vb.tick_data.custom_item_rc matches 1.. run scoreboard players set @s vb.tick_data.right_click 0
execute if score @s vb.tick_data.right_click matches 1.. run scoreboard players set @s vb.tick_data.custom_item_rc 1

execute if score @s vb.timer.talisman_cooldown matches 1.. run function vb:tick_player/custom_item/server_item/talisman_cooldown

## Active
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.festivity:1b}] unless score @s vb.timer.talisman_cooldown matches 1.. if score @s vb.tick_data.right_click matches 1 run function vb:tick_player/custom_item/server_item/talisman_use/festivity
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.warping:1b}] unless score @s vb.timer.talisman_cooldown matches 1.. if score @s vb.tick_data.right_click matches 1 run function vb:tick_player/custom_item/server_item/talisman_use/warping
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.cookies:1b}] unless score @s vb.timer.talisman_cooldown matches 1.. if score @s vb.tick_data.right_click matches 1 run function vb:tick_player/custom_item/server_item/talisman_use/cookies
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.inferno:1b}] unless score @s vb.timer.talisman_cooldown matches 1.. if score @s vb.tick_data.right_click matches 1 run function vb:tick_player/custom_item/server_item/talisman_use/inferno
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.frights:1b}] unless score @s vb.timer.talisman_cooldown matches 1.. if score @s vb.tick_data.right_click matches 1 run function vb:tick_player/custom_item/server_item/talisman_use/frights

## Passive
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.frights:1b}] run function vb:tick_player/custom_item/server_item/talisman_passive/frights
execute if items entity @s weapon.offhand *[custom_data~{vb.item.server_item.talisman.inferno:1b}] run function vb:tick_player/custom_item/server_item/talisman_passive/inferno
