namebotnesw 0 Share Posted January 22, 2020 I am experimenting with logging the actions of my bots with the idea of comparing banned bots to see if there are any patterns. As part of this I want to track each mouse click action. So far I am using the java MouseListener class to trigger a method every time the mouse button is pressed. Within the MousePressed() method (called when the left mouse button is pressed), I call getClient().getMenu().getDefaultAction(), which basically works fine when the client simply left clicks to do an action. It does not work if we right click and then select an option from the menu, it will be logged as if I just left clicked the default action in that exact spot. For logging purposes I want to log exactly what action has been pressed, whether it was left clicked or right clicked and selected from the menu. Is there any way I can do this? I have tried to look through the API in search of a way but haven't managed to come up with a solution! Any help or ideas would be much appreciated! Link to comment Share on other sites More sharing options...
Pseudo 178 Share Posted January 22, 2020 The interact method is a boolean, so you can check if it interacts successfully with an if statement and log/process data accordingly I'd imagine. Link to comment Share on other sites More sharing options...
Nuclear Nezz 1969 Share Posted January 22, 2020 If you write your own interaction handler, sure. For small details like that it's not too bad, move mouse to entity, if action is first, left click, else open menu and click action. You can log those in your scripts, but there is not a way for you to grab that information from our interaction event, no. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now