Obviously it isn't the greatest and there is probably a way to check all the slots without hardcoding each one, but I'm too stupid for that. Maybe someone else can add to this.
Try this?
procedure dropMisc();
begin
if not
isMouseOverText(['item that you want to keeps mouseOverText'])
or
isMouseOverText(['other item that you want to keeps mouseOverText'])
or
isMouseOverText(['other item that you want to keeps mouseOverText'])
then // if text matches then begin
begin
fastClick(MOUSE_RIGHT); // right click
chooseOption.select(['rop']); // choose drop option
writeLn('We dropped a junk item');
end else
writeln('item is a wanted item, keeping it');
end;
procedure findMisc();
begin
if not isLoggedIn then
Exit;
if not (tabBackpack.isOpen()) then
tabBackpack.open();
if (tabBackpack.isOpen()) then
tabBackPack.mouseSlot(1, MOUSE_MOVE); // move mouse slot 1
if (tabBackpack.isItemInSlot(1)) then
begin
dropMisc();
tabBackPack.mouseSlot(2, MOUSE_MOVE); // move mouse slot 2
end else
writeln('slot 1 empty, moving to next slot');
tabBackPack.mouseSlot(2, MOUSE_MOVE); // move mouse slot 2
if (tabBackpack.isItemInSlot(2)) then
begin
dropMisc();
tabBackPack.mouseSlot(3, MOUSE_MOVE); // move mouse slot 3
end else
writeln('slot 2 empty, moving to next slot');
tabBackPack.mouseSlot(3, MOUSE_MOVE); // move mouse slot 3
//Add in the same code from slots 3-28 to sort out the junk items from the whole inventory
end;
Actually I don't even think you need the mouse moves, but eh this is off the top of my head.