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.

Item Filters - Withdraw any charged Ring of Wealth (x) from bank

Featured Replies

I am attempting to withdraw one Ring of Wealth from my bank which has a minimum of 1 charge. Hence, Ring of wealth (1), (2), (3) and (4) are all good. From Explv's Scripting 101's tutorial I've determined that the best way to do so is by means of a filter but due to my limited Java knowledge I am unable to create working code. I've tried messing around with the match methods and NameFilter but I'm honestly confused.

Another related question: what's the best approach to withdrawing any one of these items ("Varrock teleport", "Ring of wealth (4)", "Ring of wealth (3)", "Ring of wealth (2)", "Ring of wealth (1)").
I already checked if the bank contains at least one of the items like so:

getBank().contains("Varrock teleport", "Ring of wealth (4)", "Ring of wealth (3)", "Ring of wealth (2)", "Ring of wealth (1)")

Now how do I withdraw the one which is available?

Could someone kindly help me out, preferably with both questions.

Edited by Adept

  • Author
7 minutes ago, Juggles said:

new Filter[]{new ContainsNameFilter(new String[]{"Ring of dueling"})}

 

Not sure how to use that. I tried the following but it's not correct.

getBank().withdraw(new Filter[]{new ContainsNameFilter(new String[]{"Ring of wealth"})}, 1);


Also, could you kindly take a look at the second part of the question?

Edited by Adept

Use the same filter to withdraw a ring of dueling. It will withdraw the first one available. 
For a varrock teleport, just check if the bank has one, if it does, withdraw it. 

Yeah what Juggles said. You'd wanna check if there's a V tab, withdraw, else if there is a "Ring of wealth (" possibly? That way it won't withdraw empty ones but if there is any charge it will. I'd write out the code but I'm sure you can do it with that.

getBank().withdraw(new ContainsNameFilter<>("Ring of wealth ("), 1);

 

Edited by Chris

  • Author

Thank you all for your help. Starting to get a hang of this.
(albeit I just ran into another issue, opening new thread in 3... 2... 1..)

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.