public boolean interactWithTableItem(GroundItem tableItem, String action,
int tableHeight) throws InterruptedException {
Point p = org.osbot.script.rs2.utility.Utilities.getScreenCoordinates(
bot, tableItem.getGridX(), tableItem.getGridY(), tableHeight);
int height = (int) tableItem.getMouseDestination().getBoundingBox()
.getHeight();
int width = (int) tableItem.getMouseDestination().getBoundingBox()
.getWidth();
return selectOption(null, new RectangleDestination(p.x - width / 2, p.y
- height / 2, width, height), action, false);
}
this was old code i used in osbot 1, with a little tinkering it should work