Lark has a great post on how to write a spell, you can find it by copying the link into your browser:
http://www.spellsofmagic.com/read_post.html?post=829629