Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean withdrawAmount(int itemId, int amount) throws InterruptedException {
- int slot = this.client.getBank().getSlotForId(itemId);
- Rectangle rec = client.getBank().getAbsoluteSlotPosition(slot);
- MouseDestination des = new RectangleDestination((int)rec.getMinX(), (int)rec.getMinY(), 30, 30);
- MouseDestination selection = new RectangleDestination(this.client.getMenuX(), this.client.getMenuY()+65, this.client.getMenuWidth(), 10);
- if (!client.getBank().isOpen()) {
- return false;
- }else{
- if (!client.getBank().contains(itemId)) {
- return false;
- }else{
- if (!client.getBank().isSlotVisible(slot)) {
- this.client.getBank().scrollToSlot(slot);
- }else{
- if (!client.isMenuOpen()) {
- this.client.moveMouseTo(des, false, true, true);
- }else{
- if (client.getMenu() != null) {
- if (hasOption("withdraw-"+amount)) {
- return this.client.moveMouseTo(selection, false, true, false);
- }else{
- //fix this, mouse move off of screen, withdraw x too fast, add a wait for interface.
- return this.client.getBank().withdrawX(itemId, amount);
- }
- }
- }
- }
- }
- }
- return false;
- }
- public boolean withdrawAmount(String itemName, int amount) throws InterruptedException{
- int slot = this.client.getBank().getSlotForId(getIdOfItemName(itemName));
- Rectangle rec = client.getBank().getAbsoluteSlotPosition(slot);
- MouseDestination des = new RectangleDestination((int)rec.getMinX(), (int)rec.getMinY(), 30, 30);
- MouseDestination selection = new RectangleDestination(this.client.getMenuX(), this.client.getMenuY()+65, this.client.getMenuWidth(), 10);
- if (!client.getBank().isOpen()) {
- return false;
- }else{
- if (!client.getBank().contains(itemName)) {
- return false;
- }else{
- if (!client.getBank().isSlotVisible(slot)) {
- this.client.getBank().scrollToSlot(slot);
- }else{
- if (!client.isMenuOpen()) {
- this.client.moveMouseTo(des, false, true, true);
- }else{
- if (client.getMenu() != null) {
- if (hasOption("withdraw-"+amount)) {
- return this.client.moveMouseTo(selection, false, true, false);
- }else{
- //fix this, mouse move off of screen, withdraw x too fast, add a wait for interface.
- return this.client.getBank().withdrawX(getIdOfItemName(itemName), amount);
- }
- }
- }
- }
- }
- }
- return false;
- }
- public boolean hasOption(String option){
- for (int i = 0; i < client.getMenuCount(); i++){
- if (client.getMenu().get(i).action.equalsIgnoreCase(option)) {
- return true;
- }
- }
- return false;
- }
- public int getIdOfItemName(String name) {
- for (Item item : client.getBank().getItems()) {
- if (item != null && item.getName().equalsIgnoreCase(name)) {
- return item.getId();
- }
- }
- return -1;
- }
- public boolean depositInventory() throws InterruptedException {
- MouseDestination des = new RectangleDestination(426,288,33,33);
- if (!client.getBank().isOpen()) {
- return false;
- }else{
- if (!client.getInventory().isEmpty()) {
- return this.client.moveMouseTo(des, false, true, false);
- }else{
- log("You inventory is empty");
- return true;
- }
- }
- }
- public boolean depositEquipments() throws InterruptedException {
- MouseDestination des = new RectangleDestination(463,288,33,33);
- if (!client.getBank().isOpen()) {
- return false;
- }else{
- if (equipmentTab.isWearingItem(EquipmentSlot.AMULET)|| equipmentTab.isWearingItem(EquipmentSlot.ARROWS)|| equipmentTab.isWearingItem(EquipmentSlot.CAPE)|| equipmentTab.isWearingItem(EquipmentSlot.CHEST)|| equipmentTab.isWearingItem(EquipmentSlot.FEET)||equipmentTab.isWearingItem(EquipmentSlot.HANDS)|| equipmentTab.isWearingItem(EquipmentSlot.HAT)|| equipmentTab.isWearingItem(EquipmentSlot.LEGS)|| equipmentTab.isWearingItem(EquipmentSlot.RING)|| equipmentTab.isWearingItem(EquipmentSlot.SHIELD)|| equipmentTab.isWearingItem(EquipmentSlot.WEAPON)) {
- return client.moveMouseTo(des, false, true, false);
- }else{
- log("Your not wearing anything");
- return true;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement