Just whipped this up :p
{*******************************************************************************
function R_MouseItemIDs(ID: TIntegerArray; Option: string): Boolean;
By: lordsaturn modded by mormonman
Description: Clicks an item with the given ID and chooses the given option.
*******************************************************************************}
function R_MouseItemIDs(ID: TIntegerArray; Option: string): Boolean;
var
Inv, x, y, itemID, i, t: integer;
B: TBox;
begin
Inv := GetInterface(149, 0);
Result := False;
for t := 0 to High(ID) do
begin
for i := 0 to 27 do
begin
itemID := SmartGetFieldArrayInt(Inv, InventoryItemIDs, i);
if (itemID > 0) and (itemID = ID[t]) then
begin
B := InvBox(i+1);
MMouse(B.x1, B.y1, B.x2-B.x1, B.y2-B.y1);
Wait(50+Random(50));
if OptionExists(Option) then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Result := R_ChooseOption(Option);
Break;
end;
end;
end;
end;
SmartFreeObject(Inv);
end;
E: senrath, you fail… i think he wants to click food? and that means that he doesn't want to click them all at once.