Jump to content

trade.acceptTrade() clicking wrong button?


Recommended Posts

Posted

Hey guys :) I've noticed this can happen sometimes, usually after account is running for a longer time when calling:

trade.acceptTrade();

Instead of accepting the trade, it clicks on decline button instead, not even clicking but just hover it and returns true despite.

Any ideas what could be the cause of this?

Thanks!

Posted

Most likely yeah, doesn't happen always but just sometimes. I'm running about 35+ clients.

Hmm, I'm using conditional loop, but since it returns true even if it doesn't behave correctly its kinda useless :/

 

new ConditionalLoop(getBot(), 3)
{
    @Override
    public boolean condition()
    {
        return !trade.acceptTrade();
    }
}.start();
Posted
private void acceptTrades() {
		if (trade.isFirstInterfaceOpen() && trade.didOtherAcceptTrade()) {
			log("Accepting first trade");
			gpmade = gpmade + Math.toIntExact(trade.getTheirOffers().getAmount("Coins"));
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return trade.isSecondInterfaceOpen();
				}
			}.sleep();
		} else if (trade.isSecondInterfaceOpen()) {
			log("Accepting second trade");
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return !trade.isCurrentlyTrading();
				}
			}.sleep();
		}
	}

Thats mine, works everytime i dont run 35+ clients but i have tested it on 10 running for a few days and not one problem

Posted
4 minutes ago, whipz said:

private void acceptTrades() {
		if (trade.isFirstInterfaceOpen() && trade.didOtherAcceptTrade()) {
			log("Accepting first trade");
			gpmade = gpmade + Math.toIntExact(trade.getTheirOffers().getAmount("Coins"));
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return trade.isSecondInterfaceOpen();
				}
			}.sleep();
		} else if (trade.isSecondInterfaceOpen()) {
			log("Accepting second trade");
			trade.acceptTrade();
			new ConditionalSleep(10000) {

				@Override
				public boolean condition() throws InterruptedException {
					return !trade.isCurrentlyTrading();
				}
			}.sleep();
		}
	}

Thats mine, works everytime i dont run 35+ clients but i have tested it on 10 running for a few days and not one problem

Hey, I had something similar prior running so many clients and worked just perfectly, the issue occured only when running as much... I made it with conditional sleeps and loops now and seems to be working so far :D 

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