Jump to content

Custom mouse behavior vs Interact methods/ Event Injection


Recommended Posts

Posted

New to using the API and looking into different options to control the script. I notice I can use the methods provided by the API to complete nearly everything when interacting with the game. When using these methods I do not see the mouse moving at all which makes me think its either invisible while performing the methods or injects the events into the queue. When using other scripts I can visibly see the mouse which I can only assume they are either using the mouse functionality from the API or a custom one. 

From experience I have always used a custom mouse algorithm that is trained on lots of human data for mouse control. However this fancy API has lots of control over the game. Does anyone have any opinions or information from experience ban rates using custom/API mouse movements vs interact methods? (i'm new to osbot scripting and have been reading the API however it is a lot of information... p.s. thank you for even having documentation in the first place, it's a game changer.)

Posted

The mouse is not visible by default. You can either render it or enable the mouse position option in the debug options.

You can create a mouse move profile and set it like so:

MouseMoveProfile profile = new MouseMoveProfile();
profile.setNoise();
profile.setDeviation();
profile.setSpeedBaseTime();
profile.setFlowSpeedModifier();
profile.setMinOvershootTime();
getBot().setMouseMoveProfile(profile);

You can move the mouse without using the mouse handler of osbot as described here:

https://osbot.org/api/org/osbot/rs07/input/mouse/ClientMouseEventHandler.html#generateBotMouseEvent-int-long-int-int-int-int-boolean-int-int-int-boolean-

 

Posted (edited)
On 4/18/2024 at 6:17 AM, Bobbey said:

The mouse is not visible by default. You can either render it or enable the mouse position option in the debug options.

You can create a mouse move profile and set it like so:

MouseMoveProfile profile = new MouseMoveProfile();
profile.setNoise();
profile.setDeviation();
profile.setSpeedBaseTime();
profile.setFlowSpeedModifier();
profile.setMinOvershootTime();
getBot().setMouseMoveProfile(profile);

You can move the mouse without using the mouse handler of osbot as described here:

https://osbot.org/api/org/osbot/rs07/input/mouse/ClientMouseEventHandler.html#generateBotMouseEvent-int-long-int-int-int-int-boolean-int-int-int-boolean-

 

Hindsight with an explanation it seems obvious, thanks for these resources.

 

On 4/19/2024 at 3:01 AM, yfoo said:

Its invisible, you need to draw it on the screen in onPaint or enable Mouse Position in debug/settings menu (Right side of osbot window, 3 gears icon). 

Makes sense, thank you.

Edited by Rudolph123
Brain is mushy

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...