fix + continue snipe even full
This commit is contained in:
parent
f297d32cf6
commit
9dcb525cf1
3 changed files with 18 additions and 4 deletions
|
@ -148,7 +148,7 @@ public class SniperFlipperEvents {
|
|||
map.put("price", format.format(item.price));
|
||||
Lilase.cofl.bought_items.add(map);
|
||||
new Thread(() -> {
|
||||
if (!ONLY_SNIPER) {
|
||||
if (!ONLY_SNIPER && !ah_full) {
|
||||
item.flipper = new Flipper(item.name, item.price, item.target, uuid);
|
||||
item.flipper.sendBought();
|
||||
Utils.debugLog("Bought an item, starting to sell");
|
||||
|
@ -158,7 +158,7 @@ public class SniperFlipperEvents {
|
|||
selling_queue.add(item.flipper);
|
||||
item.flipper.sellItem();
|
||||
} else {
|
||||
Utils.debugLog("Bought an item, not selling because only sniper is enabled");
|
||||
Utils.debugLog("Bought an item, not selling because only sniper is enabled or AH slots are full");
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.Objects;
|
|||
|
||||
import static me.night0721.lilase.config.AHConfig.SEND_MESSAGE;
|
||||
import static me.night0721.lilase.events.SniperFlipperEvents.ah_full;
|
||||
import static me.night0721.lilase.events.SniperFlipperEvents.selling_queue;
|
||||
import static me.night0721.lilase.utils.InventoryUtils.clickWindow;
|
||||
import static me.night0721.lilase.features.flipper.Flipper.*;
|
||||
import static me.night0721.lilase.utils.KeyBindingManager.stopMovement;
|
||||
|
@ -96,9 +97,14 @@ public class Claimer extends Sniper {
|
|||
if (isOpen()) toggle();
|
||||
if (ah_full) {
|
||||
ah_full = false;
|
||||
if (selling_queue.size() > 0) {
|
||||
Utils.debugLog("Listing next item from queue");
|
||||
selling_queue.get(0).sellItem();
|
||||
} else {
|
||||
Utils.debugLog("Continue sniping after claiming");
|
||||
Lilase.cofl.toggleAuction();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (int i = 10; i <= 25; i++) {
|
||||
|
|
|
@ -79,6 +79,14 @@ public class CommandListener extends ListenerAdapter {
|
|||
event.getHook().editOriginal("Macro is currently running, please stop it first").queue();
|
||||
}
|
||||
}
|
||||
if (type.equals("relister")) {
|
||||
if (!Lilase.claimer.isOpen()) {
|
||||
Lilase.relister.toggle();
|
||||
event.getHook().editOriginal("Relister enabled").queue();
|
||||
} else {
|
||||
event.getHook().editOriginal("Claimer is currently running, please stop it first").queue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue