July 16, 20178 yr Was testing stuff with interaction event and can't get my head around the hasFailed() and hasFinished() methods. Snippet below: Player worker = s.players.closest(tradeArea, workerName); if (worker != null) { InteractionEvent e = new InteractionEvent(worker, "Trade with"); e.setHover(false); e.setMaximumAttempts(1); e.setOperateCamera(true); s.execute(e); Utils.condSleep(5000, 300, () -> e.hasFinished() || e.hasFailed()); if (e.hasFinished()) { s.log("Interaction even has finished and will sleep!!!"); Utils.condSleep(20000, 500, () -> s.trade.isFirstInterfaceOpen()); } if (e.hasFailed()) s.log("Interaction event failed!!!!!!!"); } As you can see this is for trading. It seems that hasFinished() == true when the event succeeds (doesn't fail), hasFailed() == when it fails to eventually send a trade request. The problem I'm facing is that the hasFailed() method sometimes fires even if it actually succeeds (sent a trade request). Is this a bug or am I doing something wrong?
July 16, 20178 yr if the event executes sucessfully then it will be true? true meaning it did the action "Trade with" it will fail it couldnt interact
July 16, 20178 yr Author 11 minutes ago, Chris said: if the event executes sucessfully then it will be true? true meaning it did the action "Trade with" it will fail it couldnt interact Sadly it did. Log looked something like: [log message - action| Interaction event failed - didn't trade Interaction event failed - didn't trade Interaction event failed - trade sent somehow
July 16, 20178 yr 18 minutes ago, nosepicker said: Sadly it did. Log looked something like: [log message - action| Interaction event failed - didn't trade Interaction event failed - didn't trade Interaction event failed - trade sent somehow This also happens with the .interact() method aswell. Annoying as fuck sometimes.
July 16, 20178 yr Author 21 minutes ago, The Undefeated said: This also happens with the .interact() method aswell. Annoying as fuck sometimes. Yeah that's why I started using interaction event with setMaximumAttemps(1). Usually spammed trade requests like hell.
July 12, 20187 yr On 7/17/2017 at 3:35 AM, Butters said: So no ideas how to prevent this without doing woodoo stuff? Is this solved after 1 year?
July 13, 20187 yr I'm guessing each event was distinct? Event 1 - attempt: fail Event 2 - attempt: fail Event 3 - attempt: pass instead of Event 1 - attempt: fail Event 1 - attempt: fail Event 1 - attempt: pass Never tried interactevent befoh
Create an account or sign in to comment