ABM 2 Share Posted April 27, 2019 Is it possible? Been checking API and can't find a way to do it. Link to comment Share on other sites More sharing options...
ABM 2 Author Share Posted April 27, 2019 By this I mean when you are in the actual trade screen. For example, if a person has accepted the first screen. Link to comment Share on other sites More sharing options...
yeeter 491 Share Posted April 27, 2019 Each part of a trade has a seperate ID you can do something like if(getTrade().isOpen(1)){ // Do shit in the first trade window // offer/check if items are offered getTrade().acceptTrade(1); } if(getTrade().isOpen(2){ getTrade().acceptTrade(2); } might want to check the API documentation for all of this because I am typing this from my phone might be off a bit. Link to comment Share on other sites More sharing options...
ABM 2 Author Share Posted April 27, 2019 That would check if the trade is open, and then accept it, what I am looking for is to check if other parties in the trade involved in the trade has accept the first screen of the trade, so if the screen like this: https://prnt.sc/nhh5aq it returns true or something. Link to comment Share on other sites More sharing options...
Milasoft 202 Share Posted April 27, 2019 You'll need to use widgets to find out if they accepted. Link to comment Share on other sites More sharing options...
yeeter 491 Share Posted April 27, 2019 1 hour ago, ABM said: That would check if the trade is open, and then accept it, what I am looking for is to check if other parties in the trade involved in the trade has accept the first screen of the trade, so if the screen like this: https://prnt.sc/nhh5aq it returns true or something. ahhh sorry, yeah what Mila said you would want widgets, I am extremly intoxicated atm srry. Link to comment Share on other sites More sharing options...
Neffarion 472 Share Posted April 27, 2019 (edited) public boolean accepted() { if(!script.getTrade().isOpen()){ return false; } WidgetChild w = null; if (script.getTrade().isOpen(1) == 1) { w = script.getWidgets().getWidgetChild(335, 30); } else { w = script.getWidgets().getWidgetChild(334, 4); } return w != null && w.isVisible() && w.getText().toLowerCase().contains("player has accepted"); } Not sure about the numbers on the widgets though, you should double check Edited April 27, 2019 by Neffarion Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now