I'm trying to use getMouse().click but it doesn't seem to be clicking when I want it to.
My code is as follows:
for (i = 0; i < 28; i++) {
if (InventorySlotDestination.getSlot(i).contains(getMouse().getPosition())) {
if (getMouse().click(false)) {
i++;
sleep(random(100, 125));
}
} else {
Rectangle rect = InventorySlotDestination.getSlot(i);
getMouse().move(rect.x + (rect.width / 2), rect.y + (rect.height / 2));
sleep(random(100, 125));
}
}
Basically I'm just trying to click on all items in my inventory, my mouse moves through the inventory as intended but doesn't click on anything.
I don't want to use inventory.interact() as that doesn't serve the right purpose for what I want to do.