Jump to content

getWidgets().getWidgetContainingText() returning wrong widget


Ace

Recommended Posts

  • Mirror client version v2.13.107
  • Console output / terminal output: None
  • Crash report if a crash occurred: None
  • Script that you ran: own script
  • Hooks that failed: None
  • JVM/Browser bit version (32 / 64): 64
Hey,

on my own green dragon killer script it supports looting bag. I'm using getWidget().getWidgetContainingText("All") to make sure the script deposits all items into the looting bag but for some reason when using the mirror client it always selectes the widget that contains ("One") and not ("All"). It works perfectly fine when running the same script on injection mode so I guess it has something to do with the mirror mode.

The method I'm using:

@Override    public boolean execute() throws InterruptedException {        Item i = sA.getInventory().getItem(new Filter<Item>() {            @Override            public boolean match(Item i) {                return i.getName().equalsIgnoreCase("Green dragonhide") || i.getName().equalsIgnoreCase("Dragon bones");            }        });        if(i != null && sA.getInventory().getAmount(i.getName()) > 2){            if(sA.getInventory().getItem(i.getName()).interact("Use"));{                new ConditionalSleep(2000, 100, 50) {                    @Override                    public boolean condition() throws InterruptedException {                        return sA.getInventory().isItemSelected();                    }                }.sleep();            }            if(sA.getInventory().isItemSelected()){                sA.getInventory().getItem("Looting bag").interact();                new ConditionalSleep(4000, 100, 50) {                    @Override                    public boolean condition() throws InterruptedException {                        return sA.getWidgets().getWidgetContainingText("All") != null;                    }                }.sleep();            }            if(sA.getWidgets().getWidgetContainingText("All") != null){                sA.getWidgets().getWidgetContainingText("All").interact("Continue");                sA.sleep(MethodProvider.random(600, 800));            }        }        return true;    }
Thanks for your time! :) Edited by _Ace_
  • Like 1
Link to comment
Share on other sites

 

  • Mirror client version v2.0
  • Console output / terminal output: None
  • Crash report if a crash occurred: None
  • Script that you ran: own script
  • Hooks that failed: None
  • JVM/Browser bit version (32 / 64): 64

Hey, 

 

on my own green dragon killer script it supports looting bag. I'm using getWidget().getWidgetContainingText("All") to make sure the script deposits all items into the looting bag but for some reason when using the mirror client it always selectes the widget that contains ("One") and not ("All"). It works perfectly fine when running the same script on injection mode so I guess it has something to do with the mirror mode. 

 

The method I'm using:

@Override
    public boolean execute() throws InterruptedException {
        Item i = sA.getInventory().getItem(new Filter<Item>() {
            @Override
            public boolean match(Item i) {
                return i.getName().equalsIgnoreCase("Green dragonhide") || i.getName().equalsIgnoreCase("Dragon bones");
            }
        });
        if(i != null && sA.getInventory().getAmount(i.getName()) > 2){
            if(sA.getInventory().getItem(i.getName()).interact("Use"));{
                new ConditionalSleep(2000, 100, 50) {
                    @Override
                    public boolean condition() throws InterruptedException {
                        return sA.getInventory().isItemSelected();
                    }
                }.sleep();
            }
            if(sA.getInventory().isItemSelected()){
                sA.getInventory().getItem("Looting bag").interact();
                new ConditionalSleep(4000, 100, 50) {
                    @Override
                    public boolean condition() throws InterruptedException {
                        return sA.getWidgets().getWidgetContainingText("All") != null;
                    }
                }.sleep();
            }
            if(sA.getWidgets().getWidgetContainingText("All") != null){
                sA.getWidgets().getWidgetContainingText("All").interact("Continue");
                sA.sleep(MethodProvider.random(600, 800));
            }
        }
        return true;
    }

Thanks for your time! smile.png

 

 

The mirror client sometimes struggles with reading strings in dialogues. This is why it randomly gets stuck.

For example;

 

Ring of dueling teleports look like this -->

Duel Arena

Castle Wars

Clan Wars

 

The mirror client fails to do -->

dialogues.selectOption("Castle Wars");

so you need to do dialogues.selectOption(2);

 

so instead of trying to choose the option it should click with a string, select the option with its number.

  • Like 1
Link to comment
Share on other sites

The mirror client sometimes struggles with reading strings in dialogues. This is why it randomly gets stuck.

For example;

Ring of dueling teleports look like this -->

Duel Arena

Castle Wars

Clan Wars

The mirror client fails to do -->

dialogues.selectOption("Castle Wars");

so you need to do dialogues.selectOption(2);

so instead of trying to choose the option it should click with a string, select the option with its number.

Thanks for the reply, choosing the widget by its root and child id works fine too? :)
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...