Archon Posted November 14, 2013 Share Posted November 14, 2013 (edited) OSBot's scrolling to an item from the bank interface isn't the greatest and is buggy. Also, who honestly scrolls with the tiny up and down arrows? Anyways, this will scroll more human like. Feel free to use it. private boolean scrollToItem(String name) throws InterruptedException { RS2Interface bankInterface = client.getInterface(12); if(bankInterface == null || !bankInterface.isVisible()) return false; Item[] bankItems = bankInterface.getItems(6); if(bankItems == null || bankItems.length < 400) { log("Invalid items container child id!"); return false; } int itemSlot; Item bankItem = null; for(itemSlot = 0; itemSlot < bankItems.length; itemSlot++) { Item item = bankItems[itemSlot]; if(item == null || !item.getName().equalsIgnoreCase(name)) continue; bankItem = item; break; } if(bankItem == null) { log(name + " not found in bank!"); return false; } if(client.getBank().isSlotVisible(itemSlot)) return true; int row = itemSlot > 8 ? itemSlot / 8 : 0; System.out.println("Scrolling to row: " + row); int x = 482; int y = 75 + (int) (row * 3.5); int width = 14; int height = 10; return client.moveMouseTo(new RectangleDestination(x, y, width, height), false, true, false); } Edited November 14, 2013 by Archon Link to comment Share on other sites More sharing options...
BotRS123 Posted November 15, 2013 Share Posted November 15, 2013 fix it then. ...? I think he thinks you develop the client. 2 Link to comment Share on other sites More sharing options...
Heaven Posted November 25, 2013 Share Posted November 25, 2013 Haha, ill probably find a use for this in one of my scripts :P Link to comment Share on other sites More sharing options...
lolmanden Posted November 30, 2013 Share Posted November 30, 2013 Thanks for the snippet. Link to comment Share on other sites More sharing options...