Jump to content

Custom mouse behavior vs Interact methods/ Event Injection


Rudolph123

Recommended Posts

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.)

Link to comment
Share on other sites

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-

 

Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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