Merge remote-tracking branch 'runelite/master' into 3107-merge
This commit is contained in:
@@ -44,6 +44,7 @@ public final class AnimationID
|
|||||||
public static final int WOODCUTTING_DRAGON = 2846;
|
public static final int WOODCUTTING_DRAGON = 2846;
|
||||||
public static final int WOODCUTTING_INFERNAL = 2117;
|
public static final int WOODCUTTING_INFERNAL = 2117;
|
||||||
public static final int WOODCUTTING_3A_AXE = 7264;
|
public static final int WOODCUTTING_3A_AXE = 7264;
|
||||||
|
public static final int WOODCUTTING_CRYSTAL = 8324;
|
||||||
public static final int CONSUMING = 829; // consuming consumables
|
public static final int CONSUMING = 829; // consuming consumables
|
||||||
public static final int FIREMAKING = 733;
|
public static final int FIREMAKING = 733;
|
||||||
public static final int DEATH = 836;
|
public static final int DEATH = 836;
|
||||||
@@ -94,6 +95,7 @@ public final class AnimationID
|
|||||||
public static final int FISHING_BARBTAIL_HARPOON = 5108;
|
public static final int FISHING_BARBTAIL_HARPOON = 5108;
|
||||||
public static final int FISHING_DRAGON_HARPOON = 7401;
|
public static final int FISHING_DRAGON_HARPOON = 7401;
|
||||||
public static final int FISHING_INFERNAL_HARPOON = 7402;
|
public static final int FISHING_INFERNAL_HARPOON = 7402;
|
||||||
|
public static final int FISHING_CRYSTAL_HARPOON = 8336;
|
||||||
public static final int FISHING_OILY_ROD = 622;
|
public static final int FISHING_OILY_ROD = 622;
|
||||||
public static final int FISHING_KARAMBWAN = 1193;
|
public static final int FISHING_KARAMBWAN = 1193;
|
||||||
public static final int FISHING_CRUSHING_INFERNAL_EELS = 7553;
|
public static final int FISHING_CRUSHING_INFERNAL_EELS = 7553;
|
||||||
@@ -107,9 +109,11 @@ public final class AnimationID
|
|||||||
public static final int MINING_ADAMANT_PICKAXE = 628;
|
public static final int MINING_ADAMANT_PICKAXE = 628;
|
||||||
public static final int MINING_RUNE_PICKAXE = 624;
|
public static final int MINING_RUNE_PICKAXE = 624;
|
||||||
public static final int MINING_DRAGON_PICKAXE = 7139;
|
public static final int MINING_DRAGON_PICKAXE = 7139;
|
||||||
public static final int MINING_DRAGON_PICKAXE_ORN = 642;
|
public static final int MINING_DRAGON_PICKAXE_UPGRADED = 642;
|
||||||
|
public static final int MINING_DRAGON_PICKAXE_OR = 8346;
|
||||||
public static final int MINING_INFERNAL_PICKAXE = 4482;
|
public static final int MINING_INFERNAL_PICKAXE = 4482;
|
||||||
public static final int MINING_3A_PICKAXE = 7283;
|
public static final int MINING_3A_PICKAXE = 7283;
|
||||||
|
public static final int MINING_CRYSTAL_PICKAXE = 8347;
|
||||||
public static final int MINING_MOTHERLODE_BRONZE = 6753;
|
public static final int MINING_MOTHERLODE_BRONZE = 6753;
|
||||||
public static final int MINING_MOTHERLODE_IRON = 6754;
|
public static final int MINING_MOTHERLODE_IRON = 6754;
|
||||||
public static final int MINING_MOTHERLODE_STEEL = 6755;
|
public static final int MINING_MOTHERLODE_STEEL = 6755;
|
||||||
@@ -118,9 +122,11 @@ public final class AnimationID
|
|||||||
public static final int MINING_MOTHERLODE_ADAMANT = 6756;
|
public static final int MINING_MOTHERLODE_ADAMANT = 6756;
|
||||||
public static final int MINING_MOTHERLODE_RUNE = 6752;
|
public static final int MINING_MOTHERLODE_RUNE = 6752;
|
||||||
public static final int MINING_MOTHERLODE_DRAGON = 6758;
|
public static final int MINING_MOTHERLODE_DRAGON = 6758;
|
||||||
public static final int MINING_MOTHERLODE_DRAGON_ORN = 335;
|
public static final int MINING_MOTHERLODE_DRAGON_UPGRADED = 335;
|
||||||
|
public static final int MINING_MOTHERLODE_DRAGON_OR = 8344;
|
||||||
public static final int MINING_MOTHERLODE_INFERNAL = 4481;
|
public static final int MINING_MOTHERLODE_INFERNAL = 4481;
|
||||||
public static final int MINING_MOTHERLODE_3A = 7282;
|
public static final int MINING_MOTHERLODE_3A = 7282;
|
||||||
|
public static final int MINING_MOTHERLODE_CRYSTAL = 8345;
|
||||||
public static final int DENSE_ESSENCE_CHIPPING = 7201;
|
public static final int DENSE_ESSENCE_CHIPPING = 7201;
|
||||||
public static final int DENSE_ESSENCE_CHISELING = 7202;
|
public static final int DENSE_ESSENCE_CHISELING = 7202;
|
||||||
public static final int HERBLORE_POTIONMAKING = 363; //used for both herb and secondary
|
public static final int HERBLORE_POTIONMAKING = 363; //used for both herb and secondary
|
||||||
|
|||||||
@@ -91,8 +91,8 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
private static final Pattern RAIDS_PATTERN = Pattern.compile("Your completed (.+) count is: <col=ff0000>(\\d+)</col>");
|
private static final Pattern RAIDS_PATTERN = Pattern.compile("Your completed (.+) count is: <col=ff0000>(\\d+)</col>");
|
||||||
private static final Pattern WINTERTODT_PATTERN = Pattern.compile("Your subdued Wintertodt count is: <col=ff0000>(\\d+)</col>");
|
private static final Pattern WINTERTODT_PATTERN = Pattern.compile("Your subdued Wintertodt count is: <col=ff0000>(\\d+)</col>");
|
||||||
private static final Pattern BARROWS_PATTERN = Pattern.compile("Your Barrows chest count is: <col=ff0000>(\\d+)</col>");
|
private static final Pattern BARROWS_PATTERN = Pattern.compile("Your Barrows chest count is: <col=ff0000>(\\d+)</col>");
|
||||||
private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?:Fight|Lap) duration: <col=ff0000>[0-9:]+</col>. Personal best: ([0-9:]+)");
|
private static final Pattern KILL_DURATION_PATTERN = Pattern.compile("(?i)^(?:Fight |Lap |Challenge |Corrupted challenge )?duration: <col=ff0000>[0-9:]+</col>\\. Personal best: ([0-9:]+)");
|
||||||
private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?:Fight|Lap) duration: <col=ff0000>([0-9:]+)</col> \\(new personal best\\)");
|
private static final Pattern NEW_PB_PATTERN = Pattern.compile("(?i)^(?:Fight |Lap |Challenge |Corrupted challenge )?duration: <col=ff0000>([0-9:]+)</col> \\(new personal best\\)");
|
||||||
private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?");
|
private static final Pattern DUEL_ARENA_WINS_PATTERN = Pattern.compile("You (were defeated|won)! You have(?: now)? won (\\d+) duels?");
|
||||||
private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?");
|
private static final Pattern DUEL_ARENA_LOSSES_PATTERN = Pattern.compile("You have(?: now)? lost (\\d+) duels?");
|
||||||
private static final String TOTAL_LEVEL_COMMAND_STRING = "!total";
|
private static final String TOTAL_LEVEL_COMMAND_STRING = "!total";
|
||||||
@@ -113,6 +113,7 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
private boolean logKills;
|
private boolean logKills;
|
||||||
private HiscoreEndpoint hiscoreEndpoint; // hiscore endpoint for current player
|
private HiscoreEndpoint hiscoreEndpoint; // hiscore endpoint for current player
|
||||||
private String lastBossKill;
|
private String lastBossKill;
|
||||||
|
private int lastPb = -1;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private Client client;
|
private Client client;
|
||||||
@@ -244,7 +245,17 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
int kc = Integer.parseInt(matcher.group(2));
|
int kc = Integer.parseInt(matcher.group(2));
|
||||||
|
|
||||||
setKc(boss, kc);
|
setKc(boss, kc);
|
||||||
|
// We either already have the pb, or need to remember the boss for the upcoming pb
|
||||||
|
if (lastPb > -1)
|
||||||
|
{
|
||||||
|
log.debug("Got out-of-order personal best for {}: {}", boss, lastPb);
|
||||||
|
setPb(boss, lastPb);
|
||||||
|
lastPb = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
lastBossKill = boss;
|
lastBossKill = boss;
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,8 +323,6 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
setKc("Barrows Chests", kc);
|
setKc("Barrows Chests", kc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastBossKill != null)
|
|
||||||
{
|
|
||||||
matcher = KILL_DURATION_PATTERN.matcher(message);
|
matcher = KILL_DURATION_PATTERN.matcher(message);
|
||||||
if (matcher.find())
|
if (matcher.find())
|
||||||
{
|
{
|
||||||
@@ -325,7 +334,6 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
{
|
{
|
||||||
matchPb(matcher);
|
matchPb(matcher);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
lastBossKill = null;
|
lastBossKill = null;
|
||||||
}
|
}
|
||||||
@@ -337,8 +345,19 @@ public class ChatCommandsPlugin extends Plugin
|
|||||||
if (s.length == 2)
|
if (s.length == 2)
|
||||||
{
|
{
|
||||||
int seconds = Integer.parseInt(s[0]) * 60 + Integer.parseInt(s[1]);
|
int seconds = Integer.parseInt(s[0]) * 60 + Integer.parseInt(s[1]);
|
||||||
|
if (lastBossKill != null)
|
||||||
|
{
|
||||||
|
// Most bosses sent boss kill message, and then pb message, so we
|
||||||
|
// use the remembered lastBossKill
|
||||||
log.debug("Got personal best for {}: {}", lastBossKill, seconds);
|
log.debug("Got personal best for {}: {}", lastBossKill, seconds);
|
||||||
setPb(lastBossKill, seconds);
|
setPb(lastBossKill, seconds);
|
||||||
|
lastPb = -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Some bosses send the pb message, and then the kill message!
|
||||||
|
lastPb = seconds;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ enum DiscordGameEventType
|
|||||||
BOSS_SMOKE_DEVIL("Thermonuclear smoke devil", DiscordAreaType.BOSSES, 9363, 9619),
|
BOSS_SMOKE_DEVIL("Thermonuclear smoke devil", DiscordAreaType.BOSSES, 9363, 9619),
|
||||||
BOSS_VORKATH("Vorkath", DiscordAreaType.BOSSES, 9023),
|
BOSS_VORKATH("Vorkath", DiscordAreaType.BOSSES, 9023),
|
||||||
BOSS_WINTERTODT("Wintertodt", DiscordAreaType.BOSSES, 6462),
|
BOSS_WINTERTODT("Wintertodt", DiscordAreaType.BOSSES, 6462),
|
||||||
|
BOSS_ZALCANO("Zalcano", DiscordAreaType.BOSSES, 13250),
|
||||||
BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007),
|
BOSS_ZULRAH("Zulrah", DiscordAreaType.BOSSES, 9007),
|
||||||
|
|
||||||
// Cities
|
// Cities
|
||||||
@@ -107,6 +108,7 @@ enum DiscordGameEventType
|
|||||||
CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084),
|
CITY_FALADOR("Falador" , DiscordAreaType.CITIES, 11828, 11572, 11571, 11827, 12084),
|
||||||
CITY_GOBLIN_VILLAGE("Goblin Village" , DiscordAreaType.CITIES, 11830),
|
CITY_GOBLIN_VILLAGE("Goblin Village" , DiscordAreaType.CITIES, 11830),
|
||||||
CITY_GUTANOTH("Gu'Tanoth" , DiscordAreaType.CITIES, 10031),
|
CITY_GUTANOTH("Gu'Tanoth" , DiscordAreaType.CITIES, 10031),
|
||||||
|
CITY_GWENITH("Gwenith", DiscordAreaType.CITIES, 8501, 8757, 9013),
|
||||||
CITY_HOSIDIUS_HOUSE("Hosidius" , DiscordAreaType.CITIES, 6713, 6712, 6455, 6711, 6710, 6965, 6966, 7222, 7223, 6967),
|
CITY_HOSIDIUS_HOUSE("Hosidius" , DiscordAreaType.CITIES, 6713, 6712, 6455, 6711, 6710, 6965, 6966, 7222, 7223, 6967),
|
||||||
CITY_JATISZO("Jatizso" , DiscordAreaType.CITIES, 9531),
|
CITY_JATISZO("Jatizso" , DiscordAreaType.CITIES, 9531),
|
||||||
CITY_JIGGIG("Jiggig" , DiscordAreaType.CITIES, 9775),
|
CITY_JIGGIG("Jiggig" , DiscordAreaType.CITIES, 9775),
|
||||||
@@ -130,6 +132,7 @@ enum DiscordGameEventType
|
|||||||
CITY_PORT_PHASMATYS("Port Phasmatys" , DiscordAreaType.CITIES, 14646),
|
CITY_PORT_PHASMATYS("Port Phasmatys" , DiscordAreaType.CITIES, 14646),
|
||||||
CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12082),
|
CITY_PORT_SARIM("Port Sarim" , DiscordAreaType.CITIES, 12082),
|
||||||
CITY_PISCARILIUS_HOUSE("Port Piscarilius" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226),
|
CITY_PISCARILIUS_HOUSE("Port Piscarilius" , DiscordAreaType.CITIES, 6971, 7227, 6970, 7226),
|
||||||
|
CITY_PRIFDDINAS("Prifddinas", DiscordAreaType.CITIES, 12894, 12895, 13150, 13151),
|
||||||
CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10553),
|
CITY_RELLEKKA("Rellekka" , DiscordAreaType.CITIES, 10553),
|
||||||
CITY_RIMMINGTON("Rimmington" , DiscordAreaType.CITIES, 11826, 11570),
|
CITY_RIMMINGTON("Rimmington" , DiscordAreaType.CITIES, 11826, 11570),
|
||||||
CITY_SEERS_VILLAGE("Seers' Village" , DiscordAreaType.CITIES, 10806),
|
CITY_SEERS_VILLAGE("Seers' Village" , DiscordAreaType.CITIES, 10806),
|
||||||
@@ -180,6 +183,7 @@ enum DiscordGameEventType
|
|||||||
DUNGEON_GOBLIN_CAVE("Goblin Cave", DiscordAreaType.DUNGEONS, 10393),
|
DUNGEON_GOBLIN_CAVE("Goblin Cave", DiscordAreaType.DUNGEONS, 10393),
|
||||||
DUNGEON_GRAND_TREE_TUNNELS("Grand Tree Tunnels", DiscordAreaType.DUNGEONS, 9882),
|
DUNGEON_GRAND_TREE_TUNNELS("Grand Tree Tunnels", DiscordAreaType.DUNGEONS, 9882),
|
||||||
DUNGEON_HAM("H.A.M Dungeon", DiscordAreaType.DUNGEONS, 12694, 10321),
|
DUNGEON_HAM("H.A.M Dungeon", DiscordAreaType.DUNGEONS, 12694, 10321),
|
||||||
|
DUNGEON_IORWERTH("Iorwerth Dungeon", DiscordAreaType.DUNGEONS, 12738, 12993, 12994),
|
||||||
DUNGEON_JATIZSO_MINES("Jatizo Mines", DiscordAreaType.DUNGEONS, 9631),
|
DUNGEON_JATIZSO_MINES("Jatizo Mines", DiscordAreaType.DUNGEONS, 9631),
|
||||||
DUNGEON_JIGGIG_BURIAL_TOMB("Jiggig Burial Tomb", DiscordAreaType.DUNGEONS, 9875, 9874),
|
DUNGEON_JIGGIG_BURIAL_TOMB("Jiggig Burial Tomb", DiscordAreaType.DUNGEONS, 9875, 9874),
|
||||||
DUNGEON_JOGRE("Jogre Dungeon", DiscordAreaType.DUNGEONS, 11412),
|
DUNGEON_JOGRE("Jogre Dungeon", DiscordAreaType.DUNGEONS, 11412),
|
||||||
@@ -211,6 +215,7 @@ enum DiscordGameEventType
|
|||||||
DUNGEON_THE_WARRENS("The Warrens", DiscordAreaType.DUNGEONS, 7070, 7326),
|
DUNGEON_THE_WARRENS("The Warrens", DiscordAreaType.DUNGEONS, 7070, 7326),
|
||||||
DUNGEON_TOLNA("Dungeon of Tolna", DiscordAreaType.DUNGEONS, 13209),
|
DUNGEON_TOLNA("Dungeon of Tolna", DiscordAreaType.DUNGEONS, 13209),
|
||||||
DUNGEON_TOWER_OF_LIFE("Tower of Life Basement", DiscordAreaType.DUNGEONS, 12100),
|
DUNGEON_TOWER_OF_LIFE("Tower of Life Basement", DiscordAreaType.DUNGEONS, 12100),
|
||||||
|
DUNGEON_TRAHAEARN_MINE("Trahaearn Mine", DiscordAreaType.DUNGEONS, 13249),
|
||||||
DUNGEON_TUNNEL_OF_CHAOS("Tunnel of Chaos", DiscordAreaType.DUNGEONS, 12625),
|
DUNGEON_TUNNEL_OF_CHAOS("Tunnel of Chaos", DiscordAreaType.DUNGEONS, 12625),
|
||||||
DUNGEON_UNDERGROUND_PASS("Underground Pass", DiscordAreaType.DUNGEONS, 9369, 9370),
|
DUNGEON_UNDERGROUND_PASS("Underground Pass", DiscordAreaType.DUNGEONS, 9369, 9370),
|
||||||
DUNGEON_VARROCKSEWERS("Varrock Sewers", DiscordAreaType.DUNGEONS, 12954, 13210),
|
DUNGEON_VARROCKSEWERS("Varrock Sewers", DiscordAreaType.DUNGEONS, 12954, 13210),
|
||||||
@@ -232,6 +237,7 @@ enum DiscordGameEventType
|
|||||||
MG_CLAN_WARS("Clan Wars", DiscordAreaType.MINIGAMES, 13135, 13134, 13133, 13131, 13130, 13387, 13386),
|
MG_CLAN_WARS("Clan Wars", DiscordAreaType.MINIGAMES, 13135, 13134, 13133, 13131, 13130, 13387, 13386),
|
||||||
MG_DUEL_ARENA("Duel Arena", DiscordAreaType.MINIGAMES, 13362),
|
MG_DUEL_ARENA("Duel Arena", DiscordAreaType.MINIGAMES, 13362),
|
||||||
MG_FISHING_TRAWLER("Fishing Trawler", DiscordAreaType.MINIGAMES, 7499),
|
MG_FISHING_TRAWLER("Fishing Trawler", DiscordAreaType.MINIGAMES, 7499),
|
||||||
|
MG_GAUNTLET("Gauntlet", DiscordAreaType.MINIGAMES, 12995),
|
||||||
MG_INFERNO("The Inferno", DiscordAreaType.MINIGAMES, 9043),
|
MG_INFERNO("The Inferno", DiscordAreaType.MINIGAMES, 9043),
|
||||||
MG_LAST_MAN_STANDING("Last Man Standing", DiscordAreaType.MINIGAMES, 13660, 13659, 13658, 13916, 13915, 13914),
|
MG_LAST_MAN_STANDING("Last Man Standing", DiscordAreaType.MINIGAMES, 13660, 13659, 13658, 13916, 13915, 13914),
|
||||||
MG_MAGE_TRAINING_ARENA("Mage Training Arena", DiscordAreaType.MINIGAMES, 13462, 13463),
|
MG_MAGE_TRAINING_ARENA("Mage Training Arena", DiscordAreaType.MINIGAMES, 13462, 13463),
|
||||||
|
|||||||
@@ -195,6 +195,7 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
case WOODCUTTING_DRAGON:
|
case WOODCUTTING_DRAGON:
|
||||||
case WOODCUTTING_INFERNAL:
|
case WOODCUTTING_INFERNAL:
|
||||||
case WOODCUTTING_3A_AXE:
|
case WOODCUTTING_3A_AXE:
|
||||||
|
case WOODCUTTING_CRYSTAL:
|
||||||
/* Cooking(Fire, Range) */
|
/* Cooking(Fire, Range) */
|
||||||
case COOKING_FIRE:
|
case COOKING_FIRE:
|
||||||
case COOKING_RANGE:
|
case COOKING_RANGE:
|
||||||
@@ -255,11 +256,27 @@ public class IdleNotifierPlugin extends Plugin
|
|||||||
case MINING_ADAMANT_PICKAXE:
|
case MINING_ADAMANT_PICKAXE:
|
||||||
case MINING_RUNE_PICKAXE:
|
case MINING_RUNE_PICKAXE:
|
||||||
case MINING_DRAGON_PICKAXE:
|
case MINING_DRAGON_PICKAXE:
|
||||||
case MINING_DRAGON_PICKAXE_ORN:
|
case MINING_DRAGON_PICKAXE_UPGRADED:
|
||||||
|
case MINING_DRAGON_PICKAXE_OR:
|
||||||
case MINING_INFERNAL_PICKAXE:
|
case MINING_INFERNAL_PICKAXE:
|
||||||
case MINING_3A_PICKAXE:
|
case MINING_3A_PICKAXE:
|
||||||
|
case MINING_CRYSTAL_PICKAXE:
|
||||||
case DENSE_ESSENCE_CHIPPING:
|
case DENSE_ESSENCE_CHIPPING:
|
||||||
case DENSE_ESSENCE_CHISELING:
|
case DENSE_ESSENCE_CHISELING:
|
||||||
|
/* Mining(Motherlode) */
|
||||||
|
case MINING_MOTHERLODE_BRONZE:
|
||||||
|
case MINING_MOTHERLODE_IRON:
|
||||||
|
case MINING_MOTHERLODE_STEEL:
|
||||||
|
case MINING_MOTHERLODE_BLACK:
|
||||||
|
case MINING_MOTHERLODE_MITHRIL:
|
||||||
|
case MINING_MOTHERLODE_ADAMANT:
|
||||||
|
case MINING_MOTHERLODE_RUNE:
|
||||||
|
case MINING_MOTHERLODE_DRAGON:
|
||||||
|
case MINING_MOTHERLODE_DRAGON_UPGRADED:
|
||||||
|
case MINING_MOTHERLODE_DRAGON_OR:
|
||||||
|
case MINING_MOTHERLODE_INFERNAL:
|
||||||
|
case MINING_MOTHERLODE_3A:
|
||||||
|
case MINING_MOTHERLODE_CRYSTAL:
|
||||||
/* Herblore */
|
/* Herblore */
|
||||||
case HERBLORE_PESTLE_AND_MORTAR:
|
case HERBLORE_PESTLE_AND_MORTAR:
|
||||||
case HERBLORE_POTIONMAKING:
|
case HERBLORE_POTIONMAKING:
|
||||||
|
|||||||
@@ -43,18 +43,7 @@ import javax.inject.Singleton;
|
|||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.AnimationID;
|
import net.runelite.api.AnimationID;
|
||||||
import static net.runelite.api.AnimationID.IDLE;
|
import static net.runelite.api.AnimationID.*;
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_3A;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_ADAMANT;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_BLACK;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_BRONZE;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_DRAGON;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_DRAGON_ORN;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_INFERNAL;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_IRON;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_MITHRIL;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_RUNE;
|
|
||||||
import static net.runelite.api.AnimationID.MINING_MOTHERLODE_STEEL;
|
|
||||||
import net.runelite.api.ChatMessageType;
|
import net.runelite.api.ChatMessageType;
|
||||||
import net.runelite.api.Client;
|
import net.runelite.api.Client;
|
||||||
import net.runelite.api.GameObject;
|
import net.runelite.api.GameObject;
|
||||||
@@ -451,7 +440,9 @@ public class MotherlodePlugin extends Plugin
|
|||||||
case MINING_MOTHERLODE_ADAMANT:
|
case MINING_MOTHERLODE_ADAMANT:
|
||||||
case MINING_MOTHERLODE_RUNE:
|
case MINING_MOTHERLODE_RUNE:
|
||||||
case MINING_MOTHERLODE_DRAGON:
|
case MINING_MOTHERLODE_DRAGON:
|
||||||
case MINING_MOTHERLODE_DRAGON_ORN:
|
case MINING_MOTHERLODE_DRAGON_UPGRADED:
|
||||||
|
case MINING_MOTHERLODE_DRAGON_OR:
|
||||||
|
case MINING_MOTHERLODE_CRYSTAL:
|
||||||
case MINING_MOTHERLODE_INFERNAL:
|
case MINING_MOTHERLODE_INFERNAL:
|
||||||
case MINING_MOTHERLODE_3A:
|
case MINING_MOTHERLODE_3A:
|
||||||
lastAnimation = animation;
|
lastAnimation = animation;
|
||||||
|
|||||||
@@ -453,6 +453,7 @@ public class WintertodtPlugin extends Plugin
|
|||||||
case WOODCUTTING_DRAGON:
|
case WOODCUTTING_DRAGON:
|
||||||
case WOODCUTTING_INFERNAL:
|
case WOODCUTTING_INFERNAL:
|
||||||
case WOODCUTTING_3A_AXE:
|
case WOODCUTTING_3A_AXE:
|
||||||
|
case WOODCUTTING_CRYSTAL:
|
||||||
setActivity(WintertodtActivity.WOODCUTTING);
|
setActivity(WintertodtActivity.WOODCUTTING);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import static net.runelite.api.AnimationID.WOODCUTTING_3A_AXE;
|
|||||||
import static net.runelite.api.AnimationID.WOODCUTTING_ADAMANT;
|
import static net.runelite.api.AnimationID.WOODCUTTING_ADAMANT;
|
||||||
import static net.runelite.api.AnimationID.WOODCUTTING_BLACK;
|
import static net.runelite.api.AnimationID.WOODCUTTING_BLACK;
|
||||||
import static net.runelite.api.AnimationID.WOODCUTTING_BRONZE;
|
import static net.runelite.api.AnimationID.WOODCUTTING_BRONZE;
|
||||||
|
import static net.runelite.api.AnimationID.WOODCUTTING_CRYSTAL;
|
||||||
import static net.runelite.api.AnimationID.WOODCUTTING_DRAGON;
|
import static net.runelite.api.AnimationID.WOODCUTTING_DRAGON;
|
||||||
import static net.runelite.api.AnimationID.WOODCUTTING_INFERNAL;
|
import static net.runelite.api.AnimationID.WOODCUTTING_INFERNAL;
|
||||||
import static net.runelite.api.AnimationID.WOODCUTTING_IRON;
|
import static net.runelite.api.AnimationID.WOODCUTTING_IRON;
|
||||||
@@ -42,6 +43,7 @@ import static net.runelite.api.AnimationID.WOODCUTTING_STEEL;
|
|||||||
import static net.runelite.api.ItemID.ADAMANT_AXE;
|
import static net.runelite.api.ItemID.ADAMANT_AXE;
|
||||||
import static net.runelite.api.ItemID.BLACK_AXE;
|
import static net.runelite.api.ItemID.BLACK_AXE;
|
||||||
import static net.runelite.api.ItemID.BRONZE_AXE;
|
import static net.runelite.api.ItemID.BRONZE_AXE;
|
||||||
|
import static net.runelite.api.ItemID.CRYSTAL_AXE;
|
||||||
import static net.runelite.api.ItemID.DRAGON_AXE;
|
import static net.runelite.api.ItemID.DRAGON_AXE;
|
||||||
import static net.runelite.api.ItemID.INFERNAL_AXE;
|
import static net.runelite.api.ItemID.INFERNAL_AXE;
|
||||||
import static net.runelite.api.ItemID.IRON_AXE;
|
import static net.runelite.api.ItemID.IRON_AXE;
|
||||||
@@ -63,7 +65,8 @@ enum Axe
|
|||||||
RUNE(WOODCUTTING_RUNE, RUNE_AXE),
|
RUNE(WOODCUTTING_RUNE, RUNE_AXE),
|
||||||
DRAGON(WOODCUTTING_DRAGON, DRAGON_AXE),
|
DRAGON(WOODCUTTING_DRAGON, DRAGON_AXE),
|
||||||
INFERNAL(WOODCUTTING_INFERNAL, INFERNAL_AXE),
|
INFERNAL(WOODCUTTING_INFERNAL, INFERNAL_AXE),
|
||||||
THIRDAGE(WOODCUTTING_3A_AXE, _3RD_AGE_AXE);
|
THIRDAGE(WOODCUTTING_3A_AXE, _3RD_AGE_AXE),
|
||||||
|
CRYSTAL(WOODCUTTING_CRYSTAL, CRYSTAL_AXE);
|
||||||
|
|
||||||
private final Integer animId;
|
private final Integer animId;
|
||||||
private final Integer itemId;
|
private final Integer itemId;
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ enum QuestStartLocation
|
|||||||
DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3494, 9628, 0)),
|
DARKNESS_OF_HALLOWVALE(Quest.DARKNESS_OF_HALLOWVALE, new WorldPoint(3494, 9628, 0)),
|
||||||
DEATH_PLATEAU_TROLL_STRONGHOLD(new Quest[]{Quest.DEATH_PLATEAU, Quest.TROLL_STRONGHOLD}, new WorldPoint(2895, 3528, 0)),
|
DEATH_PLATEAU_TROLL_STRONGHOLD(new Quest[]{Quest.DEATH_PLATEAU, Quest.TROLL_STRONGHOLD}, new WorldPoint(2895, 3528, 0)),
|
||||||
DEATH_TO_THE_DORGESHUUN(Quest.DEATH_TO_THE_DORGESHUUN, new WorldPoint(3316, 9613, 0)),
|
DEATH_TO_THE_DORGESHUUN(Quest.DEATH_TO_THE_DORGESHUUN, new WorldPoint(3316, 9613, 0)),
|
||||||
THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1846, 3556, 0)),
|
THE_DEPTHS_OF_DESPAIR(Quest.THE_DEPTHS_OF_DESPAIR, new WorldPoint(1780, 3569, 0)),
|
||||||
DESERT_TREASURE(Quest.DESERT_TREASURE, new WorldPoint(3177, 3043, 0)),
|
DESERT_TREASURE(Quest.DESERT_TREASURE, new WorldPoint(3177, 3043, 0)),
|
||||||
DEVIOUS_MINDS(Quest.DEVIOUS_MINDS, new WorldPoint(3405, 3492, 0)),
|
DEVIOUS_MINDS(Quest.DEVIOUS_MINDS, new WorldPoint(3405, 3492, 0)),
|
||||||
THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3337, 0)),
|
THE_DIG_SITE(Quest.THE_DIG_SITE, new WorldPoint(3363, 3337, 0)),
|
||||||
|
|||||||
@@ -266,4 +266,94 @@ public class ChatCommandsPluginTest
|
|||||||
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("prifddinas agility course"), eq(61));
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("prifddinas agility course"), eq(61));
|
||||||
verify(configManager).setConfiguration(eq("killcount.adam"), eq("prifddinas agility course"), eq(2));
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("prifddinas agility course"), eq(2));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testZukNewPb()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your TzKal-Zuk kill count is: <col=ff0000>2</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Duration: <col=ff0000>104:31</col> (new personal best)", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("tzkal-zuk"), eq(104 * 60 + 31));
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("tzkal-zuk"), eq(2));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testZukKill()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your TzKal-Zuk kill count is: <col=ff0000>3</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Duration: <col=ff0000>172:18</col>. Personal best: 134:52", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("tzkal-zuk"), eq(134 * 60 + 52));
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("tzkal-zuk"), eq(3));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGgNewPb()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Fight duration: <col=ff0000>1:36</col> (new personal best)", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Grotesque Guardians kill count is: <col=ff0000>179</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("grotesque guardians"), eq(96));
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("grotesque guardians"), eq(179));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGgKill()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Fight duration: <col=ff0000>2:41</col>. Personal best: 2:14", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Grotesque Guardians kill count is: <col=ff0000>32</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("grotesque guardians"), eq(2 * 60 + 14));
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("grotesque guardians"), eq(32));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGuantletPersonalBest()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Challenge duration: <col=ff0000>10:24</col>. Personal best: 7:59.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Gauntlet completion count is: <col=ff0000>124</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("gauntlet"), eq(124));
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("gauntlet"), eq(7 * 60 + 59));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testGuantletNewPersonalBest()
|
||||||
|
{
|
||||||
|
when(client.getUsername()).thenReturn("Adam");
|
||||||
|
|
||||||
|
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Challenge duration: <col=ff0000>10:24</col> (new personal best).", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Gauntlet completion count is: <col=ff0000>124</col>.", null, 0);
|
||||||
|
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||||
|
|
||||||
|
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("gauntlet"), eq(10 * 60 + 24));
|
||||||
|
verify(configManager).setConfiguration(eq("killcount.adam"), eq("gauntlet"), eq(124));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user