Soldtodie Posted July 25, 2013 Share Posted July 25, 2013 (edited) Hey i have made a working withdraw method and i will share it with you! public boolean withdraw(int itemID, int amount) throws InterruptedException { if(!client.getBank().isOpen() || !client.getBank().contains(itemID)) { return false; } int firstVisibleSlot = -1; int lastVisibleSlot = -1; int itemSlot = client.getBank().getSlotForId(itemID); if(!client.getBank().isSlotVisible(itemSlot)) { for(int i = 0; i < 1000; i++) { if(firstVisibleSlot == -1 && client.getBank().isSlotVisible(i)) { firstVisibleSlot = i; } else if(firstVisibleSlot != -1 && !client.getBank().isSlotVisible(i)) { lastVisibleSlot = i - 1; break; } } if(itemSlot >= firstVisibleSlot && itemSlot <= lastVisibleSlot) { } else { if(itemSlot < firstVisibleSlot) { MouseDestination md = new RectangleDestination(new Rectangle(470, 60, 12, 12)); client.moveMouse(md, true); while(!client.getBank().isSlotVisible(itemSlot)) { client.clickMouse(false); } } else if(itemSlot > lastVisibleSlot) { MouseDestination md = new RectangleDestination(new Rectangle(470, 272, 12, 12)); client.moveMouse(md, true); while(!client.getBank().isSlotVisible(itemSlot)) { client.clickMouse(false); } } } } return client.getBank().withdrawX(itemID, amount); } Edited July 25, 2013 by Soldtodie 1 Link to comment Share on other sites More sharing options...
Anon Posted July 25, 2013 Share Posted July 25, 2013 OSBot already has support methods for scrolling.. why did you make your own... if(!this.client.getBank().isSlotVisible(this.client.getBank().getSlotForId(item))) this.client.getBank().scrollToSlot(this.client.getBank().getSlotForId(item)); this.client.getBank().withdrawX(item, amount); It looks good otherwise... Link to comment Share on other sites More sharing options...
Soldtodie Posted July 25, 2013 Author Share Posted July 25, 2013 Because scrolling up does not work! Link to comment Share on other sites More sharing options...
Joseph Posted July 25, 2013 Share Posted July 25, 2013 yep scroll is bugged Link to comment Share on other sites More sharing options...
Peach Posted July 28, 2013 Share Posted July 28, 2013 Is actually calling for the mouse scroll itself bugged, or just Bank#scrollToSlot? Link to comment Share on other sites More sharing options...