Jump to content

Need some help.


Recommended Posts

Posted

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.

Posted
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

Posted

 

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.

Posted (edited)

 

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
Posted

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...