Bobrocket Posted June 16, 2015 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
Twin Posted June 16, 2015 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.
Bobrocket Posted June 17, 2015 Author 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.
FrostBug Posted June 17, 2015 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
Bobrocket Posted June 17, 2015 Author 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.