[First Script] Bag of Bones
Hi everyone. This is my first script and I only spend an hour or so on it so it has some work but basically it is supposed to just search for 'Bones' in the area, pick up and inventor, the bury that inventory. I still have yet to put it through a loop.
My question is why does it not stop at a full inventory and start burying the bones?
I want to thank Vizzyy and his Boner script for the inspiration, elfyyy for the Reflection tutorial and some code, and Fitta on the snippets of code about finding items.
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; //elfyyy and Fitta
var
Drop: TReflectGroundItemArray;
I: Integer;
Point: TPoint;
begin
Drop.GetAll(20);
for I := 0 to High(Drop)do
begin
Point := Drop[I].GetMSPoint;
Reflect.Mouse.Move(Point, 2, 2);
Reflect.Mouse.Click(Mouse_Left);
Wait (4000);
end;
end;
procedure BuryBones
var
Item: TReflectInvItem;
begin
Item.Find('Bones');
Reflect.Mouse.Move(Item.GetPoint,2,2);
Reflect.Mouse.Click(Mouse_Left);
end;
begin
initAL;
Reflect.Setup;
MyPlayer.UserName := '';
MyPlayer.Password := '';
MyPlayer.Active := True;
MyPlayer.Login;
SetUpLoot;
wait(3000+random(100));
repeat
FindBones;
until (TReflectionInventory.IsFull);
repeat
BuryBones;
until (False)
end.