Skip to content

Commit

Permalink
2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
NK committed May 23, 2023
1 parent 10ed356 commit 943e947
Show file tree
Hide file tree
Showing 24 changed files with 393 additions and 217 deletions.
12 changes: 11 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@
- Using OOP for selling item so less error
- Fixed pricing issue
- Item not found error should be fixed
- Added gui to tell you to update the mod
- Added gui to tell you to update the mod
- v2.0.4
- Remove unecessary code
- Added auto claimer for auction house, can be toggled by "B"
- Changed Sniper shortcut key to "M"
- Changed Config shortcut key to "N"
- Changed pricing to use short format instead of real number so it looks more real
- Used onTick instead of thread in cofl macro
- Added custom listing time, 1, 6, 12, 24, 48 hours
- Adding mod id hide
- Added image to minecraft mod list and oneconfig
10 changes: 7 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,17 @@ For how to use, see **[here](https://github.com/night0721/lilase#how-to-use)**
```json
{
"SendMessageToWebhook": true,
"Webhook": "",
"ReconnectDelay": 20,
"BedSpamDelay": 100,
"OnlySniper": false,
"BedSpam": true,
"SniperMode": 2,
"GUI": true,
"GUI_COLOR": -1,
"SniperMode": true
"Debug": true,
"Webhook": "https://discord.com/api/webhooks/23452345234534/qwe78ruifahsdfauserq8734qewuiasfdhasdoifasdfADSFASDF",
"GUI_COLOR": -16764590,
"RelistTimeout": 1500,
"AuctionLength": 2
}

```
17 changes: 17 additions & 0 deletions .github/faq.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"content": null,
"embeds": [
{
"title": "Lilase FAQ",
"description": "What is Lilase:\nLilase is a QOL Auction House Mod that is made to auto buy and sell items on the auction house for profit\n\nWhat is Cofl why is it better to buy it:\nCofl is a QOL Auction House mod that tracks and find snipes for the user based on a provided config\n\nWhere can i get Cofl:\nTheir site -> https://sky.coflnet.com/flipper?refId=oedm8r\n\nWhere can I get Cofl Premium:\nhttps://sky.coflnet.com/premium?refId=oedm8r\n\nWhere is showcase of cofl macro:\nhttps://youtu.be/HqYhtSoDGBc\n\nHow to create webhooks:\nhttps://www.youtube.com/watch?v=fKksxz2Gdnc\n\nDoes Lilase have “skip” on the cofl macro:\nYes\n\nWhat is Bed spam and Delay:\nBed spam & Delay is for auctions that just started that have the bed item in the gui to buy\n\nThe sniper isn't buying items/Listing them:\nIf the sniper isn't buying items make sure its actually on (Press end key/rebind in settings on mc), If the sniper isn't listing items make sure sniper only is off if that is off get your log and send it to night (Other sniper mods such as Void can cause issues in sniping make sure if your using lilase that its the only one in the mods folder)\n\nWhere can i get a Cofl config:\nGodflipper: https://discord.gg/godflipper\n\nIs there a paid version of Lilase:\nNo\n\nAre donations accepted:\nYes donations are accepted, dm Night to donate\n\nCan i suggest features to add:\nFeatures can be suggested but make sure they aren't stuff that is already in there\n\nI'm not getting webhook messages:\nMake sure you setup the webhook correctly in the config if so send your log file to night and he can look into it\n\nWill Lilase be able to macro other things in game:\nAt the moment no but that doesn't mean we wont test on other macros such as one for bazzar\n\nWhat is required to run this:\nCofl and forge 1.8.9 + Latest lilase mod file from https://github.com/night0721/Lilase/releases/tag/latest\n\nIs Lilase open source:\nYes lilase is open source the source is located on https://github.com/night0721/Lilase/releases/tag/latest\n\nHow to flip?:\nDownload the latest version of Lilase from https://github.com/night0721/Lilase/releases\nDownload latest version of cofl from https://github.com/Coflnet/SkyblockMod/releases/tag/1.5.2\nPut it into %APPDATA%/.minecraft/mods\nStart forge 1.8.9\nChange any config you like by pressing N (Or any key you changed in settings)\nsave the file and press M key to start COFL sniper(or change it in settings)\nFor example configuration, see https://github.com/night0721/Lilase#example-config \n\nTo get started with sending messages, you need a webhook URL, you can get one via the \"Integrations\" tab in your server's settings. If you're having issues creating a webhook, [the bot](https://discohook.app/bot) can help you create one for you.\n\nKeep in mind that Discohook can't do automation yet, it only sends messages when you tell it to. If you are looking for an automatic feed or custom commands this isn't the right tool for you.",
"url": "https://github.com/night0721/Lilase",
"color": 131642,
"footer": {
"text": "Credits: Alex and Raziel",
"icon_url": "https://avatars.githubusercontent.com/u/77528305?v=4"
},
"timestamp": "2023-05-22T23:00:00.000Z"
}
],
"attachments": []
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name = Lilase
mod_id = lilase
mod_version = 2.0.3
mod_version = 2.0.4

essential.defaults.loom=0

Expand Down
23 changes: 15 additions & 8 deletions src/main/java/me/night0721/lilase/Lilase.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import me.night0721.lilase.config.AHConfig;
import me.night0721.lilase.config.ConfigHandler;
import me.night0721.lilase.events.SniperFlipperEvents;
import me.night0721.lilase.features.claimer.Claimer;
import me.night0721.lilase.features.cofl.Cofl;
import me.night0721.lilase.features.sniper.PageFlipper;
import me.night0721.lilase.features.sniper.Sniper;
//import me.night0721.lilase.features.pageflipper.PageFlipper;
import me.night0721.lilase.features.cofl.QueueItem;
import me.night0721.lilase.gui.ImageRenderer;
import me.night0721.lilase.utils.Clock;
import me.night0721.lilase.utils.KeyBindingManager;
Expand All @@ -31,10 +32,10 @@
public class Lilase {
public static final String MOD_NAME = "Lilase";
public static final String MODID = "Lilase";
public static final String VERSION = "2.0.3";
public static final String VERSION = "2.0.4";
public static final Minecraft mc = Minecraft.getMinecraft();
public static Sniper sniper;
public static PageFlipper pageFlipper;
// public static PageFlipper pageFlipper;
public static Claimer claimer;
public static Cofl cofl;
public static AHConfig config;
public static ConfigHandler configHandler;
Expand All @@ -47,10 +48,10 @@ public void init(FMLInitializationEvent event) {
KeyBindingManager keyBindingManager = new KeyBindingManager();
addToEventBus(this, keyBindingManager, new SniperFlipperEvents(), new ImageRenderer());
EventManager.INSTANCE.register(this);
sniper = new Sniper();
pageFlipper = new PageFlipper();
// pageFlipper = new PageFlipper();
keyBindingManager.registerKeyBindings();
(cofl = new Cofl()).onOpen();
claimer = new Claimer();
}

private void addToEventBus(Object... objects) {
Expand All @@ -67,7 +68,13 @@ public void onTick(TickEvent.ClientTickEvent event) {
if (mc.thePlayer == null || event.phase != TickEvent.Phase.START) return;
tickAmount++;
if (tickAmount % 20 == 0) Utils.checkFooter();
if (pageFlipper != null) pageFlipper.switchStates();
// if (pageFlipper != null) pageFlipper.switchStates();
if (claimer != null) claimer.onTick();
if (cofl.getOpen() && !cofl.queue.isEmpty() && !cofl.queue.isRunning()) {
cofl.queue.setRunning(true);
QueueItem item = cofl.queue.get();
item.openAuction();
}
if (mc.currentScreen instanceof GuiDisconnected && clock.passed()) {
clock.schedule(RECONNECT_DELAY * 1000L);
FMLClientHandler.instance().connectToServer(new GuiMultiplayer(new GuiMainMenu()), new ServerData(" ", "mc.hypixel.net", false));
Expand Down
15 changes: 8 additions & 7 deletions src/main/java/me/night0721/lilase/config/AHConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class AHConfig extends Config {
public AHConfig() {
super(new Mod("Lilase", ModType.UTIL_QOL), "lilase.json");
super(new Mod("Lilase", ModType.SKYBLOCK, "/assets/lilase.png", 100, 100), "lilase.json");
initialize();
addListener("SEND_MESSAGE", () -> Lilase.configHandler.setBoolean("SendMessageToWebhook", SEND_MESSAGE));
addListener("WEBHOOK", () -> Lilase.configHandler.setString("Webhook", WEBHOOK));
Expand All @@ -20,22 +20,23 @@ public AHConfig() {
addListener("ONLY_SNIPER", () -> Lilase.configHandler.setBoolean("OnlySniper", ONLY_SNIPER));
addListener("GUI", () -> Lilase.configHandler.setBoolean("GUI", GUI));
addListener("GUI_COLOR", () -> Lilase.configHandler.setInt("GUI_COLOR", GUI_COLOR.getRGB()));
addListener("RELIST_TIMEOUT", () -> Lilase.configHandler.setInt("RELIST_TIMEOUT", Math.round(RELIST_TIMEOUT)));
addListener("RELIST_TIMEOUT", () -> Lilase.configHandler.setInt("RelistTimeout", Math.round(RELIST_TIMEOUT)));
addListener("DEBUG", () -> Lilase.configHandler.setBoolean("Debug", DEBUG));
addListener("AUCTION_LENGTH", () -> Lilase.configHandler.setInt("AuctionLength", Math.round(AUCTION_LENGTH)));
addDependency("WEBHOOK", "SEND_MESSAGE");
addDependency("MINIMUM_PROFIT_PERCENTAGE", "CHECK_PERCENTAGE");
addDependency("MAXIMUM_PROFIT_PERCENTAGE", "CHECK_MAXIMUM_PROFIT");
addDependency("GUI_COLOR", "GUI");
}

@Switch(name = "Bed Spam & Skip Confirm", category = "Auction House", subcategory = "Sniper", description = "Spam the bed to buy the item just after the grace period ends and skips the confirmation of buying the item")
public static boolean BED_SPAM = true;

@Slider(name = "Bed Spam Delay (ms)", min = 50, max = 500, step = 50, category = "Auction House", subcategory = "Sniper", description = "Delay between each bed spam")
@Slider(name = "Bed Spam Delay (ms)", min = 50, max = 500, step = 50, category = "Auction House", subcategory = "Sniper", description = "Delay between each bed spam (milliseconds)")
public static int BED_SPAM_DELAY = 100;

@Number(name = "Relist timeout", min = 1500, max = 60000, step = 500, category = "Auction House", subcategory = "Sniper", description = "Delay between buying and relisting an item")
@Number(name = "Relist timeout (ms)", min = 1500, max = 60000, step = 500, category = "Auction House", subcategory = "Flipper", description = "Delay between buying and relisting an item (milliseconds)")
public static int RELIST_TIMEOUT = 1500;
@Dropdown(name = "Auction Listing Length", options = {"1 Hour", "6 Hours", "12 Hours", "24 Hours", "2 Days"}, category = "Auction House", subcategory = "Flipper", description = "Length of the auction listing")
public static int AUCTION_LENGTH = 2;

@Switch(name = "Debug", category = "Auction House", subcategory = "Sniper", description = "Debug mode")
public static boolean DEBUG = false;
Expand All @@ -49,7 +50,7 @@ public AHConfig() {
@Switch(name = "Send message to webhook", category = "Auction House", subcategory = "Webhook", description = "Send a message to the webhook when an item is bought")
public static boolean SEND_MESSAGE = true;

@Number(name = "Reconnect Delay", min = 5, max = 20, category = "Failsafe", description = "Delay between each reconnect attempt to the server")
@Number(name = "Reconnect Delay(s)", min = 5, max = 20, category = "Failsafe", description = "Delay between each reconnect attempt to the server (seconds)")
public static int RECONNECT_DELAY = 20;

@Checkbox(name = "GUI", category = "GUI", description = "Enable the GUI")
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/me/night0721/lilase/config/ConfigHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public void reloadConfig() {
if (hasNoKey("OnlySniper")) setBoolean("OnlySniper", false);
if (hasNoKey("GUI")) setBoolean("GUI", true);
if (hasNoKey("GUI_COLOR")) setInt("GUI_COLOR", 0x003153);
if (hasNoKey("DEBUG")) setBoolean("DEBUG", false);
if (hasNoKey("RELIST_TIMEOUT")) setInt("RELIST_TIMEOUT", 1500);
if (hasNoKey("Debug")) setBoolean("Debug", false);
if (hasNoKey("RelistTimeout")) setInt("RelistTimeout", 1500);
if (hasNoKey("AuctionLength")) setInt("AuctionLength", 2);
}

public JsonObject readConfigFile() {
Expand Down
Loading

0 comments on commit 943e947

Please sign in to comment.