Johnxtrem Posted June 10, 2017 Share Posted June 10, 2017 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! Quote Link to comment Share on other sites More sharing options...
Butters Posted June 10, 2017 Share Posted June 10, 2017 Never happened to me tbh. Though the main cause I would say is lag. if (trade.isFirstInterfaceOpen() { // DO Trade trade.acceptTrade(); } else if (trade.isSecondInterfaceOpen()) { trade.acceptTrade(); } Using more or less this structure Quote Link to comment Share on other sites More sharing options...
Johnxtrem Posted June 10, 2017 Author Share Posted June 10, 2017 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(); Quote Link to comment Share on other sites More sharing options...
whipz Posted June 10, 2017 Share Posted June 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Johnxtrem Posted June 10, 2017 Author Share Posted June 10, 2017 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 Quote Link to comment Share on other sites More sharing options...
Funfight Posted June 10, 2017 Share Posted June 10, 2017 1 hour ago, Johnxtrem said: 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(); Hey I'm pretty new to scripting and I was gotcha wondering how you made the bot into an integer. My guess is you put all the slaves into an array list 0-34? Quote Link to comment Share on other sites More sharing options...