June 26, 20178 yr 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)
June 26, 20178 yr 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
June 26, 20178 yr 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
Create an account or sign in to comment