SRL Archive - OSR Help

Need help with tpa


Drax

2012-01-30 00:25:51

Ok i can not get this to find a yew tree.
What am i doing wrong?

function FindYew(var x, y: Integer) :Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
Antirandoms;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.043);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MIX1, MIY1, MIX2, MIY2,6);
aTPA := TPAToATPAEx(TPA, 20, 20);

For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
If(IsUpTextMultiCustom(['ew','hop','own'])) then
begin
Writeln('Found Yew Tree');
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;

kitchenrange

2012-01-30 00:32:38

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MIX1, MIY1, MIX2, MIY2,6);

This line makes your function look in the inventory instead of the main screen.

RISK

2012-01-30 00:33:10

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MIX1, MIY1, MIX2, MIY2,6);

To:

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MSX1, MSY1, MSX2, MSY2,6);

You were having it search the inventory rather than the main screen.


E: Kitchenrange. D:

Drax

2012-01-30 00:39:57

From: RISK
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MIX1, MIY1, MIX2, MIY2,6);

To:

FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MSX1, MSY1, MSX2, MSY2,6);

You were having it search the inventory rather than the main screen.


E: Kitchenrange. D:


WOW im dumb haha thanks:P