I did a thing that works! If there is more than bones on the stack it doesn't know what to do but I will be adding some to it tomorrow anyway. Here is what works.
Code:
program BagOfBones;
{$DEFINE SMART}
{$i AeroLib/AeroLib.Simba}
{$i Reflection/Reflection.Simba}
var
MyPlayer: TReflectLocalPlayer;
Bones: TStringArray;
BonesCount: TIntegerArray;
procedure SetupLoot;
begin
Bones := ['Bones'];
SetLength (BonesCount, Length(Bones));
end;
procedure FindBones;
var
Drop: TReflectGroundItemArray;
I, Ind: Integer;
Point: TPoint;
begin
repeat
begin
Drop.GetAll(20);
for I := 0 to High(Drop)do
if InStrArrEx(Drop[I].GetName, Bones, Ind) then
begin
Point := Drop[I].GetMSPoint;
Reflect.Mouse.Move(Point, 2, 2);
Reflect.Mouse.Click(Mouse_Left);
Wait (1000);
While Myplayer.IsMoving do
Wait (150);
end;
end;
until (TReflectionInventory.IsFull);
end;
procedure BuryBones
var
Item: TReflectInvItem;
begin
repeat
Item.Find('Bones');
Reflect.Mouse.Move(Item.GetPoint,2,2);
Reflect.Mouse.Click(Mouse_Left);
until (TReflectionInventory.IsEmpty);
end;
begin
initAL;
Reflect.Setup;
MyPlayer.UserName := '';
MyPlayer.Password := '';
MyPlayer.Active := True;
MyPlayer.Login;
SetUpLoot;
wait(3000+random(100));
repeat
FindBones;
BuryBones;
until (False)
end.