From: Ashaman88
Unless you are talking about minimap.findsymbol? If so, yeah the symbols in the include haven't been updated with the new symbols yet
Exactly. Sorry for the confusion. I need to learn how to create bmp strings for SCAR.
For now I do the following code, when finishing a SPS path.
// returns true if bank was opened and verified with bankscreen.isOpen()
// returns false after timeout -- Bank can be either opened or closed because
// bankscreen.isOpen() does not always work.
// Make sure to try to catch the likely event that this function returns false.
// As of March 15, 2014, this function has never failed to open the bankbooth but
// it is possible.
function tryToOpenBank() : boolean;
var
x, y, i, t: integer;
tb: TBox;
tp: TPoint;
tpa: TPointArray;
atpa: T2DPointArray;
// Opens West Varrock Bank by searching first for the red velvet ropes
// then by the darker wood trim, and finally the lighter wood inserts.
begin
result := false;
// This function should be fast. With a time of 5 seconds this function will
// click around three times. Otherwise if we can't find the bank booth, the
// calling function should reposition us and recall this function.
t := getSystemTime() + RandomRange(4000, 6000);
repeat
// Search the whole screen for the red velvet rope
if findColorsSpiralTolerance(0, 0, tpa, 1121451, mainScreen.getBounds(), 8, colorSetting(2, 0.02, 0.90)) then
if (Length(tpa) < 1) then begin
exit(false);
end;
atpa := tpa.toATPA(16, 16);
SetLength(tpa, 0);
// Sort the array from player
atpa.sortFromMidPoint(mainscreen.playerPoint);
for i := 0 to High(atpa) do
begin
tp := middleTPA(atpa[i]);
tb.setBounds(tp.x - 16, tp.y - 16, tp.x + 16, tp.y + 16);
writeln('-- Bank Booth Colour Pick 1: ', tp.x, ', ', tp.y);
// Dark brown wood of bank booth
if (findColorSpiralTolerance(x, y, 1723246, tb, 8, colorSetting(2, 0.14, 0.76))) then
begin
writeln('-- Bank Booth Colour Pick 2: ', x, ', ', y);
tb.setBounds(x - 16, y - 16, x + 16, y + 16);
// Light brown wood of bank booth
if (findColorSpiralTolerance(x, y, 2579060, tb, 8, colorSetting(2, 0.16, 0.66))) then
begin
writeln('-- Bank Booth Colour Pick 3: ', x, ', ', y);
// This randomness can lead to a failure to bank...
Mouse(point(x, y).rand(4), MOUSE_MOVE, MOUSE_HUMAN);
if isMouseOverText(['ank'], 200) then
begin
GetMousePos(x, y);
wait(randomRange(100, 500));
Mouse(point(x, y).rand(1), MOUSE_LEFT, MOUSE_HUMAN);
result := bankscreen.isOpen(2000);
exit(result);
end;
end;
end;
end;
until (result or getSystemTime() > t);
exit(false);
end;
Ugly, heh?