scripting an ad capturer isn't just a line or two of code; it's a bit trickier than that. Do a google search for "mirc ad capturer" or similar; I guarantee there are standalone addons out there that handle it.

-Venoman