Rune Hacker
2007-05-01 02:04:29
Well, this is my first attempt at making an SRL function. Im not sure if it works, but what it should do is make a box around a color (you set the box size with p1, p2) and it will wait for the color to dissapear. If this works, it will change woodcutting forever i believe because it will know exactly when the tree has been cut down. It also includes a tolerance and an uptext. Tell me wat you think.
Ide love some feedback if it doesn't work, what i might have done wrong, what can be improved, and whatever. This is my first attempt so don't flame me if I did it all wrong rofl :p
Ide love some feedback if it doesn't work, what i might have done wrong, what can be improved, and whatever. This is my first attempt so don't flame me if I did it all wrong rofl :p
{*******************************************************************************
function MouseAreaBox(var x, y: Integer; Text: string; p1, p2, Color, Tolerance: Integer): Boolean;
By: Rune Hacker
Description: Will find a color and creates a __x__ pixel box(p1xp2) around your mouse
and click. Then it will wait until the color is gone.
*******************************************************************************}
function MouseAreaBox(var x, y: Integer; Text: string; p1, p2, Color, Tolerance: Integer): Boolean;
var
xx1, yy1, xx2, yy2: Integer;
begin
if(FindColorSpiralTolerance(x, y, Color, MSX1, MSY1, MSX2, MSY2, Tolerance))then
begin
MMouse(x, y, 0, 0)
Wait(50 + Random(25));
if (IsUpText(Text)) then
begin
Mouse(x, y, 0, 0, True);
Flag;
if(FindColorSpiralTolerance(x, y, Color, 3, 3, 515, 338, Tolerance))then
begin
MMouse(x, y, 0, 0)
getmousepos(x, y);
xx1 := x-(p1/2)+(p2/2);
yy1 := y-(p1/2)+(p2/2);
xx2 := x+(p1/2)-(p2/2);
yy2 := y+(p1/2)-(p2/2);
repeat
Wait(100+random(50));
until not FindColorSpiralTolerance(x, y, Color, xx1, yy1, xx2, yy2, Tolerance);
end;
if not FindColorSpiralTolerance(x, y, Color, xx1, yy1, xx2, yy2, Tolerance)then
begin
Exit;
end;
end;
end;
end;