Jump to content

Need some help.


Failure

Recommended Posts

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
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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