Jump to content

can't click on the inventory tab


Sebastian

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

  • 1 year later...
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
Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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