Jump to content

GE - selling item through Widgets


Recommended Posts

Posted

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,

Posted (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 by Explv
  • Like 2
Posted
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

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