All pastes #362631 Raw Edit

Mine

public text v1 · immutable
·published 2007-02-18 23:25 UTC
rendered paste body
RGB PickHeadColor = new RGB(0,0,0); //This would be a red, green, blue color
int Tolerance = 5; //This would set the tolerance to finding the color
//Areas.minimap would be a rectangle
XY PickHead = findXY(getColorArray2d(), PickHeadColor, Areas.MINI_MAP,Tolerance,Tolerance,Tolerance);
//We set the pickhead to return the x and y coordinate of the color

if (PickHead != null)//if found
{
mouseClickLeft(PickHead); //or mouseClickLeft(Pickhead.x, PickHead.y);
}
//summary
//It will find the color, in an area, with a tolerance. in our usage if finds the pickhead color in our mini map, with a tolerance //of 5. It then looks if it found it, if it found the color it clicks on it.