Titan Rs Posted September 16, 2018 Share Posted September 16, 2018 Hi guys, Writing a script,ive got all my noted loot in my inventory and i click on one of these items so its in the sell offer of the GE thats all fine, How would i get it to press the lower 5percent twice and then confirm.. just doing if(getGrandExchange.isSellOfferOpen){ interact(lower5percentwidget); interact(lower5percentwidget); interact(confirmWidget) } would need static sleeps inbetween, and for example if interact(confirmWidget) failed it would just go do the first two interact methods again until confirm widget worked. But atm i cant think of any other way to do it. Ive searched for snippets but i cant find any, if there are any i would really appreciate the link. I know my question may seem confusing sorry about that thanks, Quote Link to comment Share on other sites More sharing options...
Explv Posted September 16, 2018 Share Posted September 16, 2018 (edited) @Luke Reading Just keep track of the percentage changed / number of decrease price clicks. For example: final int targetPercentageChanged = -10; execute(new Event() { int percentageChanged = 0; @Override public int execute() throws InterruptedException { if (percentageChanged != targetPercentageChanged) { if (targetPercentageChanged < 0) { if (lower5PercentWidget.interact()) { percentageChanged -= 5; } else if (higher5PercentWidget.interact()) { percentageChanged += 5; } } } else if (getGrandExchange().confirm()) { setFinished(); } return 600; } }); Edited September 16, 2018 by Explv 2 Quote Link to comment Share on other sites More sharing options...
Titan Rs Posted September 16, 2018 Author Share Posted September 16, 2018 3 hours ago, Explv said: @Luke Reading Just keep track of the percentage changed / number of decrease price clicks. For example: final int targetPercentageChanged = -10; execute(new Event() { int percentageChanged = 0; @Override public int execute() throws InterruptedException { if (percentageChanged != targetPercentageChanged) { if (targetPercentageChanged < 0) { if (lower5PercentWidget.interact()) { percentageChanged -= 5; } else if (higher5PercentWidget.interact()) { percentageChanged += 5; } } } else if (getGrandExchange().confirm()) { setFinished(); } return 600; } }); Thanks for this, exactly what i needed Quote Link to comment Share on other sites More sharing options...