aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorflame-cat <kaldraganov05@gmail.com>2020-12-28 00:20:20 -0500
committerflame-cat <kaldraganov05@gmail.com>2020-12-28 00:20:20 -0500
commit0d874edaeca1a1766e8e3264b8b3391c720adefc (patch)
tree81e1ababa7fea87e2c1355809a8c2fc294c2f8c4 /src
parente00e8cc6b29b8c6826459c7d39e40b265640d22d (diff)
parentc23aabd86e5cf33d69afc6368f7a4ad28afaeea0 (diff)
downloadSkyblockMod-0d874edaeca1a1766e8e3264b8b3391c720adefc.tar.gz
SkyblockMod-0d874edaeca1a1766e8e3264b8b3391c720adefc.tar.bz2
SkyblockMod-0d874edaeca1a1766e8e3264b8b3391c720adefc.zip
Merge branch 'development' of https://github.com/flame-cat/SkyblockMod into development
Diffstat (limited to 'src')
-rw-r--r--src/main/java/me/Danker/DankersSkyblockMod.java1714
-rw-r--r--src/main/java/me/Danker/commands/DHelpCommand.java2
-rw-r--r--src/main/java/me/Danker/commands/DankerGuiCommand.java1
-rw-r--r--src/main/java/me/Danker/commands/RepartyCommand.java92
-rw-r--r--src/main/java/me/Danker/commands/SkillTrackerCommand.java107
-rw-r--r--src/main/java/me/Danker/commands/ToggleCommand.java11
-rw-r--r--src/main/java/me/Danker/gui/DankerGui.java14
-rw-r--r--src/main/java/me/Danker/gui/DisplayGui.java5
-rw-r--r--src/main/java/me/Danker/handlers/ConfigHandler.java9
9 files changed, 1055 insertions, 900 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java
index 55bc799..85d312c 100644
--- a/src/main/java/me/Danker/DankersSkyblockMod.java
+++ b/src/main/java/me/Danker/DankersSkyblockMod.java
@@ -78,8 +78,7 @@ import java.util.regex.Pattern;
@Mod(modid = DankersSkyblockMod.MODID, version = DankersSkyblockMod.VERSION, clientSideOnly = true)
public class DankersSkyblockMod {
public static final String MODID = "Danker's Skyblock Mod";
- public static final String VERSION = "1.8.5-beta6";
-
+ public static final String VERSION = "1.8.5-beta7";
static double checkItemsNow = 0;
static double itemsChecked = 0;
public static Map<String, String> t6Enchants = new HashMap<>();
@@ -147,22 +146,23 @@ public class DankersSkyblockMod {
static String lastSkill = "Farming";
public static boolean showSkillTracker;
public static StopWatch skillStopwatch = new StopWatch();
- static double farmingXP = 0;
- public static double farmingXPGained = 0;
- static double miningXP = 0;
- public static double miningXPGained = 0;
- static double combatXP = 0;
- public static double combatXPGained = 0;
- static double foragingXP = 0;
- public static double foragingXPGained = 0;
- static double fishingXP = 0;
- public static double fishingXPGained = 0;
- static double enchantingXP = 0;
- public static double enchantingXPGained = 0;
- static double alchemyXP = 0;
- public static double alchemyXPGained = 0;
- static double xpLeft = 0;
-
+ static double farmingXP = 0;
+ public static double farmingXPGained = 0;
+ static double miningXP = 0;
+ public static double miningXPGained = 0;
+ static double combatXP = 0;
+ public static double combatXPGained = 0;
+ static double foragingXP = 0;
+ public static double foragingXPGained = 0;
+ static double fishingXP = 0;
+ public static double fishingXPGained = 0;
+ static double enchantingXP = 0;
+ public static double enchantingXPGained = 0;
+ static double alchemyXP = 0;
+ public static double alchemyXPGained = 0;
+ static double xpLeft = 0;
+ static double timeSinceGained = 0;
+
public static String MAIN_COLOUR;
public static String SECONDARY_COLOUR;
public static String ERROR_COLOUR;
@@ -283,29 +283,30 @@ public class DankersSkyblockMod {
@EventHandler
public void preInit(final FMLPreInitializationEvent event) {
- ClientCommandHandler.instance.registerCommand(new ToggleCommand());
- ClientCommandHandler.instance.registerCommand(new SetkeyCommand());
- ClientCommandHandler.instance.registerCommand(new GetkeyCommand());
- ClientCommandHandler.instance.registerCommand(new LootCommand());
- ClientCommandHandler.instance.registerCommand(new ReloadConfigCommand());
- ClientCommandHandler.instance.registerCommand(new DisplayCommand());
- ClientCommandHandler.instance.registerCommand(new MoveCommand());
- ClientCommandHandler.instance.registerCommand(new SlayerCommand());
- ClientCommandHandler.instance.registerCommand(new SkillsCommand());
- ClientCommandHandler.instance.registerCommand(new GuildOfCommand());
- ClientCommandHandler.instance.registerCommand(new DHelpCommand());
- ClientCommandHandler.instance.registerCommand(new PetsCommand());
- ClientCommandHandler.instance.registerCommand(new BankCommand());
- ClientCommandHandler.instance.registerCommand(new ArmourCommand());
- ClientCommandHandler.instance.registerCommand(new ImportFishingCommand());
- ClientCommandHandler.instance.registerCommand(new ResetLootCommand());
- ClientCommandHandler.instance.registerCommand(new ScaleCommand());
- ClientCommandHandler.instance.registerCommand(new SkyblockPlayersCommand());
- ClientCommandHandler.instance.registerCommand(new BlockSlayerCommand());
- ClientCommandHandler.instance.registerCommand(new DungeonsCommand());
- ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand());
- ClientCommandHandler.instance.registerCommand(new DankerGuiCommand());
- ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand());
+ ClientCommandHandler.instance.registerCommand(new ToggleCommand());
+ ClientCommandHandler.instance.registerCommand(new SetkeyCommand());
+ ClientCommandHandler.instance.registerCommand(new GetkeyCommand());
+ ClientCommandHandler.instance.registerCommand(new LootCommand());
+ ClientCommandHandler.instance.registerCommand(new ReloadConfigCommand());
+ ClientCommandHandler.instance.registerCommand(new DisplayCommand());
+ ClientCommandHandler.instance.registerCommand(new MoveCommand());
+ ClientCommandHandler.instance.registerCommand(new SlayerCommand());
+ ClientCommandHandler.instance.registerCommand(new SkillsCommand());
+ ClientCommandHandler.instance.registerCommand(new GuildOfCommand());
+ ClientCommandHandler.instance.registerCommand(new DHelpCommand());
+ ClientCommandHandler.instance.registerCommand(new PetsCommand());
+ ClientCommandHandler.instance.registerCommand(new BankCommand());
+ ClientCommandHandler.instance.registerCommand(new ArmourCommand());
+ ClientCommandHandler.instance.registerCommand(new ImportFishingCommand());
+ ClientCommandHandler.instance.registerCommand(new ResetLootCommand());
+ ClientCommandHandler.instance.registerCommand(new ScaleCommand());
+ ClientCommandHandler.instance.registerCommand(new SkyblockPlayersCommand());
+ ClientCommandHandler.instance.registerCommand(new BlockSlayerCommand());
+ ClientCommandHandler.instance.registerCommand(new DungeonsCommand());
+ ClientCommandHandler.instance.registerCommand(new LobbySkillsCommand());
+ ClientCommandHandler.instance.registerCommand(new DankerGuiCommand());
+ ClientCommandHandler.instance.registerCommand(new SkillTrackerCommand());
+ ClientCommandHandler.instance.registerCommand(new RepartyCommand());
}
@EventHandler
@@ -390,116 +391,156 @@ public class DankersSkyblockMod {
// It randomly broke, so I had to make it the highest priority
@SubscribeEvent(priority = EventPriority.HIGHEST)
public void onChat(ClientChatReceivedEvent event) {
- String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
-
+ String message = StringUtils.stripControlCodes(event.message.getUnformattedText());
+
if (message.startsWith("Your new API key is ") && Utils.isOnHypixel()) {
String apiKey = event.message.getSiblings().get(0).getChatStyle().getChatClickEvent().getValue();
ConfigHandler.writeStringConfig("api", "APIKey", apiKey);
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentText(DankersSkyblockMod.MAIN_COLOUR + "Set API key to " + DankersSkyblockMod.SECONDARY_COLOUR + apiKey));
}
- if (!Utils.inSkyblock) return;
-
- // Action Bar
- if (event.type == 2) {
- String[] actionBarSections = event.message.getUnformattedText().split(" {3,}");
- for (String section : actionBarSections) {
- if (section.contains("+") && section.contains("/") && section.contains("(")) {
- if (!section.contains("Runecrafting") && !section.contains("Carpentry")) {
- int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50;
- double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
- int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""));
- xpLeft = xpToLevelUp - currentXP;
- int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit);
- double totalXP = currentXP + previousXP;
- String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" "));
- switch (skill) {
- case "Farming":
- lastSkill = "Farming";
- if (farmingXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- farmingXPGained += totalXP - farmingXP;
- }
- farmingXP = totalXP;
- break;
- case "Mining":
- lastSkill = "Mining";
- if (miningXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- miningXPGained += totalXP - miningXP;
- }
- miningXP = totalXP;
- break;
- case "Combat":
- lastSkill = "Combat";
- if (combatXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- combatXPGained += totalXP - combatXP;
- }
- combatXP = totalXP;
- break;
- case "Foraging":
- lastSkill = "Foraging";
- if (foragingXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- foragingXPGained += totalXP - foragingXP;
- }
- foragingXP = totalXP;
- break;
- case "Fishing":
- lastSkill = "Fishing";
- if (fishingXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- fishingXPGained += totalXP - fishingXP;
- }
- fishingXP = totalXP;
- break;
- case "Enchanting":
- lastSkill = "Enchanting";
- if (enchantingXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- enchantingXPGained += totalXP - enchantingXP;
- }
- enchantingXP = totalXP;
- break;
- case "Alchemy":
- lastSkill = "Alchemy";
- if (alchemyXP != 0) {
- if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended())
- alchemyXPGained += totalXP - alchemyXP;
- }
- alchemyXP = totalXP;
- break;
- default:
- System.err.println("Unknown skill.");
- }
- }
-
- if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) {
- String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1);
- double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
- int limit;
- int totalXp;
- if (section.contains("Farming") || section.contains("Enchanting")) {
- limit = 60;
- totalXp = 111672425;
- } else {
- limit = 50;
- totalXp = 55172425;
- }
- int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit);
- double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D;
-
- NumberFormat nf = NumberFormat.getNumberInstance(Locale.US);
- skillTimer = SKILL_TIME;
- showSkill = true;
- skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp + previousXp) + "/" + nf.format(totalXp) + ") " + percentage + "%";
- }
- }
- }
- return;
- }
-
+ // Reparty command
+ if (System.currentTimeMillis() / 1000 - RepartyCommand.callTime <= 5) {
+ if (!(message.contains("----") || message.contains("disbanded") || message.contains("seconds to accept") || message.contains("●") || message.contains("Party Members") || message.contains("Couldn't find a player") || message.contains("cannot invite that player") || message.length() == 0)) {
+ return;
+ }
+
+ EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
+
+ Pattern party_start_pattern = Pattern.compile("^Party Members \\((\\d+)\\)$");
+ Pattern leader_pattern = Pattern.compile("^Party Leader: (?:\\[.+?] )?(\\w+) ●$");
+ Pattern members_pattern = Pattern.compile(" (?:\\[.+?] )?(\\w+) ●");
+ Matcher party_start = party_start_pattern.matcher(message);
+ Matcher leader = leader_pattern.matcher(message);
+ Matcher members = members_pattern.matcher(message);
+
+ if (party_start.matches() && Integer.parseInt(party_start.group(1)) == 1) {
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You cannot reparty yourself."));
+ }
+ else if (leader.matches() && !(leader.group(1).equals(player.getName()))) {
+ player.addChatMessage(new ChatComponentText(DankersSkyblockMod.ERROR_COLOUR + "You are not party leader."));
+ }
+ else if (message.contains("Couldn't find a player") || message.contains("You cannot invite that player")) {
+ RepartyCommand.repartyFailList.add(RepartyCommand.currentMember);
+ }
+ else {
+ while (members.find()) {
+ String partyMember = members.group(1);
+ if (!partyMember.equals(player.getName())) {
+ RepartyCommand.party.add(partyMember);
+ }
+ }
+ }
+ event.setCanceled(true);
+ }
+
+ if (!Utils.inSkyblock) return;
+
+ // Action Bar
+ if (event.type == 2) {
+ EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
+ String[] actionBarSections = event.message.getUnformattedText().split(" {3,}");
+
+ for (String section : actionBarSections) {
+ if (section.contains("+") && section.contains("/") && section.contains("(")) {
+ if (!section.contains("Runecrafting") && !section.contains("Carpentry")) {
+ if (ToggleCommand.autoSkillTrackerToggled && System.currentTimeMillis() / 1000 - timeSinceGained <= 2) {
+ if (skillStopwatch.isStarted() && skillStopwatch.isSuspended()) {
+ skillStopwatch.resume();
+ } else if (!skillStopwatch.isStarted()) {
+ skillStopwatch.start();
+ }
+ }
+ timeSinceGained = System.currentTimeMillis() / 1000;
+
+ int limit = section.contains("Farming") || section.contains("Enchanting") ? 60 : 50;
+ double currentXP = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
+ int xpToLevelUp = Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", ""));
+ xpLeft = xpToLevelUp - currentXP;
+ int previousXP = Utils.getPastXpEarned(xpToLevelUp, limit);
+ double totalXP = currentXP + previousXP;
+
+ String skill = section.substring(section.indexOf(" ") + 1, section.lastIndexOf(" "));
+ switch (skill) {
+ case "Farming":
+ lastSkill = "Farming";
+ if (farmingXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) farmingXPGained += totalXP - farmingXP;
+ }
+ farmingXP = totalXP;
+ break;
+ case "Mining":
+ lastSkill = "Mining";
+ if (miningXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) miningXPGained += totalXP - miningXP;
+ }
+ miningXP = totalXP;
+ break;
+ case "Combat":
+ lastSkill = "Combat";
+ if (combatXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) combatXPGained += totalXP - combatXP;
+ }
+ combatXP = totalXP;
+ break;
+ case "Foraging":
+ lastSkill = "Foraging";
+ if (foragingXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) foragingXPGained += totalXP - foragingXP;
+ }
+ foragingXP = totalXP;
+ break;
+ case "Fishing":
+ lastSkill = "Fishing";
+ if (fishingXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) fishingXPGained += totalXP - fishingXP;
+ }
+ fishingXP = totalXP;
+ break;
+ case "Enchanting":
+ lastSkill = "Enchanting";
+ if (enchantingXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) enchantingXPGained += totalXP - enchantingXP;
+ }
+ enchantingXP = totalXP;
+ break;
+ case "Alchemy":
+ lastSkill = "Alchemy";
+ if (alchemyXP != 0) {
+ if (skillStopwatch.isStarted() && !skillStopwatch.isSuspended()) alchemyXPGained += totalXP - alchemyXP;
+ }
+ alchemyXP = totalXP;
+ break;
+ default:
+ System.err.println("Unknown skill.");
+ }
+ }
+
+ if (ToggleCommand.skill50DisplayToggled && !section.contains("Runecrafting")) {
+ String xpGained = section.substring(section.indexOf("+"), section.indexOf("(") - 1);
+ double currentXp = Double.parseDouble(section.substring(section.indexOf("(") + 1, section.indexOf("/")).replace(",", ""));
+ int limit;
+ int totalXp;
+ if (section.contains("Farming") || section.contains("Enchanting")) {
+ limit = 60;
+ totalXp = 111672425;
+ } else {
+ limit = 50;
+ totalXp = 55172425;
+ }
+ int previousXp = Utils.getPastXpEarned(Integer.parseInt(section.substring(section.indexOf("/") + 1, section.indexOf(")")).replaceAll(",", "")), limit);
+ double percentage = Math.floor(((currentXp + previousXp) / totalXp) * 10000D) / 100D;
+
+ NumberFormat nf = NumberFormat.getNumberInstance(Locale.US);
+ skillTimer = SKILL_TIME;
+ showSkill = true;
+ skillText = SKILL_50_COLOUR + xpGained + " (" + nf.format(currentXp + previousXp) + "/" + nf.format(totalXp) + ") " + percentage + "%";
+ }
+ }
+ }
+ return;
+ }
+
if (ToggleCommand.bonzoTimerToggled && Utils.inDungeons && message.contains("Bonzo's Mask") && message.contains("saved your life!")) {
double usedTime = System.currentTimeMillis() / 1000;
Minecraft mc = Minecraft.getMinecraft();
@@ -614,7 +655,7 @@ public class DankersSkyblockMod {
}
if (ToggleCommand.oruoToggled && Utils.inDungeons) {
- if (message.contains("What SkyBlock year is it?")) {
+ if (message.contains("What SkyBlock year is it?")) {
double currentTime = System.currentTimeMillis() /1000L;
double diff = Math.floor(currentTime - 1560276000);
@@ -629,691 +670,688 @@ public class DankersSkyblockMod {
}
}
}
-
- // Set wrong answers to red and remove click events
- if (triviaAnswers != null && (message.contains("ⓐ") || message.contains("ⓑ") || message.contains("ⓒ"))) {
- boolean isSolution = false;
- for (String solution : triviaAnswers) {
- if (message.contains(solution)) {
- isSolution = true;
- break;
- }
- }
- if (!isSolution) {
- char letter = message.charAt(5);
- String option = message.substring(6);
- event.message = new ChatComponentText(" " + EnumChatFormatting.GOLD + letter + TRIVIA_WRONG_ANSWER_COLOUR + option);
- return;
- }
- }
- }
-
- if (ToggleCommand.gpartyToggled) {
- if (message.contains(" has invited all members of ")) {
- try {
- final SystemTray tray = SystemTray.getSystemTray();
- final Image image = Toolkit.getDefaultToolkit().createImage("icon.png");
- final TrayIcon trayIcon = new TrayIcon(image, "Guild Party Notifier");
- trayIcon.setImageAutoSize(true);
- trayIcon.setToolTip("Guild Party Notifier");
- tray.add(trayIcon);
- trayIcon.displayMessage("Guild Party", message, TrayIcon.MessageType.INFO);
- tray.remove(trayIcon);
- } catch (Exception ex) {
- ex.printStackTrace();
- }
- }
- }
-
- if (ToggleCommand.golemAlertToggled) {
- if (message.contains("The ground begins to shake as an Endstone Protector rises from below!")) {
- Utils.createTitle(EnumChatFormatting.RED + "GOLEM SPAWNING!", 3);
- }
- }
-
- if (message.contains("Yum! You gain +") && message.contains(" for 48 hours!")) {
- cakeTime = System.currentTimeMillis() / 1000 + 172800; // Add 48 hours
- ConfigHandler.writeDoubleConfig("misc", "cakeTime", cakeTime);
- }
-
- boolean wolfRNG = false;
- boolean spiderRNG = false;
- boolean zombieRNG = false;
- // T6 books
- if (message.contains("VERY RARE DROP! (Enchanted Book)") || message.contains("CRAZY RARE DROP! (Enchanted Book)")) {
- // Loop through scoreboard to see what boss you're doing
- List<String> scoreboard = ScoreboardHandler.getSidebarLines();
- for (String s : scoreboard) {
- String sCleaned = ScoreboardHandler.cleanSB(s);
- if (sCleaned.contains("Sven Packmaster")) {
- LootCommand.wolfBooks++;
- ConfigHandler.writeIntConfig("wolf", "book", LootCommand.wolfBooks);
- } else if (sCleaned.contains("Tarantula Broodfather")) {
- LootCommand.spiderBooks++;
- ConfigHandler.writeIntConfig("spider", "book", LootCommand.spiderBooks);
- } else if (sCleaned.contains("Revenant Horror")) {
- LootCommand.zombieBooks++;
- ConfigHandler.writeIntConfig("zombie", "book", LootCommand.zombieBooks);
- }
- }
- }
-
- // Wolf
- if (message.contains("Talk to Maddox to claim your Wolf Slayer XP!")) {
- LootCommand.wolfSvens++;
- LootCommand.wolfSvensSession++;
- if (LootCommand.wolfBosses != -1) {
- LootCommand.wolfBosses++;
- }
- if (LootCommand.wolfBossesSession != -1) {
- LootCommand.wolfBossesSession++;
- }
- ConfigHandler.writeIntConfig("wolf", "svens", LootCommand.wolfSvens);
- ConfigHandler.writeIntConfig("wolf", "bossRNG", LootCommand.wolfBosses);
- } else if (message.contains("RARE DROP! (Hamster Wheel)")) {
- LootCommand.wolfWheelsDrops++;
- LootCommand.wolfWheelsDropsSession++;
- ConfigHandler.writeIntConfig("wolf", "wheelDrops", LootCommand.wolfWheelsDrops);
- } else if (message.contains("VERY RARE DROP! (") && message.contains(" Spirit Rune I)")) { // Removing the unicode here *should* fix rune drops not counting
- LootCommand.wolfSpirits++;
- LootCommand.wolfSpiritsSession++;
- ConfigHandler.writeIntConfig("wolf", "spirit", LootCommand.wolfSpirits);
- } else if (message.contains("CRAZY RARE DROP! (Red Claw Egg)")) {
- wolfRNG = true;
- LootCommand.wolfEggs++;
- LootCommand.wolfEggsSession++;
- ConfigHandler.writeIntConfig("wolf", "egg", LootCommand.wolfEggs);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_RED + "RED CLAW EGG!", 3);
- } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Couture Rune I)")) {
- wolfRNG = true;
- LootCommand.wolfCoutures++;
- LootCommand.wolfCouturesSession++;
- ConfigHandler.writeIntConfig("wolf", "couture", LootCommand.wolfCoutures);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "COUTURE RUNE!", 3);
- } else if (message.contains("CRAZY RARE DROP! (Grizzly Bait)") || message.contains("CRAZY RARE DROP! (Rename Me)")) { // How did Skyblock devs even manage to make this item Rename Me
- wolfRNG = true;
- LootCommand.wolfBaits++;
- LootCommand.wolfBaitsSession++;
- ConfigHandler.writeIntConfig("wolf", "bait", LootCommand.wolfBaits);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.AQUA + "GRIZZLY BAIT!", 3);
- } else if (message.contains("CRAZY RARE DROP! (Overflux Capacitor)")) {
- wolfRNG = true;
- LootCommand.wolfFluxes++;
- LootCommand.wolfFluxesSession++;
- ConfigHandler.writeIntConfig("wolf", "flux", LootCommand.wolfFluxes);
- if (ToggleCommand.rngesusAlerts)
- Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "OVERFLUX CAPACITOR!", 5);
- } else if (message.contains("Talk to Maddox to claim your Spider Slayer XP!")) { // Spider
- LootCommand.spiderTarantulas++;
- LootCommand.spiderTarantulasSession++;
- if (LootCommand.spiderBosses != -1) {
- LootCommand.spiderBosses++;
- }
- if (LootCommand.spiderBossesSession != -1) {
- LootCommand.spiderBossesSession++;
- }
- ConfigHandler.writeIntConfig("spider", "tarantulas", LootCommand.spiderTarantulas);
- ConfigHandler.writeIntConfig("spider", "bossRNG", LootCommand.spiderBosses);
- } else if (message.contains("RARE DROP! (Toxic Arrow Poison)")) {
- LootCommand.spiderTAPDrops++;
- LootCommand.spiderTAPDropsSession++;
- ConfigHandler.writeIntConfig("spider", "tapDrops", LootCommand.spiderTAPDrops);
- } else if (message.contains("VERY RARE DROP! (") && message.contains(" Bite Rune I)")) {
- LootCommand.spiderBites++;
- LootCommand.spiderBitesSession++;
- ConfigHandler.writeIntConfig("spider", "bite", LootCommand.spiderBites);
- } else if (message.contains("VERY RARE DROP! (Spider Catalyst)")) {
- LootCommand.spiderCatalysts++;
- LootCommand.spiderCatalystsSession++;
- ConfigHandler.writeIntConfig("spider", "catalyst", LootCommand.spiderCatalysts);
- } else if (message.contains("CRAZY RARE DROP! (Fly Swatter)")) {
- spiderRNG = true;
- LootCommand.spiderSwatters++;
- LootCommand.spiderSwattersSession++;
- ConfigHandler.writeIntConfig("spider", "swatter", LootCommand.spiderSwatters);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.LIGHT_PURPLE + "FLY SWATTER!", 3);
- } else if (message.contains("CRAZY RARE DROP! (Tarantula Talisman")) {
- spiderRNG = true;
- LootCommand.spiderTalismans++;
- LootCommand.spiderTalismansSession++;
- ConfigHandler.writeIntConfig("spider", "talisman", LootCommand.spiderTalismans);
- if (ToggleCommand.rngesusAlerts)
- Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "TARANTULA TALISMAN!", 3);
- } else if (message.contains("CRAZY RARE DROP! (Digested Mosquito)")) {
- spiderRNG = true;
- LootCommand.spiderMosquitos++;
- LootCommand.spiderMosquitosSession++;
- ConfigHandler.writeIntConfig("spider", "mosquito", LootCommand.spiderMosquitos);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "DIGESTED MOSQUITO!", 5);
- } else if (message.contains("Talk to Maddox to claim your Zombie Slayer XP!")) { // Zombie
- LootCommand.zombieRevs++;
- LootCommand.zombieRevsSession++;
- if (LootCommand.zombieBosses != -1) {
- LootCommand.zombieBosses++;
- }
- if (LootCommand.zombieBossesSession != 1) {
- LootCommand.zombieBossesSession++;
- }
- ConfigHandler.writeIntConfig("zombie", "revs", LootCommand.zombieRevs);
- ConfigHandler.writeIntConfig("zombie", "bossRNG", LootCommand.zombieBosses);
- } else if (message.contains("RARE DROP! (Foul Flesh)")) {
- LootCommand.zombieFoulFleshDrops++;
- LootCommand.zombieFoulFleshDropsSession++;
- ConfigHandler.writeIntConfig("zombie", "foulFleshDrops", LootCommand.zombieFoulFleshDrops);
- } else if (message.contains("VERY RARE DROP! (Revenant Catalyst)")) {
- LootCommand.zombieRevCatas++;
- LootCommand.zombieRevCatasSession++;
- ConfigHandler.writeIntConfig("zombie", "revCatalyst", LootCommand.zombieRevCatas);
- } else if (message.contains("VERY RARE DROP! (") && message.contains(" Pestilence Rune I)")) {
- LootCommand.zombiePestilences++;
- LootCommand.zombiePestilencesSession++;
- ConfigHandler.writeIntConfig("zombie", "pestilence", LootCommand.zombiePestilences);
- } else if (message.contains("VERY RARE DROP! (Undead Catalyst)")) {
- LootCommand.zombieUndeadCatas++;
- LootCommand.zombieUndeadCatasSession++;
- ConfigHandler.writeIntConfig("zombie", "undeadCatalyst", LootCommand.zombieUndeadCatas);
- } else if (message.contains("CRAZY RARE DROP! (Beheaded Horror)")) {
- zombieRNG = true;
- LootCommand.zombieBeheadeds++;
- LootCommand.zombieBeheadedsSession++;
- ConfigHandler.writeIntConfig("zombie", "beheaded", LootCommand.zombieBeheadeds);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_PURPLE + "BEHEADED HORROR!", 3);
- } else if (message.contains("CRAZY RARE DROP! (") && message.contains(" Snake Rune I)")) {
- zombieRNG = true;
- LootCommand.zombieSnakes++;
- LootCommand.zombieSnakesSession++;
- ConfigHandler.writeIntConfig("zombie", "snake", LootCommand.zombieSnakes);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.DARK_GREEN + "SNAKE RUNE!", 3);
- } else if (message.contains("CRAZY RARE DROP! (Scythe Blade)")) {
- zombieRNG = true;
- LootCommand.zombieScythes++;
- LootCommand.zombieScythesSession++;
- ConfigHandler.writeIntConfig("zombie", "scythe", LootCommand.zombieScythes);
- if (ToggleCommand.rngesusAlerts) Utils.createTitle(EnumChatFormatting.GOLD + "SCYTHE BLADE!", 5);
- } else if (message.contains("GOOD CATCH!")) { // Fishing
- LootCommand.goodCatches++;
- LootCommand.goodCatchesSession++;
- ConfigHandler.writeIntConfig("fishing", "goodCatch", LootCommand.goodCatches);
- } else if (message.contains("GREAT CATCH!")) {
- LootCommand.greatCatches++;
- LootCommand.greatCatchesSession++;
- ConfigHandler.writeIntConfig("fishing", "greatCatch", LootCommand.greatCatches);
- } else if (message.contains("A Squid appeared")) {
- LootCommand.squids++;
- LootCommand.squidsSession++;
- ConfigHandler.writeIntConfig("fishing", "squid", LootCommand.squids);
- increaseSeaCreatures();
- } else if (message.contains("You caught a Sea Walker")) {
- LootCommand.seaWalkers++;
- LootCommand.seaWalkersSession++;
- ConfigHandler.writeIntConfig("fishing", "seaWalker", LootCommand.seaWalkers);
- increaseSeaCreatures();
- } else if (message.contains("Pitch darkness reveals a Night Squid")) {
- LootCommand.nightSquids++;
- LootCommand.nightSquidsSession++;
- ConfigHandler.writeIntConfig("fishing", "nightSquid", LootCommand.nightSquids);
- increaseSeaCreatures();
- } else if (message.contains("You stumbled upon a Sea Guardian")) {
- LootCommand.seaGuardians++;
- LootCommand.seaGuardiansSession++;
- ConfigHandler.writeIntConfig("fishing", "seaGuardian", LootCommand.seaGuardians);
- increaseSeaCreatures();
- } else if (message.contains("It looks like you've disrupted the Sea Witch's brewing session. Watch out, she's furious")) {
- LootCommand.seaWitches++;
- LootCommand.seaWitchesSession++;
- ConfigHandler.writeIntConfig("fishing", "seaWitch", LootCommand.seaWitches);
- increaseSeaCreatures();
- } else if (message.contains("You reeled in a Sea Archer")) {
- LootCommand.seaArchers++;
- LootCommand.seaArchersSession++;
- ConfigHandler.writeIntConfig("fishing", "seaArcher", LootCommand.seaArchers);
- increaseSeaCreatures();
- } else if (message.contains("The Monster of the Deep has emerged")) {
- LootCommand.monsterOfTheDeeps++;
- LootCommand.monsterOfTheDeepsSession++;
- ConfigHandler.writeIntConfig("fishing", "monsterOfDeep", LootCommand.monsterOfTheDeeps);
- increaseSeaCreatures();
- } else if (message.contains("Huh? A Catfish")) {
- LootCommand.catfishes++;
- LootCommand.catfishesSession++;
- ConfigHandler.writeIntConfig("fishing", "catfish", LootCommand.catfishes);
- increaseSeaCreatures();
- } else if (message.contains("Is this even a fish? It's the Carrot King")) {
- LootCommand.carrotKings++;
- LootCommand.carrotKingsSession++;
- ConfigHandler.writeIntConfig("fishing", "carrotKing", LootCommand.carrotKings);
- increaseSeaCreatures();
- } else if (message.contains("Gross! A Sea Leech")) {
- LootCommand.seaLeeches++;
- LootCommand.seaLeechesSession++;
- ConfigHandler.writeIntConfig("fishing", "seaLeech", LootCommand.seaLeeches);
- increaseSeaCreatures();
- } else if (message.contains("You've discovered a Guardian Defender of the sea")) {
- LootCommand.guardianDefenders++;
- LootCommand.guardianDefendersSession++;
- ConfigHandler.writeIntConfig("fishing", "guardianDefender", LootCommand.guardianDefenders);
- increaseSeaCreatures();
- } else if (message.contains("You have awoken the Deep Sea Protector, prepare for a battle")) {
- LootCommand.deepSeaProtectors++;
- LootCommand.deepSeaProtectorsSession++;
- ConfigHandler.writeIntConfig("fishing", "deepSeaProtector", LootCommand.deepSeaProtectors);
- increaseSeaCreatures();
- } else if (message.contains("The Water Hydra has come to test your strength")) {
- LootCommand.hydras++;
- LootCommand.hydrasSession++;
- ConfigHandler.writeIntConfig("fishing", "hydra", LootCommand.hydras);
- increaseSeaCreatures();
- } else if (message.contains("The Sea Emperor arises from the depths")) {
- increaseSeaCreatures();
-
- LootCommand.seaEmperors++;
- LootCommand.empTime = System.currentTimeMillis() / 1000;
- LootCommand.empSCs = 0;
- LootCommand.seaEmperorsSession++;
- LootCommand.empTimeSession = System.currentTimeMillis() / 1000;
- LootCommand.empSCsSession = 0;
- ConfigHandler.writeIntConfig("fishing", "seaEmperor", LootCommand.seaEmperors);
- ConfigHandler.writeDoubleConfig("fishing", "empTime", LootCommand.empTime);
- ConfigHandler.writeIntConfig("fishing", "empSC", LootCommand.empSCs);
- } else if (message.contains("Frozen Steve fell into the pond long ago")) { // Fishing Winter
- LootCommand.frozenSteves++;
- LootCommand.frozenStevesSession++;
- ConfigHandler.writeIntConfig("fishing", "frozenSteve", LootCommand.frozenSteves);
- increaseSeaCreatures();
- } else if (message.contains("It's a snowman! He looks harmless")) {
- LootCommand.frostyTheSnowmans++;
- LootCommand.frostyTheSnowmansSession++;
- ConfigHandler.writeIntConfig("fishing", "snowman", LootCommand.frostyTheSnowmans);
- increaseSeaCreatures();
- } else if (message.contains("stole Jerry's Gifts...get them back")) {
- LootCommand.grinches++;
- LootCommand.grinchesSession++;
- ConfigHandler.writeIntConfig("fishing", "grinch", LootCommand.grinches);
- increaseSeaCreatures();
- } else if (message.contains("What is this creature")) {
- LootCommand.yetis++;
- LootCommand.yetiTime = System.currentTimeMillis() / 1000;
- LootCommand.yetiSCs = 0;
- LootCommand.yetisSession++;
- LootCommand.yetiTimeSession = System.currentTimeMillis() / 1000;
- LootCommand.yetiSCsSession = 0;
- ConfigHandler.writeIntConfig("fishing", "yeti", LootCommand.yetis);
-