NCDS
2010-07-22 23:55:41
In Woodcutting.Simba:
in Globals:
In ItemInfo: (all this can be removed if that's what is decided.
in Objects:
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?
{******************************************************************************}
{ 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?