diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/me/Danker/DankersSkyblockMod.java | 1 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/LootCommand.java | 32 | ||||
-rw-r--r-- | src/main/java/me/Danker/commands/ToggleCommand.java | 5 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/AutoDisplay.java | 50 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/DungeonScore.java | 57 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/loot/CatacombsTracker.java | 420 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/loot/LootDisplay.java | 78 | ||||
-rw-r--r-- | src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java | 2 | ||||
-rw-r--r-- | src/main/java/me/Danker/gui/DankerGui.java | 7 | ||||
-rw-r--r-- | src/main/java/me/Danker/handlers/ConfigHandler.java | 17 | ||||
-rw-r--r-- | src/main/java/me/Danker/utils/Utils.java | 45 |
11 files changed, 508 insertions, 206 deletions
diff --git a/src/main/java/me/Danker/DankersSkyblockMod.java b/src/main/java/me/Danker/DankersSkyblockMod.java index ce39152..02eeff4 100644 --- a/src/main/java/me/Danker/DankersSkyblockMod.java +++ b/src/main/java/me/Danker/DankersSkyblockMod.java @@ -383,6 +383,7 @@ public class DankersSkyblockMod { if (player != null) { Utils.checkForSkyblock(); Utils.checkForDungeons(); + Utils.checkForDungeonFloor(); Utils.checkTabLocation(); } diff --git a/src/main/java/me/Danker/commands/LootCommand.java b/src/main/java/me/Danker/commands/LootCommand.java index 2a647c6..246d1aa 100644 --- a/src/main/java/me/Danker/commands/LootCommand.java +++ b/src/main/java/me/Danker/commands/LootCommand.java @@ -832,7 +832,20 @@ public class LootCommand extends CommandBase { if (showSession) { player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs MM Summary (Current Session):\n" + - EnumChatFormatting.GOLD + " S Runs:" + nf.format(CatacombsTracker.masterSSession) + "\n" + + EnumChatFormatting.GOLD + " Master One S Runs:" + nf.format(CatacombsTracker.m1SSession) + "\n" + + EnumChatFormatting.GOLD + " Master One S+ Runs:" + nf.format(CatacombsTracker.m1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Two S Runs:" + nf.format(CatacombsTracker.m2SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Two S+ Runs:" + nf.format(CatacombsTracker.m2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Three S Runs:" + nf.format(CatacombsTracker.m3SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Three S+ Runs:" + nf.format(CatacombsTracker.m3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Four S Runs:" + nf.format(CatacombsTracker.m4SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Four S+ Runs:" + nf.format(CatacombsTracker.m4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Five S Runs:" + nf.format(CatacombsTracker.m5SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Five S+ Runs:" + nf.format(CatacombsTracker.m5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Six S Runs:" + nf.format(CatacombsTracker.m6SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Six S+ Runs:" + nf.format(CatacombsTracker.m6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S Runs:" + nf.format(CatacombsTracker.m7SSession) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S+ Runs:" + nf.format(CatacombsTracker.m7SPlusSession) + "\n" + EnumChatFormatting.GOLD + " Recombobulators:" + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books:" + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + EnumChatFormatting.DARK_PURPLE + " 1st Master Stars:" + nf.format(CatacombsTracker.firstStarsSession) + "\n" + @@ -840,6 +853,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.DARK_PURPLE + " 3rd Master Stars:" + nf.format(CatacombsTracker.thirdStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + " 4th Master Stars:" + nf.format(CatacombsTracker.fourthStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + " 5th Master Stars:" + nf.format(CatacombsTracker.fifthStarsSession) + "\n" + + EnumChatFormatting.GOLD + " Dark Claymores: " + nf.format(CatacombsTracker.darkClaymoresSession) + "\n" + EnumChatFormatting.WHITE + " Rerolls:" + nf.format(CatacombsTracker.masterRerollsSession) + "\n" + EnumChatFormatting.AQUA + " Coins Spent:" + nf.format(CatacombsTracker.masterCoinsSpentSession) + "\n" + EnumChatFormatting.AQUA + " Time Spent:" + nf.format(CatacombsTracker.masterTimeSpentSession) + "\n" + @@ -848,7 +862,20 @@ public class LootCommand extends CommandBase { } player.addChatMessage(new ChatComponentText(EnumChatFormatting.DARK_RED + "" + EnumChatFormatting.BOLD + "-------------------\n" + EnumChatFormatting.RED + EnumChatFormatting.BOLD + " Catacombs MM Summary:\n" + - EnumChatFormatting.GOLD + " S Runs:" + nf.format(CatacombsTracker.masterS) + "\n" + + EnumChatFormatting.GOLD + " Master One S Runs:" + nf.format(CatacombsTracker.m1S) + "\n" + + EnumChatFormatting.GOLD + " Master One S+ Runs:" + nf.format(CatacombsTracker.m1SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Two S Runs:" + nf.format(CatacombsTracker.m2S) + "\n" + + EnumChatFormatting.GOLD + " Master Two S+ Runs:" + nf.format(CatacombsTracker.m2SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Three S Runs:" + nf.format(CatacombsTracker.m3S) + "\n" + + EnumChatFormatting.GOLD + " Master Three S+ Runs:" + nf.format(CatacombsTracker.m3SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Four S Runs:" + nf.format(CatacombsTracker.m4S) + "\n" + + EnumChatFormatting.GOLD + " Master Four S+ Runs:" + nf.format(CatacombsTracker.m4SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Five S Runs:" + nf.format(CatacombsTracker.m5S) + "\n" + + EnumChatFormatting.GOLD + " Master Five S+ Runs:" + nf.format(CatacombsTracker.m5SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Six S Runs:" + nf.format(CatacombsTracker.m6S) + "\n" + + EnumChatFormatting.GOLD + " Master Six S+ Runs:" + nf.format(CatacombsTracker.m6SPlus) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S Runs:" + nf.format(CatacombsTracker.m7S) + "\n" + + EnumChatFormatting.GOLD + " Master Seven S+ Runs:" + nf.format(CatacombsTracker.m7SPlus) + "\n" + EnumChatFormatting.GOLD + " Recombobulators:" + nf.format(CatacombsTracker.recombobulators) + "\n" + EnumChatFormatting.DARK_PURPLE + " Fuming Potato Books:" + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + EnumChatFormatting.DARK_PURPLE + " 1st Master Stars:" + nf.format(CatacombsTracker.firstStars) + "\n" + @@ -856,6 +883,7 @@ public class LootCommand extends CommandBase { EnumChatFormatting.DARK_PURPLE + " 3rd Master Stars:" + nf.format(CatacombsTracker.thirdStars) + "\n" + EnumChatFormatting.DARK_PURPLE + " 4th Master Stars:" + nf.format(CatacombsTracker.fourthStars) + "\n" + EnumChatFormatting.DARK_PURPLE + " 5th Master Stars:" + nf.format(CatacombsTracker.fifthStars) + "\n" + + EnumChatFormatting.GOLD + " Dark Claymores: " + nf.format(CatacombsTracker.darkClaymores) + "\n" + EnumChatFormatting.WHITE + " Rerolls:" + nf.format(CatacombsTracker.masterRerolls) + "\n" + EnumChatFormatting.AQUA + " Coins Spent:" + nf.format(CatacombsTracker.masterCoinsSpent) + "\n" + EnumChatFormatting.AQUA + " Time Spent:" + nf.format(CatacombsTracker.masterTimeSpent) + "\n" + diff --git a/src/main/java/me/Danker/commands/ToggleCommand.java b/src/main/java/me/Danker/commands/ToggleCommand.java index 94425c0..04770aa 100644 --- a/src/main/java/me/Danker/commands/ToggleCommand.java +++ b/src/main/java/me/Danker/commands/ToggleCommand.java @@ -14,12 +14,12 @@ import net.minecraft.util.ChatComponentText; import java.util.List; public class ToggleCommand extends CommandBase implements ICommand { - // i hate this file so much // Some of these end with toggled and some don't, I don't want to go back and fix them all for consistency public static boolean gpartyToggled; public static boolean coordsToggled; public static boolean goldenToggled; public static boolean slayerCountTotal; + public static boolean masterSPlusDisplay; public static boolean rngesusAlerts; public static boolean ghostDisplay; public static boolean splitFishing; @@ -106,6 +106,7 @@ public class ToggleCommand extends CommandBase implements ICommand { public static boolean endMusic; public static boolean parkMusic; + // NO LONGER UPDATED @Override public String getCommandName() { return "toggle"; @@ -150,7 +151,7 @@ public class ToggleCommand extends CommandBase implements ICommand { } return null; } - + @Override public void processCommand(ICommandSender arg0, String[] arg1) throws CommandException { final EntityPlayer player = (EntityPlayer)arg0; diff --git a/src/main/java/me/Danker/features/AutoDisplay.java b/src/main/java/me/Danker/features/AutoDisplay.java index 8dbe359..5fc4489 100644 --- a/src/main/java/me/Danker/features/AutoDisplay.java +++ b/src/main/java/me/Danker/features/AutoDisplay.java @@ -4,6 +4,7 @@ import me.Danker.DankersSkyblockMod; import me.Danker.features.loot.LootDisplay; import me.Danker.handlers.ConfigHandler; import me.Danker.handlers.ScoreboardHandler; +import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.init.Items; @@ -44,23 +45,38 @@ public class AutoDisplay { } else if (sCleaned.contains("The Mist")){ LootDisplay.display = "ghost"; found = true; - } else if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - LootDisplay.display = "catacombs_floor_one"; - } else if (sCleaned.contains("F2")) { - LootDisplay.display = "catacombs_floor_two"; - } else if (sCleaned.contains("F3")) { - LootDisplay.display = "catacombs_floor_three"; - } else if (sCleaned.contains("F4")) { - LootDisplay.display = "catacombs_floor_four"; - } else if (sCleaned.contains("F5")) { - LootDisplay.display = "catacombs_floor_five"; - } else if (sCleaned.contains("F6")) { - LootDisplay.display = "catacombs_floor_six"; - } else if (sCleaned.contains("F7")) { - LootDisplay.display = "catacombs_floor_seven"; - } else if (sCleaned.contains("(M")) { - LootDisplay.display = "catacombs_master"; + } else if (Utils.inDungeons) { + switch (Utils.currentFloor) { + case F1: + LootDisplay.display = "catacombs_floor_one"; + break; + case F2: + LootDisplay.display = "catacombs_floor_two"; + break; + case F3: + LootDisplay.display = "catacombs_floor_three"; + break; + case F4: + LootDisplay.display = "catacombs_floor_four"; + break; + case F5: + LootDisplay.display = "catacombs_floor_five"; + break; + case F6: + LootDisplay.display = "catacombs_floor_six"; + break; + case F7: + LootDisplay.display = "catacombs_floor_seven"; + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + LootDisplay.display = "catacombs_master"; + break; } found = true; } diff --git a/src/main/java/me/Danker/features/DungeonScore.java b/src/main/java/me/Danker/features/DungeonScore.java index 706ce62..588db8a 100644 --- a/src/main/java/me/Danker/features/DungeonScore.java +++ b/src/main/java/me/Danker/features/DungeonScore.java @@ -5,7 +5,6 @@ import me.Danker.commands.MoveCommand; import me.Danker.commands.ScaleCommand; import me.Danker.commands.ToggleCommand; import me.Danker.events.RenderOverlayEvent; -import me.Danker.handlers.ScoreboardHandler; import me.Danker.handlers.TextRenderer; import me.Danker.utils.Utils; import net.minecraft.client.Minecraft; @@ -19,7 +18,6 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import java.util.Collection; -import java.util.List; public class DungeonScore { @@ -55,29 +53,6 @@ public class DungeonScore { if (!ToggleCommand.dungeonScore || !Utils.inDungeons) return; if (DankersSkyblockMod.tickAmount % 20 == 0) { - String floor = ""; - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - floor = "F1"; - } else if (sCleaned.contains("F2")) { - floor = "F2"; - } else if (sCleaned.contains("F3")) { - floor = "F3"; - } else if (sCleaned.contains("F4")) { - floor = "F4"; - } else if (sCleaned.contains("F5")) { - floor = "F5"; - } else if (sCleaned.contains("F6")) { - floor = "F6"; - } else if (sCleaned.contains("F7")) { - floor = "F7"; - } - } - } - int missingPuzzles = 0; double openedRooms = 0; double completedRooms = 0; @@ -99,23 +74,23 @@ public class DungeonScore { double secretCount = Double.parseDouble(display.replaceAll("[^\\d.]", "")); - switch (floor) { - case "F1": + switch (Utils.currentFloor) { + case F1: secretScore = secretCount / 30D; break; - case "F2": + case F2: secretScore = secretCount / 40D; break; - case "F3": + case F3: secretScore = secretCount / 50D; break; - case "F4": + case F4: secretScore = secretCount / 60D; break; - case "F5": + case F5: secretScore = secretCount / 70D; break; - case "F6": + case F6: secretScore = secretCount / 85D; break; default: @@ -127,19 +102,19 @@ public class DungeonScore { int seconds = Integer.parseInt(timeText.substring(timeText.indexOf("m") + 1, timeText.indexOf("s"))); int time = minutes * 60 + seconds; - if (floor.equals("F2")) time -= 120; + if (Utils.currentFloor == Utils.DungeonFloor.F2) time -= 120; int base; - switch (floor) { - case "F1": - case "F2": - case "F3": - case "F5": + switch (Utils.currentFloor) { + case F1: + case F2: + case F3: + case F5: base = 600; break; - case "F4": - case "F6": - case "F7": + case F4: + case F6: + case F7: base = 720; break; default: diff --git a/src/main/java/me/Danker/features/loot/CatacombsTracker.java b/src/main/java/me/Danker/features/loot/CatacombsTracker.java index c4b9634..8d50ab3 100644 --- a/src/main/java/me/Danker/features/loot/CatacombsTracker.java +++ b/src/main/java/me/Danker/features/loot/CatacombsTracker.java @@ -89,12 +89,26 @@ public class CatacombsTracker { public static double f7CoinsSpent; public static double f7TimeSpent; // MM - public static int masterS; + public static int m1S; + public static int m1SPlus; + public static int m2S; + public static int m2SPlus; + public static int m3S; + public static int m3SPlus; + public static int m4S; + public static int m4SPlus; + public static int m5S; + public static int m5SPlus; + public static int m6S; + public static int m6SPlus; + public static int m7S; + public static int m7SPlus; public static int firstStars; public static int secondStars; public static int thirdStars; public static int fourthStars; public static int fifthStars; + public static int darkClaymores; public static int masterRerolls; public static double masterCoinsSpent; public static double masterTimeSpent; @@ -174,12 +188,26 @@ public class CatacombsTracker { public static double f7CoinsSpentSession = 0; public static double f7TimeSpentSession = 0; // MM - public static int masterSSession = 0; + public static int m1SSession = 0; + public static int m1SPlusSession = 0; + public static int m2SSession = 0; + public static int m2SPlusSession = 0; + public static int m3SSession = 0; + public static int m3SPlusSession = 0; + public static int m4SSession = 0; + public static int m4SPlusSession = 0; + public static int m5SSession = 0; + public static int m5SPlusSession = 0; + public static int m6SSession = 0; + public static int m6SPlusSession = 0; + public static int m7SSession = 0; + public static int m7SPlusSession = 0; public static int firstStarsSession = 0; public static int secondStarsSession = 0; public static int thirdStarsSession = 0; public static int fourthStarsSession = 0; public static int fifthStarsSession = 0; + public static int darkClaymoresSession = 0; public static int masterRerollsSession = 0; public static double masterCoinsSpentSession = 0; public static double masterTimeSpentSession = 0; @@ -191,51 +219,138 @@ public class CatacombsTracker { if (!Utils.inDungeons) return; if (event.type == 2) return; - if (message.contains(" Team Score: ") && message.contains("(S+)")) { - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + if (message.contains(" Team Score: ")) { if (message.contains("(S+)")) { - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - f1SPlus++; - f1SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorOneSPlus", f1SPlus); - } else if (sCleaned.contains("F2")) { - f2SPlus++; - f2SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorTwoSPlus", f2SPlus); - } else if (sCleaned.contains("F3")) { - f3SPlus++; - f3SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorThreeSPlus", f3SPlus); - } else if (sCleaned.contains("F4")) { - f4SPlus++; - f4SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorFourSPlus", f4SPlus); - } else if (sCleaned.contains("F5")) { - f5SPlus++; - f5SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorFiveSPlus", f5SPlus); - } else if (sCleaned.contains("F6")) { - f6SPlus++; - f6SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorSixSPlus", f6SPlus); - } else if (sCleaned.contains("F7")) { - f7SPlus++; - f7SPlusSession++; - ConfigHandler.writeIntConfig("catacombs", "floorSevenSPlus", f7SPlus); - } - } + switch (Utils.currentFloor) { + case F1: + f1SPlus++; + f1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorOneSPlus", f1SPlus); + break; + case F2: + f2SPlus++; + f2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorTwoSPlus", f2SPlus); + break; + case F3: + f3SPlus++; + f3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorThreeSPlus", f3SPlus); + break; + case F4: + f4SPlus++; + f4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFourSPlus", f4SPlus); + break; + case F5: + f5SPlus++; + f5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorFiveSPlus", f5SPlus); + break; + case F6: + f6SPlus++; + f6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSixSPlus", f6SPlus); + break; + case F7: + f7SPlus++; + f7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "floorSevenSPlus", f7SPlus); + break; + case M1: + m1S++; + m1SPlus++; + m1SSession++; + m1SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + ConfigHandler.writeIntConfig("catacombs", "masterOneSPlus", m1SPlus); + break; + case M2: + m2S++; + m2SPlus++; + m2SSession++; + m2SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + ConfigHandler.writeIntConfig("catacombs", "masterTwoSPlus", m2SPlus); + break; + case M3: + m3S++; + m3SPlus++; + m3SSession++; + m3SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + ConfigHandler.writeIntConfig("catacombs", "masterThreeSPlus", m3SPlus); + break; + case M4: + m4S++; + m4SPlus++; + m4SSession++; + m4SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + ConfigHandler.writeIntConfig("catacombs", "masterFourSPlus", m4SPlus); + break; + case M5: + m5S++; + m5SPlus++; + m5SSession++; + m5SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + ConfigHandler.writeIntConfig("catacombs", "masterFiveSPlus", m5SPlus); + break; + case M6: + m6S++; + m6SPlus++; + m6SSession++; + m6SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + ConfigHandler.writeIntConfig("catacombs", "masterSixSPlus", m6SPlus); + break; + case M7: + m7S++; + m7SPlus++; + m7SSession++; + m7SPlusSession++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + ConfigHandler.writeIntConfig("catacombs", "masterSevenSPlus", m7SPlus); + break; } } else if (message.contains("(S)")) { - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (M")) { - masterS++; - masterSSession++; - ConfigHandler.writeIntConfig("catacombs", "masterS", masterS); - } + switch (Utils.currentFloor) { + case M1: + m1S++; + m1SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterOneS", m1S); + break; + case M2: + m2S++; + m2SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterTwoS", m2S); + break; + case M3: + m3S++; + m3SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterThreeS", m3S); + break; + case M4: + m4S++; + m4SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterFourS", m4S); + break; + case M5: + m5S++; + m5SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterFiveS", m5S); + break; + case M6: + m6S++; + m6SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterSixS", m6S); + break; + case M7: + m7S++; + m7SPlus++; + ConfigHandler.writeIntConfig("catacombs", "masterSevenS", m7S); + break; } } } @@ -435,56 +550,74 @@ public class CatacombsTracker { fifthStars++; fifthStarsSession++; ConfigHandler.writeIntConfig("catacombs", "fifthStar", fifthStars); + } else if (message.contains("Dark Claymore")) { + darkClaymores++; + darkClaymoresSession++; + ConfigHandler.writeIntConfig("catacombs", "darkClaymore", darkClaymores); } } if (message.contains("EXTRA STATS ")) { List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - int timeToAdd = 0; for (String s : scoreboard) { String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - // Add time to floor - if (sCleaned.contains("F1")) { - f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); - f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); - } else if (sCleaned.contains("F2")) { - f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); - f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); - } else if (sCleaned.contains("F3")) { - f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); - f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); - } else if (sCleaned.contains("F4")) { - f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); - f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); - } else if (sCleaned.contains("F5")) { - f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); - f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); - } else if (sCleaned.contains("F6")) { - f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); - f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); - } else if (sCleaned.contains("F7")) { - f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); - f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); - } else if (sCleaned.contains("(M")) { - masterTimeSpent = Math.floor(masterTimeSpent + timeToAdd); - masterTimeSpentSession = Math.floor(masterTimeSpentSession + timeToAdd); - ConfigHandler.writeDoubleConfig("catacombs", "masterTime", masterTimeSpent); - } - } else if (sCleaned.contains("Time Elapsed:")) { + if (sCleaned.contains("Time Elapsed:")) { // Get floor time String time = sCleaned.substring(sCleaned.indexOf(":") + 2); time = time.replaceAll("\\s", ""); int minutes = Integer.parseInt(time.substring(0, time.indexOf("m"))); int seconds = Integer.parseInt(time.substring(time.indexOf("m") + 1, time.indexOf("s"))); - timeToAdd = (minutes * 60) + seconds; + int timeToAdd = (minutes * 60) + seconds; + + // Add time to floor + switch (Utils.currentFloor) { + case F1: + f1TimeSpent = Math.floor(f1TimeSpent + timeToAdd); + f1TimeSpentSession = Math.floor(f1TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorOneTime", f1TimeSpent); + break; + case F2: + f2TimeSpent = Math.floor(f2TimeSpent + timeToAdd); + f2TimeSpentSession = Math.floor(f2TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoTime", f2TimeSpent); + break; + case F3: + f3TimeSpent = Math.floor(f3TimeSpent + timeToAdd); + f3TimeSpentSession = Math.floor(f3TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeTime", f3TimeSpent); + break; + case F4: + f4TimeSpent = Math.floor(f4TimeSpent + timeToAdd); + f4TimeSpentSession = Math.floor(f4TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFourTime", f4TimeSpent); + break; + case F5: + f5TimeSpent = Math.floor(f5TimeSpent + timeToAdd); + f5TimeSpentSession = Math.floor(f5TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveTime", f5TimeSpent); + break; + case F6: + f6TimeSpent = Math.floor(f6TimeSpent + timeToAdd); + f6TimeSpentSession = Math.floor(f6TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSixTime", f6TimeSpent); + break; + case F7: + f7TimeSpent = Math.floor(f7TimeSpent + timeToAdd); + f7TimeSpentSession = Math.floor(f7TimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenTime", f7TimeSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterTimeSpent = Math.floor(masterTimeSpent + timeToAdd); + masterTimeSpentSession = Math.floor(masterTimeSpentSession + timeToAdd); + ConfigHandler.writeDoubleConfig("catacombs", "masterTime", masterTimeSpent); + break; + } } } } @@ -504,69 +637,80 @@ public class CatacombsTracker { if (line.contains(" Coins") && !line.contains("NOTE:")) { int coinsSpent = Integer.parseInt(line.replaceAll("[^\\d]", "")); - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F1")) { - f1CoinsSpent += coinsSpent; - f1CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); - } else if (sCleaned.contains("F2")) { - f2CoinsSpent += coinsSpent; - f2CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); - } else if (sCleaned.contains("F3")) { - f3CoinsSpent += coinsSpent; - f3CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); - } else if (sCleaned.contains("F4")) { - f4CoinsSpent += coinsSpent; - f4CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); - } else if (sCleaned.contains("F5")) { - f5CoinsSpent += coinsSpent; - f5CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); - } else if (sCleaned.contains("F6")) { - f6CoinsSpent += coinsSpent; - f6CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); - } else if (sCleaned.contains("F7")) { - f7CoinsSpent += coinsSpent; - f7CoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); - } else if (sCleaned.contains("(M")) { - masterCoinsSpent += coinsSpent; - masterCoinsSpentSession += coinsSpent; - ConfigHandler.writeDoubleConfig("catacombs", "masterCoins", masterCoinsSpent); - } + switch (Utils.currentFloor) { + case F1: + f1CoinsSpent += coinsSpent; + f1CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorOneCoins", f1CoinsSpent); + break; + case F2: + f2CoinsSpent += coinsSpent; + f2CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorTwoCoins", f2CoinsSpent); + break; + case F3: + f3CoinsSpent += coinsSpent; + f3CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorThreeCoins", f3CoinsSpent); + break; + case F4: + f4CoinsSpent += coinsSpent; + f4CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFourCoins", f4CoinsSpent); + break; + case F5: + f5CoinsSpent += coinsSpent; + f5CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorFiveCoins", f5CoinsSpent); + break; + case F6: + f6CoinsSpent += coinsSpent; + f6CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixCoins", f6CoinsSpent); + break; + case F7: + f7CoinsSpent += coinsSpent; + f7CoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenCoins", f7CoinsSpent); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterCoinsSpent += coinsSpent; + masterCoinsSpentSession += coinsSpent; + ConfigHandler.writeDoubleConfig("catacombs", "masterCoins", masterCoinsSpent); break; - } } break; } } } else if (item.getDisplayName().contains("Reroll Chest")) { - List<String> scoreboard = ScoreboardHandler.getSidebarLines(); - for (String s : scoreboard) { - String sCleaned = ScoreboardHandler.cleanSB(s); - if (sCleaned.contains("The Catacombs (")) { - if (sCleaned.contains("F6")) { - f6Rerolls++; - f6RerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "floorSixRerolls", f6Rerolls); - } else if (sCleaned.contains("F7")) { - f7Rerolls++; - f7RerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "floorSevenRerolls", f7Rerolls); - } else if (sCleaned.contains("(M")) { - masterRerolls++; - masterRerollsSession++; - ConfigHandler.writeDoubleConfig("catacombs", "masterRerolls", masterRerolls); - } + switch (Utils.currentFloor) { + case F6: + f6Rerolls++; + f6RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSixRerolls", f6Rerolls); + break; + case F7: + f7Rerolls++; + f7RerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "floorSevenRerolls", f7Rerolls); + break; + case M1: + case M2: + case M3: + case M4: + case M5: + case M6: + case M7: + masterRerolls++; + masterRerollsSession++; + ConfigHandler.writeDoubleConfig("catacombs", "masterRerolls", masterRerolls); break; - } } } } diff --git a/src/main/java/me/Danker/features/loot/LootDisplay.java b/src/main/java/me/Danker/features/loot/LootDisplay.java index 812108b..16e64f6 100644 --- a/src/main/java/me/Danker/features/loot/LootDisplay.java +++ b/src/main/java/me/Danker/features/loot/LootDisplay.java @@ -30,6 +30,8 @@ public class LootDisplay { String timeBetween; String bossesBetween; String drop20; + String runs; + String runsCount; double timeNow = System.currentTimeMillis() / 1000; NumberFormat nf = NumberFormat.getIntegerInstance(Locale.US); @@ -1109,7 +1111,39 @@ public class LootDisplay { EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.f7TimeSpentSession); break; case "catacombs_master": - dropsText = EnumChatFormatting.GOLD + "S Runs:\n" + + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlus) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlus) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6S) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7S) + "\n"; + } + + dropsText = runs + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + @@ -1117,10 +1151,11 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.masterS) + "\n" + + countText = runsCount + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulators) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooks) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStars) + "\n" + @@ -1128,12 +1163,45 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStars) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStars) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStars) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymores) + "\n" + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerolls) + "\n" + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpent) + "\n" + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpent); break; case "catacombs_master_session": - dropsText = EnumChatFormatting.GOLD + "S Runs:\n" + + if (ToggleCommand.masterSPlusDisplay) { + runs = EnumChatFormatting.GOLD + "Master One S+:\n" + + EnumChatFormatting.GOLD + "Master Two S+:\n" + + EnumChatFormatting.GOLD + "Master Three S+:\n" + + EnumChatFormatting.GOLD + "Master Four S+:\n" + + EnumChatFormatting.GOLD + "Master Five S+:\n" + + EnumChatFormatting.GOLD + "Master Six S+:\n" + + EnumChatFormatting.GOLD + "Master Seven S+:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SPlusSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SPlusSession) + "\n"; + } else { + runs = EnumChatFormatting.GOLD + "Master One S:\n" + + EnumChatFormatting.GOLD + "Master Two S:\n" + + EnumChatFormatting.GOLD + "Master Three S:\n" + + EnumChatFormatting.GOLD + "Master Four S:\n" + + EnumChatFormatting.GOLD + "Master Five S:\n" + + EnumChatFormatting.GOLD + "Master Six S:\n" + + EnumChatFormatting.GOLD + "Master Seven S:\n"; + runsCount = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m1SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m2SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m3SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m4SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m5SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m6SSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.m7SSession) + "\n"; + } + + dropsText = runs + EnumChatFormatting.GOLD + "Recombobulators:\n" + EnumChatFormatting.DARK_PURPLE + "Fuming Potato Books:\n" + EnumChatFormatting.DARK_PURPLE + "1st Master Stars:\n" + @@ -1141,10 +1209,11 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + "3rd Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "4th Master Stars:\n" + EnumChatFormatting.DARK_PURPLE + "5th Master Stars:\n" + + EnumChatFormatting.GOLD + "Dark Claymores:\n" + EnumChatFormatting.WHITE + "Rerolls:\n" + EnumChatFormatting.AQUA + "Coins Spent:\n" + EnumChatFormatting.AQUA + "Time Spent:"; - countText = EnumChatFormatting.GOLD + nf.format(CatacombsTracker.masterSSession) + "\n" + + countText = runsCount + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.recombobulatorsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fumingPotatoBooksSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.firstStarsSession) + "\n" + @@ -1152,6 +1221,7 @@ public class LootDisplay { EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.thirdStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fourthStarsSession) + "\n" + EnumChatFormatting.DARK_PURPLE + nf.format(CatacombsTracker.fifthStarsSession) + "\n" + + EnumChatFormatting.GOLD + nf.format(CatacombsTracker.darkClaymoresSession) + "\n" + EnumChatFormatting.WHITE + nf.format(CatacombsTracker.masterRerollsSession) + "\n" + EnumChatFormatting.AQUA + Utils.getMoneySpent(CatacombsTracker.masterCoinsSpentSession) + "\n" + EnumChatFormatting.AQUA + Utils.getTimeBetween(0, CatacombsTracker.masterTimeSpentSession); diff --git a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java index 4e9f498..b947cdb 100644 --- a/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java +++ b/src/main/java/me/Danker/features/puzzlesolvers/LividSolver.java @@ -38,7 +38,7 @@ public class LividSolver { World world = Minecraft.getMinecraft().theWorld; if (DankersSkyblockMod.tickAmount % 20 == 0) { if (ToggleCommand.lividSolverToggled && Utils.inDungeons && !foundLivid && world != null) { - if (Utils.isInScoreboard("The Catacombs (F5)")) { + if (Utils.currentFloor == Utils.DungeonFloor.F5 || Utils.currentFloor == Utils.DungeonFloor.M5) { List<Entity> loadedLivids = new ArrayList<>(); List<Entity> entities = world.getLoadedEntityList(); for (Entity entity : entities) { diff --git a/src/main/java/me/Danker/gui/DankerGui.java b/src/main/java/me/Danker/gui/DankerGui.java index d5e9ee8..a6f76b1 100644 --- a/src/main/java/me/Danker/gui/DankerGui.java +++ b/src/main/java/me/Danker/gui/DankerGui.java @@ -50,6 +50,7 @@ public class DankerGui extends GuiScreen { private GuiButton coords; private GuiButton goldenEnch; private GuiButton slayerCount; + private GuiButton masterSPlusDisplay; private GuiButton rngesusAlert; private GuiButton splitFishing; private GuiButton chatMaddox; @@ -135,6 +136,7 @@ public class DankerGui extends GuiScreen { cakeTimer = new FeatureButton("Cake Timer: " + Utils.getColouredBoolean(ToggleCommand.cakeTimerToggled), "Displays time until century cake buffs run out."); skill50Display = new FeatureButton("Display Progress To Skill Level 50: " + Utils.getColouredBoolean(ToggleCommand.skill50DisplayToggled), "Display total progress to max skill level."); slayerCount = new FeatureButton("Count Total 20% Drops: " + Utils.getColouredBoolean(ToggleCommand.slayerCountTotal), "Counts times dropped instead of amount dropped.\nE.x. Hamster Wheels: 40 -> Hamster Wheels: 10 times."); + masterSPlusDisplay = new FeatureButton("Display MM S+ Runs: " + Utils.getColouredBoolean(ToggleCommand.masterSPlusDisplay), "Dispay Master Mode S+ runs instead of S runs."); spiritBearAlert = new FeatureButton("Spirit Bear Spawn Alerts: " + Utils.getColouredBoolean(ToggleCommand.spiritBearAlerts), "Alert when Spirit Bear spawns."); sceptreMessages = new FeatureButton("Spirit Sceptre Messages: " + Utils.getColouredBoolean(ToggleCommand.sceptreMessages), "Turn " + EnumChatFormatting.RED + "off" + EnumChatFormatting.RESET + " to hide Spirit Sceptre messages."); midasStaffMessages = new FeatureButton("Midas Staff Messages: " + Utils.getColouredBoolean(ToggleCommand.midasStaffMessages), "Turn " + EnumChatFormatting.RED + "off" + EnumChatFormatting.RESET + " to hide Midas Staff messages."); @@ -190,6 +192,7 @@ public class DankerGui extends GuiScreen { allButtons.add(cakeTimer); allButtons.add(skill50Display); allButtons.add(slayerCount); + allButtons.add(masterSPlusDisplay); allButtons.add(spiritBearAlert); allButtons.add(sceptreMessages); allButtons.add(midasStaffMessages); @@ -503,6 +506,10 @@ public class DankerGui extends GuiScreen { ToggleCommand.dungeonScore = !ToggleCommand.dungeonScore; ConfigHandler.writeBooleanConfig("toggles", "DungeonScore", ToggleCommand.dungeonScore); dungeonScore.displayString = "Dungeon Score Display: " + Utils.getColouredBoolean(ToggleCommand.dungeonScore); + } else if (button == masterSPlusDisplay) { + ToggleCommand.masterSPlusDisplay = !ToggleCommand.masterSPlusDisplay; + ConfigHandler.writeBooleanConfig("toggles", "MasterSPlusDisplay", ToggleCommand.masterSPlusDisplay); + masterSPlusDisplay.displayString = "Display MM S+ Runs: " + Utils.getColouredBoolean(ToggleCommand.masterSPlusDisplay); } } diff --git a/src/main/java/me/Danker/handlers/ConfigHandler.java b/src/main/java/me/Danker/handlers/ConfigHandler.java index 3839766..9365b63 100644 --- a/src/main/java/me/Danker/handlers/ConfigHandler.java +++ b/src/main/java/me/Danker/handlers/ConfigHandler.java @@ -201,6 +201,7 @@ public class ConfigHandler { ToggleCommand.coordsToggled = initBoolean("toggles", "Coords", false); ToggleCommand.goldenToggled = initBoolean("toggles", "Golden", false); ToggleCommand.slayerCountTotal = initBoolean("toggles", "SlayerCount", true); + ToggleCommand.masterSPlusDisplay = initBoolean("toggles", "MasterSPlusDisplay", true); ToggleCommand.rngesusAlerts = initBoolean("toggles", "RNGesusAlerts", false); ToggleCommand.ghostDisplay = initBoolean("toggles", "GhostDisplay", true); ToggleCommand.dungeonTimerToggled = initBoolean("toggles", "GhostTimer", false); @@ -514,12 +515,26 @@ public class ConfigHandler { CatacombsTracker.f7CoinsSpent = initDouble("catacombs", "floorSevenCoins", 0); CatacombsTracker.f7TimeSpent = initDouble("catacombs", "floorSevenTime", 0); // MM - CatacombsTracker.masterS = initInt("catacombs", "masterS", 0); + CatacombsTracker.m1S = initInt("catacombs", "masterOneS", 0); + CatacombsTracker.m1SPlus = initInt("catacombs", "masterOneSPlus", 0); + CatacombsTracker.m2S = initInt("catacombs", "masterTwoS", 0); + CatacombsTracker.m2SPlus = initInt("catacombs", "masterTwoSPlus", 0); + CatacombsTracker.m3S = initInt("catacombs", "masterThreeS", 0); + CatacombsTracker.m3SPlus = initInt("catacombs", "masterThreeSPlus", 0); + CatacombsTracker.m4S = initInt("catacombs", "masterFourS", 0); + CatacombsTracker.m4SPlus = initInt("catacombs", "masterFourSPlus", 0); + CatacombsTracker.m5S = initInt("catacombs", "masterFiveS", 0); + CatacombsTracker.m5SPlus = initInt("catacombs", "masterFiveSPlus", 0); + CatacombsTracker.m6S = initInt("catacombs", "masterSixS", 0); + CatacombsTracker.m6SPlus = initInt("catacombs", "masterSixSPlus", 0); + CatacombsTracker.m7S = initInt("catacombs", "masterSevenS", 0); + CatacombsTracker.m7SPlus = initInt("catacombs", "masterSevenSPlus", 0); CatacombsTracker.firstStars = initInt("catacombs", "firstStar", 0); CatacombsTracker.secondStars = initInt("catacombs", "secondStar", 0); CatacombsTracker.thirdStars = initInt("catacombs", "thirdStar", 0); CatacombsTracker.fourthStars = initInt("catacombs", "fourthStar", 0); CatacombsTracker.fifthStars = initInt("catacombs", "fifthStar", 0); + CatacombsTracker.darkClaymores = initInt("catacombs", "darkClaymore", 0); CatacombsTracker.masterRerolls = initInt("catacombs", "masterRerolls", 0); CatacombsTracker.masterCoinsSpent = initDouble("catacombs", "masterCoins", 0); CatacombsTracker.masterTimeSpent = initDouble("catacombs", "masterTime", 0); diff --git a/src/main/java/me/Danker/utils/Utils.java b/src/main/java/me/Danker/utils/Utils.java index 8c48c54..30e8249 100644 --- a/src/main/java/me/Danker/utils/Utils.java +++ b/src/main/java/me/Danker/utils/Utils.java @@ -28,6 +28,7 @@ public class Utils { public static boolean inSkyblock = false; public static boolean inDungeons = false; + public static DungeonFloor currentFloor = DungeonFloor.NONE; public static String tabLocation = ""; public static int[] skillXPPerLevel = {0, 50, 125, 200, 300, 500, 750, 1000, 1500, 2000, 3500, 5000, 7500, 10000, 15000, 20000, 30000, 50000, 75000, 100000, 200000, 300000, 400000, 500000, 600000, 700000, 800000, 900000, 1000000, 1100000, @@ -135,6 +136,31 @@ public class Utils { inDungeons = false; } + public static void checkForDungeonFloor() { + if (inDungeons) { + List<String> scoreboard = ScoreboardHandler.getSidebarLines(); + + for (String s : scoreboard) { + String sCleaned = ScoreboardHandler.cleanSB(s); + + if (sCleaned.contains("The Catacombs (")) { + String floor = sCleaned.substring(sCleaned.indexOf("(") + 1, sCleaned.indexOf(")")); + + try { + currentFloor = DungeonFloor.valueOf(floor); + } catch (IllegalArgumentException ex) { + currentFloor = DungeonFloor.NONE; + ex.printStackTrace(); + } + + break; + } + } + } else { + currentFloor = DungeonFloor.NONE; + } + } + public static void checkTabLocation() { if (inSkyblock) { Collection<NetworkPlayerInfo> players = Minecraft.getMinecraft().getNetHandler().getPlayerInfoMap(); @@ -465,4 +491,23 @@ public class Utils { return (Math.floor(level / 2D) + 25) / 100D; } + public enum DungeonFloor { + NONE, + E0, + F1, + F2, + F3, + F4, + F5, + F6, + F7, + M1, + M2, + M3, + M4, + M5, + M6, + M7 + } + } |