Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Force a right click for an interaction

Featured Replies

I've been working on some antiban for my scripts where based upon a seed the likelihood of right/left clicking for an interaction varies, this is so user's behavior will vary per account.  I've run into a problem however, I cannot figure out how to force a right click when say, interacting with an item in the inventory or an object. 

 

I know I can move the mouse to the object, item, etc, that's simple of course. I also know I can use the method mouse.click(true) to right click when at the destination.  The problem is if I move the mouse to the item, right click, then do:

myItem.interact("Use");

The bot will not simply select "Use" from the already open menu(opened via the right click earlier) but rather it will move the mouse, then go back to the item and left click to select "Use", assuming "Use" is the first option available. I had hoped using the mouse.click(true) method would be a good work around since apparently interact(action, boolean rightClick) is not a thing(I swear it used to be?), and InteractionEvent doesn't offer a force right click option.

Can anyone help me with this problem? I would be very grateful! Thanks.

Edited by Molly

I've been working on some antiban for my scripts where based upon a seed the likelihood of right/left clicking for an interaction varies, this is so user's behavior will vary per account.  I've run into a problem however, I cannot figure out how to force a right click when say, interacting with an item in the inventory or an object. 

 

I know I can move the mouse to the object, item, etc, that's simple of course. I also know I can use the method mouse.click(true) to right click when at the destination.  The problem is if I move the mouse to the item, right click, then do:

myItem.interact("Use");

The bot will not simply select "Use" from the already open menu(opened via the right click earlier) but rather it will move the mouse, then go back to the item and left click to select "Use", assuming "Use" is the first option available. I had hoped using the mouse.click(true) method would be a good work around since apparently interact(action, boolean rightClick) is not a thing(I swear it used to be?), and InteractionEvent doesn't offer a force right click option.

Can anyone help me with this problem? I would be very grateful! Thanks.

if u did right click u can use:

if(menu.isOpen()){
  menu.selectAction(Action Here);
}

Or i didnt understand u if this is what u need.

 

Thanks,

Progamerz

Edited by progamerz

I've been working on some antiban for my scripts where based upon a seed the likelihood of right/left clicking for an interaction varies, this is so user's behavior will vary per account.  I've run into a problem however, I cannot figure out how to force a right click when say, interacting with an item in the inventory or an object. 

 

I know I can move the mouse to the object, item, etc, that's simple of course. I also know I can use the method mouse.click(true) to right click when at the destination.  The problem is if I move the mouse to the item, right click, then do:

myItem.interact("Use");

The bot will not simply select "Use" from the already open menu(opened via the right click earlier) but rather it will move the mouse, then go back to the item and left click to select "Use", assuming "Use" is the first option available. I had hoped using the mouse.click(true) method would be a good work around since apparently interact(action, boolean rightClick) is not a thing(I swear it used to be?), and InteractionEvent doesn't offer a force right click option.

Can anyone help me with this problem? I would be very grateful! Thanks.

interact(action, boolean rightClick)

was removed. Try getting the items location and creating a custom method using the Mouse class & MenuAPI class

then just mouse click and check if the correct item is selected.

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.