I don't know of a tutorial, but if you dissect any current Dock icons you have you can see how they are constructed.
To dissect the an icon go to: Library>Application Support>Adium>Dock Icons.
Select an icon and right click and show package contents. This will show all the icons for the different availability statuses. You'll also notice a .plist file, open this and it will show you the programming of when to show what .PNG icon file.
Do you see what I mean? Any more questions then let me know.