Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (getInventory().contains("Coins") || pendingCollection()) {
- if (pendingCollection()) {
- if (getGrandExchange().collect()) {
- new ConditionalSleep(3000) {
- @Override
- public boolean condition() throws InterruptedException {
- return !pendingCollection();
- }
- }.sleep();
- }
- } else {
- int coins = getInventory().getItem("Coins").getAmount();
- if (getGrandExchange().buyItem(id, search, random((coins /2),coins), 1)) {
- new ConditionalSleep(3000) {
- @Override
- public boolean condition() throws InterruptedException {
- return pendingCollection();
- }
- }.sleep();
- }
- }
- } else {
- //get coins somehow, from bank or selling items
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement