SRL Archive - OSR Help

Accurate find/click help needed please.


Grimtoker

2011-12-21 15:21:36

I'm looking for help relating to a FindObject issue, the current method I'm using at the moment is working, however it is not 100% accurate and sometimes may fail to find/click the object.

It needs to click a very small area, very accurately. It's a rope in the Gnome Agility Course. I'm wondering if there is a better way to find/click it, maybe through DTM's or something?? I don't know, excuse me, i'm still learning. Any help here would be greatly appreciated and help me learn more :)

Below is a picture of the rope I need to click and also the code I'm using for the procedure.




Procedure Rope;
Var
x, y, LoopBegin:Integer;
ClickRed : Boolean;
Begin
MarkTime(LoopBegin);
Repeat
FindObjEx(x, y, ['alancing', 'ope'], [5140363, 5931426, 4547452], 5, 40, 427, 163, 445, 191)
GetMousePos(x, y);
MMouse(x, y, 1, 1);
until IsUpText('ope')
begin
repeat
IsUpText('ope');
Mouse(x, y, 1, 1, False);
WaitOption('ope', 1000);
ClickRed := DidRedClick;
Wait(1000+Random(100));
until ((TimeFromMark(LoopBegin) > 20000) or ClickRed);
End;
End;

RISK

2011-12-21 15:24:39

TPAs. :) Check out Coh3n's guide for a general tutorial on them. It's in the advanced segment of it.

http://villavu.com/forum/showthread.php?t=49089

YoHoJo

2011-12-21 15:26:25

Learn to use this
http://villavu.com/forum/showthread.php?t=26944&highlight=autocoloraid
Give me your user/pass (if you wish) and I can make it for you just like I did for this guy:
http://villavu.com/forum/showthread.php?t=69640

I'm going to be busy for a while though, so we can talk/you can PM me it later if you feel comfortable doing so.

But yeah, just learn to use AutoColorAid!

PatDuffy

2011-12-21 15:26:59

From: RISK
TPAs. :) Check out Coh3n's guide for a general tutorial on them. It's in the advanced segment of it.

http://villavu.com/forum/showthread.php?t=49089


Yeap. TPA's would definitely solve that problem, as they can be VERY accurate done correctly.

Brandon

2011-12-21 15:27:41

Just copy pasted it from my reflection trip wire finding for Grenwalls.. Always found the trip wire in that elf forest..


program new;
{.include SRL\SRL.scar}

var
x, y: Integer;

function FindObjArea(var x, y: Integer; text: string; col, tol: Integer; center: Boolean): Boolean;
var
TPA: TPointArray;
i: Integer;
begin
if (center) then
begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, col, MSX1, MSY1, MSX2, MSY2, tol);
end else
begin
FindColorsTolerance(TPA, col, MSX1, MSY1, MSX2, MSY2, tol);
end;
if (GetArrayLength(TPA) <> 0) then
begin
repeat
MMouse(TPA[i].x, TPA[i].y, 0, 0);
Wait(200 + Random(100));
if(IsUpText(text)) then
begin
Result := True;
x := TPA[i].x;
y := TPA[i].y;
end else
begin
Inc(i);
end;
until (i = GetArrayLength(TPA)) or Result;
end;
end;

begin
Repeat
FindObjArea(x, y, 'Cross', 4229264, 3, True);
ClickMouse(x,y, 1);
Until(false);
end.

Grimtoker

2011-12-21 16:10:02

Thank you all for the suggestions, I'm going to look into TPA's and ACA as suggested. Will let you know how it goes :)

ggzz, Thanks a lot for the example you posted above. I will play with it and see if it can be used.

:)