Merge pull request #461 from Sethtroll/addraidstimers
Add Raid potions to timer plugin
This commit is contained in:
@@ -187,7 +187,12 @@ public enum Varbits
|
|||||||
/**
|
/**
|
||||||
* Experience drop color
|
* Experience drop color
|
||||||
*/
|
*/
|
||||||
EXPERIENCE_DROP_COLOR(4695, 1227, 6, 8);
|
EXPERIENCE_DROP_COLOR(4695, 1227, 6, 8),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Raids
|
||||||
|
*/
|
||||||
|
IN_RAID(5432, 1431, 31, 31);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* varbit id
|
* varbit id
|
||||||
|
|||||||
@@ -64,7 +64,9 @@ public enum GameTimer
|
|||||||
ANTIDOTEPLUS("antidoteplus", "Antidote+", 518, ChronoUnit.SECONDS),
|
ANTIDOTEPLUS("antidoteplus", "Antidote+", 518, ChronoUnit.SECONDS),
|
||||||
ANTIVENOM("antivenom", "Anto-venom", 12, ChronoUnit.MINUTES),
|
ANTIVENOM("antivenom", "Anto-venom", 12, ChronoUnit.MINUTES),
|
||||||
EXSUPERANTIFIRE("exsuperantifire", "Extended Super AntiFire", 6, ChronoUnit.MINUTES),
|
EXSUPERANTIFIRE("exsuperantifire", "Extended Super AntiFire", 6, ChronoUnit.MINUTES),
|
||||||
SANFEW("sanfew", "Sanfew serum", 6, ChronoUnit.MINUTES);
|
SANFEW("sanfew", "Sanfew serum", 6, ChronoUnit.MINUTES),
|
||||||
|
OVERLOAD_RAID("overloadraid", "Overload", 5, ChronoUnit.MINUTES),
|
||||||
|
PRAYER_ENHANCE("prayerenhance", "Prayer enhance", 5, ChronoUnit.MINUTES);
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final String imageResource;
|
private final String imageResource;
|
||||||
|
|||||||
@@ -214,4 +214,14 @@ public interface TimersConfig extends Config
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ConfigItem(
|
||||||
|
keyName = "showPrayerEnhance",
|
||||||
|
name = "Prayer enhance timer",
|
||||||
|
description = "Configures whether prayer enhance timer is displayed"
|
||||||
|
)
|
||||||
|
default boolean showPrayerEnhance()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import static net.runelite.client.plugins.timers.GameTimer.FULLTB;
|
|||||||
import static net.runelite.client.plugins.timers.GameTimer.HALFTB;
|
import static net.runelite.client.plugins.timers.GameTimer.HALFTB;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.MAGICIMBUE;
|
import static net.runelite.client.plugins.timers.GameTimer.MAGICIMBUE;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.OVERLOAD;
|
import static net.runelite.client.plugins.timers.GameTimer.OVERLOAD;
|
||||||
|
import static net.runelite.client.plugins.timers.GameTimer.OVERLOAD_RAID;
|
||||||
|
import static net.runelite.client.plugins.timers.GameTimer.PRAYER_ENHANCE;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.SANFEW;
|
import static net.runelite.client.plugins.timers.GameTimer.SANFEW;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.STAMINA;
|
import static net.runelite.client.plugins.timers.GameTimer.STAMINA;
|
||||||
import static net.runelite.client.plugins.timers.GameTimer.SUPERANTIFIRE;
|
import static net.runelite.client.plugins.timers.GameTimer.SUPERANTIFIRE;
|
||||||
@@ -59,6 +61,7 @@ import net.runelite.api.ChatMessageType;
|
|||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.Prayer;
|
import net.runelite.api.Prayer;
|
||||||
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.GraphicChanged;
|
import net.runelite.api.events.GraphicChanged;
|
||||||
import net.runelite.client.config.ConfigManager;
|
import net.runelite.client.config.ConfigManager;
|
||||||
import net.runelite.api.events.ChatMessage;
|
import net.runelite.api.events.ChatMessage;
|
||||||
@@ -115,6 +118,7 @@ public class TimersPlugin extends Plugin
|
|||||||
if (!config.showOverload())
|
if (!config.showOverload())
|
||||||
{
|
{
|
||||||
removeGameTimer(OVERLOAD);
|
removeGameTimer(OVERLOAD);
|
||||||
|
removeGameTimer(OVERLOAD_RAID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!config.showCannon())
|
if (!config.showCannon())
|
||||||
@@ -191,6 +195,11 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(ICEBLITZ);
|
removeGameTimer(ICEBLITZ);
|
||||||
removeGameTimer(ICEBARRAGE);
|
removeGameTimer(ICEBARRAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!config.showPrayerEnhance())
|
||||||
|
{
|
||||||
|
removeGameTimer(PRAYER_ENHANCE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -229,7 +238,7 @@ public class TimersPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("You drink some of your stamina potion.") && config.showStamina())
|
if (config.showStamina() && event.getMessage().equals("You drink some of your stamina potion."))
|
||||||
{
|
{
|
||||||
createGameTimer(STAMINA);
|
createGameTimer(STAMINA);
|
||||||
}
|
}
|
||||||
@@ -239,17 +248,17 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(STAMINA);
|
removeGameTimer(STAMINA);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("You drink some of your antifire potion.") && config.showAntiFire())
|
if (config.showAntiFire() && event.getMessage().equals("You drink some of your antifire potion."))
|
||||||
{
|
{
|
||||||
createGameTimer(ANTIFIRE);
|
createGameTimer(ANTIFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("You drink some of your extended antifire potion.") && config.showExAntiFire())
|
if (config.showExAntiFire() && event.getMessage().equals("You drink some of your extended antifire potion."))
|
||||||
{
|
{
|
||||||
createGameTimer(EXANTIFIRE);
|
createGameTimer(EXANTIFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("You drink some of your extended super antifire potion.") && config.showExSuperAntifire())
|
if (config.showExSuperAntifire() && event.getMessage().equals("You drink some of your extended super antifire potion."))
|
||||||
{
|
{
|
||||||
createGameTimer(EXSUPERANTIFIRE);
|
createGameTimer(EXSUPERANTIFIRE);
|
||||||
}
|
}
|
||||||
@@ -261,12 +270,20 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(EXANTIFIRE);
|
removeGameTimer(EXANTIFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().contains("You drink some of your overload potion") && config.showOverload())
|
if (config.showOverload() && event.getMessage().startsWith("You drink some of your") && event.getMessage().contains("overload"))
|
||||||
{
|
{
|
||||||
createGameTimer(OVERLOAD);
|
if (client.getSetting(Varbits.IN_RAID) == 1)
|
||||||
|
{
|
||||||
|
createGameTimer(OVERLOAD_RAID);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
createGameTimer(OVERLOAD);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((event.getMessage().equals("You add the furnace.") || event.getMessage().contains("You repair your cannon, restoring it to working order.")) && config.showCannon())
|
if (config.showCannon() && (event.getMessage().equals("You add the furnace.") || event.getMessage().contains("You repair your cannon, restoring it to working order.")))
|
||||||
{
|
{
|
||||||
createGameTimer(CANNON);
|
createGameTimer(CANNON);
|
||||||
}
|
}
|
||||||
@@ -276,12 +293,12 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(CANNON);
|
removeGameTimer(CANNON);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().contains("You drink some of your super antivenom potion") && config.showAntiVenomPlus())
|
if (config.showAntiVenomPlus() && event.getMessage().contains("You drink some of your super antivenom potion"))
|
||||||
{
|
{
|
||||||
createGameTimer(ANTIVENOMPLUS);
|
createGameTimer(ANTIVENOMPLUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("You are charged to combine runes!") && config.showMagicImbue())
|
if (config.showMagicImbue() && event.getMessage().equals("You are charged to combine runes!"))
|
||||||
{
|
{
|
||||||
createGameTimer(MAGICIMBUE);
|
createGameTimer(MAGICIMBUE);
|
||||||
}
|
}
|
||||||
@@ -291,22 +308,22 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(MAGICIMBUE);
|
removeGameTimer(MAGICIMBUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("<col=4f006f>A teleblock spell has been cast on you. It will expire in 5 minutes, 0 seconds.</col>") && config.showTeleblock())
|
if (config.showTeleblock() && event.getMessage().equals("<col=4f006f>A teleblock spell has been cast on you. It will expire in 5 minutes, 0 seconds.</col>"))
|
||||||
{
|
{
|
||||||
createGameTimer(FULLTB);
|
createGameTimer(FULLTB);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("<col=4f006f>A teleblock spell has been cast on you. It will expire in 2 minutes, 30 seconds.</col>") && config.showTeleblock())
|
if (config.showTeleblock() && event.getMessage().equals("<col=4f006f>A teleblock spell has been cast on you. It will expire in 2 minutes, 30 seconds.</col>"))
|
||||||
{
|
{
|
||||||
createGameTimer(HALFTB);
|
createGameTimer(HALFTB);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().contains("You drink some of your super antifire potion") && config.showSuperAntiFire())
|
if (config.showSuperAntiFire() && event.getMessage().contains("You drink some of your super antifire potion"))
|
||||||
{
|
{
|
||||||
createGameTimer(SUPERANTIFIRE);
|
createGameTimer(SUPERANTIFIRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("<col=7f007f>Your super antifire potion has expired.</col>") && config.showSuperAntiFire())
|
if (event.getMessage().equals("<col=7f007f>Your super antifire potion has expired.</col>"))
|
||||||
{
|
{
|
||||||
removeGameTimer(SUPERANTIFIRE);
|
removeGameTimer(SUPERANTIFIRE);
|
||||||
}
|
}
|
||||||
@@ -316,15 +333,20 @@ public class TimersPlugin extends Plugin
|
|||||||
removeGameTimer(IMBUEDHEART);
|
removeGameTimer(IMBUEDHEART);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().contains("You drink some of your antivenom potion") && config.showAntiVenom())
|
if (config.showAntiVenom() && event.getMessage().contains("You drink some of your antivenom potion"))
|
||||||
{
|
{
|
||||||
createGameTimer(ANTIVENOM);
|
createGameTimer(ANTIVENOM);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().contains("You drink some of your Sanfew Serum.") && config.showSanfew())
|
if (config.showSanfew() && event.getMessage().contains("You drink some of your Sanfew Serum."))
|
||||||
{
|
{
|
||||||
createGameTimer(SANFEW);
|
createGameTimer(SANFEW);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.showPrayerEnhance() && event.getMessage().startsWith("You drink some of your") && event.getMessage().contains("prayer enhance"))
|
||||||
|
{
|
||||||
|
createGameTimer(PRAYER_ENHANCE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -337,12 +359,12 @@ public class TimersPlugin extends Plugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor.getGraphic() == IMBUEDHEART.getGraphicId() && config.showImbuedHeart())
|
if (config.showImbuedHeart() && actor.getGraphic() == IMBUEDHEART.getGraphicId())
|
||||||
{
|
{
|
||||||
createGameTimer(IMBUEDHEART);
|
createGameTimer(IMBUEDHEART);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actor.getGraphic() == VENGEANCE.getGraphicId() && config.showVengeance())
|
if (config.showVengeance() && actor.getGraphic() == VENGEANCE.getGraphicId())
|
||||||
{
|
{
|
||||||
createGameTimer(VENGEANCE);
|
createGameTimer(VENGEANCE);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 576 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user