- Joined
- May 1, 2017
- Messages
- 7
- Thread Author
- #1
I am creating an high alch bot, but i'm having trouble with finding how you can drag a certain item to a certain spot in your inventory?
By registering with us, you'll be able to discuss, share and private message with other members of our community.
Sign up now! public static void moveItem(String itemName, int indexGoal) {
SpriteItem item = Inventory.newQuery().names(itemName).results().first();
if (item != null) {
if (item.getIndex() != indexGoal) {
Interactable start = item.getBounds();
Interactable end = Inventory.getBoundsOf(indexGoal);
if (start != null && end != null) {
log.info("Dragging " + item + " from " + item.getIndex() + " to " + indexGoal);
if (Mouse.drag(start, end)) {
// delay
}
} else {
log.warn("Failed to locate the item or bounds of goal index location");
}
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.