SRL Archive - OSR Help

Minimap Symbol detection


Syntax

2013-03-17 19:03:05


There is what my Minimap looks like, here is my code for finding a Minigame symbol outside of the fightcave :
Function Symbol : Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
x,y : Integer;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 2.01);
if FindColorsSpiralTolerance(x, y, TPA, 2431709, MMX1,MMY1,MMX2,MMY2, 10) then
Writeln('Found Symbol');
result := true;
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 40, 20);
If Length(tpa) = 0 then exit;
For I := 0 to high(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
wait(20+random(10));
If I > 10 then break;
P07_MakeCameraAngleHigh;
P07_MakeCompassSouth;
end;
end;

My writeln is showing in the debug window whilst in the fight cave that is has found the symbol, which is false. Could anyone point me in the direct where I have gone wrong?

Thank you.

rj

2013-03-17 19:04:51

Are you trying to count the yellow NPC dots?

Syntax

2013-03-17 20:47:50

[INDENT]n[/INDENT]
From: RJJ95
Are you trying to count the yellow NPC dots?


Nope, outside the gave it is to detect the mini game symbol. Inside the cave it says it detects the symbol, but as shown in the image there is no red in the minimap.