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.

selecting menu action

Featured Replies

im not too sure of, how to select the first index off a open menu (off of right clicking).

 

i know there, but i wouldnt know what to put for the destination 

  • selectOptionpublic boolean selectOption(java.lang.Object e,
    MouseDestination dest,
    java.lang.String action)
    throws java.lang.InterruptedException
    Selects an option in a menu.
    Parameters: e - The entity object (Can be an instance of Entity or Item) dest - The destination of the destination. action - The action of the option, For example: 'Use' or 'Chop down' Returns:   Throws: java.lang.InterruptedException
  • Author

the stuggle lol, so far i have this, it works fine for the right clicking. Now i just need to add in menu slecetion

	public boolean menuContains(RS2Object object)	{
		if (object != null && client.isMenuOpen())	{
			for (Option menu: client.getMenu())	{
				if (menu!=null && menu.action.equalsIgnoreCase(object.getDefinition().getActions()[0]))
					return true;
			}
		}
		return false;
	}
	
	public boolean rightClick(RS2Object object) throws InterruptedException	{
		if (object != null && this.canReach(object))	{
			if (!client.isMenuOpen())	{
				client.moveMouseTo(object.getMouseDestination(), false, true, true);
			}else
				return this.menuContains(object);
		}
		return false;
	}
	
	public boolean interactWithRightClick(RS2Object object) throws InterruptedException{
		return false;
	}

 

the stuggle lol, so far i have this, it works fine for the right clicking. Now i just need to add in menu slecetion

	public boolean menuContains(RS2Object object)	{
		if (object != null && client.isMenuOpen())	{
			for (Option menu: client.getMenu())	{
				if (menu!=null && menu.action.equalsIgnoreCase(object.getDefinition().getActions()[0]))
					return true;
			}
		}
		return false;
	}
	
	public boolean rightClick(RS2Object object) throws InterruptedException	{
		if (object != null && this.canReach(object))	{
			if (!client.isMenuOpen())	{
				client.moveMouseTo(object.getMouseDestination(), false, true, true);
			}else
				return this.menuContains(object);
		}
		return false;
	}
	
	public boolean interactWithRightClick(RS2Object object) throws InterruptedException{
		if(right
	}

 

okay, how about this? :)

private boolean selectOpenMenuOption(String name) throws InterruptedException {
		sA.log("Selecting Menu Option");
		if (sA.client.isMenuOpen()) {
			List<Option> options = sA.client.getMenu();
			for (int i= 0; i < options.size(); i++) {
				if (options.get(i).action.equalsIgnoreCase(name)) {
					return sA.client.moveMouseTo(new RectangleDestination(sA.client.getMenuX(), sA.client.getMenuY()+19+(i*15), sA.client.getMenuWidth(), 15), false, true, false);
				} 
			}
		}
		return false;
	}



private boolean rightClick(RS2Object object) throws InterruptedException	{
		if (object != null && sA.canReach(object))	{
			return sA.client.moveMouseTo(object.getMouseDestination(), false, true, true);
		}
		return false;
	}


public boolean interactWithRightClick(RS2Object object) throws InterruptedException{
      if(rightClick(object)) {
          return selectOpenMenuOption(object.getDefinition().getActions()[0]);
      }
      return false;
 }
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.