Banker 175 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.
slasso 27 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();
slasso 27 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)
Banker 175 Author 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 :/
slasso 27 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);
Banker 175 Author 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();
slasso 27 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);
Banker 175 Author 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); } }
Diddy 265 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.