Jump to content
Dab in a Lab

Why is my widget interaction kinda retarded?

Recommended Posts

I have the widget for setting up a buy offer in box 1, but when the script tries to setup the offer, it misses the widget and just goes next to it like so:

https://gyazo.com/6cc01719e0e86e4463bcc1c6ceeafb4c

It happens like 75% of the time

pic of code:

https://gyazo.com/51813b05a9759085fda3a6a5d6cc3414

pic of widget info:

https://gyazo.com/d9aea51792eb398416a28151c8d25307

 

Link to comment
Share on other sites

6 minutes ago, Slut said:

also @Dab in a Lab jus for the record, because it's the widgets default option, you can just use widget.interact(), doesn't need the actual action, this will just left click on the widget for you.

Sweet, thats good to know. Thanks for the help

  • Like 1
Link to comment
Share on other sites

2 hours ago, Dab in a Lab said:

I have the widget for setting up a buy offer in box 1, but when the script tries to setup the offer, it misses the widget and just goes next to it like so:

https://gyazo.com/6cc01719e0e86e4463bcc1c6ceeafb4c

It happens like 75% of the time

pic of code:

https://gyazo.com/51813b05a9759085fda3a6a5d6cc3414

pic of widget info:

https://gyazo.com/d9aea51792eb398416a28151c8d25307

 

just do 

getContext().getGrandExchange().buyItems(GrandExchange.Box.BOX_1);

 

and if you need any empty box

private GrandExchange.Box getUnusedBox(){
    for (GrandExchange.Box box : GrandExchange.Box.values()) {
        if (getContext().getGrandExchange().getStatus(box) == GrandExchange.Status.EMPTY)
            return box;
    }
    return GrandExchange.Box.BOX_1;
}
  • Like 2
Link to comment
Share on other sites

49 minutes ago, Chris said:

just do 


getContext().getGrandExchange().buyItems(GrandExchange.Box.BOX_1);

 

and if you need any empty box


private GrandExchange.Box getUnusedBox(){
    for (GrandExchange.Box box : GrandExchange.Box.values()) {
        if (getContext().getGrandExchange().getStatus(box) == GrandExchange.Status.EMPTY)
            return box;
    }
    return GrandExchange.Box.BOX_1;
}

Idk if its the getContext() but when I tried doing the getGE().buyItems(...) it didn't seem to do anything. The bot just read over that part of the script and continued onto the next part of the loop. I'll have to try mess around with a bit more

 

Edit: Just added it back to my script and now its working pretty well. Idk what was up with it earlier. Thank you

Edited by Dab in a Lab
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.

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...