Not the best way to do it, but i wrote it in about 30 seconds...and it should work
int slot = random(0, 27);
int attempts = 0;
while (!inventory.getItemInSlot(slot).getName().equals("Shark")) {
if (attempts > 50)
break;
slot = random(0, 27);
attempts++;
}
mouse.click(new InventorySlotDestination(getBot(), slot), false);
Add you own logic, error checking, etc
https://osbot.org/api/org/osbot/rs07/input/mouse/InventorySlotDestination.html#InventorySlotDestination-org.osbot.rs07.Bot-int-