diff --git a/runelite-api/src/main/java/net/runelite/api/ProjectileID.java b/runelite-api/src/main/java/net/runelite/api/ProjectileID.java index d99a7b2aaa..06cab49768 100644 --- a/runelite-api/src/main/java/net/runelite/api/ProjectileID.java +++ b/runelite-api/src/main/java/net/runelite/api/ProjectileID.java @@ -77,6 +77,7 @@ public class ProjectileID public static final int DEMONIC_GORILLA_BOULDER = 856; public static final int XARPUS_ACID = 1555; + public static final int CERB_FIRE = 1247; /** * missing: marble gargoyle, superior dark beast @@ -97,5 +98,5 @@ public class ProjectileID public static final int HYDRA_POISON = 1644; public static final int HYDRA_LIGHTNING = 1664; public static final int HYDRA_LIGHTNING_2 = 1665; - public static final int DRAKE_BREATH = 1637; + public static final int DRAKE_BREATH = 1637; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectileInfo.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectileInfo.java index b7111848a2..1fb9a72b29 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectileInfo.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeProjectileInfo.java @@ -107,11 +107,15 @@ public enum AoeProjectileInfo */ ADDY_DRAG_POISON(ProjectileID.ADDY_DRAG_POISON, 1), - /** - * the Breath of the Drake - */ - - DRAKE_BREATH(ProjectileID.DRAKE_BREATH, 1); + /** + * the Breath of the Drake + */ + DRAKE_BREATH(ProjectileID.DRAKE_BREATH, 1), + + /** + * Cerbs fire + */ + CERB_FIRE(ProjectileID.CERB_FIRE, 2); private static final Map map = new HashMap<>(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java index 42e7b5efc8..3475d9f7b9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningConfig.java @@ -253,14 +253,25 @@ public interface AoeWarningConfig extends Config return true; } - @ConfigItem( - keyName = "drake", - name = "Drakes Breath", - description = "Configures if Drakes Breath tile markers are displayed" - ) - default boolean isDrakeEnabled() { - return true; - } + @ConfigItem( + keyName = "drake", + name = "Drakes Breath", + description = "Configures if Drakes Breath tile markers are displayed" + ) + default boolean isDrakeEnabled() + { + return true; + } + + @ConfigItem( + keyName = "cerbFire", + name = "Cerberus Fire", + description = "Configures if Cerberus fire tile markers are displayed" + ) + default boolean isCerbFireEnabled() + { + return true; + } @ConfigItem( keyName = "delay", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java index feaa5f27f6..9971635bb4 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/aoewarnings/AoeWarningPlugin.java @@ -300,8 +300,10 @@ public class AoeWarningPlugin extends Plugin return config.isXarpusEnabled(); case ADDY_DRAG_POISON: return config.addyDrags(); - case DRAKE_BREATH: - return config.isDrakeEnabled(); + case DRAKE_BREATH: + return config.isDrakeEnabled(); + case CERB_FIRE: + return config.isCerbFireEnabled(); } return false; diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 388ebb300a..44ff821be8 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -70,6 +70,8 @@ import net.runelite.http.api.hiscore.HiscoreSkill; import net.runelite.http.api.hiscore.SingleHiscoreSkillResult; import net.runelite.http.api.hiscore.Skill; import net.runelite.http.api.item.ItemPrice; +import net.runelite.http.api.osbuddy.OSBGrandExchangeClient; +import net.runelite.http.api.osbuddy.OSBGrandExchangeResult; import org.apache.commons.text.WordUtils; @PluginDescriptor( @@ -98,6 +100,7 @@ public class ChatCommandsPlugin extends Plugin private final HiscoreClient hiscoreClient = new HiscoreClient(); private final ChatClient chatClient = new ChatClient(); + private final OSBGrandExchangeClient CLIENT = new OSBGrandExchangeClient(); private boolean logKills; private HiscoreEndpoint hiscoreEndpoint; // hiscore endpoint for current player @@ -597,19 +600,31 @@ public class ChatCommandsPlugin extends Plugin if (!results.isEmpty()) { ItemPrice item = retrieveFromList(results, search); + OSBGrandExchangeResult osbresult = new OSBGrandExchangeResult(); + try + { + osbresult = CLIENT.lookupItem(item.getId()); + } + catch (IOException e) + { + e.printStackTrace(); + } int itemId = item.getId(); int itemPrice = item.getPrice(); - final ChatMessageBuilder builder = new ChatMessageBuilder() - .append(ChatColorType.NORMAL) - .append("Price of ") - .append(ChatColorType.HIGHLIGHT) - .append(item.getName()) - .append(ChatColorType.NORMAL) - .append(": GE average ") - .append(ChatColorType.HIGHLIGHT) - .append(StackFormatter.formatNumber(itemPrice)); + final ChatMessageBuilder builder = new ChatMessageBuilder(); + builder.append(ChatColorType.NORMAL); + builder.append(ChatColorType.HIGHLIGHT); + builder.append(item.getName()); + builder.append(ChatColorType.NORMAL); + builder.append(": GE "); + builder.append(ChatColorType.HIGHLIGHT); + builder.append(StackFormatter.formatNumber(itemPrice)); + builder.append(ChatColorType.NORMAL); + builder.append(": OSB "); + builder.append(ChatColorType.HIGHLIGHT); + builder.append(StackFormatter.formatNumber(osbresult.getOverall_average())); ItemComposition itemComposition = itemManager.getItemComposition(itemId); if (itemComposition != null) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java index 1f78bddb9f..936d814725 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/examine/ExaminePlugin.java @@ -26,6 +26,7 @@ package net.runelite.client.plugins.examine; import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; +import java.io.IOException; import java.time.Instant; import java.util.ArrayDeque; import java.util.Deque; @@ -54,6 +55,8 @@ import net.runelite.client.plugins.Plugin; import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.util.StackFormatter; import net.runelite.http.api.examine.ExamineClient; +import net.runelite.http.api.osbuddy.OSBGrandExchangeClient; +import net.runelite.http.api.osbuddy.OSBGrandExchangeResult; /** * Submits examine info to the api @@ -72,6 +75,7 @@ public class ExaminePlugin extends Plugin private static final Pattern X_PATTERN = Pattern.compile("^\\d+ x "); private final Deque pending = new ArrayDeque<>(); + private final OSBGrandExchangeClient CLIENT = new OSBGrandExchangeClient(); private final Cache cache = CacheBuilder.newBuilder() .maximumSize(128L) .build(); @@ -342,11 +346,24 @@ public class ExaminePlugin extends Plugin if (gePrice > 0) { + OSBGrandExchangeResult osbresult = new OSBGrandExchangeResult(); + try + { + osbresult = CLIENT.lookupItem(itemComposition.getId()); + } + catch (IOException e) + { + e.printStackTrace(); + } message .append(ChatColorType.NORMAL) - .append(" GE average ") + .append(" GE ") .append(ChatColorType.HIGHLIGHT) - .append(StackFormatter.formatNumber(gePrice * quantity)); + .append(StackFormatter.formatNumber(gePrice * quantity)) + .append(ChatColorType.NORMAL) + .append(" OSB ") + .append(ChatColorType.HIGHLIGHT) + .append(StackFormatter.formatNumber(osbresult.getOverall_average() * quantity)); if (quantity > 1) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java index bba5994d89..c2f355d7f9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerConfig.java @@ -59,6 +59,16 @@ public interface LootTrackerConfig extends Config return true; } + @ConfigItem( + keyName = "chestLootChat", + name = "Show chest loot value in chat", + description = "Show the value of items from CoX/ToB/Barrows chests in chat" + ) + default boolean chestLootChat() + { + return true; + } + @ConfigItem( keyName = "syncPanel", name = "Synchronize panel contents", @@ -70,4 +80,4 @@ public interface LootTrackerConfig extends Config { return true; } -} \ No newline at end of file +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index 5429ec5941..f561a87a25 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -51,6 +51,7 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; +import net.runelite.api.Item; import net.runelite.api.InventoryID; import net.runelite.api.ItemComposition; import net.runelite.api.ItemContainer; @@ -66,6 +67,10 @@ import net.runelite.api.widgets.WidgetID; import net.runelite.client.account.AccountSession; import net.runelite.client.account.SessionManager; import net.runelite.client.callback.ClientThread; +import net.runelite.client.chat.ChatColorType; +import net.runelite.client.chat.ChatMessageBuilder; +import net.runelite.client.chat.ChatMessageManager; +import net.runelite.client.chat.QueuedMessage; import net.runelite.client.config.ConfigManager; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.events.NpcLootReceived; @@ -80,6 +85,7 @@ import net.runelite.client.plugins.PluginDescriptor; import net.runelite.client.ui.ClientToolbar; import net.runelite.client.ui.NavigationButton; import net.runelite.client.util.ImageUtil; +import net.runelite.client.util.StackFormatter; import net.runelite.client.util.Text; import net.runelite.http.api.loottracker.GameItem; import net.runelite.http.api.loottracker.LootRecord; @@ -115,6 +121,9 @@ public class LootTrackerPlugin extends Plugin @Inject private ItemManager itemManager; + + @Inject + private ChatMessageManager chatMessageManager; @Inject private SpriteManager spriteManager; @@ -352,6 +361,29 @@ public class LootTrackerPlugin extends Plugin return; } + if (!(event.getGroupId() == WidgetID.CLUE_SCROLL_REWARD_GROUP_ID) && config.chestLootChat()) + { + Item[] items = container.getItems(); + long chestPrice = 0; + for (Item item : items) + { + long itemStack = (long) itemManager.getItemPrice(item.getId()) * (long) item.getQuantity(); + chestPrice += itemStack; + } + + final ChatMessageBuilder message = new ChatMessageBuilder() + .append(ChatColorType.HIGHLIGHT) + .append("Your loot is worth around ") + .append(StackFormatter.formatNumber(chestPrice)) + .append(" coins.") + .append(ChatColorType.NORMAL); + + chatMessageManager.queue(QueuedMessage.builder() + .type(ChatMessageType.ITEM_EXAMINE) + .runeLiteFormattedMessage(message.build()) + .build()); + } + // Convert container items to array of ItemStack final Collection items = Arrays.stream(container.getItems()) .filter(item -> item.getId() > 0) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesConfig.java index eab7c91c30..cc88234686 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesConfig.java @@ -55,11 +55,22 @@ public interface XpGlobesConfig extends Config return false; } + @ConfigItem( + keyName = "Time to level", + name = "Display TTL", + description = "Displays time left to level", + position = 2 + ) + default boolean enableTimeToLevel() + { + return true; + } + @ConfigItem( keyName = "enableCustomArcColor", name = "Enable custom arc color", description = "Enables the custom coloring of the globe's arc instead of using the skill's default color.", - position = 2 + position = 3 ) default boolean enableCustomArcColor() { @@ -71,7 +82,7 @@ public interface XpGlobesConfig extends Config keyName = "Progress arc color", name = "Progress arc color", description = "Change the color of the progress arc in the xp orb", - position = 3 + position = 4 ) default Color progressArcColor() { @@ -83,7 +94,7 @@ public interface XpGlobesConfig extends Config keyName = "Progress orb outline color", name = "Progress orb outline color", description = "Change the color of the progress orb outline", - position = 4 + position = 5 ) default Color progressOrbOutLineColor() { @@ -95,7 +106,7 @@ public interface XpGlobesConfig extends Config keyName = "Progress orb background color", name = "Progress orb background color", description = "Change the color of the progress orb background", - position = 5 + position = 6 ) default Color progressOrbBackgroundColor() { @@ -106,7 +117,7 @@ public interface XpGlobesConfig extends Config keyName = "Progress arc width", name = "Progress arc width", description = "Change the stroke width of the progress arc", - position = 6 + position = 7 ) default int progressArcStrokeWidth() { @@ -117,7 +128,7 @@ public interface XpGlobesConfig extends Config keyName = "Orb size", name = "Size of orbs", description = "Change the size of the xp orbs", - position = 7 + position = 8 ) default int xpOrbSize() { @@ -128,7 +139,7 @@ public interface XpGlobesConfig extends Config keyName = "Orb duration", name = "Duration of orbs", description = "Change the duration the xp orbs are visible", - position = 8 + position = 9 ) default int xpOrbDuration() { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java index 81171840e1..168476b376 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java @@ -293,12 +293,15 @@ public class XpGlobesOverlay extends Overlay .build()); } - String timeLeft = xpTrackerService.getTimeTillGoal(mouseOverSkill.getSkill()); - xpTooltip.getChildren().add(LineComponent.builder() - .left("Time left:") - .leftColor(Color.ORANGE) - .right(timeLeft) - .build()); + if (config.enableTimeToLevel()) + { + String timeLeft = xpTrackerService.getTimeTillGoal(mouseOverSkill.getSkill()); + xpTooltip.getChildren().add(LineComponent.builder() + .left("Time left:") + .leftColor(Color.ORANGE) + .right(timeLeft) + .build()); + } } xpTooltip.render(graphics);