ABM 2 Author 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.
yeeter 528 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.
ABM 2 Author 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.
yeeter 528 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.
Neffarion 486 Posted April 27, 2019 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
Recommended Posts
Archived
This topic is now archived and is closed to further replies.