douko Posted May 14, 2020 Share Posted May 14, 2020 (edited) Is there a way to do this through the API or does the client do it by itself? Edited May 14, 2020 by douko Quote Link to comment Share on other sites More sharing options...
Ace99 Posted May 14, 2020 Share Posted May 14, 2020 Might want to be more specific, that question could have a lot of answers. Quote Link to comment Share on other sites More sharing options...
douko Posted May 14, 2020 Author Share Posted May 14, 2020 4 minutes ago, Ace99 said: Might want to be more specific, that question could have a lot of answers. I'm wondering if there is a way through the API to make clicks & mouse movements look more human. Sorry for the bad explanation. Quote Link to comment Share on other sites More sharing options...
Ace99 Posted May 14, 2020 Share Posted May 14, 2020 No worries just wondering the intention. You'd have to make all your own methods to click and move in a "random" way. int random = //random number 0-9 if (random < 5) //return one movement //return another movement Quote Link to comment Share on other sites More sharing options...
BravoTaco Posted May 16, 2020 Share Posted May 16, 2020 Best way would be to write your own algorithm. You could take a look at this its written in Pascal so you won't be able to just plop into java, but the algorithm is there for you to take a look at than write your own based on that knowledge. It has pretty good functionality such as overshooting the target, shaky pathing to target, and variable speed, to just name a few. Quote Link to comment Share on other sites More sharing options...
datpigeon Posted May 17, 2020 Share Posted May 17, 2020 20 hours ago, BravoTaco said: Best way would be to write your own algorithm. You could take a look at this its written in Pascal so you won't be able to just plop into java, but the algorithm is there for you to take a look at than write your own based on that knowledge. It has pretty good functionality such as overshooting the target, shaky pathing to target, and variable speed, to just name a few. What methods would you have to override to have osbot universally to implement custom mouse movement like that? I've spent about 4 hours trying to find information on how other people have done it in the past and I only came across 2 different topics that had anything to do with what I am asking/trying to do. Topic 1: This topic slightly addresses my question but the responses got derailed off the topic and is irrelevant to me. In the topic "making your own Mouse.click()" was mentioned which I assume was intended to mean overriding the Mouse.click() and Mouse.move() functions which is not possible because those methods are final and cannot be overridden. And before anyone answers "just make your own function that clicks where you want to click with the custom mouse movement you want to use...", i'm specifically asking how to universally override the mouse movement without having to create every single possible method I would ever need to use that would move the mouse like a new NPC.interact() method, a new Item.interact() method, etc. Topic 2: This topic is almost exactly what I want to be able to do, but the main topic it references (https://osbot.org/forum/topic/47398-semi-advanced-creating-your-own-mouse-controller/) has been moved to a location I cannot see with my osbot account (maybe I need VIP or something but I doubt it) and I went through all the archived topics in the date range that the topic existed and I couldn't find it. To be able to do what this topic below mentions, I need to be able to use the MouseController class (which is in the topic that is referenced above) and I have not found a way to see it. While having the ability to implement custom mouse movement would be really nice, my scripts work entirely fine right now so there is no real urgency here. Quote Link to comment Share on other sites More sharing options...
BravoTaco Posted May 17, 2020 Share Posted May 17, 2020 7 hours ago, datpigeon said: Topic 1: This topic slightly addresses my question but the responses got derailed off the topic and is irrelevant to me. In the topic "making your own Mouse.click()" was mentioned which I assume was intended to mean overriding the Mouse.click() and Mouse.move() functions which is not possible because those methods are final and cannot be overridden. And before anyone answers "just make your own function that clicks where you want to click with the custom mouse movement you want to use...", i'm specifically asking how to universally override the mouse movement without having to create every single possible method I would ever need to use that would move the mouse like a new NPC.interact() method, a new Item.interact() method, etc To my knowledge, you won't be able to override the default mouse movement/interactions within the API so you will have to create custom methods and call those. You wont have to create that many methods as the objects you interact with always have an X, Y position, knowing this you could create a moveMouse(int X, int Y) method that would work for all interactable objects. Than after using your own mouse movement logic to move closely to the object you could than finish off the method with an interaction() call to the API. This may even provide more randomness to the mouse logic since the API will than have a chance to also use its own movement logic to interact with the object. Quote Link to comment Share on other sites More sharing options...
datpigeon Posted May 17, 2020 Share Posted May 17, 2020 23 minutes ago, BravoTaco said: To my knowledge, you won't be able to override the default mouse movement/interactions within the API so you will have to create custom methods and call those. You wont have to create that many methods as the objects you interact with always have an X, Y position, knowing this you could create a moveMouse(int X, int Y) method that would work for all interactable objects. Than after using your own mouse movement logic to move closely to the object you could than finish off the method with an interaction() call to the API. This may even provide more randomness to the mouse logic since the API will than have a chance to also use its own movement logic to interact with the object. ok well I may end up trying that out, i did something similar to that a long time ago but rather than moving the mouse close with some other mouse movement API i just instantly moved the mouse to the x,y position and then used the standard methods to interact with the object and that worked really well for the critical task it needed to do Quote Link to comment Share on other sites More sharing options...