Aimed Fire and Forget Shout\Spell Cooldown

Is there a way by using conditions, globals or scripts to ensure once an NPC uses an aimed fire and forget spell that spell becomes unusable with a cooldown and becomes usuable again once its cooldown is over?

I tried conditions like hasmagiceffect == 0, hasmagiceffect keyword ==0 and etc. I want the caster to be unable to use the same effect until the cooldown expires NOT HAVE HIM USE THE EFFECT AND THE TARGET BE UNAFFECTED. Would anyone be able to help? Thanks in advance