Bobrocket Posted June 16, 2015 Share Posted June 16, 2015 In short, I want to be able to accept a trade when someone sends it. Is there any way to do this without using onMessage? Thanks Quote Link to comment Share on other sites More sharing options...
Twin Posted June 16, 2015 Share Posted June 16, 2015 In short, I want to be able to accept a trade when someone sends it. Is there any way to do this without using onMessage? Thanks I've never used this before, but just from looking at the api http://osbot.org/api/ in the trade section, it looks like it will be something like: if(trade.getTheirOffers() == itemYouWant) trade.acceptTrade(); Although i'm not sure what geetTheirOffers returns, so I don't know howt o check it. Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted June 17, 2015 Author Share Posted June 17, 2015 I've never used this before, but just from looking at the api http://osbot.org/api/ in the trade section, it looks like it will be something like: if(trade.getTheirOffers() == itemYouWant) trade.acceptTrade(); Although i'm not sure what geetTheirOffers returns, so I don't know howt o check it. What I mean is initiate a trade when I am traded. I know how to accept the trade, but when someone requests a trade. Sorry for being confusing. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted June 17, 2015 Share Posted June 17, 2015 (edited) you could use something like.. getTrade().getLastRequestingPlayer().interact("Trade"); to interact with the trading player (Don't forget various null / distance / reachability checks) Edited June 17, 2015 by FrostBug 1 Quote Link to comment Share on other sites More sharing options...
Twin Posted June 17, 2015 Share Posted June 17, 2015 Do what frosttbug said, I misread your question. Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted June 17, 2015 Author Share Posted June 17, 2015 you could use something like.. getTrade().getLastRequestingPlayer().interact("Trade"); to interact with the trading player (Don't forget various null / distance / reachability checks) Thank you. Quote Link to comment Share on other sites More sharing options...