January 9, 20179 yr Hi all, I'm developing a simple herb cleaner that cleans herbs, sells clean, buys grimy and repeat. I'm a bit stuck on the Grand Exchange, I'm just trying to find out how to get the grand exchange window to stay open and wait for the offers to buy or sell to complete, then collect. This is my logic so far: while (grandExchange.getStatus(GrandExchange.Box.BOX_1).valueOf(getName()).toString() == "PENDING_SALE") { if (grandExchange.getStatus(GrandExchange.Box.BOX_1).valueOf(getName()).toString() == "FINISHED_SALE"); { grandExchange.collect(); break; } } Cheers Edited January 9, 20179 yr by uyfgfarOS
January 9, 20179 yr You don't need a while loop, the OnLoop is basicly your while loop Try this: if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.PENDING_BUY) { status = "Pending offer"; }else if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.FINISHED_BUY) { status = "Offer completed - Collecting"; }
January 9, 20179 yr EDIT: I posted in the wrong thread, don't drink and type Edited January 9, 20179 yr by Abuse
January 9, 20179 yr Author You don't need a while loop, the OnLoop is basicly your while loop Try this: if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.PENDING_BUY) { status = "Pending offer"; }else if (grandExchange.getStatus(GrandExchange.Box.BOX_1) == GrandExchange.Status.FINISHED_BUY) { status = "Offer completed - Collecting"; } Cheers mate, completely forgot about the onLoop! nice idea! should be solid gp/h Thanks mate! I'll post when I've finished it
Create an account or sign in to comment