JoRouss Posted December 11, 2018 Posted December 11, 2018 InteractionEvent AcceptTradeEvent = new InteractionEvent(t_LastRequestingPlayer, "Trade with"); AcceptTradeEvent.setWalkTo(false); AcceptTradeEvent.setWalkingDistanceThreshold(0); AcceptTradeEvent.setMaximumAttempts(1); //Accept the trade if(execute(AcceptTradeEvent).hasFinished()){ new ConditionalSleep(3000, 500) { @Override public boolean condition() throws InterruptedException { //Interrupt the pause if I'm trading with the Player return getTrade().isCurrentlyTrading(); } }.sleep(); } I want the bot to stay in place, to not move at all. I thought this would achieve what I wanted. I can't figure it out... If someone trades me and run away, my bot will chase him. Thanks for the help!
HeyImJamie Posted December 11, 2018 Posted December 11, 2018 I'd suggest stopping the other script from walking away? The only checks I can see you doing from this end are making sure the players animation is -1 and that they're within 1 tile at the time of accepting the trade. If your player moves, just walk back?
JoRouss Posted December 11, 2018 Author Posted December 11, 2018 Yeah, I'm just walking back. I was wondering if there was a way to prevent it from running away. Thanks!