diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index f0d01d51c0..42a588c778 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -133,4 +133,15 @@ public interface ScreenshotConfig extends Config { return false; } + + @ConfigItem( + keyName = "kills", + name = "Screenshot PvP Kills", + description = "Configures whether or not screenshots are automatically taken of PvP kills", + position = 9 + ) + default boolean screenshotKills() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 02db8d3edf..52c5057bd5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -111,6 +111,11 @@ public class ScreenshotPlugin extends Plugin "You feel something weird sneaking into your backpack", "You have a funny feeling like you would have been followed"); + private static final ImmutableList KILL_MESSAGES = ImmutableList.of("into tiny pieces and sat on them", "you have obliterated", + "falls before your might", "A humiliating defeat for", "With a crushing blow you", "thinking challenging you", + "Can anyone defeat you? Certainly", "was no match for you", "You were clearly a better fighter than", "RIP", + "You have defeated", "What an embarrassing performance by", "was no match for your awesomeness"); + private String clueType; private Integer clueNumber; @@ -258,6 +263,12 @@ public class ScreenshotPlugin extends Plugin String fileName = "Pet " + TIME_FORMAT.format(new Date()); takeScreenshot(fileName); } + + if (config.screenshotKills() && KILL_MESSAGES.stream().anyMatch(chatMessage::contains)) + { + String fileName = "Kill " + " " + LocalDate.now(); + takeScreenshot(fileName); + } } @Subscribe