pushing without i even know it works or not

This commit is contained in:
NK 2023-07-29 23:42:14 +01:00
parent 242b2835f7
commit 87a71235b4
3 changed files with 18 additions and 9 deletions

View file

@ -95,7 +95,8 @@ public class SniperFlipperEvents {
while (tries < 50) { while (tries < 50) {
if (InventoryUtils.inventoryNameStartsWith("BIN Auction View")) { if (InventoryUtils.inventoryNameStartsWith("BIN Auction View")) {
clickWindow(latestWindowId, 31); clickWindow(latestWindowId, 31);
clickWindow(latestWindowId + 1, 11); Thread.sleep(300 + new Random().nextInt(100));
clickWindow(latestWindowId, 11);
tries++; tries++;
Thread.sleep(BED_SPAM_DELAY); Thread.sleep(BED_SPAM_DELAY);
} }
@ -115,8 +116,13 @@ public class SniperFlipperEvents {
if (spam != null && spam.isAlive()) { if (spam != null && spam.isAlive()) {
spam.interrupt(); spam.interrupt();
} }
clickWindow(latestWindowId, 31); try {
clickWindow(latestWindowId + 1, 11); clickWindow(latestWindowId, 31);
Thread.sleep(300 + new Random().nextInt(100));
clickWindow(latestWindowId, 11);
} catch (Exception ignored) {
}
} else { } else {
Utils.debugLog("Auction was bought by someone else, closing window"); Utils.debugLog("Auction was bought by someone else, closing window");
Lilase.mc.thePlayer.closeScreen(); Lilase.mc.thePlayer.closeScreen();

View file

@ -18,6 +18,7 @@ import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Random;
import static me.night0721.lilase.config.AHConfig.SEND_MESSAGE; 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.ah_full;
@ -117,10 +118,10 @@ public class Claimer extends Sniper {
if (ScoreboardUtils.cleanSB(list.toString()).contains("Status: Sold")) { if (ScoreboardUtils.cleanSB(list.toString()).contains("Status: Sold")) {
toClaim.add(i); toClaim.add(i);
try { try {
Thread.sleep(300); Thread.sleep(400 + new Random().nextInt(100));
clickWindow(Lilase.mc.thePlayer.openContainer.windowId, i); clickWindow(Lilase.mc.thePlayer.openContainer.windowId, i);
Thread.sleep(300); Thread.sleep(500 + new Random().nextInt(100));
clickWindow(Lilase.mc.thePlayer.openContainer.windowId + 1, 31); clickWindow(Lilase.mc.thePlayer.openContainer.windowId, 31);
if (SEND_MESSAGE) { if (SEND_MESSAGE) {
try { try {
webhook.addEmbed(new DiscordWebhook.EmbedObject() webhook.addEmbed(new DiscordWebhook.EmbedObject()

View file

@ -18,6 +18,7 @@ import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import java.util.Random;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -120,9 +121,10 @@ public class Relister extends Sniper {
int target = Math.round(price * 0.98f); int target = Math.round(price * 0.98f);
String uuid = is.getTagCompound().getCompoundTag("ExtraAttributes").getString("uuid"); String uuid = is.getTagCompound().getCompoundTag("ExtraAttributes").getString("uuid");
clickWindow(Lilase.mc.thePlayer.openContainer.windowId, i); clickWindow(Lilase.mc.thePlayer.openContainer.windowId, i);
Thread.sleep(300); Thread.sleep(300 + new Random().nextInt(100));
clickWindow(Lilase.mc.thePlayer.openContainer.windowId + 1, 31); clickWindow(Lilase.mc.thePlayer.openContainer.windowId, 31);
Thread.sleep(300); Thread.sleep(300 + new Random().nextInt(100));
if (SEND_MESSAGE) { if (SEND_MESSAGE) {
try { try {
webhook.addEmbed(new DiscordWebhook.EmbedObject() webhook.addEmbed(new DiscordWebhook.EmbedObject()