Goto you Hooks file change
Code:
{Item: as}
Item_StackSizes: THook = ['c', 1707626481];
Item_ID: THook = ['d', -933263931];
As for the code
Code:
function loot(D: Integer): boolean;
var
e,i, j: integer;
_gItems: TReflectGroundItemArray;
s : string;
InInv: TReflectInvItem;
gItems : tstringarray;
begin
gItems := [ 'bones','big bones','bronze bar'];
_gItems.GetAll(D);
if length(_gItems) = 0 then Exit;
for i := 0 to high(_gItems) do begin
for j := 0 to high(gItems) do begin
if (pos(gItems[j], lowercase(_gItems[i].getName)) > 0) then begin
If InteractTileOnce(_gItems[I].GetTile, 'Take ', 'Take ' + _gItems[I].GetName, Mouse_Right,0,0,0)then
writeln('Picked up: '+ _gItems[I].GetName);
end;
end;
end;
end;
Code:
procedure loot;
var
i, j, me_indice: integer;
_gItems: TReflectGroundItemArray;
gItems: tstringarray;
s : string;
begin
_gItems.GetAll;
for i := 0 to high(_gItems) do
begin
for j := 0 to high(gItems) do
begin
if (pos(gItems[j], lowercase(_gItems[i].getName)) > 0) then
begin
s:=_gItems[i].GetName;
begin
Mouse.Move(_gItems[i].GetMSPoint, 2, 2);
Wait(50);
Mouse.Click(Mouse_Right);
Wait(50);
Reflect.Text.ChooseOption('Take '+s);
end
waitMove(3000);
end;
end;
end;
end;
Can use the above if you don't have your own custom interactonce or similar function..
But there is still one more problem... It will search through the piles.. but it returns to the last pile and false clicks.- where as it should release the final TPoint
Something i need to discuss && resolve
I have written the looting function 4 different ways; they all result with the same bug.