Hello Guys,
Im working on a script that makes tuna potatoes from cooked ingredients in the bank
It basically works like this:
Inventory contains 9 Bowl, 9 Cooked sweetcorn, 9 Tuna and a Knife
Combines items to 9 Corn and tuna
Bank to get 9 Pat of butter and 9 Baked potato
Combines items to get Potato with butter and after that makes the Tuna potatoes
And leaves the inventory with 9 Bowl and 9 Tuna Potatoes
But I can’t get the banking to work I’ve tried this:
case BANK:
if (!getBank().isOpen()) {
getBank().open();
} else {
// Inventory 9 Tuna and corn, 9 Pat of butter, 9 Baked Potato and 1 knife inventory ready for making Potato with butter and Tuna Potato.
if (this.inventory.getAmount(new String[] { "Tuna and corn" }) == 9) {
sleep(random(333, 666));
getBank().depositAllExcept(new String[] { "Knife", "Tuna and corn" });
sleep(random(300, 800));
getBank().withdraw("Pat of butter", 9);
sleep(random(300, 800));
getBank().withdraw("Baked Potato", 9);
sleep(random(300, 800));
if (this.inventory.getAmount(new String[] { "Pat of butter", "Baked Potato" }) == 18){
getBank().close();
sleep(random(300, 800));
return Main.random(300, 800);
}}
// Inventory 9 Bowl, 9 Tuna, 9 Cooked Sweedcorn and 1 knife start and finish of inventory.
if (this.inventory.getAmount(new String[] { "Bowl" }) == 9) {
sleep(random(333, 666));
getBank().depositAllExcept(new String[] { "Knife", "Bowl" });
sleep(random(300, 800));
getBank().withdraw("Tuna", 9);
sleep(random(300, 800));
getBank().withdraw("Cooked Sweedcorn", 9);
sleep(random(300, 800));
if (this.inventory.getAmount(new String[] { "Tuna", "Cooked Sweedcorn" }) == 18){
getBank().close();
sleep(random(300, 800));
return Main.random(300, 800);
}}
}
break;
Some help would be appreciated ;)