Spell Script exemple..

Can someone please write a spell script example in C++?

I want to make it give a message to the caster when:

  1. Just started to cast the spell
  2. When spell cast successful
  3. When spell interrupt or fail cast
    I know there is an example for a custom spell script in the core but If someone can write the stuff from above I will be thankful