May 14, 20187 yr 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
May 14, 20187 yr 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.
May 14, 20187 yr Author 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
May 14, 20187 yr 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; }
May 14, 20187 yr As Chris suggested, it's totally worth making use of the API features to do this for you rather than manually interacting with widgets!
May 14, 20187 yr Author 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, 20187 yr by Dab in a Lab
Create an account or sign in to comment