timmyboy
2006-04-27 20:48:47
FindIColor finds a color in the inventory and then clicks it if the user wants it to.
FindIColorTol is the same thing except with a tolerance.
In 'color' put the color of the object, in 'click' put if you want it to click, true or false, and in 'left put if you want it to left click or right, true or false.
In 'color' put the color of the object,in 'tol' put the color tolerance, in 'click' put if you want it to click, true or false, and in 'left put if you want it to left click or right, true or false.
FindIColorTol is the same thing except with a tolerance.
In 'color' put the color of the object, in 'click' put if you want it to click, true or false, and in 'left put if you want it to left click or right, true or false.
{*******************************************************************************
function FindIColor(var x, y : Integer; color: Integer; click, left: boolean) : Boolean;
By: Timmyboy
Description: Finds a color in the inventory and then clicks it if the user wants it to.
*******************************************************************************}
function FindIColor(var x, y : Integer; color: Integer; click, left: boolean) : Boolean;
begin
if (FindColor(x, y, color, MIX1, MIY1, MIX2, MIY2)) then
begin
if ((click)=true) then
begin
wait(250+random(500));
mouse(x,y,2,2,left);
end;
Result := True;
end;
end;
In 'color' put the color of the object,in 'tol' put the color tolerance, in 'click' put if you want it to click, true or false, and in 'left put if you want it to left click or right, true or false.
{*******************************************************************************
function FindIColorTol(var x, y : Integer; color, tol: Integer; click, left: boolean) : Boolean;
By: Timmyboy
Description: Finds a color in the inventory and then clicks it if the user wants it to.
*******************************************************************************}
function FindIColorTol(var x, y : Integer; color, tol : Integer; click, left: boolean) : Boolean;
begin
if (FindColorTolerance(x, y, color, MIX1, MIY1, MIX2, MIY2, tol)) then
begin
if ((click)=true) then
begin
wait(250+random(500));
mouse(x,y,2,2,left);
end;
Result := True;
end;
end;