This is a copy (with minor changes) of my formor reply on the thread "ability cooldown"
--------------------------------------------------------------
fist you need 3 spells from the object editor:
[Learning Dummyspell] = channel with "data - options: none" and tooltip
[Passive Dummyspell] = some passive dummy spell, critical strike /w no effect etc. (this is not a hero spell!)
[Cooldown Dummyspell] = some instantcast no-target spell, beserk etc. (this is not a hero spell!)
(all 3 should have same icon and tooltip)
add in object editor [Learning Dummyspell] to the hero. when the hero learns the [Learning Dummyspell], add the [Passive dummyspell] to the hero.
when the hero activates the [Passive dummyspell], remove it, and replace it with [Cooldown Dummyspell]. Activate [Cooldown Dummyspell] via triggers, it will then cooldown. Make a timer that matches the [Cooldown Dummyspell]'s cooldown. When timer expires remove [Cooldown Dummyspell] and add [Passive dummyspell] again.
(you need to set level's of [Passive dummyspell] and [Cooldown Dummyspell] to level [Learning Dummyspell] when replacing them... also you need to make a boolean so that the ability want go off untill cooldown is done)
I'm not good at english or explaning so i posted a test map to show what i mean

"This is a copy testmap (with minor changes) of my formor reply on the thread "ability cooldown""