Banker 175 Share Posted October 4, 2016 Okay so I'm working on a bot for someone and It needs to automatically accept trades, get the amount of an item in a trade and accept second trade. My issue is that i can't seem to find how to accept the second trade, in the docs there's acceptSecondTrade(); but i cant seem to find it/use it in my actual code. Thanks. Link to comment Share on other sites More sharing options...
slasso 27 Share Posted October 4, 2016 Okay so I'm working on a bot for someone and It needs to automatically accept trades, get the amount of an item in a trade and accept second trade. My issue is that i can't seem to find how to accept the second trade, in the docs there's acceptSecondTrade(); but i cant seem to find it/use it in my actual code. Thanks. getTrade().acceptSecondTrade(); Link to comment Share on other sites More sharing options...
Banker 175 Author Share Posted October 4, 2016 getTrade().acceptSecondTrade(); That isnt an option? Link to comment Share on other sites More sharing options...
slasso 27 Share Posted October 4, 2016 That isnt an option? Hm, yea it's in the docs but isn't showing up. Use getTrade().acceptTrade(int tradeScreen) Link to comment Share on other sites More sharing options...
Banker 175 Author Share Posted October 4, 2016 Hm, yea it's in the docs but isn't showing up. Yeah, i tried using getTrade().acceptTrade(); twice to see if that would work but it doesnt seem to :/ Link to comment Share on other sites More sharing options...
slasso 27 Share Posted October 4, 2016 Yeah, i tried using getTrade().acceptTrade(); twice to see if that would work but it doesnt seem to :/ Try with the int arg. getTrade().acceptTrade(2); Link to comment Share on other sites More sharing options...
Banker 175 Author Share Posted October 4, 2016 Try with the int arg. getTrade().acceptTrade(2); Hmm, i cant seem to get it to even accept the first trade screen now, even using getTrade().acceptTrade(); Link to comment Share on other sites More sharing options...
slasso 27 Share Posted October 4, 2016 Hmm, i cant seem to get it to even accept the first trade screen now, even using getTrade().acceptTrade(); getTrade().acceptTrade(1); getTrade().acceptTrade(2); Link to comment Share on other sites More sharing options...
Banker 175 Author Share Posted October 4, 2016 getTrade().acceptTrade(1); getTrade().acceptTrade(2); Ive tried that and the following but neither are working :/ public void onTradeMessage(Message trade) { user = trade.getUsername(); getTrade().tradeWithPlayer(user); if(getTrade().isOpen(1)){ getTrade().acceptTrade(1); } if(getTrade().isOpen(2)){ getTrade().acceptTrade(2); } } Link to comment Share on other sites More sharing options...
Diddy 265 Share Posted October 4, 2016 Ive tried that and the following but neither are working :/ public void onTradeMessage(Message trade) { user = trade.getUsername(); getTrade().tradeWithPlayer(user); if(getTrade().isOpen(1)){ getTrade().acceptTrade(1); } if(getTrade().isOpen(2)){ getTrade().acceptTrade(2); } } don't do actions in onMessage, put every action in onLoop and try to do 1 action a loop Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.