Isolate Posted August 20, 2014 Posted August 20, 2014 seems like i can find an alternative for everything else when updating my scripts but can't find this.
Eliot Posted August 20, 2014 Posted August 20, 2014 I remember having to do this, I can't remember what I figured out though. menu.getMenu() returns a list of the options.
Joseph Posted August 20, 2014 Posted August 20, 2014 seems like i can find an alternative for everything else when updating my scripts but can't find this. Are you trying to choose an action from a menu list? If so, I got you with a snippet in a little
FrostBug Posted August 20, 2014 Posted August 20, 2014 Dialogues#selectOption(int choice, int choices) Dialogues#selectOption(String... option) are these not what you're looking for?
Isolate Posted August 20, 2014 Author Posted August 20, 2014 Dialogues#selectOption(int choice, int choices) Dialogues#selectOption(String... option) are these not what you're looking for? I have no idea why i didnt consider it, but i think that might be the chatbox. and the one i want is select option for the Menu.
Joseph Posted August 20, 2014 Posted August 20, 2014 (edited) I have no idea why i didnt consider it, but i think that might be the chatbox. and the one i want is select option for the Menu. Alright I got you, I'll edit this post with the method edit: public boolean selectMenuOption(String option) { if (script.menu.isOpen()) { List<Option> options = script.menu.getMenu(); for (int i = 0; i < options.size(); i++) { if (options.get(i).action.equalsIgnoreCase(option)) { return script.mouse.click(new RectangleDestination(script.bot, script.menu.getX(), script.menu.getY() + 20 + (i * 15), script.menu.getWidth(), 15)); } } } return false; } Edited August 20, 2014 by josedpay
Isolate Posted August 20, 2014 Author Posted August 20, 2014 Alright I got you, I'll edit this post with the method edit: public boolean selectMenuOption(String option) { if (script.menu.isOpen()) { List<Option> options = script.menu.getMenu(); for (int i = 0; i < options.size(); i++) { if (options.get(i).action.equalsIgnoreCase(option)) { return script.mouse.click(new RectangleDestination(script.bot, script.menu.getX(), script.menu.getY() + 20 + (i * 15), script.menu.getWidth(), 15)); } } } return false; } Thank-you very much ^_^ 1