Tale of Hell, type in tutorial in the search bar here at sythe. And next time research before posting something. No one will just send you information that has been covered thousands of times before (And I don't think I'm exagerating. At all.) However, to point you in a general direction, try looking for a FindColor function. That should get you started.
And great job Vic! You've definetley shown that you really know what your doing and not just using other's work without understanding everything. Also, if you interested in creating bots at all I'd like to give you a library I made for C++, most of its standard stuff that I'm sure you've seen and don't particularly care about, but theres a few functions I think you may be interested in. PM me if your interested. It looks like your a much better programmer than me however.
I'll post the 5th as soon as I can, I left my laptop at my moms house so I don't know when I'll be able to get to it. The fourth level pretty much proves you have a mind though so going any farther is more just practice I guess *shrug*, hopefully you have some entertainment doing it.