SCAR Code:
{*******************************************************************************
Function FindBirdsNest: Boolean;
By: Liquid and Starblaster100 with edit by cycrosism
Description: If a birds nest is found, it will pick it up
*******************************************************************************}
Function FindBirdsNest: Boolean;
var
tries, x, y: Integer;
s: string;
begin
if (not (GetLastChatText(s))) then
LastChatter(s);
if (Pos(s, 'A bird') <> 0) then
begin
repeat
if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
begin
KeyDown(VK_LEFT);
Wait(700 + Random(500));
KeyUp(VK_LEFT);
Wait(400 + Random(300));
end;
if not (FindObj(x, y, 'Take Bird', 3952984, 10)) or
not (FindObj(x, y, 'Take Bird', 1713706, 10)) or
not (FindObj(x, y, 'Take Bird', 1581604, 10)) then
begin
x := 648;
y := 83;
tries := tries + 1;
FindColorSpiral(x, y, 241, 570, 5, 725, 155);
Mouse(x + 3, y + 3, 2, 2, True);
Flag;
Wait(200 + Random(100));
end;
if (FindObj(x, y, 'Take Bird', 3952984, 10)) or
(FindObj(x, y, 'Take Bird', 1713706, 10)) or
(FindObj(x, y, 'Take Bird', 1581604, 10)) then
begin
WriteLn('Birds Nest Found');
Result := True;
Wait(450 + Random(400));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
Wait(500 + Random(300));
if (Screenshots) then
SaveScreenshot('Birds Nest - SRL - ' + IntToStr(GetTimeRunning) + '.bmp');
tries := tries + 100;
// Birdsnest := Birdsnest + 1;
Mouse(583, 226, 2, 2, False);
Wait(100 + Random(100));
ChooseOption('Examine');
Exit;
end;
until (FindObj(x, y, 'Take Bird', 3952984, 10)) or
(FindObj(x, y, 'Take Bird', 1713706, 10)) or
(FindObj(x, y, 'Take Bird', 1581604, 10)) or (tries > 5)
end;
end;