June 18, 20169 yr Hey ^^ I've seen another thread about an issue with trading, but no solution has been posted so I'm posting another one :3 I'm writing some merching scripts and when trading, "trade.acceptTrade()" sometimes fails to accept the trade and instead only shakes the mouse over Decline trade button doing nothing? It's been bugging me out for hours -.- Anyone knows how to solve this? Thx
June 18, 20169 yr do u have a: getTrade().isCurrentlyTrading() in your code edit: post ur code Edited June 18, 20169 yr by Acerd
June 18, 20169 yr Author do u have a: getTrade().isCurrentlyTrading() in your code edit: post ur code Trader 1: if(trade.isCurrentlyTrading()) { if(trade.isFirstInterfaceOpen()) { trade.acceptTrade(); while(trade.isCurrentlyTrading() && !trade.isSecondInterfaceOpen()) sleep(50); } if(trade.isSecondInterfaceOpen()) { trade.acceptTrade(); while(trade.isCurrentlyTrading()) sleep(50); } return; } Trader 2: if(trade.isCurrentlyTrading()) { if(trade.isFirstInterfaceOpen()) { while(!trade.didOtherAcceptTrade()) sleep(50); trade.acceptTrade(); } if(trade.isSecondInterfaceOpen()) { while(!trade.didOtherAcceptTrade()) sleep(50); trade.acceptTrade(); } } This isn't exactly how my code looks like, but this is an example of my logic. (There are sleeps in betwen) Edited June 18, 20169 yr by Xious
June 18, 20169 yr use conditionalsleeps instead of while loops try tis: if (getTrade().isCurrentlyTrading()) { if (getTrade().isFirstInterfaceOpen()) { if (getTrade().acceptTrade()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getTrade().isSecondInterfaceOpen(); } }.sleep(); } } else { if (getTrade().acceptTrade()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return !getTrade().isCurrentlyTrading(); } }.sleep(); } } idk 100% if code will work cause i wrote it on browser
June 18, 20169 yr Author use conditionalsleeps instead of while loops try tis: if (getTrade().isCurrentlyTrading()) { if (getTrade().isFirstInterfaceOpen()) { if (getTrade().acceptTrade()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return getTrade().isSecondInterfaceOpen(); } }.sleep(); } } else { if (getTrade().acceptTrade()) { new ConditionalSleep(5000) { @Override public boolean condition() throws InterruptedException { return !getTrade().isCurrentlyTrading(); } }.sleep(); } } idk 100% if code will work cause i wrote it on browser Thx, gonna try this ^^
June 19, 20169 yr Author I tested and it doesn't seem to be the logic of how I implemented it, acceptTrade(); just fails at some point >:< Edit: It was my bad, figured it out ^^ Edited June 19, 20169 yr by Xious
June 19, 20169 yr I tested and it doesn't seem to be the logic of how I implemented it, acceptTrade(); just fails at some point >:< report it to alek
Create an account or sign in to comment