Failure Posted May 20, 2016 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
Failure Posted May 20, 2016 Author 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.
Sponsor Posted May 20, 2016 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?
Salty as fuck Posted May 20, 2016 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
Failure Posted May 20, 2016 Author 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.
Explv Posted May 20, 2016 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
Failure Posted May 20, 2016 Author 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.
Salty as fuck Posted May 20, 2016 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
Explv Posted May 20, 2016 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
Salty as fuck Posted May 20, 2016 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
Explv Posted May 20, 2016 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'.