Compare commits

...

12 commits

Author SHA1 Message Date
Oscar Fu
06a0688a0d
fix workflow failure
Some checks failed
build-ci / build (push) Has been cancelled
2023-11-03 13:48:47 +00:00
night0721
a251c61a10 change lilase.png to lilase.jpg 2023-11-03 12:36:11 +00:00
night0721
aac63bbbfb update build workfolow 2023-11-03 12:32:52 +00:00
Oscar Fu
29dd94f5ee
Update LICENSE 2023-10-31 01:47:17 +00:00
Night
9ccac630aa
Update SniperFlipperEvents.java
Some checks failed
build-ci / build (push) Has been cancelled
2023-08-12 10:57:51 +01:00
NK
54f1db859b if previous push doesn't work, use this 2023-07-29 23:57:46 +01:00
NK
0478e1180a Merge remote-tracking branch 'origin/master' 2023-07-29 23:42:50 +01:00
NK
87a71235b4 pushing without i even know it works or not 2023-07-29 23:42:14 +01:00
Night
fc48ff15ae
Merge pull request #4 from PerchunPak/patch-2
Include `Profit` field into webhook "purchased" notification
2023-06-20 19:38:16 +01:00
Night
0bb726cc71
Merge pull request #3 from PerchunPak/patch-1
Increase sleep time to fix AntiAFK
2023-06-20 19:37:52 +01:00
Perchun Pak
2458b9c373
Include Profit field into webhook "purchased" notification 2023-06-20 20:09:33 +02:00
Perchun Pak
2c7f4250ca
Increase sleep time to fix AntiAFK
As I understand, it executes command even before entered the server. New time should avoid it, but it's just a workaround. You should somehow wait for world to load + 5 seconds.

BTW, commands in limbo execute much slower, increase timeout there in ~3 times in the future.
2023-06-20 20:06:44 +02:00
12 changed files with 699 additions and 455 deletions

2
.github/README.md vendored
View file

@ -1,6 +1,6 @@
<h1 style="text-align:center;"> Auction House Flipper - Lilase</h1> <h1 style="text-align:center;"> Auction House Flipper - Lilase</h1>
<div style="display:flex;align-items: center;justify-content: center;"> <div style="display:flex;align-items: center;justify-content: center;">
<img src="https://cdn.discordapp.com/attachments/842014909264953354/1082373275038003210/lilase.png" width="300" alt="icon"/> <img src="https://raw.githubusercontent.com/night0721/Lilase/master/src/main/resources/assets/lilase.jpg" width="300" alt="icon"/>
</div> </div>
# Introduction: # Introduction:

View file

@ -22,11 +22,8 @@ jobs:
${{ runner.os }}-gradle- ${{ runner.os }}-gradle-
- name: Build - name: Build
run: chmod +x gradlew && ./gradlew build --stacktrace --info run: chmod +x gradlew && ./gradlew build --stacktrace --info
- name: List working directory contents
run: ls -R
- name: Upload build artifacts - name: Upload build artifacts
uses: actions/upload-artifact@v2 uses: actions/upload-artifact@v2
with: with:
name: build-artifacts name: build-artifacts
path: versions/1.8.9-forge/build/libs/Lilase.jar path: versions/1.8.9-forge/build/libs/Lilase.jar
# ./gradlew setupDecompWorkspace

1111
LICENSE

File diff suppressed because it is too large Load diff

View file

@ -10,7 +10,7 @@ import me.night0721.lilase.Lilase;
public class AHConfig extends Config { public class AHConfig extends Config {
public AHConfig() { public AHConfig() {
super(new Mod("Lilase", ModType.SKYBLOCK, "/assets/lilase.png", 84, 84), "lilase.json"); super(new Mod("Lilase", ModType.SKYBLOCK, "/assets/lilase.jpg", 84, 84), "lilase.json");
initialize(); initialize();
addListener("WEBHOOK", () -> Lilase.configHandler.setString("Webhook", WEBHOOK)); addListener("WEBHOOK", () -> Lilase.configHandler.setString("Webhook", WEBHOOK));
addListener("REMOTE_CONTROL", () -> Lilase.configHandler.setBoolean("RemoteControl", REMOTE_CONTROL)); addListener("REMOTE_CONTROL", () -> Lilase.configHandler.setBoolean("RemoteControl", REMOTE_CONTROL));

View file

@ -102,11 +102,11 @@ public class ChatReceivedEvent {
Utils.addTitle("You got sent to Limbo or Lobby!"); Utils.addTitle("You got sent to Limbo or Lobby!");
Flipper.state = FlipperState.NONE; Flipper.state = FlipperState.NONE;
if (Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction(); if (Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction();
Thread.sleep(5000 + new Random().nextInt(500)); Thread.sleep(30000 + new Random().nextInt(5000));
Utils.sendServerMessage("/lobby"); Utils.sendServerMessage("/lobby");
Thread.sleep(5000 + new Random().nextInt(500)); Thread.sleep(30000 + new Random().nextInt(5000));
Utils.sendServerMessage("/skyblock"); Utils.sendServerMessage("/skyblock");
Thread.sleep(5000 + new Random().nextInt(500)); Thread.sleep(30000 + new Random().nextInt(5000));
Utils.sendServerMessage("/hub"); Utils.sendServerMessage("/hub");
if (!Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction(); if (!Lilase.cofl.isOpen()) Lilase.cofl.toggleAuction();
// Thread bzchillingthread = new Thread(bazaarChilling); // Thread bzchillingthread = new Thread(bazaarChilling);

View file

@ -95,6 +95,7 @@ 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);
Thread.sleep(300 + new Random().nextInt(100));
clickWindow(latestWindowId + 1, 11); clickWindow(latestWindowId + 1, 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 + 1, 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

@ -353,6 +353,7 @@ public class Flipper {
.addField("Item:", name, true) .addField("Item:", name, true)
.addField("Price:", format.format(price), true) .addField("Price:", format.format(price), true)
.addField("Target Price:", format.format(target), true) .addField("Target Price:", format.format(target), true)
.addField("Profit:", df.format(target - price), true)
.addField("Profit Percentage:", df.format((double) (target - price) / price * 100f) + "%", true) .addField("Profit Percentage:", df.format((double) (target - price) / price * 100f) + "%", true)
.setColor(Color.decode(color)); .setColor(Color.decode(color));
} }

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()

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

View file

@ -9,8 +9,8 @@
"updateUrl": "https://github.com/night0721/Lilase/releases", "updateUrl": "https://github.com/night0721/Lilase/releases",
"authorList": ["night0721"], "authorList": ["night0721"],
"credits": "JellyLab/FarmHelper", "credits": "JellyLab/FarmHelper",
"logoFile": "assets/lilase.png", "logoFile": "assets/lilase.jpg",
"screenshots": [], "screenshots": [],
"dependencies": [] "dependencies": []
} }
] ]