@
Peanuts
As you can see here the entrance around the ladder has a unique color for the most part:
http://i.imgur.com/iSj35il.png
There are some other matching colors, but that can be fixed by Ollybest's TPA filter. What it does is it filters TPA's that have a certain number of points:
Simba Code:
procedure filterTPAsBetween(var atpa: T2DPointArray; len1, len2: integer);
var
h, l, i: integer;
c: T2DPointArray;
begin
h := high(atpa);
for i := 0 to h do
begin
l := length(atpa[i]);
if (not (inRange(l, len1, len2))) then
begin
setLength(c, length(c) + 1);
c[high(c)] := atpa[i];
end;
end;
atpa := c;
end;
Example:
Simba Code:
filterTPAsBetween(ATPA, 1, 650)
That would filter/delete TPA's that have 1-650 points in them
Here is the TPA being debugged:
http://i.imgur.com/J9SAafg.png
Now all we have to do is wait for the uptext
Here's the code let me know if you need anything to be explained
Simba Code:
{$DEFINE SMART8}
{$i srl/srl.simba}
{$i srl/srl/misc/SmartGraphics.simba}
procedure filterTPAsBetween(var atpa: T2DPointArray; len1, len2: integer);
var
h, l, i: integer;
c: T2DPointArray;
begin
h := high(atpa);
for i := 0 to h do
begin
l := length(atpa[i]);
if (not (inRange(l, len1, len2))) then
begin
setLength(c, length(c) + 1);
c[high(c)] := atpa[i];
end;
end;
atpa := c;
end;
Function FindLadder: Boolean;
var
B: TBox;
TPA,TPA2: TPointArray;
i,CTS,X,Y: Integer;
ATPA: T2DPointArray;
begin
Result := False;
if (not loggedin) then exit;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.08, 0.51);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3032670, MSX1, MSY1, MSX2, MSY2, 12);
SetColorSpeed2Modifiers(0.02, 0.02);
ColorToleranceSpeed(CTS);
if (Length(TPA) < 1) then Exit;
ATPA := TPAToATPAEx(TPA, 70, 70);
filterTPAsBetween(ATPA, 1, 650)
SortATPAFromFirstpoint(ATPA, Point(MSCX, MSCY));
smart_debugATPA(true,ATPA);
for i := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], X, Y);
MMouse(X, Y, 6, 6);
if WaitUpTextMulti(['adder','limb'], 300) then
begin
Result := True;
Exit;
end;
end;
end;
begin
SetupSRL;
FindLadder;
end.
partly ripped off of flight.