futurepasts Posted July 31, 2015 Share Posted July 31, 2015 Hello again so i was looking at API and didnt founded anything about how to get item amount in my bank. For example: I want to check if my bank contains 2000 Oak logs If it contains 2000 Oak logs do something. Thanks for the help Quote Link to comment Share on other sites More sharing options...
chad0ck Posted July 31, 2015 Share Posted July 31, 2015 (edited) if (getBank().contains(1521, 2000)){ do something } Edited July 31, 2015 by chad0ck Quote Link to comment Share on other sites More sharing options...
Joseph Posted July 31, 2015 Share Posted July 31, 2015 inventory and bank and cclass that extends item container you would use http://osbot.org/api/org/osbot/rs07/api/util/ItemContainer.html#getAmount-java.lang.String...- 1 Quote Link to comment Share on other sites More sharing options...
chad0ck Posted July 31, 2015 Share Posted July 31, 2015 inventory and bank and cclass that extends item container you would use http://osbot.org/api/org/osbot/rs07/api/util/ItemContainer.html#getAmount-java.lang.String...- Liked your commend for your signature. Quote Link to comment Share on other sites More sharing options...
Gold Scripts Posted July 31, 2015 Share Posted July 31, 2015 (edited) if (getBank().getItem("Oak logs").getAmount() == 2000) { do something;} or probably better if (getBank().getItem("Oak logs").getAmount() >= 2000) {do something;} Or even better (Alek's post) Edited July 31, 2015 by OG Scripts 2 Quote Link to comment Share on other sites More sharing options...
Alek Posted July 31, 2015 Share Posted July 31, 2015 Item i; if ((i = getBank().getItem("Oak logs")) != null && i.getAmount() > 100) { System.out.println("We currently have " + i.getAmount() + " " + i.getName().toLowerCase() + " in our bank."); } We currently have 1126 oak logs in our bank. 2 Quote Link to comment Share on other sites More sharing options...
chad0ck Posted July 31, 2015 Share Posted July 31, 2015 so many different ways to do 1 thing lol Quote Link to comment Share on other sites More sharing options...
Apaec Posted July 31, 2015 Share Posted July 31, 2015 so many different ways to do 1 thing lol not really, they all use the same method :* 1 Quote Link to comment Share on other sites More sharing options...
itzDot Posted July 31, 2015 Share Posted July 31, 2015 ^ olollol Quote Link to comment Share on other sites More sharing options...
futurepasts Posted August 1, 2015 Author Share Posted August 1, 2015 Thanks for amazing answers it really helped me Quote Link to comment Share on other sites More sharing options...