I have been seeing people needing this lately so I made a function for it. Tell me if it works or not and feel free to edit it at will, etc. Have fun
.
SCAR Code:
function FindStairs(Direction : String) : Boolean;
//Direction: up or down
var
q : Integer;
StairLocs: TPointArray;
StairLoc : TPoint;
begin
if not LoggedIn then Exit;
MakeCompass('135');
SetAngle(True);
Direction := Lowercase(Direction);
x := MSCx;
y := MSCy - 75;
FindColorsSpiralTolerance(x, y, StairLocs, 2961456, MSX1, MSY1, MSX2, MSY2, 10);
if Length(StairLocs) = 0 then FindColorsSpiralTolerance(x, y, StairLocs, 8160390, MSX1, MSY1, MSX2, MSY2, 10);
if Length(StairLocs) = 0 then FindColorsSpiralTolerance(x, y, StairLocs, 3556689, MSX1, MSY1, MSX2, MSY2, 10);
if Length(StairLocs) = 0 then Exit;
for q:= 0 to High(StairLocs)do
begin
StairLoc := StairLocs[q];
x := StairLoc.x;
y := StairLoc.y;
MMouse (x, y, 3, 3);
if (IsUpTextMultiCustom(['tair', 'case'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
ChooseOption(Direction);
Result := True;
Exit;
end;
Wait(350+random(350));
end;
Result := False;
end;