Wanted
2009-12-14 00:59:30
Ok so I spent a long time and I decided that there is no need for anything that detects angle height because you can guess as many times as you want and you only have to get it right once, so sorting out the unique color will almost always get you out on the first try, if not it's a 25% guess, and it will reset the levers with a good chance of a unique color being found the 2nd go around and increasingly as you reach the max of 5 trys (no reason to be 5, thats just what it was in the old solver) I did however spend a long time *trying* to make something that would detect the unique one even if all the colors were the same based on heights of each one using deformed bitmaps, that one and the solver can be found below:
Again, although this solver doesn't have angle detection, it will still work very well and usually on the very first try.
New Abyssal.scar
With explanation:
Attempt at finding unique by angles:
I also attached a file with the raw large images of each lever, as well as the super small pieces I used to find the "Up" ones..
Again, although this solver doesn't have angle detection, it will still work very well and usually on the very first try.
New Abyssal.scar
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » Abyss Solver Routines --//
//-----------------------------------------------------------------//
// * function InAbyss: Boolean; // * by Nava2
// * procedure Abyss_WalkToCenter; // * by IceFire908
// * function Abyss_OddManOut(var P: TPoint): string; // * by IceFire908
// * procedure Abyss_ClickLever; // * by IceFire908
// * function SolveAbyss: Boolean; // * by IceFire908 & Nava2
{*******************************************************************************
function InAbyss: Boolean;
By: Nava2
Description: Searches the Minimap for a black count. If in range, we are in the
abyss.
*******************************************************************************}
function InAbyss: Boolean;
var
Pts: TPointArray;
cts: Integer;
begin
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(Pts, 0, MMX1, MMY1, MMX2, MMY2, 20);
FilterPointsPie(Pts, 0, 360, 50, 76, MMCX, MMCY);
Result := InRange(Length(Pts), 10480, 10520);
ColorToleranceSpeed(cts);
//Writeln('InAbyss returned ' + IntToStr(Length(Pts)) + '.');
end;
{*******************************************************************************
procedure Abyss_WalkToCenter;
By: IceFire908
Description: Walks to center and aligns everything high angle and compass 45deg
*******************************************************************************}
procedure Abyss_WalkToCenter;
var
TPA: TPointArray;
WTC: TPoint;
begin
MakeCompass(45);
SetAngle(True);
FindColorsTolerance(TPA, clWhite, MMX1, MMY1, MMX2, MMY2, 421);
FilterPointsPie(TPA, 0, 360, 0, 75, MMCX, MMCY);
WTC := MiddleTPA(TPA);
if (Distance(MMCX, MMCY, WTC.X + 2, WTC.Y - 3) > 4) then
begin
Mouse(WTC.X + 2, WTC.Y - 3, 0, 0, True);
Flag;
end;
Wait(1000 + Random(500));
end;
{*******************************************************************************
function Abyss_OddManOut(var P: TPoint): string;
By: IceFire908
Description: Sorts through colors of each lever, finds the odd one.
*******************************************************************************}
function Abyss_OddManOut(var P: TPoint): string;
var
TPA: array [0..3] of array [0..2] of TPointArray;
LvCounts: array [0..3] of Integer;
LeverType: array [0..3] of string;
LPos: array [0..3] of TPoint;
Levers: TVariantArray;
Locs: TStringArray;
Sec: TPointArray;
I, II: Byte;
TC: LongInt;
B: TBox;
begin //NW (N) NE (E) SE (S) SW (W)
Sec := [Point(149, 73), Point(354, 66), Point(375, 268), Point(137, 279)];
Levers := ['Eye', 0.01, 0.71, 5423630, 17, 'Gray', 0.04, 0.48, 8819879, 19, 'Pink', 0.10, 0.08, 5394279, 10, 'Arm'];
Locs := ['North', 'East', 'South', 'West'];
ColorToleranceSpeed(2);
for I := 0 to 3 do
begin
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
for II := 0 to 2 do
begin
SetColorSpeed2Modifiers(Levers[1 + (II * 5)], Levers[2 + (II * 5)])
FindColorsTolerance(TPA[I][II], Levers[3 + (II * 5)], B.X1, B.Y1, B.X2, B.Y2, Levers[4 + (II * 5)]);
if (Length(TPA[I][II]) > 0) then
begin
LPos[I] := MiddleTPA(TPA[I][II]);
LeverType[I] := Levers[II * 5];
Wait(100);
Break;
end;
Wait(100);
end;
end;
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
for I := 0 to 3 do
begin
if (LeverType[I] = '') then
LeverType[I] := 'Arm';
WriteLn(LeverType[I] + ' found in ' + Locs[I] + '.');
end;
for I := 0 to 3 do
for II := 0 to 3 do
begin
if (II < 3) then
if (Length(TPA[I][II]) > 0) then
Inc(LvCounts[II]);
if (II = 3) then
if (LeverType[I] = 'Arm') then
Inc(LvCounts[3]);
end;
if (LvCounts[3] = 2) then
begin
LvCounts[3] := 0;
LvCounts[2] := 3;
end;
for I := 0 to 3 do
WriteLn(Levers[I * 5] + ' count: ' + IntToStr(LvCounts[I]));
for I := 0 to 3 do
if (LvCounts[I] = 1) then
begin
InStrArrEx(Levers[I * 5], LeverType, TC);
WriteLn('Found unique! ' + Levers[I * 5] + ' in ' + Locs[TC] + '.');
if (not (PointInBox(LPos[TC], IntToBox(MSX1, MSY1, MSX2, MSY2)))) then
LPos[TC] := Sec[TC]
else
P := LPos[TC];
Result := Locs[TC];
Exit;
end;
WriteLn('No uniques found!');
end;
{*******************************************************************************
procedure Abyss_ClickLever;
By: IceFire908
Description: Clicks lever, if it didn't find a unique it guesses.
*******************************************************************************}
procedure Abyss_ClickLever;
var
Locs: TStringArray;
Sec: TPointArray;
LLoc: string;
I: LongInt;
P: TPoint;
B: TBox;
begin
Locs := ['North', 'East', 'South', 'West'];
Sec := [Point(149, 73), Point(354, 66), Point(375, 268), Point(137, 279)];
LLoc := Abyss_OddManOut(P);
if (LLoc <> '') then
begin
MMouse(P.X, P.Y, 0, 0);
Wait(200 + Random(250));
if (CountColorTolerance(14342657, 7, 7, 100, 25, 70) > 50) then
Mouse(P.X, P.Y, 0, 0, True)
else
begin
InStrArrEx(LLoc, Locs, I);
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
if (SpiralMouse(P.X, P.Y, B.X1, B.Y1, B.X2, B.Y2, 'ppend', 30, 8)) then
Mouse(P.X, P.Y, 0, 0, True);
end;
Exit;
end;
I := Random(4);
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
WriteLn('Guessing...');
if (SpiralMouse(P.X, P.Y, B.X1, B.Y1, B.X2, B.Y2, 'ppend', 30, 8)) then
Mouse(P.X, P.Y, 0, 0, True);
end;
{*******************************************************************************
function SolveAbyss: Boolean;
By: IceFire908 & Nava2
Description: Solves the Abyss Random.
*******************************************************************************}
function SolveAbyss: Boolean;
var
T, Trys: LongInt;
begin
T := GetSystemTime;
if (not (InAbyss)) then
Exit;
while ((InAbyss) and (LoggedIn) and (Trys < 6)) do
begin
if (Trys > 0) then
srl_Warn('SolveAbyss', 'Failed finding right answer. Retrying, attempt #' + IntToStr(Trys) + '.', warn_AllVersions);
Abyss_WalkToCenter;
Abyss_ClickLever;
FFlag(0);
Wait(RandomRange(4000, 5000));
Inc(Trys);
end;
Result := ((not (InAbyss)) and (LoggedIn));
if (not (Result)) then
begin
LogOut;
Exit;
end;
srl_Warn('SolveAbyss', 'Took ' + IntToStr(GetTimeRunning - T) + ' ms.', warn_Debug);
end;With explanation:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- » Abyss Solver Routines --//
//-----------------------------------------------------------------//
// * function InAbyss: Boolean; // * by Nava2
// * procedure Abyss_WalkToCenter; // * by IceFire908
// * function Abyss_OddManOut(var P: TPoint): string; // * by IceFire908
// * procedure Abyss_ClickLever; // * by IceFire908
// * function SolveAbyss: Boolean; // * by IceFire908 & Nava2
{*******************************************************************************
function InAbyss: Boolean;
By: Nava2
Description: Searches the Minimap for a black count. If in range, we are in the
abyss.
*******************************************************************************}
function InAbyss: Boolean;
var
Pts: TPointArray;
cts: Integer;
begin
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsTolerance(Pts, 0, MMX1, MMY1, MMX2, MMY2, 20);
FilterPointsPie(Pts, 0, 360, 50, 76, MMCX, MMCY);
Result := InRange(Length(Pts), 10480, 10520);
ColorToleranceSpeed(cts);
//Writeln('InAbyss returned ' + IntToStr(Length(Pts)) + '.');
end;
{*******************************************************************************
procedure Abyss_WalkToCenter;
By: IceFire908
Description: Walks to center and aligns everything high angle and compass 45deg
*******************************************************************************}
procedure Abyss_WalkToCenter;
var
TPA: TPointArray;
WTC: TPoint;
begin
MakeCompass(45);//Align Northeast to North
SetAngle(True); //High angle
FindColorsTolerance(TPA, clWhite, MMX1, MMY1, MMX2, MMY2, 421); //All but black
FilterPointsPie(TPA, 0, 360, 0, 75, MMCX, MMCY); //On Minimap
WTC := MiddleTPA(TPA);
if (Distance(MMCX, MMCY, WTC.X + 2, WTC.Y - 3) > 4) then //Not standing in
begin
Mouse(WTC.X + 2, WTC.Y - 3, 0, 0, True); //Walk to
Flag;
end;
Wait(1000 + Random(500)); //Wait a second
end;
{*******************************************************************************
function Abyss_OddManOut(var P: TPoint): string;
By: IceFire908
Description: Sorts through colors of each lever, finds the odd one.
*******************************************************************************}
function Abyss_OddManOut(var P: TPoint): string; //Results North south east west or ''
var // each direction each color except none "arm"
TPA: array [0..3] of array [0..2] of TPointArray;
LvCounts: array [0..3] of Integer; //Eye0 Gray1 Pink2 Arm3 amounts
LeverType: array [0..3] of string; //Levertypes for N[0]-E[1]-S[2]-W[3] North south e...we.. ect.
LPos: array [0..3] of TPoint; //The position of each lever for NSEW
Levers: TVariantArray; //Name, Hue, Sat, Col, LumTol, speed2
Locs: TStringArray; //Gives each direction an index
Sec: TPointArray; //Estimated center point of each direction, take or give max 45pixels each way
I, II: Byte; //Used for small loops/indexs
TC: LongInt; //Used for InStrArrEx which doesn't accept bytes
B: TBox; //Box to search in for each direction, reset each loop by Loccenter + or -45
begin //NW (N) NE (E) SE (S) SW (W)
Sec := [Point(149, 73), Point(354, 66), Point(375, 268), Point(137, 279)];
Levers := ['Eye', 0.01, 0.71, 5423630, 17, 'Gray', 0.04, 0.48, 8819879, 19, 'Pink', 0.10, 0.08, 5394279, 10, 'Arm'];
Locs := ['North', 'East', 'South', 'West'];
ColorToleranceSpeed(2);
for I := 0 to 3 do
begin
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
for II := 0 to 2 do
begin
SetColorSpeed2Modifiers(Levers[1 + (II * 5)], Levers[2 + (II * 5)])
FindColorsTolerance(TPA[I][II], Levers[3 + (II * 5)], B.X1, B.Y1, B.X2, B.Y2, Levers[4 + (II * 5)]);
if (Length(TPA[I][II]) > 0) then
begin
LPos[I] := MiddleTPA(TPA[I][II]); //Center of colors matched
LeverType[I] := Levers[II * 5]; //Get name and set to direction index
Wait(100); //avoid loop lag
Break; //found color, no need to search for other parts
end;
Wait(100); //avoid loop lag
end;
end;
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
for I := 0 to 3 do
begin
if (LeverType[I] = '') then //Arm had no color, so by process of elimination its plain arm
LeverType[I] := 'Arm';
WriteLn(LeverType[I] + ' found in ' + Locs[I] + '.'); //i.e. Eyeball found in north does all 4 locs
end;
for I := 0 to 3 do
for II := 0 to 3 do
begin
if (II < 3) then //Since arm doesn't have a TPA which is index 3
if (Length(TPA[I][II]) > 0) then //checks TPA length and increases the index for lvr counts
Inc(LvCounts[II]); //+1
if (II = 3) then //Arm
if (LeverType[I] = 'Arm') then
Inc(LvCounts[3]); //Add to arm count
end;
if (LvCounts[3] = 2) then //Pink isn't always visible so if two arms indx(3) then set 3 pinks
begin
LvCounts[3] := 0; //no normal arms
LvCounts[2] := 3; //3 pink ones
end;
for I := 0 to 3 do
WriteLn(Levers[I * 5] + ' count: ' + IntToStr(LvCounts[I])); //writeln all lver counts i.e. Eyeball : 3
for I := 0 to 3 do
if (LvCounts[I] = 1) then //if there is just 1 count of one then do the following
begin
InStrArrEx(Levers[I * 5], LeverType, TC); //Match Index with lever name
WriteLn('Found unique! ' + Levers[I * 5] + ' in ' + Locs[TC] + '.'); //Output unique with location
if (not (PointInBox(LPos[TC], IntToBox(MSX1, MSY1, MSX2, MSY2)))) then //check if NOT on MS
LPos[TC] := Sec[TC] //Out put estimated fixed middle of that loc
else
P := LPos[TC]; //Out put middle of TPA from big loop with findcolors for that loc
Result := Locs[TC]; //result = location
Exit; //leave function
end;
WriteLn('No uniques found!'); //all were the same result = ''
end;
{*******************************************************************************
procedure Abyss_ClickLever;
By: IceFire908
Description: Clicks lever, if it didn't find a unique it guesses.
*******************************************************************************}
procedure Abyss_ClickLever;
var
Locs: TStringArray;
Sec: TPointArray;
LLoc: string;
I: LongInt;
P: TPoint;
B: TBox;
begin
Locs := ['North', 'East', 'South', 'West']; //Loc index
Sec := [Point(149, 73), Point(354, 66), Point(375, 268), Point(137, 279)]; // Loc middle index
LLoc := Abyss_OddManOut(P); //LLoc = unique lever location
if (LLoc <> '') then //if oddmanout found a unique then..
begin
MMouse(P.X, P.Y, 0, 0); //hover mouse
Wait(200 + Random(250)); //uptime
if (CountColorTolerance(14342657, 7, 7, 100, 25, 70) > 50) then //check blue text
Mouse(P.X, P.Y, 0, 0, True) //select
else
begin
InStrArrEx(LLoc, Locs, I); //Match up indexes
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45); //set box
if (SpiralMouse(P.X, P.Y, B.X1, B.Y1, B.X2, B.Y2, 'ppend', 30, 8)) then //hover mouse around til text
Mouse(P.X, P.Y, 0, 0, True); //selected in the section
end;
Exit;
end;
I := Random(4); //random location
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45); //random box
WriteLn('Guessing...');
if (SpiralMouse(P.X, P.Y, B.X1, B.Y1, B.X2, B.Y2, 'ppend', 30, 8)) then
Mouse(P.X, P.Y, 0, 0, True); //select random
end;
{*******************************************************************************
function SolveAbyss: Boolean;
By: IceFire908 & Nava2
Description: Solves the Abyss Random.
*******************************************************************************}
function SolveAbyss: Boolean;
var
T, Trys: LongInt;
begin
T := GetSystemTime; //total function time
if (not (InAbyss)) then
Exit;
while ((InAbyss) and (LoggedIn) and (Trys < 6)) do //stops after 5 trys, logged out, or out of random
begin
if (Trys > 0) then //guessed
srl_Warn('SolveAbyss', 'Failed finding right answer. Retrying, attempt #' + IntToStr(Trys) + '.', warn_AllVersions);
Abyss_WalkToCenter; //align/realign
Abyss_ClickLever; //select lever, if not found then guess
FFlag(0); //wait till at lever
Wait(RandomRange(4000, 5000)); //wait for response
Inc(Trys); //Trys +1
end;
Result := ((not (InAbyss)) and (LoggedIn)); //Logged in and not in random
if (not (Result)) then //Still in random or logged out
begin
LogOut; //GTFO!
Exit;
end;
srl_Warn('SolveAbyss', 'Took ' + IntToStr(GetTimeRunning - T) + ' ms.', warn_Debug); //Debug total time
end;Attempt at finding unique by angles:
I also attached a file with the raw large images of each lever, as well as the super small pieces I used to find the "Up" ones..
function Abyss_OddManOut(var P: TPoint): string;
var
TPA: array [0..3] of array [0..2] of TPointArray;
LvCounts: array [0..3] of Integer;
LeverType: array [0..3] of string;
Bitmaps: array [0..3] of LongInt;
UpC: array [0..1] of Integer;
LPos: array [0..3] of TPoint;
Locs, LHeights: TStringArray;
Up: array [0..3] of string;
Levers: TVariantArray;
Sec: TPointArray;
TC, Tol: LongInt;
Acc: Extended;
I, II: Byte;
B: TBox;
begin //NW (N) NE (E) SE (S) SW (W)
Sec := [Point(149, 73), Point(354, 66), Point(375, 268), Point(137, 279)];
Levers := ['Eye', 0.01, 0.71, 5423630, 17, 'Gray', 0.04, 0.48, 8819879, 19, 'Pink', 0.10, 0.08, 5394279, 10, 'Arm'];
Locs := ['North', 'East', 'South', 'West'];
LHeights := ['Up', 'Down'];
ColorToleranceSpeed(2);
for I := 0 to 3 do
begin
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
for II := 0 to 2 do
begin
SetColorSpeed2Modifiers(Levers[1 + (II * 5)], Levers[2 + (II * 5)])
FindColorsTolerance(TPA[I][II], Levers[3 + (II * 5)], B.X1, B.Y1, B.X2, B.Y2, Levers[4 + (II * 5)]);
if (Length(TPA[I][II]) > 0) then
begin
LPos[I] := MiddleTPA(TPA[I][II]);
LeverType[I] := Levers[II * 5];
Wait(100);
Break;
end;
Wait(100);
end;
end;
SetColorSpeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(1);
for I := 0 to 3 do
begin
if (LeverType[I] = '') then
LeverType[I] := 'Arm';
WriteLn(LeverType[I] + ' found in ' + Locs[I] + '.');
end;
for I := 0 to 3 do
for II := 0 to 3 do
begin
if (II < 3) then
if (Length(TPA[I][II]) > 0) then
Inc(LvCounts[II]);
if (II = 3) then
if (LeverType[I] = 'Arm') then
Inc(LvCounts[3]);
end;
if (LvCounts[3] = 2) then
begin
LvCounts[3] := 0;
LvCounts[2] := 3;
end;
for I := 0 to 3 do
WriteLn(Levers[I * 5] + ' count: ' + IntToStr(LvCounts[I]));
for I := 0 to 3 do
if (LvCounts[I] = 1) then
begin
InStrArrEx(Levers[I * 5], LeverType, TC);
WriteLn('Found unique! ' + Levers[I * 5] + ' in ' + Locs[TC] + '.');
if (not (PointInBox(LPos[TC], IntToBox(MSX1, MSY1, MSX2, MSY2)))) then
LPos[TC] := Sec[TC]
else
P := LPos[TC];
MMouse(LPos[TC].X, LPos[TC].Y, 0, 0);
Result := Locs[TC];
Exit;
end;
WriteLn('No uniques found! Searching by angles...');
for I := 0 to 3 do
if (LvCounts[I] > 3) then
begin
case I of
0: begin
Bitmaps[0] := BitmapFromString(6, 2, 'beNrjz3KTFLuwa8uHGxeUPxYBkdKb/AAZSaDI51uXVH6XA5EqAFCKEwE=');
Bitmaps[1] := BitmapFromString(2, 4, 'beNr7WzGruw2ILu7ZemX/DtW/FSo/y9T4c1QBumANTA==');
Bitmaps[2] := BitmapFromString(2, 5, 'beNq7dl6Sy1N6V4TM4RggUnyaA0QvL54CovfXzr8HANyGESQ=');
Bitmaps[3] := BitmapFromString(2, 5, 'beNq7d032VDwQKdzPBCKltwVA9ObKmffXzn+/d+07AACpEtE=');
Tol := 275;
end;
1: begin
Bitmaps[0] := BitmapFromString(7, 2, 'beNqb2mPDwxGmqQZBq+ZOBqKpXY2eUmLR2hpAFKKhumHxjBWzJy4EAC/FD4s=');
Bitmaps[1] := BitmapFromString(4, 2, 'beNoz0N20ZNbqeVP2b1gaq6MZoqG6cGrPrjUL0wCR6wvB');
Bitmaps[2] := BitmapFromString(2, 5, 'beNrTUu9rrq7Iy1i7YNr+DUvXL5wera1xeMvKRD3tSC31SADfNQ2V');
Bitmaps[3] := BitmapFromString(2, 6, 'beNrT0144tWfxtN6lM/q8VRSD1FVm9rasXzgdiGJ1NIEoUU87EQAmVw7R');
Tol := 17;
end;
2: begin
Bitmaps[0] := BitmapFromString(6, 2, 'beNpLzfSVlvCWEgciN0X5ksjY2sRUoAgQhWmqAVFZdHwzAKGZCTc=');
Bitmaps[1] := BitmapFromString(5, 2, 'beNqTkaxPSiuJjI3V0QxSV/GVlnDk5YRwo7U1AgB8XQen');
Bitmaps[2] := BitmapFromString(2, 4, 'beNozMbTk4Yh284zW1gCiRD3tLCP9ZH2dPABBwwWq');
Bitmaps[3] := BitmapFromString(2, 5, 'beNozM0r09gtzdgtSV4n18A7TVEsz0M0zMcwxNigxNy4CAHzJCCk=');
Tol := 75;
end;
3: begin
Bitmaps[0] := BitmapFromString(5, 2, 'beNpTV4nUUo/W1gCSQOStohimqQZEsTqaQBQEAGMwBog=');
Bitmaps[1] := BitmapFromString(5, 2, 'beNrT1UrU047X1cKOAGzJByE=');
Bitmaps[2] := BitmapFromString(2, 6, 'beNrT1QpQU/6vpPBfWwOIkvV1YnU0E/W0gSheVwuIgNx4AMnpCjc=');
Bitmaps[3] := BitmapFromString(5, 2, 'beNrT1XJTlIegaG0NOIrX1QIhAFz6Bm0=');
Tol := 17;
end;
end;
end;
for I := 0 to 3 do
begin
B := IntToBox(Sec[I].X - 45, Sec[I].Y - 45, Sec[I].X + 45, Sec[I].Y + 45);
if (FindDeformedBitmapToleranceIn(Bitmaps[I], LPos[I].X, LPos[I].Y, B.X1, B.Y1, B.X2, B.Y2, Tol, 0, True, Acc)) then
Up[I] := 'Up'
else
Up[I] := 'Down';
if (Up[I] = 'Up') then
Inc(UpC[0])
else
Inc(UpC[1]);
Wait(100);
end;
for I := 0 to 3 do
WriteLn(Locs[I] + ' is ' + LowerCase(Up[I]) + '.');
for I := 0 to 1 do
WriteLn(LHeights[I] + ' levers : ' + IntToStr(UpC[I]));
for I := 0 to 1 do
begin
if (UpC[I] = 1) then
begin
InStrArrEx(LHeights[I], Up, TC);
WriteLn('Found unique ' + LowerCase(LHeights[I]) + ' lever in ' + Locs[TC] + '!');
if (not (PointInBox(LPos[TC], IntToBox(MSX1, MSY1, MSX2, MSY2)))) then
LPos[TC] := Sec[TC]
else
P := LPos[TC];
MMouse(LPos[TC].X, LPos[TC].Y, 0, 0);
Result := Locs[TC];
end;
end;
for I := 0 to 3 do
FreeBitmap(Bitmaps[I]);
end;
{ NorthEye := BitmapFromString(6, 2, 'beNrjz3KTFLuwa8uHGxeUPxYBkdKb/AAZSaDI51uXVH6XA5EqAFCKEwE=');
EastEye := BitmapFromString(2, 4, 'beNr7WzGruw2ILu7ZemX/DtW/FSo/y9T4c1QBumANTA==');
SouthEye := BitmapFromString(2, 5, 'beNq7dl6Sy1N6V4TM4RggUnyaA0QvL54CovfXzr8HANyGESQ=');
WestEye := BitmapFromString(2, 5, 'beNq7d032VDwQKdzPBCKltwVA9ObKmffXzn+/d+07AACpEtE=');
NorthGray := BitmapFromString(7, 2, 'beNqb2mPDwxGmqQZBq+ZOBqKpXY2eUmLR2hpAFKKhumHxjBWzJy4EAC/FD4s=');
EastGray := BitmapFromString(4, 2, 'beNoz0N20ZNbqeVP2b1gaqMZoqG6cGrPrjUL0wCR6wvB');
SouthGray := BitmapFromString(2, 5, 'beNrTUu9rrq7Iy1i7YNr+DUvXL5wera1xeMvKRD3tSC31SADfNQ2V');
WestGray := BitmapFromString(2, 6, 'beNrT0144tWfxtN6lM/q8VRSD1FVm9rasXzgdiGJ1NIEoUU87EQAmVw7R');
NorthPink := BitmapFromString(6, 2, 'beNpLzfSVlvCWEgciN0X5ksjY2sRUoAgQhWmqAVFZdHwzAKGZCTc=');
EastPink := BitmapFromString(5, 2, 'beNqTkaxPSiuJjI3V0QxSV/GVlnDk5YRwo7U1AgB8XQen');
SouthPink := BitmapFromString(2, 4, 'beNozMbTk4Yh284zW1gCiRD3tLCP9ZH2dPABBwwWq');
WestPink := BitmapFromString(2, 5, 'beNozM0r09gtzdgtSV4n18A7TVEsz0M0zMcwxNigxNy4CAHzJCCk=');
NorthArm := BitmapFromString(5, 2, 'beNpTV4nUUo/W1gCSQOStohimqQZEsTqaQBQEAGMwBog=');
EastArm := BitmapFromString(5, 2, 'beNrT1UrU047X1cKOAGzJByE=');
SouthArm := BitmapFromString(2, 6, 'beNrT1QpQU/6vpPBfWwOIkvV1YnU0E/W0gSheVwuIgNx4AMnpCjc=');
WestArm := BitmapFromString(5, 2, 'beNrT1XJTlIegaG0NOIrX1QIhAFz6Bm0=');}
{ NorthEye := BitmapFromString(6, 2, 'beNrjz3KTFLuwa8uHGxeUPx' +
'YBkdKb/AAZSaDI51uXVH6XA5EqAFCKEwE=');
EastEye := BitmapFromString(2, 4, 'beNr7WzGruw2ILu7ZemX/DtW' +
'/FSo/y9T4c1QBumANTA==');
SouthEye := BitmapFromString(2, 5, 'beNq7dl6Sy1N6V4TM4RggUn' +
'yaA0QvL54CovfXzr8HANyGESQ=');
WestEye := BitmapFromString(2, 5, 'beNq7d032VDwQKdzPBCKltwV' +
'A9ObKmffXzn+/d+07AACpEtE=');
NorthGray := BitmapFromString(7, 2, 'beNqb2mPDwxGmqQZBq+ZOB' +
'qKpXY2eUmLR2hpAFKKhumHxjBWzJy4EAC/FD4s=');
EastGray := BitmapFromString(4, 2, 'beNoz0N20ZNbqeVP2b1gaq6' +
'MZoqG6cGrPrjUL0wCR6wvB');
SouthGray := BitmapFromString(2, 5, 'beNrTUu9rrq7Iy1i7YNr+D' +
'UvXL5wera1xeMvKRD3tSC31SADfNQ2V');
WestGray := BitmapFromString(2, 6, 'beNrT0144tWfxtN6lM/q8VR' +
'SD1FVm9rasXzgdiGJ1NIEoUU87EQAmVw7R');
NorthPink := BitmapFromString(6, 2, 'beNpLzfSVlvCWEgciN0X5k' +
'sjY2sRUoAgQhWmqAVFZdHwzAKGZCTc=');
EastPink := BitmapFromString(5, 2, 'beNqTkaxPSiuJjI3V0QxSV/' +
'GVlnDk5YRwo7U1AgB8XQen');
SouthPink := BitmapFromString(2, 4, 'beNozMbTk4Yh284zW1gCiR' +
'D3tLCP9ZH2dPABBwwWq');
WestPink := BitmapFromString(2, 5, 'beNozM0r09gtzdgtSV4n18A' +
'7TVEsz0M0zMcwxNigxNy4CAHzJCCk=');
NorthArm := BitmapFromString(5, 2, 'beNpTV4nUUo/W1gCSQOStoh' +
'imqQZEsTqaQBQEAGMwBog=');
EastArm := BitmapFromString(5, 2, 'beNrT1UrU047X1cKOAGzJByE' +
'=');
SouthArm := BitmapFromString(2, 6, 'beNrT1QpQU/6vpPBfWwOIkv' +
'V1YnU0E/W0gSheVwuIgNx4AMnpCjc=');
WestArm := BitmapFromString(5, 2, 'beNrT1XJTlIegaG0NOIrX1QI' +
'hAFz6Bm0=');}