k9thebeast Posted June 26, 2017 Share Posted June 26, 2017 NPC storeGuy = script.getNpcs().closest("Store"); if(storeGuy != null){ script.log("Trading store guy"); InteractionEvent e = new InteractionEvent(storeGuy, "Trade"); e.setMaximumAttempts(2); e.execute(); //line 67 https://gyazo.com/8ec12a4cb9a91d57d032238ad0df094f Seems to happen every time I do event.execute (not alone to this type of event) Quote Link to comment Share on other sites More sharing options...
Alek Posted June 26, 2017 Share Posted June 26, 2017 Event execute() is an internal method used by the event executor. You can use either bot.getEventExecutor().execute(event) or the wrapper method which is simply "execute(Event)" therefore execute(e); will work 3 Quote Link to comment Share on other sites More sharing options...
Botre Posted June 26, 2017 Share Posted June 26, 2017 2 hours ago, Alek said: Event execute() is an internal method used by the event executor. You can use either bot.getEventExecutor().execute(event) or the wrapper method which is simply "execute(Event)" therefore execute(e); will work Hi, Might be a good idea to put this in the docs. Also, since you probably can't hide this method from the public API, could be a good idea to return an error with a message containing what you just explained whenever the method is called 'inappropriately'. I remember this part of the API causing me so many headaches back in the day. Bye 2 Quote Link to comment Share on other sites More sharing options...
Chris Posted June 26, 2017 Share Posted June 26, 2017 script.execute(e); Quote Link to comment Share on other sites More sharing options...