Tazmania Posted December 30, 2015 Share Posted December 30, 2015 (edited) Hi, I would like to have control when the user clicks somewhere in the client (not when the script clicks). Is there syntax to override the OnMouseClick method? Edited December 30, 2015 by Tazmania Quote Link to comment Share on other sites More sharing options...
Joseph Posted December 30, 2015 Share Posted December 30, 2015 (edited) Hi, I would like to have control when the user clicks somewhere in the client (not when the script clicks). Is there syntax to override the OnMouseClick method? Let me give you some wisdom. Override the onMouseClick() And use that method to do what you want. There is no way to tell if it's a human clicking or the bot. But there is a way to tell if human input is enable or disabled. So you could use that boolean with maybe another boolean (clicking shape). getBot().isHumanInputEnabled () No need to implement mouselistener since it is already implemented in scripts. Finally for it to activate. On the onstart you should enable it by using. getBot ().add Mouse Listener (listener ) Edited December 30, 2015 by Joseph 1 Quote Link to comment Share on other sites More sharing options...
FrostBug Posted December 30, 2015 Share Posted December 30, 2015 bot.addMouseListener(yourListener) The listener only captures mouse events fired by the user; not the script (it used to capture everything, but not anymore AFAIK). Quote Link to comment Share on other sites More sharing options...
Tazmania Posted December 30, 2015 Author Share Posted December 30, 2015 Thanks the bot.addMouseListener(yourListener) did it Quote Link to comment Share on other sites More sharing options...