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.

mouse to option

Featured Replies

So I want my mouse to move to a entity, right click on it and then move to an option from the "Choose option" menu but not click on it.

I already have this for example:

 

Entity door = objects.closest("Door");

EntityDestination mouseDoor = new EntityDestination(getBot(),door);

 

getMouse().click(mouseChest, true); 

 

now the mouse just moves to the door and right clicks on it. But what should i add to make it even move to the "Open" action but not click on it yet?

Umm maybe something along the lines of this:

(Not sure if it works but the logic is there and could be tweaked)

void hovenEntityOption(Entity entity, String option){
        if(menu.isOpen() && menuContains(option)){
         Rectangle optionBox = menu.getOptionRectangle(menuIndex(option));
            if(optionBox != null){
                if(optionBox.contains(mouse.getPosition())){
                    //idling
                }else{
                    int x,y;
                    do {
                        x = (int) (optionBox.getX() + optionBox.getWidth() * Math.random());
                        y = (int) (optionBox.getY() + optionBox.getHeight() * Math.random());
                    } while(!optionBox.contains(x,y)) ;
                    mouse.move(x,y);
                }
            }
        }else{
            if(menu.isOpen() && !menuContains(option)){
                menu.selectAction("Cancel");
            }else {
                if (entity.hover()) {
                    mouse.click(false);
                }
            }
        }
    }

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.