Hello, im quite new to writing these scripts, and just been messing with it this evening.
I quickly stumbled into a problem when trying to script selling an item to the grand exchange, and i could not find any example on how to do this, so i experimented.
My issue is, that an item does not get withdrawn from the bank properly, because of lack of sleeps or whatever, im not completely sure.
if (!getBank().isOpen()) {
getBank().open();
getBank().enableMode(Bank.BankMode.WITHDRAW_NOTE);
} else if (getBank().contains("Kebab")) {
Sleep.sleepUntil(() -> (getBank().withdrawAll("Kebab")), 5000);
getBank().close();
}
NPC geClerk = npcs.closest("Grand Exchange Clerk");
if (geClerk != null) {
Sleep.sleepUntil(() -> (geClerk.interact("Exchange")), 5000);
}
If i have the code above, the kebabs will not be withdrawn when i have the geClerk interact line. Without it, it gets withdrawn fine, but with that line, it skips over the withdrawal and instantly opens the GE window instead.
Hope i explained my issue well enough, and someone can give a helping hand.
(if anyone has a code snippet that just grabs whatever item in a Note and lists it on GE for insta-sell price then that would be perfect too)