diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java index 91a218f93b..c9454ba347 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/GameTimer.java @@ -74,7 +74,8 @@ enum GameTimer ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison", 90, ChronoUnit.SECONDS), SUPERANTIPOISON(ItemID.SUPERANTIPOISON4, GameTimerImageType.ITEM, "Superantipoison", 346, ChronoUnit.SECONDS), CHARGE(SpriteID.SPELL_CHARGE, GameTimerImageType.SPRITE, "Charge", 6, ChronoUnit.MINUTES), - STAFF_OF_THE_DEAD(ItemID.STAFF_OF_THE_DEAD, GameTimerImageType.ITEM, "Staff of the Dead", 1, ChronoUnit.MINUTES); + STAFF_OF_THE_DEAD(ItemID.STAFF_OF_THE_DEAD, GameTimerImageType.ITEM, "Staff of the Dead", 1, ChronoUnit.MINUTES), + ABYSSAL_SIRE_STUN(ItemID.ABYSSAL_ORPHAN, GameTimerImageType.ITEM, "Abyssal Sire Stun", 30, ChronoUnit.SECONDS); @Getter private final Duration duration; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java index 86562f6577..817adc21c2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersConfig.java @@ -294,4 +294,15 @@ public interface TimersConfig extends Config { return true; } + + @ConfigItem( + position = 24, + keyName = "showAbyssalSireStun", + name = "Abyssal Sire Stun Timer", + description = "Configures whether Abyssal Sire stun timer is displayed" + ) + default boolean showAbyssalSireStun() + { + return true; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java index 7c57be0240..6f46c0baef 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/timers/TimersPlugin.java @@ -54,6 +54,7 @@ import net.runelite.client.game.ItemManager; import net.runelite.client.game.SpriteManager; import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; +import static net.runelite.client.plugins.timers.GameTimer.ABYSSAL_SIRE_STUN; import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUS; import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUSPLUS; import static net.runelite.client.plugins.timers.GameTimer.ANTIFIRE; @@ -94,7 +95,7 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager; @PluginDescriptor( name = "Timers", description = "Show various timers in an infobox", - tags = {"combat", "items", "magic", "potions", "prayer", "overlay"} + tags = {"combat", "items", "magic", "potions", "prayer", "overlay", "abyssal", "sire"} ) public class TimersPlugin extends Plugin { @@ -464,6 +465,32 @@ public class TimersPlugin extends Plugin { Actor actor = event.getActor(); + if (config.showAbyssalSireStun() + && actor instanceof NPC) + { + int npcId = ((NPC)actor).getId(); + + switch (npcId) + { + // Show the countdown when the Sire enters the stunned state. + case NpcID.ABYSSAL_SIRE_5887: + createGameTimer(ABYSSAL_SIRE_STUN); + break; + + // Hide the countdown if the Sire isn't in the stunned state. + // This is necessary because the Sire leaves the stunned + // state early once all all four respiratory systems are killed. + case NpcID.ABYSSAL_SIRE: + case NpcID.ABYSSAL_SIRE_5888: + case NpcID.ABYSSAL_SIRE_5889: + case NpcID.ABYSSAL_SIRE_5890: + case NpcID.ABYSSAL_SIRE_5891: + case NpcID.ABYSSAL_SIRE_5908: + removeGameTimer(ABYSSAL_SIRE_STUN); + break; + } + } + if (actor != client.getLocalPlayer()) { return; @@ -631,4 +658,4 @@ public class TimersPlugin extends Plugin { infoBoxManager.removeIf(t -> t instanceof TimerTimer && ((TimerTimer) t).getTimer() == timer); } -} \ No newline at end of file +}