asdfghj654 0 Share Posted March 1, 2019 I try to get sense of MouseSettings method and wherever I look it seems very hard or impossible to figure out what they do without testing each setting manually. https://dreambot.org/javadocs/org/dreambot/api/methods/input/mouse/MouseSettings.html Only gives very abstract info and when I try to look manually from the code it seems even more difficult. Is there some way to figure these things out more easily or am I just too noob coder? The thing I was trying to do is adjust area wich the click can go and chance that the click misses and way the click point is randomized. Sorry if this is in wrong area, im new here. Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 1, 2019 Also I thought that I make method manually wich modifys the click spot before doing it, but i thought that would only help in some of the cases and would complicate script making significantly. Link to comment Share on other sites More sharing options...
NovaGTX 106 Share Posted March 1, 2019 (edited) First of all, welcome. You posted in the correct area, but I think you're looking in the wrong spot for what you are intending to do. Some of the functions found within mouseSettings could apply to creating variation of the mouse but essentially I believe you're looking to create an area, known as a Rectangle, where you'd like the mouse to click. First we need to define the rectangle: Rectangle rec = new Rectangle(590, 280, 50, 70); Rectangle() takes the arguments (int x, int y, int width, int height) where x and y are coordinated relative to the window, and width and height respectively. Once you have defined the rectangle you can click within it how you like by calling getMouse().click(rec); Keep in mind if the cursor is anywhere within the rectangle it will click and will not move. You can add variation to this easily, but this should get you closer to what you're after I hope. Edited March 1, 2019 by NovaGTX YoHoJo 1 Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 1, 2019 4 hours ago, NovaGTX said: First of all, welcome. You posted in the correct area, but I think you're looking in the wrong spot for what you are intending to do. Some of the functions found within mouseSettings could apply to creating variation of the mouse but essentially I believe you're looking to create an area, known as a Rectangle, where you'd like the mouse to click. First we need to define the rectangle: Rectangle rec = new Rectangle(590, 280, 50, 70); Rectangle() takes the arguments (int x, int y, int width, int height) where x and y are coordinated relative to the window, and width and height respectively. Once you have defined the rectangle you can click within it how you like by calling getMouse().click(rec); Keep in mind if the cursor is anywhere within the rectangle it will click and will not move. You can add variation to this easily, but this should get you closer to what you're after I hope. Saddly this isn't exactly what im looking for, because I think to get good antiban script you would need to apply click variation to every action in the game, not just the ones I would normally think. For example if I use walk method the guy who made walk method might not have made antiban the way I would like to implement it, thats I would need to modify the click parameters in general. Also I think using only random spot from area isn't good enough for antiban, because human doesnt randomly click from area, human tries to click one spot usually hits the target but might also miss and so on... Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 1, 2019 Also I think I would be able to make some kind of antibot if I could just straight modify the "do this when someone calls click" method, but I cannot find the core method wich ultimately tells what spot to click when its called. Link to comment Share on other sites More sharing options...
NovaGTX 106 Share Posted March 1, 2019 The default mouse movements and actions have variation based on a heat map of over 1,000,000 data points in a csv file. Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 1, 2019 10 minutes ago, NovaGTX said: The default mouse movements and actions have variation based on a heat map of over 1,000,000 data points in a csv file. Wow thats way nicer than I thought. Still I would like to make my own adjustments, mainly for learning purposes. Also it's a bit weird that it seems like bot never misses a click. Also I think it would be good to generally know how to modify pretty much anything you want in the client, everything just seem so complicated when I try to make sense of it. There must be a better way than to quess what every method does. Link to comment Share on other sites More sharing options...
Nuclear Nezz 1969 Share Posted March 3, 2019 The mouse currently does not allow a whole lot of overriding of its methods. You can do it with reflection, but if you use that you won't be able to put your script on the SDN. Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 3, 2019 13 hours ago, Nuclear Nezz said: The mouse currently does not allow a whole lot of overriding of its methods. You can do it with reflection, but if you use that you won't be able to put your script on the SDN. I tried to check reflection but im not sure did I understand it right. It seemed just like @Override in itellij? And if thats how then can you tell what is the basic click method i need to override? Link to comment Share on other sites More sharing options...
asdfghj654 0 Author Share Posted March 4, 2019 23 hours ago, Nuclear Nezz said: The mouse currently does not allow a whole lot of overriding of its methods. You can do it with reflection, but if you use that you won't be able to put your script on the SDN. I was being idiot last post, I have read some about overriding and reflection, but I still find reflection hard to understand. Do you mean I would have to reflect the whole client.jar and pretty much modify methods I like to modify from there? Sounds a bit complicated for such a small task, also im new to coding and just heard about reflection from you. Also I read reflect can come with great performance loss and reflecting whole client seems the kind of thing that would destroy all performance. Why this wouldn't just work, or do I understand override wrong or does other methods use some sort of different click method I cannot override? @Override boolean click(AbstractMouseDestination destination) { getMouse().hop(destination.getCenterPoint()); getMouse().click(); } 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