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.

Need some help.

Featured Replies

private boolean withdrawSupplies(){
RS07Item[] Supplies = bank.getItem(Supplies_ID);
 
 
return false;
}

Edit : Wut everything is gone.

 

I'm trying it like this http://prntscr.com/b6ahv8

 

but the RSItem doesn't work for me, what should I use?

 

Thank you.

Edited by Failure

  • Author

 

I looked there at Item, org.osbot.rs07.api.model

 

I tried RS07Item, 07Item etc, but still the problem. I'm really new to this I was happy I made a jugFiller, which uhum does work but got to work on my standards and fail saves. Made it to get familair with interacting things etc.

What are you trying to exactly do here, get it to make sure it has supplies in bank?


if so it would be something like bank.getBank.Contains("some shit here") for a fail safe?

 

too... cool to help?

 

also @op, i assume something like this is what you're looking for?

 

boolean hasSupplies() {
  int[] Supplies_ID = { 1, 2 };
  if (bank.contains(Supplies_ID)) {
   return true;
  } else {
   return false;
  }
}
  • Author

What are you trying to exactly do here, get it to make sure it has supplies in bank?

if so it would be something like bank.getBank.Contains("some shit here") for a fail safe?

 

I'm tryin that http://prntscr.com/b6arcq

 

but the "RSItem" doesn't work, I'm pretty sure it's something else since that isn't the OSBot API. And the way he scripts, I like it for the structure.

private boolean withdrawSupplies(){
RS07Item[] Supplies = bank.getItem(Supplies_ID);
 
 
return false;
}

Edit : Wut everything is gone.

 

I'm trying it like this http://prntscr.com/b6ahv8

 

but the RSItem doesn't work for me, what should I use?

 

Thank you.

 

 

If you actually looked at the API you would see:

 

IhWUAmf.png

 

As you can see it inherits the method getItem

 

If you then looked at this method you would see:

 

X4xaDt7.png

 

As you can see from that it returns an Item.

 

Assuming you are trying to withdraw items from the bank though, once again looking at the API you would see:

 

NeLNI26.png

 

Please try harder in the future

  • Author

 

too... cool to help?

 

also @op, i assume something like this is what you're looking for?

boolean hasSupplies() {
  int[] Supplies_ID = { 1, 2 };
  if (bank.contains(Supplies_ID)) {
   return true;
  } else {
   return false;
  }
}

 

Thanks, figured it out works like a charm!

 

noticed also the difference in the video I used ( instead of { lol.

Thanks, figured it out works like a charm!

 

noticed also the difference in the video I used ( instead of { lol.

Certainly! Glad you figured it out.

Yeah, those tricky little brackets will get you.. lol

 

too... cool to help?

 

also @op, i assume something like this is what you're looking for?

boolean hasSupplies() {
  int[] Supplies_ID = { 1, 2 };
  if (bank.contains(Supplies_ID)) {
   return true;
  } else {
   return false;
  }
}

 

This method is dumb.

 

It is exactly the same as:

boolean hasSupplies() {
  int[] Supplies_ID = { 1, 2 };
  return bank.contains(Supplies_ID);
}

Which is exactly the same as:

boolean hasSupplies() {
  return bank.contains(1, 2);
}

So why wouldn't you just do:

bank.contains(1, 2);

Also I don't know why you are using IDs in this method, considering contains can take names of items, which is far more readable.

Edited by Explv

This method is dumb.

 

It is exactly the same as:

boolean hasSupplies() {
  int[] Supplies_ID = { 1, 2 };
  return bank.contains(Supplies_ID);
}

Which is exactly the same as:

boolean hasSupplies() {
  return bank.contains(1, 2);
}

So why wouldn't you just do:

bank.contains(1, 2);

Also I don't know why you are using IDs in this method, considering contains can take names of items, which is far more readable.

teen angst

teen angst

 

Also contains returns true if ANY of the items are in the ItemContainer. Not if ALL of the items are in the itemContainer. Just letting you know as it seems like you are assuming that from the method name 'hasSupplies'. 

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.