SCAR Code:
//-----------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//-- ยป Evil Bob Island Routines --//
//-----------------------------------------------------------------//
// * procedure MiddleOfEvilBobIsland; // * by Markus
// * function FindBobsServant: Boolean; // * by MastaRaymond
// * procedure TalkToBobsServant; // * by Markus
// * function FilterBobPointsFast(points: tpointarray): TPoint; // * by Markus
// * function WalkToStatue(statue: integer): Boolean; // * by Markus
// * function FilterTPA(midx, midy, dist: integer; points: TPointArray): TPointarray; // * by Markus
// * function RemovePointsInBox(points: TPointArray; box: TBox): TPointArray; // * by Markus
// * function PickupFishingNet: Boolean; // * by Markus
// * function FishAThing: Boolean; // * by Markus
// * function UncookBobFish: Boolean; // * by Markus
// * function GiveBobDaFish: Boolean; // * by Markus
// * function LeaveBobsIsland: Boolean; // * by Markus
// * function FishingNetInInv: Boolean; // * by Markus
// * function SolveEvilBob: Boolean; // * by Markus
function GetMusic: string; forward;
{*******************************************************************************
procedure MiddleOfEvilBobIsland;
by: Markus
Description: Walks to the middle of the Evil Bob island
*******************************************************************************}
procedure MiddleOfEvilBobIsland;
var
x, y: integer;
p: tpointarray;
begin
if (not LoggedIn) then Exit;
FindColorsTolerance(p, 195836, mmx1, mmy1, mmx2, mmy2, 0);
MiddleTPAEx(p, x, y);
Mouse(x, y, 5, 5, True);
FFlag(0);
Wait(1000 + Random(2000));
end;
{*******************************************************************************
function FindBobsServant: Boolean;
by: MastaRaymond
Description: Finds Evil Bob's servant
*******************************************************************************}
function FindBobsServant: Boolean;
var
TPA: TPointArray;
ATPA: TPointArrayArray;
I, cts ,x ,y, k: Integer;
begin
if (not LoggedIn) then Exit;
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.10, 25);
FindColorsTolerance(TPA, 5143728, MSX1, MSY1, MSX2, MSY2, 20);
ATPA := TPAtoATPAEx(TPA, 50, 50);
SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));
k := High(atpa);
For I:= 0 to k do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 1, 1);
Wait(150 + Random(70));
GetMousePos(x, y);
if (Pos('ervan', rs_GetUpText) <= 0) then
Continue;
Mouse(x, y, 0, 0, True);
FFlag(0);
ColorToleranceSpeed(cts);
Result := True;
Exit;
end;
end;
{*******************************************************************************
procedure TalkToBobsServant;
by: Markus
Description: Talks to the servant until the text Fish here is in the corner, takes a screenie
*******************************************************************************}
function TalkToBobsServant : TPointArray;
var
x, cts, i : integer;
begin
writeln('Bobsolver - attempting to talk to the servant');
MiddleOfEvilBobIsland;
repeat
x := x + 1;
if x > 5 then
exit;
until(FindBobsServant);
repeat
writeln('Bobsolver - Waiting and clicking until the statue is there');
wait(500 + random(500));
ClickToContinue; //Click to continue until we see the cross top right corner
inc(i);
writeln(inttostr(i));
if (i > 10) then exit;
until(getcolor(497, 26) = 39423);
wait(1700); //Wait some time...
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.01, 3);
FindColorsTolerance(result, 3253191, msx1+10, msy1+10, msx2, msy2, 30);
ColorToleranceSpeed(cts);
SetColorspeed2Modifiers(0.2, 0.2); //to defaults
highestangle;
MakeCompass('n');
//DisplayDebugImgWindow(700, 500); //Uncomment this for debug purposes
//SafeDrawBitmap(bobshot, GetDebugCanvas, 0, 0);
end;
{*******************************************************************************
function FilterBobPointsFast(points: tpointarray): TPoint;
by: Markus
Description: Filters the points, only used to filter the tail of the scared cat
*******************************************************************************}
function FilterBobPointsFast(points: tpointarray): TPointArray;
var
YNo: TIntegerArray;
i, L, count, MinY: integer;
box: TBox;
begin
box := GetTPABounds(points);
SetLength(YNo, box.y2-box.y1+1);
L := Length(points)-1;
for i := 0 to L do
Inc(YNo[points[i].y-Box.Y1]);
L := box.y2-box.y1;
for i := 0 to L do
if (YNo[i] > 3) then Break;
if i = L then
MinY := 0
else
MinY := i;
L := Length(points)-1;
SetLength(Result, l+1);
for i := 0 to l do
begin
if (points[i].y >= (MinY + Box.Y1)) then
begin
Result[count] := points[i];
Inc(count);
end;
end;
SetLength(Result, count);
end;
{*******************************************************************************
function GetStatue(ratio: extended): integer;
by: Markus, ratios by Ruler
Description: Returns the statue
*******************************************************************************}
function GetStatue(ratio: extended): Integer;
var
closest, rat: Extended;
ratios: array of Extended;
i: integer;
begin
SetArrayLength(ratios, 4);
closest := 10;
ratios := [2.46, 2.23, 1.45, 1.2{, 1.6}]; //Credits to ruler for these
for i := 0 to 3 do
begin
rat := abs(ratio - ratios[i]);
if (rat < closest) then
begin
closest := rat;
Result := i;
end;
end;
case Result of
0: writeln('Bobsolver - Statue: praying cat');
1: writeln('Bobsolver - Statue: attacking cat');
2: writeln('Bobsolver - Statue: dead cat');
3: writeln('Bobsolver - Statue: scared cat');
//4: writeln('Scared cat w/out filtering');
end;
end;
{*******************************************************************************
function WalkToStatue(statue: integer): Boolean;
by: Markus
Description: Walks to the statue
*******************************************************************************}
function WalkToStatue(statue: integer): Boolean;
var
DDTM: TDTM;
bx, by, ptc, x, y: Integer;
begin
if (not LoggedIn) then Exit;
if (not FindColor(x, y, WaterColor, MMX1, MMY1, MMX2, MMY2)) or (WaterColor < 1) then
WaterColor := FindWaterColor;
case statue of
0:
begin
//Praying cat
DDTM.MainPoint.x := 661; //DDTM generated by SKy Scripters DDTM maker.
DDTM.MainPoint.y := 84;
DDTM.MainPoint.AreaSize := 0;
DDTM.MainPoint.AreaShape := 0;
DDTM.MainPoint.Color := 5610937;
DDTM.MainPoint.Tolerance := 255;
SetArrayLength(DDTM.SubPoints, 3);
DDTM.SubPoints[0].x := 606;
DDTM.SubPoints[0].y := 82;
DDTM.SubPoints[0].AreaSize := 2;
DDTM.SubPoints[0].AreaShape := 0;
DDTM.SubPoints[0].Color := 195836;
DDTM.SubPoints[0].Tolerance := 0;
DDTM.SubPoints[1].x := 592;
DDTM.SubPoints[1].y := 84;
DDTM.SubPoints[1].AreaSize := 2;
DDTM.SubPoints[1].AreaShape := 0;
DDTM.SubPoints[1].Color := 195836;
DDTM.SubPoints[1].Tolerance := 0;
end;
1:
begin
//Attacking cat
DDTM.MainPoint.x := 649;
DDTM.MainPoint.y := 94;
DDTM.MainPoint.AreaSize := 0;
DDTM.MainPoint.AreaShape := 0;
DDTM.MainPoint.Color := 7979730;
DDTM.MainPoint.Tolerance := 255;
SetArrayLength(DDTM.SubPoints, 4);
DDTM.SubPoints[0].x := 641;
DDTM.SubPoints[0].y := 47;
DDTM.SubPoints[0].AreaSize := 0;
DDTM.SubPoints[0].AreaShape := 0;
DDTM.SubPoints[0].Color := 195836;
DDTM.SubPoints[0].Tolerance := 0;
DDTM.SubPoints[1].x := 653;
DDTM.SubPoints[1].y := 46;
DDTM.SubPoints[1].AreaSize := 2;
DDTM.SubPoints[1].AreaShape := 0;
DDTM.SubPoints[1].Color := 195836;
DDTM.SubPoints[1].Tolerance := 0;
DDTM.SubPoints[2].x := 643;
DDTM.SubPoints[2].y := 102;
DDTM.SubPoints[2].AreaSize := 2;
DDTM.SubPoints[2].AreaShape := 0;
DDTM.SubPoints[2].Color := watercolor;
DDTM.SubPoints[2].Tolerance := 0;
DDTM.SubPoints[3].x := 655;
DDTM.SubPoints[3].y := 102;
DDTM.SubPoints[3].AreaSize := 0;
DDTM.SubPoints[3].AreaShape := 0;
DDTM.SubPoints[3].Color := watercolor;
DDTM.SubPoints[3].Tolerance := 0;
end;
2:
begin
//Death cat
DDTM.MainPoint.x := 650;
DDTM.MainPoint.y := 79;
DDTM.MainPoint.AreaSize := 0;
DDTM.MainPoint.AreaShape := 0;
DDTM.MainPoint.Color := 8111059;
DDTM.MainPoint.Tolerance := 255;
SetArrayLength(DDTM.SubPoints, 4);
DDTM.SubPoints[0].x := 633;
DDTM.SubPoints[0].y := 122;
DDTM.SubPoints[0].AreaSize := 2;
DDTM.SubPoints[0].AreaShape := 0;
DDTM.SubPoints[0].Color := 195836;
DDTM.SubPoints[0].Tolerance := 0;
DDTM.SubPoints[1].x := 645;
DDTM.SubPoints[1].y := 121;
DDTM.SubPoints[1].AreaSize := 2;
DDTM.SubPoints[1].AreaShape := 0;
DDTM.SubPoints[1].Color := 195836;
DDTM.SubPoints[1].Tolerance := 0;
DDTM.SubPoints[2].x := 641;
DDTM.SubPoints[2].y := 66;
DDTM.SubPoints[2].AreaSize := 0;
DDTM.SubPoints[2].AreaShape := 0;
DDTM.SubPoints[2].Color := watercolor;
DDTM.SubPoints[2].Tolerance := 0;
DDTM.SubPoints[3].x := 658;
DDTM.SubPoints[3].y := 65;
DDTM.SubPoints[3].AreaSize := 0;
DDTM.SubPoints[3].AreaShape := 0;
DDTM.SubPoints[3].Color := watercolor;
DDTM.SubPoints[3].Tolerance := 0;
end;
3, 4:
begin
//Scared cat
DDTM.MainPoint.x := 642;
DDTM.MainPoint.y := 86;
DDTM.MainPoint.AreaSize := 0;
DDTM.MainPoint.AreaShape := 0;
DDTM.MainPoint.Color := 8111059;
DDTM.MainPoint.Tolerance := 255;
SetArrayLength(DDTM.SubPoints, 4);
DDTM.SubPoints[0].x := 627;
DDTM.SubPoints[0].y := 77;
DDTM.SubPoints[0].AreaSize := 0;
DDTM.SubPoints[0].AreaShape := 0;
DDTM.SubPoints[0].Color := watercolor;
DDTM.SubPoints[0].Tolerance := 0;
DDTM.SubPoints[1].x := 632;
DDTM.SubPoints[1].y := 96;
DDTM.SubPoints[1].AreaSize := 0;
DDTM.SubPoints[1].AreaShape := 0;
DDTM.SubPoints[1].Color := watercolor;
DDTM.SubPoints[1].Tolerance := 0;
DDTM.SubPoints[2].x := 691;
DDTM.SubPoints[2].y := 82;
DDTM.SubPoints[2].AreaSize := 2;
DDTM.SubPoints[2].AreaShape := 0;
DDTM.SubPoints[2].Color := 195836;
DDTM.SubPoints[2].Tolerance := 0;
DDTM.SubPoints[3].x := 703;
DDTM.SubPoints[3].y := 82;
DDTM.SubPoints[3].AreaSize := 2;
DDTM.SubPoints[3].AreaShape := 0;
DDTM.SubPoints[3].Color := 195836;
DDTM.SubPoints[3].Tolerance := 0;
end;
end;
ptc := AddDTM(ddtm);
if DTMRotated(ptc, bx, by, mmx1, mmy1, mmx2, mmy2) then
begin
MFF(bx, by, 1, 1); //Walk to it
FFlag(0);
Result := True;
end else
Result := False;
FreeDTM(ptc);
end;
{*******************************************************************************
function FilterTPA(midx, midy, dist: integer; points: TPointArray): TPointarray;
by: Markus
Description: Filters points by max dist of MidX and MidY
*******************************************************************************}
function FilterTPA(midx, midy, dist: integer; points: TPointArray): TPointarray;
var
i, ll: integer;
begin
for i := 0 to High(points) do
if (distance(midx, midy, points[i].x, points[i].y) <= dist) then
begin
ll := ll + 1;
SetArrayLength(Result, ll);
Result[ll - 1] := points[i];
end;
end;
{*******************************************************************************
function RemovePointsInBox(points: TPointArray; box: TBox): TPointArray;
by: Markus
Description: Removes all points in tpa 'points' in a box specified by 'box'
*******************************************************************************}
function RemovePointsInBox(points: TPointArray; box: TBox): TPointArray;
var
i, L, rescnt: Integer;
begin
L := GetArrayLength(points)-1
for i := 0 to L do
begin
if not PointInBox(points[i], box) then
begin
rescnt := rescnt + 1;
SetArrayLength(Result, rescnt);
Result[rescnt - 1] := points[i];
end;
end;
end;
{*******************************************************************************
function PickupFishingNet: Boolean;
by: Markus
Description: Used in Evil Bob solver. Picks up an fishing net
*******************************************************************************}
function PickupFishingNet: Boolean;
var
cts, bmpDropDot, cx, cy, tries, i, pntl: integer;
Points: TPointArray;
begin
if (not LoggedIn) then Exit;
bmpDropDot := BitmapFromString(4, 3, 'FF3636FE2020FC0606E90000FE0C0CF' +
'C0606F10000CE0000000001D90000BC0000000001');
repeat
cx := mmcx;
cy := mmcy;
if FindBitmapSpiralTolerance(bmpdropdot, cx, cy, mmx1, mmy1, mmx2, mmy2, 30) then
MouseFindFlag(cx + 3, cy + 3, 1, 1);
FFlag(0);
Wait(1000 + Random(1000));
MakeCompass('n');
begin
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorspeed2Modifiers(0.016, 5.5);
FindColorsSpiralTolerance(mscx, mscy, points, 1845815, msx1, msy1, msx2, msy2, 15);
SetColorspeed2Modifiers(0.2, 0.2);
ColorToleranceSpeed(cts);
ReArrangeandShortenArrayEx(points, 40, 40);
SortTPAFrom(points, point(mscx, mscy));
points := RemovePointsInBox(points, IntToBox(mscx-25, mscy-30, mscx+25, mscy+30));
points := FilterTPA(mscx, mscy, 100, points);
if (GetArrayLength(points) > 5) then
pntl := 5
else
pntl := GetArraylength(points)-1
for i := 0 to pntl-1 do
begin
MMouse(points[i].x, points[i].y, 0, 0);
Wait(500 + Random(500));
if (rs_getuptext = 'Take Small fishing net / 2 more options') then
begin
Mouse(points[i].x, points[i].y, 0, 0, False);
Result := ChooseOption('ake')
FFlag(0);
Wait(1000 + Random(2000));
Freebitmap(bmpDropDot);
Exit;
//Break;
end else
tries := tries + 1;
end;
end;
until ((Result) or (tries > 5));
Result := False;
Freebitmap(bmpDropDot);
end;
{*******************************************************************************
function FishAThing: Boolean;
by: Markus
Description: Fishes a Fishlike thing
*******************************************************************************}
function FishAThing: Boolean;
var
points1, points2, rp: TPointArray;
l, i, cts, x, y, t, d: integer;
atpa: TPointArrayArray;
begin
Result := False;
if (not LoggedIn) then Exit;
d := DTMFromString('78DA63CC606260D0676440066D89760C1A401' +
'A24FA1F0818D3816AD450D54064612490CE07AA5127A0A6840873' +
'8A30DD83A12609A8C68C809A04A01A3DFC6A00EEB6098E'); //Dtm from cooked Fishlike thing
Gametab(4);
cts := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(mscx, mscy, points1, 1906709, msx1, msy1, msx2, msy2, 40);
findcolorsSpiraltolerance(mscx, mscy, points2, 5456179, msx1, msy1, msx2, msy2, 40);
rp := CombineTPA(points1, points2);
atpa := TPAtoATPAEx(rp, 30, 30);
l := High(atpa);
if (l > 5) then
l := 5;
for i := 0 to l do
begin
MiddleTPAEx(atpa[i], x, y);
MMouse(x, y, 5, 5);
Wait(10 + Random(25));
if (rs_getuptext = 'Net Fishing spot / 2 more options') then
begin
Result := True;
ColorToleranceSpeed(cts);
Mouse(x, y, 0, 0, True);
t := GetSystemTime;
repeat
Wait(500 + Random(500));
until (GetColor(434, 459) <> 6321792) or ((GetSystemTime - t) > 10000);
if ((GetSystemTime - t) < 10000) then
if (FindDTM(d, x, y, mix1, miy1, mix2, miy2)) then
begin
Result := True;
ColorToleranceSpeed(cts);
FreeDTM(d);
exit;
end;
end;
end;
FreeDTM(d);
ColorToleranceSpeed(cts);
end;
{*******************************************************************************
function UncookBobFish: Boolean;
by: Markus
Description: Uncooks a fishlike thing
*******************************************************************************}
function UncookBobFish: Boolean;
var
dtmFish, x, y: Integer;
begin
if (not LoggedIn) then Exit;
WriteLn('Bobsolver - uncooking fish...');
GameTab(4);
dtmFish:= DTMFromString('78DA63CC606260D0676440066D89760C1A401' +
'A24FA1F0818D3816AD450D54064612490CE07AA5127A0A6840873' +
'8A30DD83A12609A8C68C809A04A01A3DFC6A00EEB6098E');
if not(FindDTM(dtmFish, x, y, mix1, miy1, mix2, miy2)) then
begin
FreeDTM(dtmFish);
Result := False;
Exit;
end
else
begin
FreeDTM(dtmFish);
Mouse(x, y, 5, 5, False);
Chooseoption('Use');
end;
if FindObjCustom(x, y, ['ncook'], [11167552], 20) then
begin
Mouse(x, y, 5, 5, True);
FFlag(0);
Wait(3000 + Random(5000));
Result := True;
WriteLn('Bobsolver - uncooked the fish :)');
end;
end;
{*******************************************************************************
function GiveBobDaFish: Boolean;
by: Markus
Description: Gives a raw fishlike thing to Evil Bob
*******************************************************************************}
function GiveBobDaFish: Boolean;
var
dtmRawFish, x, y: Integer;
begin
if (not LoggedIn) then Exit;
dtmRawFish := DTMFromString('78DA637464626008666440064E13AF33E8026' +
'990E87F20607402AAF142550391859140DA1AA8C69B801A53A01A' +
'7F026A4C806A2208A8B102AA8922A0C60DA82694809A40A09A000' +
'26AFC88F0BB17613500F0EC0BC1');
if (not(FindDTM(dtmRawFish, x, y, mix1, miy1, mix2, miy2))) then
begin
FreeDTM(dtmRawFish);
Exit;
end else
begin
FreeDTM(dtmRawFish);
Mouse(x, y, 5, 5, True);
if FindObjCustom(x, y, ['Bob'], [1776414], 25) then
begin
Mouse(x, y, 5, 5, True);
Result := True;
end;
end;
repeat
Wait(500 + Random(1000));
ClickToContinue;
until(GetColor(435, 459) = 6321792) or (not LoggedIn);
end;
{*******************************************************************************
function LeaveBobsIsland: Boolean;
by: Markus
Description: Leaves evil bobs island
*******************************************************************************}
function LeaveBobsIsland: Boolean;
var
x, y: Integer;
begin
if (not LoggedIn) then Exit;
if FindObjCustom(x, y, ['Portal'], [6729645], 25) then
begin
Mouse(x, y, 5, 5, True);
FFlag(0);
Wait(8000 + Random(8000));
ClickToContinue;
Wait(1000 + Random(2000));
ClickToContinue;
Result := (Pos('evil bob', LowerCase(GetMusic)) = 0);
if (Result) then
writeln('*******SOLVED EVIL BOB********');
end;
end;
{*******************************************************************************
function FishingNetInInv: Boolean;
by: Markus
Description: Used in Evil Bob solver to detect if we got a fishing net in our
inventory. Uses bitmap masks, slow but working.
*******************************************************************************}
function FishingNetInInv: Boolean;
var
bmpmskNet, x, y: Integer;
begin
if (not LoggedIn) then Exit;
bmpmskNet:= BitmapFromString(49, 38, 'beNrtV9EKgEAI6/9/uiAoIuey' +
'8paEe4rj6NY2T5umRqPR+AfmFQXJzBu+5QPJfEVsP/f4YNdl3Kw+J' +
'5XgZgGfoHoaK+37PYmsswLjvLNI2NIjDdNLSHrchkYIRsUuptdg8A' +
'O9bbkSRYoI+vWgYO/6ZQPjlR7h9pLS5dE8S+m3U9AsqEkk7VmN/jI' +
'nvK0klj9prLcyPOIC58HgfmmmApg3GDMxH8JNOaLwWoPdpM5AXoGS' +
'52mFn5dSKg26ITWzeqMhwgLX8iL6');
GameTab(4);
Result := FindBitmapMaskTolerance(bmpmskNet, x, y, mix1, miy1, mix2, miy2, 0, 0);
Freebitmap(bmpmskNet);
end;
{*******************************************************************************
function CanLeaveBobsIsland : boolean;
by: Markus
Description: Returns true if the random is solved but we are still trying to
solve (misclick failsafe)
*******************************************************************************}
function CanLeaveBobsIsland : boolean;
begin
result := false;
if (not(loggedin)) then exit;
MiddleOfEvilBobIsland;
if (FindBobsServant) then
begin
wait(2000 + random(2000));
if (GetTextAtEx(79, 404, 0, NPCChars, false, false, 0, 2, 0, 41, false, tr_AllChars) = 'Evil Bob has fallen asleep, come quickly!') then
result := true;
end;
end;
{*******************************************************************************
function SolveEvilBob: Boolean;
by: Markus
Description: Solves the Evil Bob island Random
*******************************************************************************}
function SolveEvilBob: Boolean;
var
clrpnts: TPointArray;
Statue, bobshot, time, t: integer;
pnt: TPoint;
size: Tbox;
MadeError: Boolean;
label
WeSolvedItSoFar;
begin
if (not LoggedIn) then Exit;
Result := False;
if (not(FishingNetInInv)) then
begin
if (invcount > 26) then
Exit;
end else
if (invcount > 27) then
Exit;
time := GetSystemTime;
while (pos('evil bob', lowercase(getmusic)) <> 0) and (LoggedIn) do
begin
MadeError := False;
if ((GetSystemTime - time) > 360000) then
Exit;
clrpnts := TalkToBobsServant;
if (length(clrpnts) < 20) then
if (CanLeaveBobsIsland) then
begin
Goto WeSolvedItSoFar;
end;
clrpnts := FilterBobPointsFast(clrpnts);
FreeBitmap(bobshot);
size := GetTPABounds(clrpnts);
pnt.x := size.x2-size.x1;
pnt.y := size.y2-size.y1;
statue := GetStatue(pnt.y/pnt.x);
t := 0;
if (not(FishingNetInInv)) then
repeat
Inc(t);
if not WalkToStatue(statue) then
begin
MiddleOfEvilBobIsland;
WalkToStatue(statue);
end;
if (t > 5) then
begin
MadeError := True;
Break;
end;
until(PickupFishingNet) or (not LoggedIn);
if (MadeError) or (not LoggedIn) then
continue;
t := 0;
repeat
Inc(t);
MakeCompass('n');
if not WalkToStatue(statue) then
begin
MiddleOfEvilBobIsland;
WalkToStatue(statue);
end;
Wait(2000 + Random(2000));
if (t > 5) then
begin
MadeError := True;
Break;
end;
until(FishAThing) or (not LoggedIn);
if (MadeError) or (not LoggedIn) then
continue;
MiddleOfEvilBobIsland;
UncookBobFish;
GiveBobDaFish;
WeSolvedItSoFar:
if LeaveBobsIsland then
begin
Result := True;
Inc(BobIsland);
end else
Result := False;
end;
end;