timers plugin: add abyssal sire stun timer
This commit is contained in:
@@ -74,7 +74,8 @@ enum GameTimer
|
|||||||
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison", 90, ChronoUnit.SECONDS),
|
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison", 90, ChronoUnit.SECONDS),
|
||||||
SUPERANTIPOISON(ItemID.SUPERANTIPOISON4, GameTimerImageType.ITEM, "Superantipoison", 346, ChronoUnit.SECONDS),
|
SUPERANTIPOISON(ItemID.SUPERANTIPOISON4, GameTimerImageType.ITEM, "Superantipoison", 346, ChronoUnit.SECONDS),
|
||||||
CHARGE(SpriteID.SPELL_CHARGE, GameTimerImageType.SPRITE, "Charge", 6, ChronoUnit.MINUTES),
|
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
|
@Getter
|
||||||
private final Duration duration;
|
private final Duration duration;
|
||||||
|
|||||||
@@ -294,4 +294,15 @@ public interface TimersConfig extends Config
|
|||||||
{
|
{
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ import net.runelite.client.game.ItemManager;
|
|||||||
import net.runelite.client.game.SpriteManager;
|
import net.runelite.client.game.SpriteManager;
|
||||||
import net.runelite.client.plugins.Plugin;
|
import net.runelite.client.plugins.Plugin;
|
||||||
import net.runelite.client.plugins.PluginDescriptor;
|
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.ANTIDOTEPLUS;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUSPLUS;
|
import static net.runelite.client.plugins.timers.GameTimer.ANTIDOTEPLUSPLUS;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.ANTIFIRE;
|
import static net.runelite.client.plugins.timers.GameTimer.ANTIFIRE;
|
||||||
@@ -94,7 +95,7 @@ import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
|
|||||||
@PluginDescriptor(
|
@PluginDescriptor(
|
||||||
name = "Timers",
|
name = "Timers",
|
||||||
description = "Show various timers in an infobox",
|
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
|
public class TimersPlugin extends Plugin
|
||||||
{
|
{
|
||||||
@@ -464,6 +465,32 @@ public class TimersPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
Actor actor = event.getActor();
|
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())
|
if (actor != client.getLocalPlayer())
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user