Neb 7 Posted December 19, 2020 Is there a API method to move items around in your inventory? for example move a item from slot 25 to slot 26.
Neb 7 Author Posted December 19, 2020 if (Mouse.move(knife)) { if (Mouse.drag(knifeSpot)) { sleepUntil(()->Inventory.slotContains(26,"Knife"),Calculations.random(1000,4000)); } } Going to be doing something like this if there isnt I think.
Pseudo 179 Posted December 20, 2020 private static boolean moveItemToSlot(String itemName, int inventorySlot) { Item item = Inventory.get(itemName); if (item == null) return false; if (!item.getDestination().contains(Mouse.getPosition())) { if (Mouse.move(item.getDestination())) { Timing.waitCondition(() -> item.getDestination().contains(Mouse.getPosition()), 1800); } } else { if (Mouse.drag(Inventory.slotBounds(inventorySlot))) { return item.getSlot() == inventorySlot; } } return false; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.