Cazax
2008-03-08 14:15:56
AutoColorThis
A function by sumillion
A function by sumillion
{*******************************************************************************
function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2: Integer): Integer;
By: Sumilion
Description: Resturns exact color of a bmp with tol found on the screen.
*******************************************************************************}AutoColorThis is way of autocoloring. Like other autocolorers (e.g FindWaterColor), AutoColorThis use a bitmap, a tolerance and a place to search the bmp.
First of all, make bitmap of the thing you want to get the color, a small bmp could be fine. Dont use high tolerance.
Something like this:
AutoColorThis(GrassBmp, 15, MMX1, MMY1, MMX2, MMY2)You can use it for walking, e.g:
RadialWalk(AutoColorThis(GrassBmp, 15, MMX1, MMY1, MMX2, MMY2), 0, 360, 65, -1, 1)Using AutoColorThis you dont need RadialWalkEx or other tolerance walker functions.