SRL Archive - Help and Support

Ent Detection Help


3Garrett3

2007-06-22 15:37:58

Ok, i made a crappy, untested ent checker, that just looks for the yellow text in the top corner. I need to know how to make it go to the next tree though instead of waiting. Here is my chopping procedure:

function ClickTree: Boolean;
begin
Result := True;
i := Random(3);
case i of
0: begin
i := FindClosestObject(5552);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(5551);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(1308);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
Result := False;
end;
end;
end;
end;
1: begin
i := FindClosestObject(5551);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(1308);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(5552);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
Result := False;
end;
end;
end;
end;
2: begin
i := FindClosestObject(1308);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(5552);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
i := FindClosestObject(5551);
MSCoordsofUID(i, 50, x, y);
if x > 0 then
begin
Mouse(x, y, 2, 2, True);
end else
begin
Result := False;
end;
end;
end;
end;
end;
end;

It looks for three trees. I need a way to make it skip to the next tree without redoing the entire procedure. Could somebody help me out here? It uses KYAB, so i couldnt post it in the free members thing.

EDIT: maybe this shouldnt be here, i just read the thing in the public forum, and nobody really wants KYAB stuff here anymore.

NinjaTerrorist

2007-06-22 16:22:21

You could use FindColorSkipBox.

3Garrett3

2007-06-22 16:45:11

i know how to find the ent, i need to make it skip to the next tree though.

The Claw

2007-06-22 20:31:13

if FindEnt then Break;

would that work?

Bobarkinator

2007-06-22 22:49:06

Post this on the other forums.

SRL way. Just keep updating coords looking for yellow uptext and you will be fine ;)

3Garrett3

2007-06-23 10:34:33

just made my chopping things into different procedures, it should work. Thanks for the help though.