It's definitely working for me, with a very similar function. My guess is that your ID may be wrong.
You can add a few lines for debugging to see if the function is working AT ALL.
function PickupHide : boolean;
var
GroundItems : TGroundItemArray;
HideTile : TTile;
i : integer;
begin
GroundItems := [];
GroundItems := GetItemsNear(3);
WriteLn('Searching for hides.');
for i := 0 to High(GroundItems) do
begin
WriteLn('One Ground Item');
[b]Writeln(GroundItems[i].ID);
Writeln(GroundItems[i].Stack);[/b]
if GroundItems[i].ID = Inv_Hide then
begin
WriteLn('there is hide on the ground');
HideTile := TileToMS(GroundItems[i].Tile, 0);
MMouse(HideTile.x, HideTile.y, 2, 2);
if OptionExists('ake Cow') then
begin
if R_IsUpText('ake Cow') then
begin
ClickMouse2(True);
Result := True;
Exit;
end else
begin
ClickMouse2(False);
R_ChooseOption('ake Cow');
Result := True;
Exit;
end
end else
begin
Result := False;
Exit;
end;
end;
inc(i);
end;
end;
If there's anything at all around you, it should tell you the ID and the number in the stack for each item in the array, until one matches the ID for a cowhide anyway.