July 18, 201510 yr Hey, do someone know how to check if you have item in your inventory and if not tell it to withdraw from bank ( not to walking to bank)
July 18, 201510 yr if (!getInventory().contains("Iron battleaxe")) { //no battleaxe } if (getInventory().contains(999, 1337, 289)) { //Has all of those IDs }
July 18, 201510 yr if (!inventory.contains("pleb")) { // inv does not contain pleb if (bank.isOpen()) { // if bank is open if (bank.contains("pleb") { // if bank contains pleb if (bank.withdraw("pleb", 1)) { // withdraw 1 pleb sleep(x); //sleep, tbh use conditionalsleep } } } }
July 23, 201510 yr You can also check for multiple items using the string values as well if(inventory.contains("feather", "cheese", "penis") {
Create an account or sign in to comment