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 with multiple options not working?

Featured Replies

I am attempting to go through tutorial island and in the combat section, I am using getInventory().getItem(ITEM).interact("Wield", "Equip") to deal with being in the stats menu vs just equipping via inventory. However, it does not work and simply fails to find the option on the item. I can split it up into getInventory().getItem(ITEM).interact("Wield") and getInventory().getItem(ITEM).interact("Equip") and it works fine. Anyone have any clues as to what I may be doing wrong?

1 hour ago, FyredUp said:

I am attempting to go through tutorial island and in the combat section, I am using getInventory().getItem(ITEM).interact("Wield", "Equip") to deal with being in the stats menu vs just equipping via inventory. However, it does not work and simply fails to find the option on the item. I can split it up into getInventory().getItem(ITEM).interact("Wield") and getInventory().getItem(ITEM).interact("Equip") and it works fine. Anyone have any clues as to what I may be doing wrong?

https://osbot.org/api/org/osbot/rs07/api/model/Interactable.html

Pretty sure you can only put 1 options, but you could try with {"Wield", "Equip"} since the method only takes 1 parameters. I'm pretty sure its not gonna work, but you can still try :)

  • Author
3 hours ago, Nyb said:

https://osbot.org/api/org/osbot/rs07/api/model/Interactable.html

Pretty sure you can only put 1 options, but you could try with {"Wield", "Equip"} since the method only takes 1 parameters. I'm pretty sure its not gonna work, but you can still try :)

the interact function takes the params 

java.lang.String... actions

meaning it can take any number of arguments, given they are strings. So it 'should' work, but it doesnt :(

you could try getInventory().getItem(ITEM).interact() if your out side of a bank but also i think "Equip" should be "Wear".

 

18 hours ago, FyredUp said:

I am attempting to go through tutorial island and in the combat section, I am using getInventory().getItem(ITEM).interact("Wield", "Equip") to deal with being in the stats menu vs just equipping via inventory. However, it does not work and simply fails to find the option on the item. I can split it up into getInventory().getItem(ITEM).interact("Wield") and getInventory().getItem(ITEM).interact("Equip") and it works fine. Anyone have any clues as to what I may be doing wrong?

I would recommend not calling the interact() in the same call as getItem() as it could throw an NPE.

Anyways you can try this if the first action is the one you always want to use.

Item invItem = getInventory().getItem("ItemName");
if (invItem != null) {
    String[] actions = invItem.getActions();
    if (actions != null)
        invItem.interact(actions[0]);
}

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.