SRL Archive - General

Bird Nest Finding


NCDS

2010-07-22 23:55:41

In Woodcutting.Simba:

{******************************************************************************}
{ function MSI_FindBirdNest: Boolean; }
{ By: NCDS }
{ Date: 21 July 2010 }
{ Description: Find and pick up bird nest }
{******************************************************************************}
function MSI_FindBirdNest: Boolean;
var
Birds_Nest: TMSObjectArray;
SearchBox: TBox;
begin
if (not(IsChatBoxTextBetween(BIRD_NEST_CBMESSAGE, 0, 8, 6))) then
Exit;

Birds_Nest := MSI_GetObjects([OBJ_BIRD_NEST]);
SearchBox := IntToBox(MSCx - 100, MSCy - 100, MSCx + 100, MSCy + 100);

if MSI_FindObjectIn(Birds_Nest[0], SearchBox, ClickLeft) then
begin
Result := True;
Flag;
Wait(RandomRange(100, 300));
end;
end;

in Globals:

ITEM_BIRD_NEST = 26; //Currently not used as this would be for bank/Inventory functions. I can remove it, but thought it might be used at some point, but the depositing no longer requires it so just let me know your thought on it.

OBJ_BIRD_NEST = 16;
BIRD_NEST_CBMESSAGE = 'nest falls out of';


In ItemInfo: (all this can be removed if that's what is decided.

ITEM_BIRD_NEST:
Result := [
Point(1155, 422),
Point(1154, 413),
Point(1141, 422),
Point(1157, 431),
Point(1169, 425)
];

ITEM_BIRD_NEST: Result := 2634036

{ Bird Nest ================================== ]
[============================================= }
ITEM_BIRD_NEST: //NCDS
with MSI_Items[ITEM_BIRD_NEST] do
begin
Name := 'Bird''s nest';
UpText := ['s nest'];
ItemP := Point(0, 0);
Colors := [3489088];
Tol := 11;
Stackable := False;
DTM := MSI_LoadDTM(ITEM_BIRD_NEST);
end;

in Objects:

{ Bird Nest ================================== ]
[============================================= }
OBJ_BIRD_NEST: //NCDS
with MSI_Objects[OBJ_BIRD_NEST] do
begin
Name := 'Bird''s nest';
UpText := 's nest';
Option := 'ake';
Colors := [4016204];
Tol := 3;
Hue := 0.38;
Sat := 1.16;
FindAllColors := False;
W := 25;
H := 18;
Accuracy := 3;
ExcludeSelf := True;
RightClickOnly := False;
Tries := 5;
Anim := False;
WaitToMove := True;
BadColors := [];
BadColorTolerance := 10;
AssociatedItems := [];
end;

Currently the function itself is called in WaitWhileChopping right after MSI_FindRandoms. I figured that would be the most appropriate spot.

This compiles but has not yet been committed as I have haven't had an opportunity to test it yet.

Comments? Concerns?

Sir R. M8gic1an

2010-07-23 07:22:35

I'd say go ahead and commit.

I would add the following to the finder:

[php]
{$IFDEF SMART}
if not Smart_Members then exit;
{$ENDIF}
[/php]

~RM

Coh3n

2010-07-23 12:37:43

From: Rasta Magician
I'd say go ahead and commit.

I would add the following to the finder:

[php]
{$IFDEF SMART}
if not Smart_Members then exit;
{$ENDIF}
[/php]

~RM

Should do this instead:

if (not MSI_Players[CurrentPlayer].Member) then
Exit;
Now that it's in DeclarePlayers, and all you have to do is choose the Free/Members button now.

NCDS

2010-07-23 12:52:56

Added and Committed :)

3Garrett3

2010-07-23 14:41:21

You committed this wrong or my MSI didn't update correctly. It says newest revision and MSI doesn't compile. You didn't update the globals section apparently. I'll add it in and commit with fishing stuff in like 10 minutes, once I know it compiles :P

NCDS

2010-07-23 14:45:27

From: 3Garrett3
You committed this wrong or my MSI didn't update correctly. It says newest revision and MSI doesn't compile. You didn't update the globals section apparently. I'll add it in and commit with fishing stuff in like 10 minutes, once I know it compiles :P


try again, I think it didn't take any of my committs except for woodcutting.smba the first time around for some reason.

Should be good now though.

3Garrett3

2010-07-23 14:48:36

Well then now that i've updated my own manually it should work anyway, without conflicts since I added fishing.