Dab in a Lab Posted May 14, 2018 Share Posted May 14, 2018 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 Quote Link to comment Share on other sites More sharing options...
Hel Posted May 14, 2018 Share Posted May 14, 2018 ur widget: vs the right widget: 2 1 Quote Link to comment Share on other sites More sharing options...
Hel Posted May 14, 2018 Share Posted May 14, 2018 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. Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted May 14, 2018 Author Share Posted May 14, 2018 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 1 Quote Link to comment Share on other sites More sharing options...
Chris Posted May 14, 2018 Share Posted May 14, 2018 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; } 2 Quote Link to comment Share on other sites More sharing options...
Apaec Posted May 14, 2018 Share Posted May 14, 2018 As Chris suggested, it's totally worth making use of the API features to do this for you rather than manually interacting with widgets! 1 Quote Link to comment Share on other sites More sharing options...
Dab in a Lab Posted May 14, 2018 Author Share Posted May 14, 2018 (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 May 14, 2018 by Dab in a Lab Quote Link to comment Share on other sites More sharing options...