HelloPeeps Posted February 23, 2014 Share Posted February 23, 2014 I'm trying to get my script to change state if it contains any items at all, not just when it's full? is this possible? I have the code to change when full. if (!client.getInventory().isFull() && BANK_AREA.contains(myPlayer())) return State.WALK_TO_AREA; Any help guys? Also It may contain numerous items so I can't put each ID down Thanks Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 23, 2014 Share Posted February 23, 2014 Look at the Inventory class in the API. Link to comment Share on other sites More sharing options...
Han Posted February 23, 2014 Share Posted February 23, 2014 API is there for a reason, take a quick look :P Link to comment Share on other sites More sharing options...
Brown Posted February 23, 2014 Share Posted February 23, 2014 Try this: if(!client.getInventory().isEmpty && BANK_AREA.contains(myPlayer()){ state = State.WALK_TO_BANK; } Link to comment Share on other sites More sharing options...
diamondcut11 Posted February 23, 2014 Share Posted February 23, 2014 (edited) if (!client.getInventory().isEmpty() && BANK_AREA.contains(myPlayer())) return State.WALK_TO_AREA; I believe...First time I've looked at the API so I cant make any promises haha Edited February 23, 2014 by diamondcut11 Link to comment Share on other sites More sharing options...
Booch Posted February 23, 2014 Share Posted February 23, 2014 if(!client.getInventory().isEmpty() && myPlayer().isInArea(BANK_AREA) { return State.WALK_TO_AREA; } Try that, wrote it right now so check for syntax Link to comment Share on other sites More sharing options...