Oftentimes, you will already have a script lying around that you wish to convert to a plugin because you found yourself using it repeatedly in your projects. For beginner MooTools developers, it may be helpful to first get the functionality working, and then convert it to a flexible plugin, thus using the script as a pattern.
To begin, we'll focus on scripting the image caption function. This will also help you understand how the code works to make it easier to transition it into a MooTools plugin.