Jump to content

Why is my widget interaction kinda retarded?


Recommended Posts

Posted

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

 

Posted
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
Posted (edited)
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

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