From 03c397d77f5f84e3c054b42ccd6a0b76331fa557 Mon Sep 17 00:00:00 2001 From: MrFast <78495381+MrFast-js@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:02:02 -0500 Subject: Added slayer quest fail handling to Slayer Overlay (#1025) added slayer quest fail handling --- .../github/moulberry/notenoughupdates/listener/ChatListener.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java index 68605ed4..16b8493f 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/ChatListener.java @@ -228,16 +228,17 @@ public class ChatListener { } else if (e.message.getFormattedText().startsWith( EnumChatFormatting.RESET.toString() + EnumChatFormatting.RED + "Invalid recipe ")) { r = ""; + } else if (unformatted.equals(" SLAYER QUEST FAILED!")) { + SlayerOverlay.isSlain = false; + timeSinceLastBoss = 0; } else if (unformatted.equals(" NICE! SLAYER BOSS SLAIN!")) { SlayerOverlay.isSlain = true; } else if (unformatted.equals(" SLAYER QUEST STARTED!")) { SlayerOverlay.isSlain = false; - if (timeSinceLastBoss == 0) { - SlayerOverlay.timeSinceLastBoss = System.currentTimeMillis(); - } else { + if (timeSinceLastBoss != 0) { timeSinceLastBoss2 = timeSinceLastBoss; - timeSinceLastBoss = System.currentTimeMillis(); } + timeSinceLastBoss = System.currentTimeMillis(); } else if (unformatted.startsWith(" RNG Meter")) { RNGMeter = unformatted.substring(" RNG Meter - ".length()); } else if (matcher.matches()) { -- cgit