Jump to content

can't click on the inventory tab


Recommended Posts

Posted (edited)

Hi everyone. What am i doing wrong here. I used the same method for opening settings tab. But Inventory doesn't seem to work. It also logs that it's opening the inventory.

[INFO][Bot #1][12/01 09:06:11 PM]: Started script : SBTutorialIsland
[INFO][Bot #1][12/01 09:06:12 PM]: Opening inventory


		if (!getWidgets().containingText("Click on the flashing backpack").isEmpty()) {
					getTabs().open(Tab.INVENTORY);
					log("Opening inventory");
					sleep(random(600,700));
				}
Edited by OSRS Sebastian
  • Like 1
Posted (edited)
getWidgets().getWidgetContainingText("Click on the flashing backpack icon to the right hand side") != null

though this is how I use it for tutorial island


    @Override
    public void run() throws InterruptedException {
        RS2Widget w = getWidgets().get(548, 54);
        WidgetDestination m = new WidgetDestination(getBot(),w);
        ClickMouseEvent g = new ClickMouseEvent(m);
        if(w != null && w.isVisible())
        {
            execute(g);
            //w.interact("Inventory");
            sleep(500 + random (100, 600));
        }
    }

or do fix it your way

                if (!getTabs().getOpen().equals(Tab.INVENTORY)) getTabs().open(Tab.INVENTORY);

Edited by Trinity
  • Like 1
Posted

Hi everyone. What am i doing wrong here. I used the same method for opening settings tab. But Inventory doesn't seem to work. It also logs that it's opening the inventory.

[INFO][Bot #1][12/01 09:06:11 PM]: Started script : SBTutorialIsland
[INFO][Bot #1][12/01 09:06:12 PM]: Opening inventory


if (!getWidgets().containingText("Click on the flashing backpack").isEmpty()) {
					getTabs().open(Tab.INVENTORY);
					log("Opening inventory");
					sleep(random(600,700));
				}
Because the method used to open the inventory doesn't match the same widget. The blinking inventory does not equal the neutral inventory
  • Like 1
Posted

 

Hi everyone. What am i doing wrong here. I used the same method for opening settings tab. But Inventory doesn't seem to work. It also logs that it's opening the inventory.

[INFO][Bot #1][12/01 09:06:11 PM]: Started script : SBTutorialIsland
[INFO][Bot #1][12/01 09:06:12 PM]: Opening inventory


		if (!getWidgets().containingText("Click on the flashing backpack").isEmpty()) {
					getTabs().open(Tab.INVENTORY);
					log("Opening inventory");
					sleep(random(600,700));
				}

 

I recommend you use configs for Tutorial Island. It greatly simplifies everything.

 

For example, when config 281 == 30 you need to open the Inventory tab ( on the Survival stage of Tut Island )

if(script.getConfigs().get(281) == 30){

    script.getTabs().open(Tab.INVENTORY);
    new ConditionalSleep(1500) {
        @Override
        public boolean condition() throws InterruptedException {
            return script.getTabs().getOpen() == Tab.INVENTORY;
        }
    }.sleep();
}

 

  • Like 1
  • 1 year later...
Posted (edited)
On 1-12-2015 at 9:30 PM, Explv said:

 

I recommend you use configs for Tutorial Island. It greatly simplifies everything.

 

For example, when config 281 == 30 you need to open the Inventory tab ( on the Survival stage of Tut Island )


if(script.getConfigs().get(281) == 30){

    script.getTabs().open(Tab.INVENTORY);
    new ConditionalSleep(1500) {
        @Override
        public boolean condition() throws InterruptedException {
            return script.getTabs().getOpen() == Tab.INVENTORY;
        }
    }.sleep();
}

 

Sorry for reviving an old thread but thank you for bringing this to my attention, you have posted this on several threads and everytime you get either ignored or they use their own shitty method to determine states of something. This (script.getConfigs().get(281)) is truly the best and most trustworthy way. Thanks again

Edited by tinnetju
Posted
2 hours ago, tinnetju said:

Sorry for reviving an old thread but thank you for bringing this to my attention, you have posted this on several threads and everytime you get either ignored or they use their own shitty method to determine states of something. This (script.getConfigs().get(281)) is truly the best and most trustworthy way. Thanks again

You do realize that the most of us that use other methods that you consider worse, do it because we're unaware that this is superior or exist at all right? 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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