SRL Archive - SRL Bugs

FindBirdsNest


Shuttleu

2011-11-15 15:35:28

The colour was incorrect for for the text searching

{*******************************************************************************
function FindBirdsNest: Boolean;
By: Liquid and Starblaster100
Description: If a birds nest is found, it will pick it up
*******************************************************************************}
function FindBirdsNest: Boolean;
var
tries, x, y: Integer;
s: string;
begin
s:= GetChatBoxText(8, 255)
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');
Wait(450 + Random(400));
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
Result := True;
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;

~shut

Nava2

2011-11-15 15:55:29

Wow, I wrote a much better one.. I wonder what ever happened to it.. :<

NCDS

2011-11-15 20:40:52

I think it's safe to say there's not much point to updating this. There is a much better one in MSI as well.

Does anyone actually use this?

Shuttleu

2011-11-16 18:35:37

From: NCDS
I think it's safe to say there's not much point to updating this. There is a much better one in MSI as well.

Does anyone actually use this?


i do in VV

~shut

YoHoJo

2011-11-16 18:36:15

How oldschool!
A DTM should be made.

NCDS

2011-11-16 19:57:42

From: Shuttleu
i do in VV

~shut

I'm assuming you've tested this?

If this works I'll push it to the srl4 repo.

Shuttleu

2011-11-17 09:31:45

it was working, but now it seems to give me a 'out of memory' error :/

~shut

Home

2011-11-17 10:11:48

Man that's old school :) <3

~Home

Shuttleu

2011-11-18 18:13:47

can we put the one from MSI into SRL then?

~shut

Coh3n

2011-11-18 20:04:10

From: Shuttleu
can we put the one from MSI into SRL then?

~shut
Probably, it would just have to be altered slightly as it uses MSI's object methods as well.

NCDS

2011-11-18 22:55:01

From: Shuttleu
can we put the one from MSI into SRL then?

~shut


From: Coh3n
Probably, it would just have to be altered slightly as it uses MSI's object methods as well.


Yeah, this is something I thought about before, but haven't acted upon. It will get done though. :)

Coh3n

2011-12-09 18:38:20

Moved to bugs (subtle bump to remind me). :)

Shuttleu

2011-12-23 04:06:34

reminder bump again?

~shut

Coh3n

2011-12-30 22:20:14

I know, I was just on holidays. :)

E: Fixed in SRL5. I just committed the fix in the OP.