Jump to content

GE - selling item through Widgets


Titan Rs

Recommended Posts

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,

Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...