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.

Interact vs. Hover-Click

Featured Replies

In my scripts, I have found that hover-clicking is much more reliable than interact when you want to use a left click action (primarily for an item in the inventory). I was just curious if anyone else has noticed this or knows why this happens. For example, let's say we are making a script for repeatedly using pestle and mortar on an Herblore secondary. 

 

inventory.interact("Use","Pestle & mortar");
inventory.interact("Use","Chocolate bar");

The code above, which seems the most straightforward will eventually misclick. The only way to stop it from misclicking is to put an unnecessarily long sleep in between (somewhere around 500ms).

Whereas the code below never misclicks (even without sleeps) and runs extremely fast.

inventory.getItem("Pestle & mortar").hover();
mouse.click(false);
inventory.getItem("Chocolate bar").hover();
mouse.click(false);

I was just curious as to why hover-click is more reliable? I would assume the interact method is derived from some sort of hover + click. 

Your correct, hover, then click ensures proper sleep within the hover itself.

However, does mouse.click(false) doesnt that mean dont click? True = click yes?

 

*

inventory.getItem("Pestle & mortar").hover();
mouse.click(false);

 

The transition from hover to click is the sleep.

Edited by z10n

It will misclick because you're not checking if the item is selected before clicking next...

if (!itemIsSelected) {
    inventory.interact("Use","Pestle and mortar");

       sleepCondition 

           return itemIsSelected();

} else {

     inventory.interact("Use","Pestle and mortar");

       sleepCondition 

           return inDialogue();

}


This is the proper way to do it so that you won't misclick or bugs won't occur. If you don't check and have sleeps then it will misclick

38 minutes ago, z10n said:

Your correct, hover, then click ensures proper sleep within the hover itself.

However, does mouse.click(false) doesnt that mean dont click? True = click yes?

 

*


inventory.getItem("Pestle & mortar").hover();
mouse.click(false);

 

The transition from hover to click is the sleep.

The boolean value represents whether it should right-click or not.

Create an account or sign in to comment

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.