Failure Posted May 20, 2016 Share Posted May 20, 2016 (edited) 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 May 20, 2016 by Failure Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 20, 2016 Share Posted May 20, 2016 http://osbot.org/api/ Quote Link to comment Share on other sites More sharing options...
Failure Posted May 20, 2016 Author Share Posted May 20, 2016 http://osbot.org/api/ 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. Quote Link to comment Share on other sites More sharing options...
Sponsor Posted May 20, 2016 Share Posted May 20, 2016 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? Quote Link to comment Share on other sites More sharing options...
Salty as fuck Posted May 20, 2016 Share Posted May 20, 2016 http://osbot.org/api/ 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; } } 1 Quote Link to comment Share on other sites More sharing options...
Failure Posted May 20, 2016 Author Share Posted May 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Explv Posted May 20, 2016 Share Posted May 20, 2016 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: As you can see it inherits the method getItem If you then looked at this method you would see: 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: Please try harder in the future Quote Link to comment Share on other sites More sharing options...
Failure Posted May 20, 2016 Author Share Posted May 20, 2016 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. Quote Link to comment Share on other sites More sharing options...
Salty as fuck Posted May 20, 2016 Share Posted May 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
Explv Posted May 20, 2016 Share Posted May 20, 2016 (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 May 20, 2016 by Explv Quote Link to comment Share on other sites More sharing options...
Salty as fuck Posted May 20, 2016 Share Posted May 20, 2016 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 Quote Link to comment Share on other sites More sharing options...
Explv Posted May 20, 2016 Share Posted May 20, 2016 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'. Quote Link to comment Share on other sites More sharing options...
FrostBug Posted May 20, 2016 Share Posted May 20, 2016 too... cool to help? Guilty as charged 1 Quote Link to comment Share on other sites More sharing options...