Merge remote-tracking branch 'upstream/master' into master

This commit is contained in:
ThatGamerBlue
2021-06-23 13:00:32 +01:00
66 changed files with 1586 additions and 1219 deletions

View File

@@ -395,6 +395,7 @@ public class RuneLite
// Add core overlays
WidgetOverlay.createOverlays(client).forEach(overlayManager::add);
overlayManager.add(worldMapOverlay.get());
eventBus.register(worldMapOverlay.get());
overlayManager.add(tooltipOverlay.get());
playerManager.get();

View File

@@ -165,7 +165,7 @@ public class ChatIconManager
private static int clanRankToIdx(int key)
{
// keys are -5 to 264, with no 0
return key < 0 ? ~key : (key + 4);
// keys are -6 to 265, with no 0
return key < 0 ? ~key : (key + 5);
}
}

View File

@@ -109,7 +109,7 @@ public class LumbridgeDiaryRequirement extends GenericDiaryRequirement
new SkillRequirement(Skill.FARMING, 63));
add("Light your mining helmet in the Lumbridge castle basement.",
new SkillRequirement(Skill.FIREMAKING, 65));
add("Recharge your prayer at Clan Wars with Smite activated.",
add("Recharge your prayer at the Duel Arena with Smite activated.",
new SkillRequirement(Skill.PRAYER, 52));
add("Craft, string and enchant an Amulet of Power in Lumbridge.",
new SkillRequirement(Skill.CRAFTING, 70),

View File

@@ -32,6 +32,7 @@ import net.runelite.api.coords.WorldPoint;
enum Courses
{
GNOME(86.5, 46, 9781),
SHAYZIEN_BASIC(133.2, 92, 6200),
DRAYNOR(120.0, 79, 12338),
AL_KHARID(180.0, 0, 13105, new WorldPoint(3299, 3194, 0)),
PYRAMID(722.0, 0, 13356, new WorldPoint(3364, 2830, 0)),
@@ -40,6 +41,7 @@ enum Courses
BARBARIAN(139.5, 60, 10039),
CANIFIS(240.0, 175, 13878),
APE_ATOLL(580.0, 300, 11050),
SHAYZIEN_ADVANCED(474.3, 382, 5944),
FALADOR(440, 180, 12084),
WILDERNESS(571.0, 499, 11837),
WEREWOLF(730.0, 380, 14234),

View File

@@ -98,7 +98,13 @@ class Obstacles
ROPE_BRIDGE_36233, TIGHTROPE_36234, ROPE_BRIDGE_36235, TIGHTROPE_36236, TIGHTROPE_36237, DARK_HOLE_36238,
// Rellekka Lighthouse
BASALT_ROCK, BASALT_ROCK_4553, BASALT_ROCK_4554, BASALT_ROCK_4556, BASALT_ROCK_4558, ROCKY_SHORE,
BASALT_ROCK_4557, BASALT_ROCK_4555, BASALT_ROCK_4552, BEACH
BASALT_ROCK_4557, BASALT_ROCK_4555, BASALT_ROCK_4552, BEACH,
// Shayzien
LADDER_42209, MONKEYBARS_42211, TIGHTROPE_42212,
// Shayzien basic
BAR_42213, TIGHTROPE_42214, TIGHTROPE_42215, GAP_42216,
// Shayzien hard
BEAM, EDGE_42218, EDGE_42219, BEAM_42220, ZIPLINE
);
static final Set<Integer> PORTAL_OBSTACLE_IDS = ImmutableSet.of(

View File

@@ -31,13 +31,10 @@ import javax.inject.Inject;
import lombok.AllArgsConstructor;
import lombok.Getter;
import net.runelite.api.Client;
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition;
class HealerOverlay extends Overlay
@@ -74,7 +71,6 @@ class HealerOverlay extends Overlay
this.client = client;
this.plugin = plugin;
this.config = config;
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "B.A. overlay"));
}
@Override

View File

@@ -29,12 +29,9 @@ import java.awt.Graphics2D;
import java.awt.Rectangle;
import javax.inject.Inject;
import net.runelite.api.Client;
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
import net.runelite.api.widgets.Widget;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
import net.runelite.client.ui.overlay.OverlayMenuEntry;
import net.runelite.client.ui.overlay.OverlayPosition;
class TimerOverlay extends Overlay
@@ -52,7 +49,6 @@ class TimerOverlay extends Overlay
this.client = client;
this.plugin = plugin;
this.config = config;
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "B.A. overlay"));
}
@Override

View File

@@ -51,6 +51,7 @@ class ClueScrollWorldMapPoint extends WorldMapPoint
this.plugin = plugin;
this.setSnapToEdge(true);
this.setJumpOnClick(true);
this.setName("Clue Scroll");
this.setImage(clueScrollWorldImage);
this.setImagePoint(clueScrollWorldImagePoint);
}

View File

@@ -126,8 +126,8 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
new AnagramClue("O BIRDZ A ZANY EN PC", "Cap'n Izzy No-Beard", new WorldPoint(2807, 3191, 0), "Brimhaven Agility Arena", "How many Banana Trees are there in the plantation?", "33"),
new AnagramClue("OK CO", "Cook", new WorldPoint(3207, 3214, 0), "Ground floor of Lumbridge Castle", "How many cannons does Lumbridge Castle have?", "9"),
new AnagramClue("OR ZINC FUMES WARD", "Wizard Frumscone", new WorldPoint(2594, 3086, 0), "Downstairs in the Wizards' Guild"),
new AnagramClue("OUR OWN NEEDS", "Nurse Wooned", new WorldPoint(1511, 3619, 0), "Shayzien Infirmary", "How many wounded soldiers are in the camp?", "19"),
new AnagramClue("PACINNG A TAIE", "Captain Ginea", new WorldPoint(1561, 3602, 0), "Building east of Shayzien combat ring", "1 soldier can deal with 6 lizardmen. How many soldiers do we need for an army of 678 lizardmen?", "113"),
new AnagramClue("OUR OWN NEEDS", "Nurse Wooned", new WorldPoint(1511, 3619, 0), "Shayzien Infirmary", "How many wounded soldiers are in the camp?", "16"),
new AnagramClue("PACINNG A TAIE", "Captain Ginea", new WorldPoint(1504, 3632, 0), "Tent east of Shayzien Encampment war tent", "1 soldier can deal with 6 lizardmen. How many soldiers do we need for an army of 678 lizardmen?", "113"),
new AnagramClue("PEAK REFLEX", "Flax keeper", new WorldPoint(2744, 3444, 0), "Flax field south of Seers Village", "If I have 1014 flax, and I spin a third of them into bowstring, how many flax do I have left?", "676"),
new AnagramClue("PEATY PERT", "Party Pete", new WorldPoint(3047, 3376, 0), "Falador Party Room"),
new AnagramClue("PROFS LOSE WRONG PIE", "Professor Onglewip", new WorldPoint(3113, 3162, 0), "Ground floor of Wizards Tower"),
@@ -149,7 +149,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
new AnagramClue("TEN WIGS ON", "Wingstone", new WorldPoint(3389, 2877, 0), "Between Nardah & Agility Pyramid"),
new AnagramClue("THEM CAL CAME", "Cam the Camel", new WorldPoint(3300, 3231, 0), "Just outside of the Duel Arena"),
new AnagramClue("THICKNO", "Hickton", new WorldPoint(2822, 3442, 0), "Catherby fletching shop", "How many ranges are there in Catherby?", "2"),
new AnagramClue("TWENTY CURE IRON", "New recruit Tony", new WorldPoint(1498, 3544, 0), "Shayzien Graveyard"),
new AnagramClue("TWENTY CURE IRON", "New recruit Tony", new WorldPoint(1503, 3553, 0), "Shayzien Graveyard"),
new AnagramClue("UNLEASH NIGHT MIST", "Sigli the Huntsman", new WorldPoint(2660, 3654, 0), "Rellekka", "What is the combined slayer requirement of every monster in the slayer cave?", "302"),
new AnagramClue("VESTE", "Steve", new WorldPoint(2432, 3423, 0), "Upstairs Wyvern Area or Stronghold Slayer Cave", "How many farming patches are there in Gnome stronghold?", "2"),
new AnagramClue("VEIL VEDA", "Evil Dave", new WorldPoint(3079, 9892, 0), "Doris' basement, Edgeville", "What is 333 multiplied by 2?", "666"),
@@ -167,7 +167,8 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc
new AnagramClue("TAUNT ROOF", "Fortunato", new WorldPoint(3080, 3250, 0), "Draynor Village Market"),
new AnagramClue("HICK JET", "Jethick", new WorldPoint(2541, 3305, 0), "West Ardougne", "How many graves are there in the city graveyard?", "38"),
new AnagramClue("RUE GO", "Goreu", new WorldPoint(2335, 3162, 0), "Lletya"),
new AnagramClue("BRUCIE CATNAP", "Captain Bruce", new WorldPoint(1520, 3558, 0), "Graveyard of Heroes")
new AnagramClue("BRUCIE CATNAP", "Captain Bruce", new WorldPoint(1520, 3558, 0), "Graveyard of Heroes"),
new AnagramClue("UESNKRL NRIEDDO", "Drunken soldier", new WorldPoint(1551, 3565, 0), "Shayzien pub", "If 13 Shayzien Soldiers kill 46 Lizardmen each in a day, how many Lizardmen have they killed in total in a single day?", "598")
);
private final String text;

View File

@@ -111,7 +111,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati
.put(new WorldPoint(2363, 3531, 0), new CoordinateClueInfo("North-east of Eagles' Peak (AKQ)."))
.put(new WorldPoint(2919, 3535, 0), new CoordinateClueInfo("East of Burthorpe pub."))
.put(new WorldPoint(3548, 3560, 0), new CoordinateClueInfo("Inside Fenkenstrain's Castle."))
.put(new WorldPoint(1476, 3566, 0), new CoordinateClueInfo("Graveyard of Heroes west of Shayzien (DJR)."))
.put(new WorldPoint(1476, 3566, 0), new CoordinateClueInfo("Graveyard of Heroes in west Shayzien."))
.put(new WorldPoint(2735, 3638, 0), new CoordinateClueInfo("East of Rellekka, north-west of Golden Apple Tree (AJR)."))
.put(new WorldPoint(2681, 3653, 0), new CoordinateClueInfo("Rellekka, in the garden of the south-east house."))
.put(new WorldPoint(2537, 3881, 0), new CoordinateClueInfo("Miscellania (CIP)."))

View File

@@ -324,7 +324,12 @@ public class CrypticClue extends ClueScroll implements TextClueScroll, NpcClueSc
new CrypticClue("Observing someone in a swamp, under the telescope lies treasure.", new WorldPoint(2221, 3091, 0), "Dig next to the telescope on Broken Handz's island in the poison wastes. (Accessible only through fairy ring DLR)"),
new CrypticClue("A general who sets a 'shining' example.", "General Hining", new WorldPoint(2186, 3148, 0), "Talk to General Hining in Tyras Camp."),
new CrypticClue("Has no one told you it is rude to ask a lady her age?", "Mawrth", new WorldPoint(2333, 3165, 0), "Talk to Mawrth in Lletya."),
new CrypticClue("Elvish onions.", new WorldPoint(3303, 6092, 0), "Dig in the onion patch east of the Prifddinas allotments.")
new CrypticClue("Elvish onions.", new WorldPoint(3303, 6092, 0), "Dig in the onion patch east of the Prifddinas allotments."),
new CrypticClue("Dig by the Giant's Den entrance, looking out over Lake Molch.", new WorldPoint(1418, 3591, 0), "South-east of Lake Molch in Zeah, outside the cave entrance."),
new CrypticClue("Search the crates in the fruit store just east of the Hosidius town centre.", CRATES_27533, new WorldPoint(1798, 3612, 0), "Search the crates in the back room of the Hosidius fruit store."),
new CrypticClue("A graceful man of many colours, his crates must be full of many delights.", "Hill Giant", CRATE_42067, new WorldPoint(1506, 3591, 2), "Kill any Hill Giant for a medium key. Then search the crate on the top floor of Osten's clothing shop in Shayzien."),
new CrypticClue("Search the basket of apples in an orchard, south of the unknown grave surrounded by white roses.", APPLE_BASKET, new WorldPoint(1718, 3626, 0), "Search the middle apple basket in the apple orchard north of Hosidius."),
new CrypticClue("Dig in the lair of red wings, within the temple of the Sun and Moon.", new WorldPoint(1820, 9935, 0), "Forthos Dungeon. In the center of the red dragons.")
);
private final String text;

View File

@@ -83,7 +83,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
new EmoteClue("Beckon by a collection of crystalline maple trees. Beware of double agents! Equip Bryophyta's staff and a nature tiara.", "North of Prifddinas", CRYSTALLINE_MAPLE_TREES, new WorldPoint(2211, 3427, 0), DOUBLE_AGENT_141, BECKON, range("Bryophyta's staff", BRYOPHYTAS_STAFF_UNCHARGED, BRYOPHYTAS_STAFF), item(NATURE_TIARA)),
new EmoteClue("Beckon in the Digsite, near the eastern winch. Bow before you talk to me. Equip a green gnome hat, snakeskin boots and an iron pickaxe.", "Digsite", DIGSITE, new WorldPoint(3370, 3425, 0), BECKON, BOW, item(GREEN_HAT), item(SNAKESKIN_BOOTS), item(IRON_PICKAXE)),
new EmoteClue("Beckon in Tai Bwo Wannai. Clap before you talk to me. Equip green dragonhide chaps, a ring of dueling and a mithril medium helmet.", "Tai Bwo Wannai", SOUTH_OF_THE_SHRINE_IN_TAI_BWO_WANNAI_VILLAGE, new WorldPoint(2803, 3073, 0), BECKON, CLAP, item(GREEN_DHIDE_CHAPS), any("Ring of dueling", item(RING_OF_DUELING1), item(RING_OF_DUELING2), item(RING_OF_DUELING3), item(RING_OF_DUELING4), item(RING_OF_DUELING5), item(RING_OF_DUELING6), item(RING_OF_DUELING7), item(RING_OF_DUELING8)), item(MITHRIL_MED_HELM)),
new EmoteClue("Beckon in the combat ring of Shayzien. Show your anger before you talk to me. Equip an adamant platebody, adamant full helm and adamant platelegs.", "Shayzien combat ring", WEST_OF_THE_SHAYZIEN_COMBAT_RING, new WorldPoint(1545, 3594, 0), BECKON, ANGRY, item(ADAMANT_PLATELEGS), item(ADAMANT_PLATEBODY), item(ADAMANT_FULL_HELM)),
new EmoteClue("Beckon in the Shayzien Combat Ring. Show your anger before you talk to me. Equip an adamant platebody, adamant full helm and adamant platelegs.", "Shayzien Combat Ring", WEST_OF_THE_SHAYZIEN_COMBAT_RING, new WorldPoint(1543, 3623, 0), BECKON, ANGRY, item(ADAMANT_PLATELEGS), item(ADAMANT_PLATEBODY), item(ADAMANT_FULL_HELM)),
new EmoteClue("Bow near Lord Iorwerth. Beware of double agents! Equip a charged crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), DOUBLE_AGENT_141, BOW, any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))),
new EmoteClue("Bow in the Iorwerth Camp. Beware of double agents! Equip a charged crystal bow.", "Lord Iorwerth's camp", TENT_IN_LORD_IORWERTHS_ENCAMPMENT, new WorldPoint(2205, 3252, 0), DOUBLE_AGENT_141, BOW, any("Crystal Bow", item(CRYSTAL_BOW), item(CRYSTAL_BOW_24123))),
new EmoteClue("Bow outside the entrance to the Legends' Guild. Equip iron platelegs, an emerald amulet and an oak longbow.", "Legend's Guild", OUTSIDE_THE_LEGENDS_GUILD_GATES, new WorldPoint(2729, 3349, 0), BOW, item(IRON_PLATELEGS), item(OAK_LONGBOW), item(EMERALD_AMULET)),
@@ -151,7 +151,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
new EmoteClue("Shrug in the mine near Rimmington. Equip a gold necklace, a gold ring and a bronze spear.", "Rimmington mine", RIMMINGTON_MINE, new WorldPoint(2976, 3238, 0), SHRUG, item(GOLD_NECKLACE), item(GOLD_RING), item(BRONZE_SPEAR)),
new EmoteClue("Shrug in Catherby bank. Yawn before you talk to me. Equip a maple longbow, green d'hide chaps and an iron med helm.", "Catherby", OUTSIDE_CATHERBY_BANK, new WorldPoint(2808, 3440, 0), SHRUG, YAWN, item(MAPLE_LONGBOW), item(GREEN_DHIDE_CHAPS), item(IRON_MED_HELM)),
new EmoteClue("Shrug in the Zamorak temple found in the Eastern Wilderness. Beware of double agents! Equip rune platelegs, an iron platebody and blue dragonhide vambraces.", "Chaos temple", CHAOS_TEMPLE_IN_THE_SOUTHEASTERN_WILDERNESS, new WorldPoint(3239, 3611, 0), DOUBLE_AGENT_65, SHRUG, item(RUNE_PLATELEGS), item(IRON_PLATEBODY), item(BLUE_DHIDE_VAMBRACES)),
new EmoteClue("Shrug in the Shayzien command tent. Equip a blue mystic robe bottom, a rune kiteshield and any bob shirt.", "Shayzien command tent", SHAYZIEN_WAR_TENT, new WorldPoint(1555, 3537, 0), SHRUG, item(MYSTIC_ROBE_BOTTOM), item(RUNE_KITESHIELD), range("Any bob shirt", BOBS_RED_SHIRT, BOBS_PURPLE_SHIRT)),
new EmoteClue("Shrug in the Shayzien war tent. Equip a blue mystic robe bottom, a rune kiteshield and any bob shirt.", "Shayzien war tent", SHAYZIEN_WAR_TENT, new WorldPoint(1487, 3635, 0), SHRUG, item(MYSTIC_ROBE_BOTTOM), item(RUNE_KITESHIELD), range("Any bob shirt", BOBS_RED_SHIRT, BOBS_PURPLE_SHIRT)),
new EmoteClue("Slap your head in the centre of the Kourend catacombs. Beware of double agents! Equip the arclight and the amulet of the damned.", "Kourend catacombs", CENTRE_OF_THE_CATACOMBS_OF_KOUREND, new WorldPoint(1663, 10045, 0), DOUBLE_AGENT_141, SLAP_HEAD, item(ARCLIGHT), any("Amulet of the damned", item(AMULET_OF_THE_DAMNED), item(AMULET_OF_THE_DAMNED_FULL))),
new EmoteClue("Spin at the crossroads north of Rimmington. Equip a green gnome hat, cream gnome top and leather chaps.", "Rimmington", ROAD_JUNCTION_NORTH_OF_RIMMINGTON, new WorldPoint(2981, 3276, 0), SPIN, item(GREEN_HAT), item(CREAM_ROBE_TOP), item(LEATHER_CHAPS)),
new EmoteClue("Spin in Draynor Manor by the fountain. Equip an iron platebody, studded leather chaps and a bronze full helmet.", "Draynor Manor", DRAYNOR_MANOR_BY_THE_FOUNTAIN, new WorldPoint(3088, 3336, 0), SPIN, item(IRON_PLATEBODY), item(STUDDED_CHAPS), item(BRONZE_FULL_HELM)),
@@ -172,14 +172,15 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
new EmoteClue("Yawn in the Castle Wars lobby. Shrug before you talk to me. Equip a ruby amulet, a mithril scimitar and a Wilderness cape.", "Castle Wars", CASTLE_WARS_BANK, new WorldPoint(2440, 3092, 0), YAWN, SHRUG, item(RUBY_AMULET), item(MITHRIL_SCIMITAR), range("Any team cape", TEAM1_CAPE, TEAM50_CAPE)),
new EmoteClue("Yawn in the rogues' general store. Beware of double agents! Equip an adamant square shield, blue dragon vambraces and a rune pickaxe.", "Rogues general store", NOTERAZZOS_SHOP_IN_THE_WILDERNESS, new WorldPoint(3026, 3701, 0), DOUBLE_AGENT_65, YAWN, item(ADAMANT_SQ_SHIELD), item(BLUE_DHIDE_VAMBRACES), item(RUNE_PICKAXE)),
new EmoteClue("Yawn at the top of Trollheim. Equip a lava battlestaff, black dragonhide vambraces and a mind shield.", "Trollheim Mountain", ON_TOP_OF_TROLLHEIM_MOUNTAIN, new WorldPoint(2887, 3676, 0), YAWN, any("Lava battlestaff", item(LAVA_BATTLESTAFF), item(LAVA_BATTLESTAFF_21198)), item(BLACK_DHIDE_VAMBRACES), item(MIND_SHIELD)),
new EmoteClue("Yawn in the centre of Arceuus library. Nod your head before you talk to me. Equip blue dragonhide vambraces, adamant boots and an adamant dagger.", "Arceuus library", ENTRANCE_OF_THE_ARCEUUS_LIBRARY, new WorldPoint(1632, 3807, 0), YAWN, YES, item(BLUE_DHIDE_VAMBRACES), item(ADAMANT_BOOTS), item(ADAMANT_DAGGER)),
new EmoteClue("Yawn in the centre of the Arceuus Library. Nod your head before you talk to me. Equip blue dragonhide vambraces, adamant boots and an adamant dagger.", "Arceuus library", ENTRANCE_OF_THE_ARCEUUS_LIBRARY, new WorldPoint(1632, 3807, 0), YAWN, YES, item(BLUE_DHIDE_VAMBRACES), item(ADAMANT_BOOTS), item(ADAMANT_DAGGER)),
new EmoteClue("Swing a bullroarer at the top of the Watchtower. Beware of double agents! Equip a dragon plateskirt, climbing boots and a dragon chainbody.", "Yanille Watchtower", TOP_FLOOR_OF_THE_YANILLE_WATCHTOWER, new WorldPoint(2930, 4717, 2), DOUBLE_AGENT_141, BULL_ROARER, any("Dragon plateskirt", item(DRAGON_PLATESKIRT), item(DRAGON_PLATESKIRT_G)), item(CLIMBING_BOOTS), any("Dragon chainbody", item(DRAGON_CHAINBODY_3140), item(DRAGON_CHAINBODY_G)), item(ItemID.BULL_ROARER)),
new EmoteClue("Blow a raspberry at Gypsy Aris in her tent. Equip a gold ring and a gold necklace.", "Varrock", GYPSY_TENT_ENTRANCE, new WorldPoint(3203, 3424, 0), RASPBERRY, item(GOLD_RING), item(GOLD_NECKLACE)),
new EmoteClue("Bow to Brugsen Bursen at the Grand Exchange.", "Grand Exchange", null, new WorldPoint(3164, 3477, 0), BOW),
new EmoteClue("Cheer at Iffie Nitter. Equip a chef hat and a red cape.", "Varrock", FINE_CLOTHES_ENTRANCE, new WorldPoint(3205, 3416, 0), CHEER, item(CHEFS_HAT), item(RED_CAPE)),
new EmoteClue("Clap at Bob's Brilliant Axes. Equip a bronze axe and leather boots.", "Lumbridge", BOB_AXES_ENTRANCE, new WorldPoint(3231, 3203, 0), CLAP, item(BRONZE_AXE), item(LEATHER_BOOTS)),
new EmoteClue("Panic at Al Kharid mine.", "Al Kharid mine", null, new WorldPoint(3300, 3314, 0), PANIC),
new EmoteClue("Spin at Flynn's Mace Shop.", "Falador", null, new WorldPoint(2950, 3387, 0), SPIN));
new EmoteClue("Spin at Flynn's Mace Shop.", "Falador", null, new WorldPoint(2950, 3387, 0), SPIN),
new EmoteClue("Salute by the Charcoal Burners. Equip a Farmer's strawhat, Shayzien platebody (5) and Pyromancer robes.", "Charcoal Burners", CHARCOAL_BURNERS, new WorldPoint(1714, 3467, 0), SALUTE, any("Farmer's strawhat", item(FARMERS_STRAWHAT), item(FARMERS_STRAWHAT_13647)), item(SHAYZIEN_PLATEBODY_5), item(PYROMANCER_ROBE)));
private static final String UNICODE_CHECK_MARK = "\u2713";
private static final String UNICODE_BALLOT_X = "\u2717";

View File

@@ -79,7 +79,7 @@ public enum STASHUnit
OUTSIDE_HARRYS_FISHING_SHOP_IN_CATHERBY(NullObjectID.NULL_29003, new WorldPoint(2837, 3436, 0)),
TZHAAR_WEAPONS_STORE(NullObjectID.NULL_29004, new WorldPoint(2479, 5146, 0)),
NORTH_OF_EVIL_DAVES_HOUSE_IN_EDGEVILLE(NullObjectID.NULL_29005, new WorldPoint(3077, 3503, 0)),
WEST_OF_THE_SHAYZIEN_COMBAT_RING(NullObjectID.NULL_29006, new WorldPoint(1534, 3591, 0)),
WEST_OF_THE_SHAYZIEN_COMBAT_RING(NullObjectID.NULL_29006, new WorldPoint(1541, 3631, 0)),
ENTRANCE_OF_THE_ARCEUUS_LIBRARY(NullObjectID.NULL_29007, new WorldPoint(1642, 3809, 0)),
OUTSIDE_DRAYNOR_VILLAGE_JAIL(NullObjectID.NULL_29008, new WorldPoint(3130, 3250, 0)),
CHAOS_TEMPLE_IN_THE_SOUTHEASTERN_WILDERNESS(NullObjectID.NULL_29009, new WorldPoint(3245, 3609, 0)),
@@ -109,7 +109,7 @@ public enum STASHUnit
FOUNTAIN_OF_HEROES(NullObjectID.NULL_29033, new WorldPoint(2916, 9891, 0)),
ENTRANCE_OF_THE_CAVERN_UNDER_THE_WHIRLPOOL(NullObjectID.NULL_29034, new WorldPoint(1764, 5367, 1), new WorldPoint(1636, 5367, 1)),
HALFWAY_DOWN_TROLLWEISS_MOUNTAIN(NullObjectID.NULL_29035, new WorldPoint(2782, 3787, 0)),
SHAYZIEN_WAR_TENT(NullObjectID.NULL_29036, new WorldPoint(1550, 3541, 0)),
SHAYZIEN_WAR_TENT(NullObjectID.NULL_29036, new WorldPoint(1488, 3637, 0)),
OUTSIDE_THE_LEGENDS_GUILD_DOOR(NullObjectID.NULL_29037, new WorldPoint(2727, 3371, 0)),
NEAR_THE_GEM_STALL_IN_ARDOUGNE_MARKET(NullObjectID.NULL_29038, new WorldPoint(2672, 3302, 0)),
OUTSIDE_THE_BAR_BY_THE_FIGHT_ARENA(NullObjectID.NULL_29039, new WorldPoint(2571, 3150, 0)),
@@ -138,7 +138,9 @@ public enum STASHUnit
GYPSY_TENT_ENTRANCE(NullObjectID.NULL_34736, new WorldPoint(3206, 3422, 0)),
FINE_CLOTHES_ENTRANCE(NullObjectID.NULL_34737, new WorldPoint(3209, 3416, 0)),
BOB_AXES_ENTRANCE(NullObjectID.NULL_34738, new WorldPoint(3233, 3200, 0)),
CRYSTALLINE_MAPLE_TREES(NullObjectID.NULL_34953, new WorldPoint(2213, 3427, 0));
CRYSTALLINE_MAPLE_TREES(NullObjectID.NULL_34953, new WorldPoint(2213, 3427, 0)),
CHARCOAL_BURNERS(NullObjectID.NULL_41758, new WorldPoint(1712, 3469, 0)),
;
private final int objectId;
private final WorldPoint[] worldPoints;

View File

@@ -185,7 +185,7 @@ public enum HotColdLocation
ZEAH_PISCARILUS_MINE(MASTER, new WorldPoint(1768, 3705, 0), ZEAH, "South of the Piscarilius mine.", ANCIENT_WIZARDS),
ZEAH_GOLDEN_FIELD_TAVERN(MASTER, new WorldPoint(1718, 3643, 0), ZEAH, "South of the gravestone in Kingstown.", BRASSICAN_MAGE),
ZEAH_MESS_HALL(MASTER, new WorldPoint(1656, 3621, 0), ZEAH, "East of the Mess hall.", ANCIENT_WIZARDS),
ZEAH_WATSONS_HOUSE(MASTER, new WorldPoint(1653, 3573, 0), ZEAH, "East of Watson's house.", ANCIENT_WIZARDS),
ZEAH_WATSONS_HOUSE(MASTER, new WorldPoint(1653, 3573, 0), ZEAH, "East of Watson's house.", BRASSICAN_MAGE),
ZEAH_VANNAHS_FARM_STORE(MASTER, new WorldPoint(1807, 3523, 0), ZEAH, "North of Tithe Farm, next to the pond.", BRASSICAN_MAGE),
ZEAH_FARMING_GUILD_W(MASTER, new WorldPoint(1208, 3736, 0), ZEAH, "West of the Farming Guild.", BRASSICAN_MAGE),
ZEAH_DAIRY_COW(MASTER, new WorldPoint(1324, 3722, 0), ZEAH, "North-east of the Kebos Lowlands, east of the dairy cow.", BRASSICAN_MAGE),

View File

@@ -29,7 +29,6 @@ import javax.inject.Inject;
import net.runelite.api.Client;
import net.runelite.api.events.GameTick;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.crowdsourcing.CrowdsourcingManager;
@@ -44,6 +43,7 @@ public class CrowdsourcingDialogue
@Inject
private CrowdsourcingManager manager;
private boolean inDialogue = false;
private String lastNpcDialogueText = null;
private String lastPlayerDialogueText = null;
private Widget[] dialogueOptions;
@@ -58,6 +58,23 @@ public class CrowdsourcingDialogue
public void onGameTick(GameTick tick)
{
Widget npcDialogueTextWidget = client.getWidget(WidgetInfo.DIALOG_NPC_TEXT);
Widget playerDialogueTextWidget = client.getWidget(WidgetInfo.DIALOG_PLAYER_TEXT);
Widget playerDialogueOptionsWidget = client.getWidget(WidgetInfo.DIALOG_OPTION_OPTIONS);
// If we were not in a conversation, but now one of these widgets is not null, we have started a conversation.
// Else if we were in a conversation, but now there is no widget, we have left the conversation.
if (!inDialogue && (npcDialogueTextWidget != null || playerDialogueTextWidget != null || playerDialogueOptionsWidget != null))
{
inDialogue = true;
manager.storeEvent(new StartEndData(true));
}
else if (inDialogue && npcDialogueTextWidget == null && playerDialogueTextWidget == null
&& playerDialogueOptionsWidget == null)
{
inDialogue = false;
manager.storeEvent(new StartEndData(false));
}
if (npcDialogueTextWidget != null && !npcDialogueTextWidget.getText().equals(lastNpcDialogueText))
{
lastNpcDialogueText = npcDialogueTextWidget.getText();
@@ -66,7 +83,6 @@ public class CrowdsourcingDialogue
manager.storeEvent(data);
}
Widget playerDialogueTextWidget = client.getWidget(WidgetID.DIALOG_PLAYER_GROUP_ID, 4);
if (playerDialogueTextWidget != null && !playerDialogueTextWidget.getText().equals(lastPlayerDialogueText))
{
lastPlayerDialogueText = playerDialogueTextWidget.getText();
@@ -74,7 +90,6 @@ public class CrowdsourcingDialogue
manager.storeEvent(data);
}
Widget playerDialogueOptionsWidget = client.getWidget(WidgetID.DIALOG_OPTION_GROUP_ID, 1);
if (playerDialogueOptionsWidget != null && playerDialogueOptionsWidget.getChildren() != dialogueOptions)
{
dialogueOptions = playerDialogueOptionsWidget.getChildren();

View File

@@ -0,0 +1,36 @@
/*
* Copyright (c) 2021, Weird Gloop <admin@weirdgloop.org>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.plugins.crowdsourcing.dialogue;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class StartEndData
{
private final boolean isStart;
}

View File

@@ -79,7 +79,7 @@ class WorldMapRegionOverlay extends Overlay
{
RenderOverview ro = client.getRenderOverview();
Widget map = client.getWidget(WidgetInfo.WORLD_MAP_VIEW);
Float pixelsPerTile = ro.getWorldMapZoom();
float pixelsPerTile = ro.getWorldMapZoom();
if (map == null)
{

View File

@@ -32,7 +32,6 @@ import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.inject.Named;
@@ -250,27 +249,16 @@ class DiscordState
final Duration actionTimeout = Duration.ofMinutes(config.actionTimeout());
final Instant now = Instant.now();
final AtomicBoolean updatedAny = new AtomicBoolean();
final boolean removedAny = events.removeAll(events.stream()
// Only include clearable events
.filter(event -> event.getType().isShouldBeCleared())
// Find only events that should time out
.filter(event -> event.getType().isShouldTimeout() && now.isAfter(event.getUpdated().plus(actionTimeout)))
// Reset start times on timed events that should restart
.peek(event ->
{
if (event.getType().isShouldRestart())
{
event.setStart(null);
updatedAny.set(true);
}
})
// Now filter out events that should restart as we do not want to remove them
.filter(event -> !event.getType().isShouldRestart())
.filter(event -> event.getType().isShouldBeCleared())
.collect(Collectors.toList())
);
if (removedAny || updatedAny.get())
if (removedAny)
{
updatePresenceWithLatestEvent();
}

View File

@@ -43,6 +43,7 @@ public enum LoginScreenOverride
MONKEY_MADNESS_2("mm2.jpg"),
PRIFDDINAS("prifddinas.jpg"),
THEATRE_OF_BLOOD("tob.jpg"),
A_KINGDOM_DIVIDED("akd.jpg"),
CUSTOM;
@Getter

View File

@@ -67,6 +67,7 @@ import net.runelite.api.InventoryID;
import net.runelite.api.ItemComposition;
import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.MenuAction;
import net.runelite.api.MessageNode;
import net.runelite.api.NPC;
import net.runelite.api.ObjectID;
@@ -817,52 +818,70 @@ public class LootTrackerPlugin extends Plugin
{
// There are some pickpocket targets who show up in the chat box with a different name (e.g. H.A.M. members -> man/woman)
// We use the value selected from the right-click menu as a fallback for the event lookup in those cases.
if (event.getMenuOption().equals("Pickpocket"))
if (isNPCOp(event.getMenuAction()) && event.getMenuOption().equals("Pickpocket"))
{
lastPickpocketTarget = Text.removeTags(event.getMenuTarget());
}
if (event.getMenuOption().equals("Take") && event.getId() == ItemID.SEED_PACK)
{
setEvent(LootRecordType.EVENT, SEEDPACK_EVENT);
takeInventorySnapshot();
}
if (event.getMenuOption().equals("Open") && SHADE_CHEST_OBJECTS.containsKey(event.getId()))
else if (isObjectOp(event.getMenuAction()) && event.getMenuOption().equals("Open") && SHADE_CHEST_OBJECTS.containsKey(event.getId()))
{
setEvent(LootRecordType.EVENT, SHADE_CHEST_OBJECTS.get(event.getId()));
takeInventorySnapshot();
}
if (event.getMenuOption().equals("Search") && BIRDNEST_IDS.contains(event.getId()))
else if (isItemOp(event.getMenuAction()))
{
setEvent(LootRecordType.EVENT, BIRDNEST_EVENT, event.getId());
takeInventorySnapshot();
if (event.getMenuOption().equals("Take") && event.getId() == ItemID.SEED_PACK)
{
setEvent(LootRecordType.EVENT, SEEDPACK_EVENT);
takeInventorySnapshot();
}
else if (event.getMenuOption().equals("Search") && BIRDNEST_IDS.contains(event.getId()))
{
setEvent(LootRecordType.EVENT, BIRDNEST_EVENT, event.getId());
takeInventorySnapshot();
}
else if (event.getMenuOption().equals("Open"))
{
switch (event.getId())
{
case ItemID.CASKET:
setEvent(LootRecordType.EVENT, CASKET_EVENT);
takeInventorySnapshot();
break;
case ItemID.SUPPLY_CRATE:
case ItemID.EXTRA_SUPPLY_CRATE:
setEvent(LootRecordType.EVENT, WINTERTODT_SUPPLY_CRATE_EVENT);
takeInventorySnapshot();
break;
case ItemID.SPOILS_OF_WAR:
setEvent(LootRecordType.EVENT, SPOILS_OF_WAR_EVENT);
takeInventorySnapshot();
break;
case ItemID.CASKET_25590:
setEvent(LootRecordType.EVENT, TEMPOROSS_CASKET_EVENT);
takeInventorySnapshot();
break;
}
}
}
}
if (event.getMenuOption().equals("Open") && event.getId() == ItemID.CASKET)
{
setEvent(LootRecordType.EVENT, CASKET_EVENT);
takeInventorySnapshot();
}
private static boolean isItemOp(MenuAction menuAction)
{
final int id = menuAction.getId();
return id >= MenuAction.ITEM_FIRST_OPTION.getId() && id <= MenuAction.ITEM_FIFTH_OPTION.getId();
}
if (event.getMenuOption().equals("Open") && (event.getId() == ItemID.SUPPLY_CRATE || event.getId() == ItemID.EXTRA_SUPPLY_CRATE))
{
setEvent(LootRecordType.EVENT, WINTERTODT_SUPPLY_CRATE_EVENT);
takeInventorySnapshot();
}
private static boolean isNPCOp(MenuAction menuAction)
{
final int id = menuAction.getId();
return id >= MenuAction.NPC_FIRST_OPTION.getId() && id <= MenuAction.NPC_FIFTH_OPTION.getId();
}
if (event.getMenuOption().equals("Open") && event.getId() == ItemID.SPOILS_OF_WAR)
{
setEvent(LootRecordType.EVENT, SPOILS_OF_WAR_EVENT);
takeInventorySnapshot();
}
if (event.getMenuOption().equals("Open") && event.getId() == ItemID.CASKET_25590)
{
setEvent(LootRecordType.EVENT, TEMPOROSS_CASKET_EVENT);
takeInventorySnapshot();
}
private static boolean isObjectOp(MenuAction menuAction)
{
final int id = menuAction.getId();
return (id >= MenuAction.GAME_OBJECT_FIRST_OPTION.getId() && id <= MenuAction.GAME_OBJECT_FOURTH_OPTION.getId())
|| id == MenuAction.GAME_OBJECT_FIFTH_OPTION.getId();
}
@Schedule(

View File

@@ -283,6 +283,7 @@ public class MenuEntrySwapperPlugin extends Plugin
swap("enter", "the gauntlet", "enter-corrupted", config::swapGauntlet);
swap("enter", "quick-enter", config::swapQuick);
swap("enter-crypt", "quick-enter", config::swapQuick);
swap("ring", "quick-start", config::swapQuick);
swap("pass", "quick-pass", config::swapQuick);
swap("pass", "quick pass", config::swapQuick);

View File

@@ -45,6 +45,7 @@ class PartyWorldMapPoint extends WorldMapPoint
this.member = member;
this.setSnapToEdge(true);
this.setJumpOnClick(true);
this.setName(member.getName());
this.setImagePoint(new Point(
ARROW.getWidth() / 2,
ARROW.getHeight()));

View File

@@ -76,7 +76,16 @@ enum GameTimer
DIVINE_BATTLEMAGE(ItemID.DIVINE_BATTLEMAGE_POTION4, GameTimerImageType.ITEM, "Divine Battlemage", 5, ChronoUnit.MINUTES),
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison", false),
ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom", false),
TELEBLOCK(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Teleblock", true);
TELEBLOCK(SpriteID.SPELL_TELE_BLOCK, GameTimerImageType.SPRITE, "Teleblock", true),
SHADOW_VEIL(SpriteID.SPELL_SHADOW_VEIL, GameTimerImageType.SPRITE, "Shadow veil", true),
RESURRECT_THRALL(SpriteID.SPELL_RESURRECT_SUPERIOR_SKELETON, GameTimerImageType.SPRITE, "Resurrect thrall", false),
WARD_OF_ARCEUUS(SpriteID.SPELL_WARD_OF_ARCEUUS, GameTimerImageType.SPRITE, "Ward of Arceuus", true),
DEATH_CHARGE(SpriteID.SPELL_DEATH_CHARGE, GameTimerImageType.SPRITE, "Death charge", false),
SHADOW_VEIL_COOLDOWN(SpriteID.SPELL_SHADOW_VEIL_DISABLED, GameTimerImageType.SPRITE, "Shadow veil cooldown", 30, ChronoUnit.SECONDS),
RESURRECT_THRALL_COOLDOWN(SpriteID.SPELL_RESURRECT_SUPERIOR_SKELETON_DISABLED, GameTimerImageType.SPRITE, "Resurrect thrall cooldown", 12, GAME_TICKS),
WARD_OF_ARCEUUS_COOLDOWN(SpriteID.SPELL_WARD_OF_ARCEUUS_DISABLED, GameTimerImageType.SPRITE, "Ward of Arceuus cooldown", 30, ChronoUnit.SECONDS),
DEATH_CHARGE_COOLDOWN(SpriteID.SPELL_DEATH_CHARGE_DISABLED, GameTimerImageType.SPRITE, "Death charge cooldown", 60, ChronoUnit.SECONDS),
CORRUPTION_COOLDOWN(SpriteID.SPELL_GREATER_CORRUPTION_DISABLED, GameTimerImageType.SPRITE, "Corruption cooldown", 30, ChronoUnit.SECONDS);
@Nullable
private final Duration duration;

View File

@@ -263,4 +263,24 @@ public interface TimersConfig extends Config
{
return true;
}
@ConfigItem(
keyName = "showArceuus",
name = "Arceuus spells duration",
description = "Whether to show Arceuus spellbook spell timers"
)
default boolean showArceuus()
{
return true;
}
@ConfigItem(
keyName = "showArceuusCooldown",
name = "Arceuus spells cooldown",
description = "Whether to show cooldown timers for Arceuus spellbook spells"
)
default boolean showArceuusCooldown()
{
return false;
}
}

View File

@@ -76,6 +76,7 @@ import net.runelite.client.plugins.PluginDescriptor;
import static net.runelite.client.plugins.timers.GameIndicator.VENGEANCE_ACTIVE;
import static net.runelite.client.plugins.timers.GameTimer.*;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import net.runelite.client.util.RSTimeUnit;
import org.apache.commons.lang3.ArrayUtils;
@PluginDescriptor(
@@ -113,6 +114,14 @@ public class TimersPlugin extends Plugin
private static final String KILLED_TELEBLOCK_OPPONENT_TEXT = "Your Tele Block has been removed because you killed ";
private static final String PRAYER_ENHANCE_EXPIRED = "<col=ff0000>Your prayer enhance effect has worn off.</col>";
private static final String ENDURANCE_EFFECT_MESSAGE = "Your Ring of endurance doubles the duration of your stamina potion's effect.";
private static final String SHADOW_VEIL_MESSAGE = ">Your thieving abilities have been enhanced.</col>";
private static final String DEATH_CHARGE_MESSAGE = ">Upon the death of your next foe, some of your special attack energy will be restored.</col>";
private static final String DEATH_CHARGE_ACTIVATE_MESSAGE = ">Some of your special attack energy has been restored.</col>";
private static final String RESURRECT_THRALL_MESSAGE_START = ">You resurrect a ";
private static final String RESURRECT_THRALL_MESSAGE_END = " thrall.</col>";
private static final String RESURRECT_THRALL_DISAPPEAR_MESSAGE_START = ">Your ";
private static final String RESURRECT_THRALL_DISAPPEAR_MESSAGE_END = " thrall returns to the grave.</col>";
private static final String WARD_OF_ARCEUUS_MESSAGE = ">Your defence against Arceuus magic has been strengthened.</col>";
private static final Pattern TELEBLOCK_PATTERN = Pattern.compile("A Tele Block spell has been cast on you(?: by .+)?\\. It will expire in (?<mins>\\d+) minutes?(?:, (?<secs>\\d+) seconds?)?\\.");
private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\.");
@@ -138,6 +147,7 @@ public class TimersPlugin extends Plugin
private int lastIsVengeancedVarb;
private int lastPoisonVarp;
private int lastPvpVarb;
private int lastCorruptionVarb;
private int nextPoisonTick;
private WorldPoint lastPoint;
private TeleportWidget lastTeleportClicked;
@@ -202,6 +212,7 @@ public class TimersPlugin extends Plugin
int isVengeancedVarb = client.getVar(Varbits.VENGEANCE_ACTIVE);
int poisonVarp = client.getVar(VarPlayer.POISON);
int pvpVarb = client.getVar(Varbits.PVP_SPEC_ORB);
int corruptionCooldownVarb = client.getVar(Varbits.CORRUPTION_COOLDOWN);
if (lastRaidVarb != raidVarb)
{
@@ -224,6 +235,20 @@ public class TimersPlugin extends Plugin
lastVengCooldownVarb = vengCooldownVarb;
}
if (lastCorruptionVarb != corruptionCooldownVarb && config.showArceuusCooldown())
{
if (corruptionCooldownVarb == 1)
{
createGameTimer(CORRUPTION_COOLDOWN);
}
else
{
removeGameTimer(CORRUPTION_COOLDOWN);
}
lastCorruptionVarb = corruptionCooldownVarb;
}
if (lastIsVengeancedVarb != isVengeancedVarb && config.showVengeanceActive())
{
if (isVengeancedVarb == 1)
@@ -665,6 +690,55 @@ public class TimersPlugin extends Plugin
}
}
if (config.showArceuus())
{
Duration duration = Duration.of(client.getRealSkillLevel(Skill.MAGIC), RSTimeUnit.GAME_TICKS);
if (message.endsWith(SHADOW_VEIL_MESSAGE))
{
createGameTimer(SHADOW_VEIL, duration);
}
else if (message.endsWith(WARD_OF_ARCEUUS_MESSAGE))
{
createGameTimer(WARD_OF_ARCEUUS, duration);
}
else if (message.endsWith(DEATH_CHARGE_MESSAGE))
{
createGameTimer(DEATH_CHARGE, duration);
}
else if (message.endsWith(DEATH_CHARGE_ACTIVATE_MESSAGE))
{
removeGameTimer(DEATH_CHARGE);
}
else if (message.contains(RESURRECT_THRALL_MESSAGE_START) && message.endsWith(RESURRECT_THRALL_MESSAGE_END))
{
createGameTimer(RESURRECT_THRALL, duration);
}
else if (message.contains(RESURRECT_THRALL_DISAPPEAR_MESSAGE_START) && message.endsWith(RESURRECT_THRALL_DISAPPEAR_MESSAGE_END))
{
removeGameTimer(RESURRECT_THRALL);
}
}
if (config.showArceuusCooldown())
{
if (message.endsWith(SHADOW_VEIL_MESSAGE))
{
createGameTimer(SHADOW_VEIL_COOLDOWN);
}
else if (message.endsWith(DEATH_CHARGE_MESSAGE))
{
createGameTimer(DEATH_CHARGE_COOLDOWN);
}
else if (message.endsWith(WARD_OF_ARCEUUS_MESSAGE))
{
createGameTimer(WARD_OF_ARCEUUS_COOLDOWN);
}
else if (message.contains(RESURRECT_THRALL_MESSAGE_START) && message.endsWith(RESURRECT_THRALL_MESSAGE_END))
{
createGameTimer(RESURRECT_THRALL_COOLDOWN);
}
}
if (message.equals(TZHAAR_DEFEATED_MESSAGE) || TZHAAR_COMPLETE_MESSAGE.matcher(message).matches())
{
log.debug("Stopping tzhaar timer");

View File

@@ -46,6 +46,7 @@ enum AgilityCourseLocation
PRIFDDINAS_AGILITY_COURSE("Prifddinas Agility Course", new WorldPoint(3253, 6109, 0)),
RELLEKKA_ROOFTOP_COURSE("Rellekka Rooftop Course", new WorldPoint(2624, 3677, 0)),
SEERS_VILLAGE_ROOFTOP_COURSE("Seers' Village Rooftop Course", new WorldPoint(2728, 3488, 0)),
SHAYZIEN_COURSE("Shayzien Agility Course", new WorldPoint(1551, 3632, 0)),
VARROCK_ROOFTOP_COURSE("Varrock Rooftop Course", new WorldPoint(3219, 3414, 0)),
WEREWOLF_AGILITY_COURSE("Werewolf Agility Course", new WorldPoint(3542, 3463, 0)),
WILDERNESS_AGILITY_COURSE("Wilderness Agility Course", new WorldPoint(2997, 3916, 0));

View File

@@ -62,11 +62,11 @@ enum KourendTaskLocation
PISCARILIUS_SANDWORMS("Piscarilius Task (30%) - Hunting Sandworms", new WorldPoint(1841, 3789, 0)),
PISCARILIUS_STEALING_ARTEFACTS("Piscarilius Task (75%) - Stealing Artefacts", new WorldPoint(1849, 3753, 0)),
SHAYZIEN_HEALING_SOLDIERS("Shayzien Task (0%) - Healing Wounded Soldiers", new WorldPoint(1572, 3581, 0)),
SHAYZIEN_HEALING_SOLDIERS("Shayzien Task (0%) - Healing Wounded Soldiers", new WorldPoint(1528, 3627, 0)),
SHAYZIEN_LIZARDMEN_EAST("Shayzien Task (5%) - Killing Lizardmen", new WorldPoint(1570, 3668, 0)),
SHAYZIEN_LIZARDMEN_WEST("Shayzien Task (5%) - Killing Lizardmen", new WorldPoint(1471, 3686, 0)),
SHAYZIEN_ORGANIZED_CRIME("Shayzien Task (40%) - Organized Crime", new WorldPoint(1565, 3605, 0)),
SHAYZIEN_COMBAT_RING("Shayzien Task (60%) - Combat Ring", new WorldPoint(1539, 3589, 0)),
SHAYZIEN_ORGANIZED_CRIME("Shayzien Task (40%) - Organized Crime", new WorldPoint(1504, 3635, 0)),
SHAYZIEN_COMBAT_RING("Shayzien Task (60%) - Combat Ring", new WorldPoint(1541, 3628, 0)),
SHAYZIEN_LIZARDMAN_SHAMANS("Shayzien Unlock (100%) - Lizardman Shamans", new WorldPoint(1455, 3693, 0));
private final String tooltip;

View File

@@ -187,9 +187,8 @@ enum MiningSiteLocation
new Rock(1, Ore.COPPER), new Rock(1, Ore.TIN), new Rock(5, Ore.IRON), new Rock(2, Ore.SILVER), new Rock(1, Ore.COAL)),
SALT_MINE(new WorldPoint(2835, 10334, 0),
new Rock(7, Ore.BASALT), new Rock(15, Ore.TE_SALT), new Rock(12, Ore.EFH_SALT), new Rock(12, Ore.URT_SALT)),
SHAYZIEN_EAST(new WorldPoint(1597, 3653, 0), new Rock(3, Ore.CLAY), new Rock(1, Ore.MITHRIL), new Rock(1, Ore.ADAMANTITE)),
SHAYZIEN_WEST(new WorldPoint(1586, 3650, 0),
new Rock(4, Ore.IRON), new Rock(4, Ore.COAL), new Rock(1, Ore.MITHRIL), new Rock(1, Ore.ADAMANTITE)),
SHAYZIEN(new WorldPoint(1601, 3645, 0),
new Rock(3, Ore.CLAY), new Rock(3, Ore.IRON), new Rock(4, Ore.COAL), new Rock(2, Ore.MITHRIL), new Rock(2, Ore.ADAMANTITE)),
SHILO_VILLAGE_SURFACE(new WorldPoint(2822, 3001, 0), new Rock(7, Ore.GEM_ROCK)),
SILVAREA(new WorldPoint(3371, 3498, 0), new Rock(7, Ore.LIMESTONE)),
SLEPE_UNDERGROUND(new WorldPoint(3888, 9749, 0), new Rock(6, Ore.IRON), new Rock(14, Ore.COAL)),

View File

@@ -116,6 +116,7 @@ enum QuestStartLocation
ICTHLARINS_LITTLE_HELPER(Quest.ICTHLARINS_LITTLE_HELPER, new WorldPoint(3314, 2849, 0)),
IN_SEARCH_OF_THE_MYREQUE(Quest.IN_SEARCH_OF_THE_MYREQUE, new WorldPoint(3502, 3477, 0)),
JUNGLE_POTION(Quest.JUNGLE_POTION, new WorldPoint(2809, 3086, 0)),
A_KINGDOM_DIVIDED(Quest.A_KINGDOM_DIVIDED, new WorldPoint(1663, 3672, 0)),
KINGS_RANSOM(Quest.KINGS_RANSOM, new WorldPoint(2741, 3554, 0)),
LEGENDS_QUEST(Quest.LEGENDS_QUEST, new WorldPoint(2725, 3367, 0)),
LOST_CITY(Quest.LOST_CITY, new WorldPoint(3149, 3205, 0)),
@@ -130,6 +131,7 @@ enum QuestStartLocation
MURDER_MYSTERY(Quest.MURDER_MYSTERY, new WorldPoint(2740, 3562, 0)),
MY_ARMS_BIG_ADVENTURE(Quest.MY_ARMS_BIG_ADVENTURE, new WorldPoint(2908, 10088, 0)),
NATURE_SPIRIT(Quest.NATURE_SPIRIT, new WorldPoint(3440, 9894, 0)),
A_NIGHT_AT_THE_THEATRE(Quest.A_NIGHT_AT_THE_THEATRE, new WorldPoint(3672, 3224, 0)),
OBSERVATORY_QUEST(Quest.OBSERVATORY_QUEST, new WorldPoint(2438, 3185, 0)),
OLAFS_QUEST(Quest.OLAFS_QUEST, new WorldPoint(2723, 3729, 0)),
ONE_SMALL_FAVOUR(Quest.ONE_SMALL_FAVOUR, new WorldPoint(2834, 2985, 0)),
@@ -153,7 +155,7 @@ enum QuestStartLocation
SWAN_SONG(Quest.SWAN_SONG, new WorldPoint(2345, 3652, 0)),
TAI_BWO_WANNAI_TRIO(Quest.TAI_BWO_WANNAI_TRIO, new WorldPoint(2779, 3087, 0)),
A_TAIL_OF_TWO_CATS(Quest.A_TAIL_OF_TWO_CATS, new WorldPoint(2917, 3557, 0)),
TALE_OF_THE_RIGHTEOUS(Quest.TALE_OF_THE_RIGHTEOUS, new WorldPoint(1511, 3631, 0)),
TALE_OF_THE_RIGHTEOUS(Quest.TALE_OF_THE_RIGHTEOUS, new WorldPoint(1541, 3570, 0)),
A_TASTE_OF_HOPE(Quest.A_TASTE_OF_HOPE, new WorldPoint(3668, 3216, 0)),
TEARS_OF_GUTHIX(Quest.TEARS_OF_GUTHIX, new WorldPoint(3251, 9517, 0)),
TEMPLE_OF_IKOV(Quest.TEMPLE_OF_IKOV, new WorldPoint(2574, 3320, 0)),

View File

@@ -138,6 +138,9 @@ enum RareTreeLocation
new WorldPoint(1642, 3533, 0),
new WorldPoint(1671, 3657, 0),
new WorldPoint(1680, 3657, 0),
new WorldPoint(1572, 3618, 0),
new WorldPoint(1553, 3551, 0),
new WorldPoint(1496, 3582, 0),
// Tirannwn
new WorldPoint(2217, 3141, 0),

View File

@@ -134,7 +134,7 @@ enum TeleportLocationData
TROLL_STRONGHOLD_STONY_BASALT_OUTSIDE(TeleportType.OTHER, "Stony Basalt", "Troll Stronghold", new WorldPoint(2844, 3693, 0), "stony_basalt_teleport_icon.png"),
KHAREDSTS_MEMOIRS_HOSIDIUS(TeleportType.OTHER, "Kharedst's Memoirs", "Lunch by the Lancalliums (Hosidius)", new WorldPoint(1713, 3612, 0), "kharedsts_memoirs_teleport_icon.png"),
KHAREDSTS_MEMOIRS_PISCARILIUS(TeleportType.OTHER, "Kharedst's Memoirs", "The Fisher's Flute (Piscarilius)", new WorldPoint(1802, 3748, 0), "kharedsts_memoirs_teleport_icon.png"),
KHAREDSTS_MEMOIRS_SHAYZIEN(TeleportType.OTHER, "Kharedst's Memoirs", "History and Hearsay (Shayzien)", new WorldPoint(1476, 3580, 0), "kharedsts_memoirs_teleport_icon.png"),
KHAREDSTS_MEMOIRS_SHAYZIEN(TeleportType.OTHER, "Kharedst's Memoirs", "History and Hearsay (Shayzien)", new WorldPoint(1478, 3576, 0), "kharedsts_memoirs_teleport_icon.png"),
KHAREDSTS_MEMOIRS_LOVAKENGJ(TeleportType.OTHER, "Kharedst's Memoirs", "Jewelry of Jubilation (Lovakengj)", new WorldPoint(1544, 3762, 0), "kharedsts_memoirs_teleport_icon.png"),
KHAREDSTS_MEMOIRS_ARCEUUS(TeleportType.OTHER, "Kharedst's Memoirs", "A Dark Disposition (Arceuus)", new WorldPoint(1680, 3746, 0), "kharedsts_memoirs_teleport_icon.png"),
PHARAOHS_SCEPTRE_JALSAVRAH(TeleportType.OTHER, "Pharaoh's Sceptre", "Jalsavrah (Pyramid Plunder)", new WorldPoint(3288, 2795, 0), "pharaohs_sceptre_teleport_icon.png"),

View File

@@ -48,6 +48,7 @@ import net.runelite.client.plugins.PluginDescriptor;
import net.runelite.client.ui.overlay.worldmap.WorldMapPoint;
import net.runelite.client.ui.overlay.worldmap.WorldMapPointManager;
import net.runelite.client.util.ImageUtil;
import net.runelite.client.util.Text;
@PluginDescriptor(
name = "World Map",
@@ -327,6 +328,7 @@ public class WorldMapPlugin extends Plugin
.image(BLANK_ICON)
.target(l.getTarget())
.jumpOnClick(l.getTarget() != null)
.name(Text.titleCase(l))
.tooltip(l.getTooltip())
.build()
)

View File

@@ -42,15 +42,10 @@ public class WidgetOverlay extends Overlay
return Arrays.asList(
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.RESIZABLE_MINIMAP_STONES_WIDGET, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.FOSSIL_ISLAND_OXYGENBAR, OverlayPosition.TOP_LEFT),
new XpTrackerWidgetOverlay(client, WidgetInfo.EXPERIENCE_TRACKER_WIDGET, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.RAIDS_POINTS_INFOBOX, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.TOB_PARTY_INTERFACE, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.TOB_PARTY_STATS, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.GWD_KC, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.TITHE_FARM, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_BOAT_INFO, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.PEST_CONTROL_INFO, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.ZEAH_MESS_HALL_COOKING_DISPLAY, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.PVP_KILLDEATH_COUNTER, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.SKOTIZO_CONTAINER, OverlayPosition.TOP_LEFT),
@@ -60,10 +55,7 @@ public class WidgetOverlay extends Overlay
new WidgetOverlay(client, WidgetInfo.LMS_KDA, OverlayPosition.TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.GAUNTLET_TIMER_CONTAINER, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.HALLOWED_SEPULCHRE_TIMER_CONTAINER, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.HEALTH_OVERLAY_BAR, OverlayPosition.TOP_CENTER),
new WidgetOverlay(client, WidgetInfo.NIGHTMARE_PILLAR_HEALTH, OverlayPosition.TOP_LEFT),
new WidgetOverlay(client, WidgetInfo.VOLCANIC_MINE_VENTS_INFOBOX_GROUP, OverlayPosition.BOTTOM_RIGHT),
new WidgetOverlay(client, WidgetInfo.VOLCANIC_MINE_STABILITY_INFOBOX_GROUP, OverlayPosition.BOTTOM_LEFT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_FIXED, OverlayPosition.BOTTOM_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZEABLE_MODERN, OverlayPosition.CANVAS_TOP_RIGHT),
new WidgetOverlay(client, WidgetInfo.MULTICOMBAT_RESIZEABLE_CLASSIC, OverlayPosition.CANVAS_TOP_RIGHT),

View File

@@ -25,33 +25,43 @@
package net.runelite.client.ui.overlay.worldmap;
import com.google.common.base.Splitter;
import com.google.common.base.Strings;
import java.awt.Dimension;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.geom.Area;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import net.runelite.api.Client;
import net.runelite.api.MenuAction;
import net.runelite.api.MenuEntry;
import net.runelite.api.Point;
import net.runelite.api.RenderOverview;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.widgets.JavaScriptCallback;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetID;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.input.MouseManager;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.ui.FontManager;
import net.runelite.client.ui.JagexColors;
import net.runelite.client.ui.overlay.Overlay;
import net.runelite.client.ui.overlay.OverlayLayer;
import net.runelite.client.ui.overlay.OverlayPosition;
import net.runelite.client.ui.overlay.OverlayPriority;
import net.runelite.client.util.ColorUtil;
@Singleton
public class WorldMapOverlay extends Overlay
{
private static final String FOCUS_ON = "Focus on";
private static final int TOOLTIP_OFFSET_HEIGHT = 25;
private static final int TOOLTIP_OFFSET_WIDTH = 5;
private static final int TOOLTIP_PADDING_HEIGHT = 1;
@@ -63,12 +73,12 @@ public class WorldMapOverlay extends Overlay
private final WorldMapPointManager worldMapPointManager;
private final Client client;
private final List<MenuEntry> mapMenuEntries = new ArrayList<>();
@Inject
private WorldMapOverlay(
Client client,
WorldMapPointManager worldMapPointManager,
MouseManager mouseManager,
WorldMapOverlayMouseListener worldMapOverlayMouseListener)
WorldMapPointManager worldMapPointManager)
{
this.client = client;
this.worldMapPointManager = worldMapPointManager;
@@ -76,7 +86,6 @@ public class WorldMapOverlay extends Overlay
setPriority(OverlayPriority.HIGHEST);
setLayer(OverlayLayer.MANUAL);
drawAfterInterface(WidgetID.WORLD_MAP_GROUP_ID);
mouseManager.registerMouseListener(worldMapOverlayMouseListener);
}
@Override
@@ -90,17 +99,44 @@ public class WorldMapOverlay extends Overlay
}
Widget widget = client.getWidget(WidgetInfo.WORLD_MAP_VIEW);
if (widget == null)
Widget bottomBar = client.getWidget(WidgetInfo.WORLD_MAP_BOTTOM_BAR);
if (widget == null || bottomBar == null)
{
return null;
}
bottomBar.setOnTimerListener((JavaScriptCallback) ev ->
{
if (client.isMenuOpen() || mapMenuEntries.isEmpty())
{
return;
}
MenuEntry[] entries = client.getMenuEntries();
int end = entries.length;
entries = Arrays.copyOf(entries, end + mapMenuEntries.size());
for (int i = 0; i < mapMenuEntries.size(); i++)
{
entries[end + i] = mapMenuEntries.get(i);
}
client.setMenuEntries(entries);
});
bottomBar.setHasListener(true);
final Rectangle worldMapRectangle = widget.getBounds();
final Area mapViewArea = getWorldMapClipArea(worldMapRectangle);
final Rectangle canvasBounds = new Rectangle(0, 0, client.getCanvasWidth(), client.getCanvasHeight());
final Area canvasViewArea = getWorldMapClipArea(canvasBounds);
Area currentClip = null;
Point mousePos = client.getMouseCanvasPosition();
if (!canvasViewArea.contains(mousePos.getX(), mousePos.getY()))
{
mousePos = null;
}
mapMenuEntries.clear();
WorldMapPoint tooltipPoint = null;
for (WorldMapPoint worldPoint : points)
@@ -111,10 +147,8 @@ public class WorldMapOverlay extends Overlay
if (image != null && point != null)
{
Point drawPoint = mapWorldPointToGraphicsPoint(point);
if (drawPoint == null)
{
worldPoint.setClickbox(null);
continue;
}
@@ -183,15 +217,40 @@ public class WorldMapOverlay extends Overlay
graphics.drawImage(image, drawX, drawY, null);
Rectangle clickbox = new Rectangle(drawX, drawY, image.getWidth(), image.getHeight());
worldPoint.setClickbox(clickbox);
if (worldPoint.isTooltipVisible())
if (mousePos != null && clickbox.contains(mousePos.getX(), mousePos.getY()))
{
tooltipPoint = worldPoint;
if (!Strings.isNullOrEmpty(worldPoint.getTooltip()))
{
tooltipPoint = worldPoint;
}
if (worldPoint.isJumpOnClick())
{
assert worldPoint.getName() != null;
WorldPoint target = worldPoint.getTarget();
if (target == null)
{
target = worldPoint.getWorldPoint();
}
MenuEntry entry = new MenuEntry();
entry.setType(MenuAction.RUNELITE.getId());
entry.setOption(FOCUS_ON);
entry.setTarget(ColorUtil.wrapWithColorTag(worldPoint.getName(), JagexColors.MENU_TARGET));
entry.setIdentifier(target.getPlane() << 28 | target.getX() << 14 | target.getY());
mapMenuEntries.add(entry);
}
}
}
}
final Widget rsTooltip = client.getWidget(WidgetInfo.WORLD_MAP_TOOLTIP);
if (rsTooltip != null)
{
rsTooltip.setHidden(tooltipPoint != null);
}
if (tooltipPoint != null)
{
drawTooltip(graphics, tooltipPoint);
@@ -200,8 +259,24 @@ public class WorldMapOverlay extends Overlay
return null;
}
@Subscribe
private void onMenuOptionClicked(MenuOptionClicked ev)
{
if (ev.getMenuAction() == MenuAction.RUNELITE && FOCUS_ON.equals(ev.getMenuOption()))
{
int pxy = ev.getId();
WorldPoint wp = new WorldPoint(
pxy >> 14 & 0x3fff,
pxy & 0x3fff,
pxy >> 28);
client.getRenderOverview().setWorldMapPositionTarget(wp);
}
}
/**
* Get the screen coordinates for a WorldPoint on the world map
*
* @param worldPoint WorldPoint to get screen coordinates of
* @return Point of screen coordinates of the center of the world point
*/
@@ -214,7 +289,7 @@ public class WorldMapOverlay extends Overlay
return null;
}
Float pixelsPerTile = ro.getWorldMapZoom();
float pixelsPerTile = ro.getWorldMapZoom();
Widget map = client.getWidget(WidgetInfo.WORLD_MAP_VIEW);
if (map != null)

View File

@@ -1,166 +0,0 @@
/*
* Copyright (c) 2018, Morgan Lewis <https://github.com/MESLewis>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package net.runelite.client.ui.overlay.worldmap;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.swing.SwingUtilities;
import net.runelite.api.Client;
import net.runelite.api.Point;
import net.runelite.api.RenderOverview;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.widgets.Widget;
import net.runelite.api.widgets.WidgetInfo;
import net.runelite.client.input.MouseAdapter;
@Singleton
public class WorldMapOverlayMouseListener extends MouseAdapter
{
private final Client client;
private final WorldMapPointManager worldMapPointManager;
private WorldMapPoint tooltipPoint = null;
@Inject
private WorldMapOverlayMouseListener(Client client, WorldMapPointManager worldMapPointManager)
{
this.client = client;
this.worldMapPointManager = worldMapPointManager;
}
@Override
public MouseEvent mousePressed(MouseEvent e)
{
final List<WorldMapPoint> worldMapPoints = worldMapPointManager.getWorldMapPoints();
if (SwingUtilities.isLeftMouseButton(e) && !worldMapPoints.isEmpty())
{
Point mousePos = client.getMouseCanvasPosition();
final Widget view = client.getWidget(WidgetInfo.WORLD_MAP_VIEW);
if (view == null)
{
return e;
}
for (WorldMapPoint worldMapPoint : worldMapPoints)
{
Rectangle clickbox = worldMapPoint.getClickbox();
if (clickbox != null && clickbox.contains(mousePos.getX(), mousePos.getY()))
{
if (worldMapPoint.isJumpOnClick())
{
// jump map to target, or position of point
WorldPoint target = worldMapPoint.getTarget();
if (target == null)
{
target = worldMapPoint.getWorldPoint();
}
RenderOverview renderOverview = client.getRenderOverview();
renderOverview.setWorldMapPositionTarget(target);
}
e.consume();
return worldMapPoint.onClick(e);
}
}
}
return e;
}
@Override
public MouseEvent mouseMoved(MouseEvent mouseEvent)
{
final List<WorldMapPoint> worldMapPoints = worldMapPointManager.getWorldMapPoints();
if (worldMapPoints.isEmpty())
{
return mouseEvent;
}
final Point mousePos = client.getMouseCanvasPosition();
final Widget view = client.getWidget(WidgetInfo.WORLD_MAP_VIEW);
if (view == null)
{
return mouseEvent;
}
final Rectangle worldMapDisplay = view.getBounds();
if (worldMapDisplay == null || !worldMapDisplay.contains(mousePos.getX(), mousePos.getY()))
{
if (tooltipPoint != null)
{
tooltipPoint.setTooltipVisible(false);
tooltipPoint = null;
final Widget rsTooltip = client.getWidget(WidgetInfo.WORLD_MAP_TOOLTIP);
if (rsTooltip != null)
{
rsTooltip.setHidden(false);
}
}
return mouseEvent;
}
if (tooltipPoint != null)
{
if (tooltipPoint.getClickbox() != null
&& tooltipPoint.getClickbox().contains(mousePos.getX(), mousePos.getY()))
{
return mouseEvent;
}
else
{
tooltipPoint.setTooltipVisible(false);
tooltipPoint = null;
final Widget rsTooltip = client.getWidget(WidgetInfo.WORLD_MAP_TOOLTIP);
if (rsTooltip != null)
{
rsTooltip.setHidden(false);
}
}
}
for (WorldMapPoint worldMapPoint : worldMapPointManager.getWorldMapPoints())
{
if (worldMapPoint.getClickbox() != null
&& worldMapPoint.getClickbox().contains(mousePos.getX(), mousePos.getY())
&& worldMapPoint.getTooltip() != null)
{
worldMapPoint.setTooltipVisible(true);
tooltipPoint = worldMapPoint;
final Widget rsTooltip = client.getWidget(WidgetInfo.WORLD_MAP_TOOLTIP);
if (rsTooltip != null)
{
rsTooltip.setHidden(true);
}
return mouseEvent;
}
}
return mouseEvent;
}
}

View File

@@ -24,8 +24,6 @@
*/
package net.runelite.client.ui.overlay.worldmap;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
import javax.annotation.Nullable;
import lombok.Data;
@@ -53,8 +51,6 @@ public class WorldMapPoint
*/
private Point imagePoint;
private Rectangle clickbox;
private boolean snapToEdge;
private boolean currentlyEdgeSnapped;
@@ -64,7 +60,10 @@ public class WorldMapPoint
*/
private boolean jumpOnClick;
private boolean tooltipVisible;
/**
* Name in menu option when {@link #jumpOnClick} is set
*/
private String name;
private String tooltip;
@@ -74,11 +73,6 @@ public class WorldMapPoint
this.image = image;
}
public MouseEvent onClick(MouseEvent e)
{
return e;
}
public void onEdgeSnap()
{
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@@ -6,6 +6,12 @@
"name": "Gnome Stronghold",
"xp": 86.5
},
{
"level": 5,
"icon": 13359,
"name": "Shayzien Basic Course",
"xp": 133.2
},
{
"level": 10,
"icon": 11849,
@@ -66,6 +72,12 @@
"name": "Ape Atoll",
"xp": 580
},
{
"level": 48,
"icon": 13379,
"name": "Shayzien Advanced Course",
"xp": 474.3
},
{
"level": 50,
"icon": 11849,

View File

@@ -180,12 +180,24 @@
"name": "Fire Bolt",
"xp": 22.5
},
{
"level": 35,
"sprite": 1267,
"name": "Ghostly Grasp",
"xp": 22.5
},
{
"level": 37,
"sprite": 33,
"name": "Falador Teleport",
"xp": 48
},
{
"level": 38,
"sprite": 1270,
"name": "Resurrect Lesser Thrall",
"xp": 55
},
{
"level": 39,
"sprite": 34,
@@ -222,6 +234,12 @@
"name": "Superheat Item",
"xp": 53
},
{
"level": 44,
"sprite": 1302,
"name": "Inferior Demonbane",
"xp": 27
},
{
"level": 45,
"sprite": 37,
@@ -234,6 +252,12 @@
"name": "Water Blast",
"xp": 28.5
},
{
"level": 47,
"sprite": 1315,
"name": "Shadow Veil",
"xp": 58
},
{
"level": 48,
"sprite": 1259,
@@ -276,6 +300,12 @@
"name": "Snare",
"xp": 60
},
{
"level": 50,
"sprite": 1316,
"name": "Dark Lure",
"xp": 60
},
{
"level": 51,
"sprite": 54,
@@ -318,6 +348,12 @@
"name": "Blood Rush",
"xp": 33
},
{
"level": 56,
"sprite": 1268,
"name": "Skeletal Grasp",
"xp": 33
},
{
"level": 57,
"sprite": 358,
@@ -330,6 +366,12 @@
"name": "Enchant Diamond Jewellery",
"xp": 67
},
{
"level": 57,
"sprite": 2981,
"name": "Resurrect Superior Thrall",
"xp": 70
},
{
"level": 58,
"sprite": 55,
@@ -348,6 +390,12 @@
"name": "Fire Blast",
"xp": 34.5
},
{
"level": 59,
"sprite": 1305,
"name": "Mark of Darkness",
"xp": 70
},
{
"level": 60,
"sprite": 342,
@@ -408,6 +456,12 @@
"name": "Wind Wave",
"xp": 36
},
{
"level": 62,
"sprite": 1303,
"name": "Superior Demonbane",
"xp": 36
},
{
"level": 63,
"sprite": 47,
@@ -426,6 +480,12 @@
"name": "Teleport Ape Atoll",
"xp": 74
},
{
"level": 64,
"sprite": 1307,
"name": "Lesser Corruption",
"xp": 75
},
{
"level": 65,
"sprite": 543,
@@ -480,6 +540,12 @@
"name": "Monster Examine",
"xp": 61
},
{
"level": 66,
"sprite": 1317,
"name": "Vile Vigour",
"xp": 76
},
{
"level": 67,
"sprite": 568,
@@ -540,6 +606,12 @@
"name": "Tele Group Moonclan",
"xp": 67
},
{
"level": 70,
"sprite": 1318,
"name": "Degrime",
"xp": 83
},
{
"level": 71,
"sprite": 586,
@@ -594,6 +666,12 @@
"name": "Enfeeble",
"xp": 83
},
{
"level": 73,
"sprite": 1306,
"name": "Ward of Arceuus",
"xp": 83
},
{
"level": 74,
"sprite": 349,
@@ -648,6 +726,12 @@
"name": "Spin Flax",
"xp": 75
},
{
"level": 76,
"sprite": 2984,
"name": "Resurrect Greater Thrall",
"xp": 88
},
{
"level": 77,
"sprite": 548,
@@ -696,6 +780,12 @@
"name": "Dream",
"xp": 82
},
{
"level": 79,
"sprite": 1269,
"name": "Undead Grasp",
"xp": 46.5
},
{
"level": 80,
"sprite": 322,
@@ -720,6 +810,12 @@
"name": "String Jewellery",
"xp": 83
},
{
"level": 80,
"sprite": 1310,
"name": "Death Charge",
"xp": 90
},
{
"level": 81,
"sprite": 554,
@@ -750,6 +846,12 @@
"name": "Ice Blitz",
"xp": 46
},
{
"level": 82,
"sprite": 1304,
"name": "Dark Demonbane",
"xp": 43.5
},
{
"level": 83,
"sprite": 553,
@@ -774,6 +876,12 @@
"name": "Boost Potion Share",
"xp": 88
},
{
"level": 84,
"sprite": 1311,
"name": "Demonic Offering",
"xp": 175
},
{
"level": 85,
"sprite": 363,
@@ -798,6 +906,12 @@
"name": "Teleport To Bounty Target",
"xp": 45
},
{
"level": 85,
"sprite": 1308,
"name": "Greater Corruption",
"xp": 95
},
{
"level": 86,
"sprite": 332,
@@ -912,6 +1026,12 @@
"name": "Heal Other",
"xp": 101
},
{
"level": 92,
"sprite": 1312,
"name": "Sinister Offering",
"xp": 180
},
{
"level": 93,
"sprite": 561,

View File

@@ -168,6 +168,41 @@
"xp": 1560,
"ignoreBonus": true
},
{
"level": 1,
"icon": 25766,
"name": "Fiendish Ashes",
"xp": 10,
"ignoreBonus": true
},
{
"level": 1,
"icon": 25769,
"name": "Vile Ashes",
"xp": 25,
"ignoreBonus": true
},
{
"level": 1,
"icon": 25772,
"name": "Malicious Ashes",
"xp": 65,
"ignoreBonus": true
},
{
"level": 1,
"icon": 25775,
"name": "Abyssal Ashes",
"xp": 85,
"ignoreBonus": true
},
{
"level": 1,
"icon": 25778,
"name": "Infernal Ashes",
"xp": 110,
"ignoreBonus": true
},
{
"level": 1,
"icon": 526,

View File

@@ -1,2 +1,2 @@
oprs.api.version=1.1.0
oprs.api.version=2.0.0
oprs.version=@open.osrs.version@

View File

@@ -1 +1 @@
28D9B0BC06E4C832129BE800E1F53A8DD6C6C5F1277EF038C49E92C8648E9F44
D8865833BC828A91FC7D4A10B6A7629786ED2099E2F45689BECD55A9E933323D

File diff suppressed because it is too large Load Diff

View File

@@ -1 +1 @@
4B4BC80A1E1C22193721F88794D320A50B87ED1351BD56F9C01D4D8355EA91F4
BADE5769E553D84CF031C4D278466E46B74E12CF62A3351646CD1C504D7A426A

View File

@@ -1,8 +1,8 @@
.id 89
.int_stack_count 1
.string_stack_count 0
.int_var_count 19
.string_var_count 6
.int_var_count 20
.string_var_count 7
iconst 0
istore 1
iconst 2
@@ -62,7 +62,7 @@ LABEL49:
iconst 73
iconst 73
iload 6
iconst 10551328
iconst 10551333
enum
if_getheight
add
@@ -181,71 +181,79 @@ LABEL156:
istore 14
sconst ""
sstore 2
iconst 0
istore 15
sconst ""
sstore 3
sconst ""
sstore 4
iconst -1
istore 15
iconst 0
istore 16
iconst 0
istore 17
sconst "<col=00ffff>"
sstore 4
sstore 5
sconst "<col=ffff00>"
sstore 5
sload 4
sstore 6
sload 5
sload 6
invoke 4485
sstore 6
sstore 5
sstore 4
get_varc_int 55
get_varc_int 202
if_icmpge LABEL185
jump LABEL311
LABEL185:
if_icmpge LABEL189
jump LABEL319
LABEL189:
get_varc_int 55
clientclock
iconst 3000
sub
if_icmpgt LABEL191
jump LABEL311
LABEL191:
if_icmpgt LABEL195
jump LABEL319
LABEL195:
iconst 14
chat_gethistorylength
iconst 0
if_icmpgt LABEL196
jump LABEL311
LABEL196:
if_icmpgt LABEL200
jump LABEL319
LABEL200:
iconst 14
iconst 0
chat_gethistory_bytypeandline
5030
istore 15
sstore 2
istore 14
sstore 0
sstore 2
sstore 3
sstore 1
istore 13
istore 12
iload 12
iconst -1
if_icmpne LABEL209
jump LABEL311
LABEL209:
if_icmpne LABEL215
jump LABEL319
LABEL215:
sload 0
invoke 2066
istore 15
sstore 3
istore 16
sstore 4
sstore 0
iload 15
iload 16
iconst 4
if_icmpne LABEL221
if_icmpne LABEL227
reboottimer
iconst 0
if_icmple LABEL221
jump LABEL311
LABEL221:
if_icmple LABEL227
jump LABEL319
LABEL227:
iload 7
sload 5
sload 2
sload 6
sload 0
sconst "</col>"
join_string 3
invoke 4742
iload 9
iload 10
iconst 10682368
@@ -262,17 +270,17 @@ LABEL221:
istore 7
iload 10
if_clearops
sload 3
sload 4
string_length
iconst 0
if_icmpgt LABEL247
jump LABEL276
LABEL247:
iload 15
if_icmpgt LABEL255
jump LABEL284
LABEL255:
iload 16
iconst -1
if_icmpne LABEL251
jump LABEL276
LABEL251:
if_icmpne LABEL259
jump LABEL284
LABEL259:
iconst 6
sconst "Open"
iload 10
@@ -297,8 +305,8 @@ LABEL251:
sconst "Iii"
iload 10
if_setonmouseleave
jump LABEL284
LABEL276:
jump LABEL292
LABEL284:
iconst -1
sconst ""
iload 10
@@ -307,7 +315,7 @@ LABEL276:
sconst ""
iload 10
if_setonmouseleave
LABEL284:
LABEL292:
iconst 9
sconst "Clear history"
iload 10
@@ -320,8 +328,8 @@ LABEL284:
if_setopbase
iconst 2064
iconst -2147483644
sload 3
iload 15
sload 4
iload 16
sconst "isi"
iload 10
if_setonop
@@ -335,63 +343,65 @@ LABEL284:
iload 9
enum
istore 10
LABEL311:
LABEL319:
iload 0
istore 12
iconst 0
istore 17
invoke 4487
istore 18
invoke 4487
istore 19
get_varp 287
iconst 1
if_icmpeq LABEL321
jump LABEL536
LABEL321:
if_icmpeq LABEL329
jump LABEL554
LABEL329:
get_varc_int 41
iconst 1337
if_icmpne LABEL328
if_icmpne LABEL336
get_varbit 4089
iconst 0
if_icmpeq LABEL328
jump LABEL536
LABEL328:
if_icmpeq LABEL336
jump LABEL554
LABEL336:
iload 12
iconst -1
if_icmpne LABEL332
jump LABEL536
LABEL332:
if_icmpne LABEL340
jump LABEL554
LABEL340:
iload 10
iconst -1
if_icmpne LABEL336
jump LABEL536
LABEL336:
if_icmpne LABEL344
jump LABEL554
LABEL344:
iload 7
iload 4
sub
iconst 57
if_icmplt LABEL342
jump LABEL536
LABEL342:
if_icmplt LABEL350
jump LABEL554
LABEL350:
iload 12
chat_gethistory_byuid
5031
istore 15
sstore 2
istore 14
sstore 0
sstore 2
sstore 3
sstore 1
istore 13
istore 17
iload 17
istore 18
iload 18
sload 1
iload 13
iload 14
invoke 91
iconst 1
if_icmpeq CHAT_FILTER ; Jump to our new label instead
jump LABEL532
jump LABEL550
CHAT_FILTER:
sload 0 ; Load the message
iconst 1 ; Gets changed to 0 if message is blocked
iload 17 ; Load the messageType
iload 18 ; Load the messageType
iload 12 ; Load the id of the messageNode
sconst "chatFilterCheck"
runelite_callback
@@ -399,23 +409,24 @@ CHAT_FILTER:
pop_int ; Pop the messageType
iconst 1 ; 2nd half of conditional
sstore 0 ; Override the message with our filtered message
if_icmpeq LABEL358 ; Check if we are building this message
jump LABEL532
LABEL358:
if_icmpeq LABEL368 ; Check if we are building this message
jump LABEL550
LABEL368:
iload 12 ; message uid
sconst "chatMessageBuilding"
runelite_callback
pop_int
iload 17
iload 18
switch
3: LABEL361
5: LABEL413
6: LABEL387
7: LABEL361
jump LABEL448
LABEL361:
3: LABEL371
5: LABEL427
6: LABEL399
7: LABEL371
jump LABEL464
LABEL371:
iload 7
sload 4
sload 2
sload 5
sconst "splitPrivChatUsernameColor"
runelite_callback
sconst "From "
@@ -423,7 +434,8 @@ LABEL361:
sconst ":"
sconst "</col>"
join_string 5
sload 4
invoke 4742
sload 5
sload 0
sconst "</col>"
join_string 3
@@ -441,10 +453,11 @@ LABEL361:
invoke 203
add
istore 7
jump LABEL464
LABEL387:
jump LABEL482
LABEL399:
iload 7
sload 4
sload 2
sload 5
sconst "splitPrivChatUsernameColor"
runelite_callback
sconst "To "
@@ -452,7 +465,8 @@ LABEL387:
sconst ":"
sconst "</col>"
join_string 5
sload 4
invoke 4742
sload 5
sload 0
sconst "</col>"
join_string 3
@@ -470,13 +484,15 @@ LABEL387:
invoke 203
add
istore 7
jump LABEL464
LABEL413:
jump LABEL482
LABEL427:
iload 7
sload 4
sload 2
sload 5
sload 0
sconst "</col>"
join_string 3
invoke 4742
iload 9
iload 10
iconst 10682368
@@ -491,11 +507,11 @@ LABEL413:
invoke 199
add
istore 7
iload 18
iload 19
iconst 0
if_icmpeq LABEL436
jump LABEL447
LABEL436:
if_icmpeq LABEL452
jump LABEL463
LABEL452:
iload 13
iconst 500
add
@@ -507,11 +523,13 @@ LABEL436:
sconst "1"
iconst 10616832
if_setontimer
LABEL447:
jump LABEL464
LABEL448:
LABEL463:
jump LABEL482
LABEL464:
iload 7
sload 2
sload 0
invoke 4742
iload 9
iload 10
iconst 10682368
@@ -526,31 +544,31 @@ LABEL448:
invoke 199
add
istore 7
LABEL464:
LABEL482:
iload 10
if_clearops
iload 17
iload 18
iconst 3
if_icmpeq LABEL476
iload 17
if_icmpeq LABEL494
iload 18
iconst 6
if_icmpeq LABEL476
iload 17
if_icmpeq LABEL494
iload 18
iconst 7
if_icmpeq LABEL476
jump LABEL510
LABEL476:
if_icmpeq LABEL494
jump LABEL528
LABEL494:
iload 14
iconst 1
if_icmpeq LABEL480
jump LABEL485
LABEL480:
if_icmpeq LABEL498
jump LABEL503
LABEL498:
iconst 8
sconst "Message"
iload 10
if_setop
jump LABEL493
LABEL485:
jump LABEL511
LABEL503:
iconst 8
sconst "Add friend"
iload 10
@@ -559,7 +577,7 @@ LABEL485:
sconst "Add ignore"
iload 10
if_setop
LABEL493:
LABEL511:
iconst 10
sconst "Report"
iload 10
@@ -576,13 +594,13 @@ LABEL493:
sconst "is"
iload 10
if_setonop
jump LABEL514
LABEL510:
jump LABEL532
LABEL528:
iconst -1
sconst ""
iload 10
if_setonop
LABEL514:
LABEL532:
iconst -1
sconst ""
iload 10
@@ -601,17 +619,17 @@ LABEL514:
iload 9
enum
istore 10
LABEL532:
LABEL550:
iload 12
chat_getprevuid
istore 12
jump LABEL328
LABEL536:
jump LABEL336
LABEL554:
iload 10
iconst -1
if_icmpne LABEL540
jump LABEL623
LABEL540:
if_icmpne LABEL558
jump LABEL641
LABEL558:
iload 10
if_clearops
iconst -1
@@ -638,14 +656,14 @@ LABEL540:
multiply
cc_find
iconst 1
if_icmpeq LABEL568
jump LABEL572
LABEL568:
if_icmpeq LABEL586
jump LABEL590
LABEL586:
sconst ""
cc_settext
iconst 1
cc_sethide
LABEL572:
LABEL590:
iconst 10682368
iload 9
iconst 4
@@ -654,14 +672,14 @@ LABEL572:
add
cc_find
iconst 1
if_icmpeq LABEL582
jump LABEL586
LABEL582:
if_icmpeq LABEL600
jump LABEL604
LABEL600:
sconst ""
cc_settext
iconst 1
cc_sethide
LABEL586:
LABEL604:
iconst 10682368
iload 9
iconst 4
@@ -670,14 +688,14 @@ LABEL586:
add
cc_find
iconst 1
if_icmpeq LABEL596
jump LABEL600
LABEL596:
if_icmpeq LABEL614
jump LABEL618
LABEL614:
sconst ""
cc_settext
iconst 1
cc_sethide
LABEL600:
LABEL618:
iconst 10682368
iload 9
iconst 4
@@ -686,12 +704,12 @@ LABEL600:
add
cc_find
iconst 1
if_icmpeq LABEL610
jump LABEL612
LABEL610:
if_icmpeq LABEL628
jump LABEL630
LABEL628:
iconst 1
cc_sethide
LABEL612:
LABEL630:
iload 9
iconst 1
add
@@ -702,6 +720,6 @@ LABEL612:
iload 9
enum
istore 10
jump LABEL536
LABEL623:
jump LABEL554
LABEL641:
return

View File

@@ -1 +1 @@
1D8F698FFDA4B0D72798938A0EFB4D7F58988E9AF3FA706A7CD9402FE14E201C
C3095F0E7973E9EF0E8035AF4B4AC7CE28D692B71A63DE31B7820F1D2AB09F2E

View File

@@ -20,11 +20,11 @@
1131: LABEL9
jump LABEL204
LABEL9:
iconst 10747939
iconst 10747944
if_getwidth
iconst 33
sub
iconst 10747939
iconst 10747944
if_getheight
istore 3
istore 2
@@ -33,7 +33,7 @@ LABEL9:
iconst 73
iconst 73
iload 1
iconst 10551328
iconst 10551333
enum
if_getwidth
sub
@@ -48,7 +48,7 @@ LABEL9:
LABEL29:
iconst 0
iload 3
iconst 10747954
iconst 10747959
if_getheight
add
iconst 2
@@ -56,14 +56,14 @@ LABEL29:
iconst 73
iconst 73
iload 1
iconst 10747971
iconst 10747976
enum
if_setposition
iconst 0
iload 3
iconst 2
iconst 2
iconst 10747954
iconst 10747959
if_setposition
jump LABEL65
LABEL49:
@@ -74,14 +74,14 @@ LABEL49:
iconst 73
iconst 73
iload 1
iconst 10747971
iconst 10747976
enum
if_setposition
iload 2
iconst 0
iconst 2
iconst 2
iconst 10747954
iconst 10747959
if_setposition
LABEL65:
get_varbit 4084
@@ -93,7 +93,7 @@ LABEL69:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
jump LABEL84
@@ -102,7 +102,7 @@ LABEL77:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
LABEL84:
@@ -119,7 +119,7 @@ LABEL91:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
jump LABEL106
@@ -128,7 +128,7 @@ LABEL99:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
LABEL106:
@@ -145,7 +145,7 @@ LABEL113:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
jump LABEL128
@@ -154,7 +154,7 @@ LABEL121:
iconst 73
iconst 73
iload 1
iconst 10551324
iconst 10551329
enum
2122
LABEL128:
@@ -169,15 +169,15 @@ LABEL129:
jump LABEL140
LABEL136:
iconst 1
iconst 39387169
iconst 39387175
if_sethide
jump LABEL195
LABEL140:
iconst 0
iconst 39387169
iconst 39387175
if_sethide
iconst 1
iconst 39387169
iconst 39387175
2308
get_varbit 6255
switch
@@ -187,38 +187,38 @@ LABEL140:
jump LABEL173
LABEL149:
iconst 1718
iconst 39387171
iconst 39387177
if_setgraphic
iconst 1
sconst "Toggle single-tap mode"
iconst 39387169
iconst 39387175
if_setop
jump LABEL180
LABEL157:
iconst 1717
iconst 39387171
iconst 39387177
if_setgraphic
iconst 1
sconst "Toggle tap-to-drop mode"
iconst 39387169
iconst 39387175
if_setop
jump LABEL180
LABEL165:
iconst 1716
iconst 39387171
iconst 39387177
if_setgraphic
iconst 1
sconst "Show Keyboard"
iconst 39387169
iconst 39387175
if_setop
jump LABEL180
LABEL173:
iconst 1715
iconst 39387171
iconst 39387177
if_setgraphic
iconst 1
sconst ""
iconst 39387169
iconst 39387175
if_setop
LABEL180:
get_varbit 6255
@@ -232,18 +232,18 @@ LABEL184:
jump LABEL192
LABEL188:
iconst 155
iconst 39387171
iconst 39387177
if_settrans
jump LABEL195
LABEL192:
iconst 0
iconst 39387171
iconst 39387177
if_settrans
LABEL195:
invoke 2581
get_varbit 6254
invoke 633
iconst 39387160
iconst 39387166
if_sethide
invoke 2526
pop_int

View File

@@ -1 +1 @@
F62F3A22CA5AEAECCEFAA3A9EEDA095D778CC8BE08CD15CC4ECDC91159924746
90BE2B2F4CE3D5C7C00D2ECF6D552D9A285FD08DC47DDA93E5BFE86529B01E6E

View File

@@ -12,19 +12,19 @@
iconst 73
iconst 73
iload 1
iconst 10551308
iconst 10551313
enum
istore 3
iconst 73
iconst 73
iload 1
iconst 10551302
iconst 10551305
enum
istore 4
iconst 73
iconst 73
iload 1
iconst 10551310
iconst 10551315
enum
istore 5
iconst 103
@@ -76,14 +76,14 @@
LABEL70:
iconst 0
iload 16
iconst 39387150
iconst 39387155
if_getwidth
sub
invoke 1045
istore 14
iconst 0
iload 17
iconst 39387150
iconst 39387155
if_getheight
sub
invoke 1045
@@ -279,7 +279,7 @@ LABEL189:
iconst 73
iconst 73
iload 1
iconst 10551309
iconst 10551314
enum
iload 5
iload 8
@@ -291,7 +291,7 @@ LABEL268:
iconst 73
iconst 73
iload 1
iconst 10551309
iconst 10551314
enum
iload 3
iconst 0
@@ -417,7 +417,7 @@ LABEL342:
iconst 73
iconst 73
iload 1
iconst 10551309
iconst 10551314
enum
iload 5
iload 8
@@ -429,7 +429,7 @@ LABEL385:
iconst 73
iconst 73
iload 1
iconst 10551309
iconst 10551314
enum
iload 3
iconst 0
@@ -439,7 +439,7 @@ LABEL395:
iconst 73
iconst 73
iload 1
iconst 10551311
iconst 10551316
enum
istore 18
iload 18
@@ -503,7 +503,7 @@ LABEL449:
iconst 73
iconst 73
iload 1
iconst 10551313
iconst 10551318
enum
istore 18
iconst 0
@@ -518,7 +518,7 @@ LABEL463:
iconst 73
iconst 73
iload 1
iconst 10551304
iconst 10551307
enum
if_hassub
iconst 1
@@ -578,7 +578,7 @@ LABEL511:
iconst 73
iconst 73
iload 1
iconst 10551304
iconst 10551307
enum
istore 18
iconst 0

View File

@@ -1 +1 @@
A1B6D1B291AA3594728DDEA47049E17119F5CCB6F8E757E1524FA89DE92F9A34
581520BBF672827101447FABB2D0F515AB1AF23FDABFAF374032DF36A82B0658

View File

@@ -23,9 +23,9 @@
runelite_callback
sub
istore 1
iconst 7602235
iconst 7602237
if_getwidth
iconst 7602236
iconst 7602238
if_getwidth
sub
istore 2
@@ -78,6 +78,6 @@ LABEL44:
iconst 0
iconst 0
iconst 0
iconst 7602236
iconst 7602238
if_setposition
return

View File

@@ -1 +1 @@
1CEB4F2F85A8FECA9D9CB80DCAF0CB6A1FB3670607C6CDE80363BC40E95CA1E3
1BB0517CD647510451A0AF5FC160252892F4C3627BED106FEDEE44E62027A2D4

View File

@@ -219,18 +219,100 @@ LABEL183:
iload 1
iconst 0
if_icmpeq LABEL189
jump LABEL339
jump LABEL417
LABEL189:
invoke 1972
iconst 0
invoke 2357
iconst 1
if_icmpeq LABEL193
jump LABEL273
jump LABEL267
LABEL193:
iload 4
iconst 20
if_icmplt LABEL197
jump LABEL272
jump LABEL226
LABEL197:
iconst 10616867
iconst 3
iload 4
cc_create
iconst 0
iload 3
iconst 1
iconst 2
cc_setsize
iconst 0
iconst 0
iconst 1
iconst 2
cc_setposition
iconst 0
cc_setcolour
iconst 1
cc_setfill
iconst 252
cc_settrans
iload 4
iconst 1
add
iload 3
iload 2
sub
istore 3
istore 4
jump LABEL193
LABEL226:
iconst 10616886
iconst 3
iconst 0
cc_create
iconst 10616886
iconst 3
iconst 1
cc_create 1
iconst 16384
iconst 1
iconst 2
iconst 0
cc_setsize
iconst 16384
iconst 1
iconst 2
iconst 0
cc_setsize 1
iconst 0
iconst 0
iconst 0
iconst 0
cc_setposition
iconst 0
iconst 15
iconst 0
iconst 2
cc_setposition 1
iconst 16777215
cc_setcolour
iconst 16777215
cc_setcolour 1
iconst 1
cc_setfill
iconst 1
cc_setfill 1
iconst 100
cc_settrans
iconst 120
cc_settrans 1
jump LABEL417
LABEL267:
invoke 1972
iconst 0
if_icmpeq LABEL271
jump LABEL351
LABEL271:
iload 4
iconst 20
if_icmplt LABEL275
jump LABEL350
LABEL275:
iconst 10616867
iconst 3
iload 4
@@ -293,7 +375,7 @@ LABEL197:
cc_setfill
iconst 1
cc_setfill 1
iconst 251
iconst 250
cc_settrans
iconst 250
cc_settrans 1
@@ -305,12 +387,12 @@ LABEL197:
sub
istore 3
istore 4
jump LABEL193
LABEL272:
jump LABEL271
LABEL350:
sconst "chatboxBackgroundBuilt"
runelite_callback
jump LABEL339
LABEL273:
jump LABEL417
LABEL351:
iconst 10616867
iconst 3
iload 4
@@ -377,7 +459,7 @@ LABEL273:
cc_settrans
iconst 130
cc_settrans 1
LABEL339:
LABEL417:
iconst 10617389
iconst 1190
iconst 1187
@@ -389,24 +471,24 @@ LABEL339:
invoke 838
iload 0
iconst 1
if_icmpeq LABEL352
jump LABEL356
LABEL352:
if_icmpeq LABEL430
jump LABEL434
LABEL430:
iconst 255
iconst 10616835
if_settrans
jump LABEL387
LABEL356:
jump LABEL465
LABEL434:
invoke 1972
iconst 0
if_icmpeq LABEL360
jump LABEL364
LABEL360:
if_icmpeq LABEL438
jump LABEL442
LABEL438:
iconst 155
iconst 10616835
if_settrans
jump LABEL387
LABEL364:
jump LABEL465
LABEL442:
iconst 255
iconst 10616835
if_settrans
@@ -430,5 +512,5 @@ LABEL364:
cc_setfill
iconst 225
cc_settrans
LABEL387:
LABEL465:
return

View File

@@ -27,7 +27,6 @@ package net.runelite.client.plugins.discord;
import com.google.inject.Guice;
import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import java.util.List;
import javax.inject.Inject;
import javax.inject.Named;
import net.runelite.api.Client;
@@ -35,7 +34,6 @@ import net.runelite.client.discord.DiscordPresence;
import net.runelite.client.discord.DiscordService;
import net.runelite.client.ws.PartyService;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -44,6 +42,7 @@ import static org.mockito.ArgumentMatchers.any;
import org.mockito.Mock;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyNoMoreInteractions;
import static org.mockito.Mockito.when;
import org.mockito.junit.MockitoJUnitRunner;
@@ -90,13 +89,12 @@ public class DiscordStateTest
when(discordConfig.elapsedTimeType()).thenReturn(DiscordConfig.ElapsedTimeType.ACTIVITY);
discordState.triggerEvent(DiscordGameEventType.IN_MENU);
verify(discordService).updatePresence(any(DiscordPresence.class));
verify(discordService).updatePresence(any(DiscordPresence.class)); // menu presence
discordState.checkForTimeout();
ArgumentCaptor<DiscordPresence> captor = ArgumentCaptor.forClass(DiscordPresence.class);
verify(discordService, times(2)).updatePresence(captor.capture());
List<DiscordPresence> captured = captor.getAllValues();
assertNull(captured.get(captured.size() - 1).getEndTimestamp());
// menu is not clearable and so no changes will be made
verifyNoMoreInteractions(discordService);
}
@Test

View File

@@ -30,6 +30,7 @@ import com.google.inject.testing.fieldbinder.Bind;
import com.google.inject.testing.fieldbinder.BoundFieldModule;
import java.time.Duration;
import java.time.Instant;
import java.util.function.Predicate;
import net.runelite.api.ChatMessageType;
import net.runelite.api.Client;
import net.runelite.api.Experience;
@@ -37,15 +38,19 @@ import net.runelite.api.InventoryID;
import net.runelite.api.ItemContainer;
import net.runelite.api.ItemID;
import net.runelite.api.Skill;
import net.runelite.api.Varbits;
import net.runelite.api.events.ChatMessage;
import net.runelite.api.events.ItemContainerChanged;
import net.runelite.api.events.MenuOptionClicked;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.VarbitChanged;
import net.runelite.client.game.ItemManager;
import net.runelite.client.game.SpriteManager;
import net.runelite.client.ui.overlay.infobox.InfoBox;
import net.runelite.client.ui.overlay.infobox.InfoBoxManager;
import net.runelite.client.util.RSTimeUnit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
@@ -377,6 +382,165 @@ public class TimersPluginTest
assertEquals("00:06", timer.getText());
}
// region Arceuus spells
@Test
public void testDeathChargeCast()
{
when(timersConfig.showArceuus()).thenReturn(true);
when(client.getRealSkillLevel(Skill.MAGIC)).thenReturn(50);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=6800bf>Upon the death of your next foe, some of your special attack energy will be restored.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> ibcaptor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(ibcaptor.capture());
TimerTimer infoBox = (TimerTimer) ibcaptor.getValue();
assertEquals(GameTimer.DEATH_CHARGE, infoBox.getTimer());
assertEquals(Duration.of(50, RSTimeUnit.GAME_TICKS), infoBox.getDuration());
}
@Test
public void testDeathChargeCooldown()
{
when(timersConfig.showArceuusCooldown()).thenReturn(true);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=6800bf>Upon the death of your next foe, some of your special attack energy will be restored.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> ibcaptor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(ibcaptor.capture());
TimerTimer infoBox = (TimerTimer) ibcaptor.getValue();
assertEquals(GameTimer.DEATH_CHARGE_COOLDOWN, infoBox.getTimer());
}
@Test
public void testDeathChargeRestore()
{
when(timersConfig.showArceuus()).thenReturn(true);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=6800bf>Some of your special attack energy has been restored.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
TimerTimer correctInfoBox = new TimerTimer(GameTimer.DEATH_CHARGE, Duration.ofSeconds(1), timersPlugin);
TimerTimer incorrectInfoBox = new TimerTimer(GameTimer.WARD_OF_ARCEUUS, Duration.ofSeconds(1), timersPlugin);
ArgumentCaptor<Predicate<InfoBox>> prcaptor = ArgumentCaptor.forClass(Predicate.class);
verify(infoBoxManager).removeIf(prcaptor.capture());
Predicate<InfoBox> pred = prcaptor.getValue();
assertTrue(pred.test(correctInfoBox));
assertFalse(pred.test(incorrectInfoBox));
}
@Test
public void testArceuusWard()
{
when(timersConfig.showArceuus()).thenReturn(true);
when(client.getRealSkillLevel(Skill.MAGIC)).thenReturn(57);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=0000b2>Your defence against Arceuus magic has been strengthened.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(captor.capture());
TimerTimer infoBox = (TimerTimer) captor.getValue();
assertEquals(GameTimer.WARD_OF_ARCEUUS, infoBox.getTimer());
assertEquals(Duration.of(57, RSTimeUnit.GAME_TICKS), infoBox.getDuration());
}
@Test
public void testArceuusWardCooldown()
{
when(timersConfig.showArceuusCooldown()).thenReturn(true);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=0000b2>Your defence against Arceuus magic has been strengthened.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(captor.capture());
TimerTimer infoBox = (TimerTimer) captor.getValue();
assertEquals(GameTimer.WARD_OF_ARCEUUS_COOLDOWN, infoBox.getTimer());
}
@Test
public void testCorruptionCooldown()
{
when(timersConfig.showArceuusCooldown()).thenReturn(true);
when(client.getVar(any(Varbits.class))).thenReturn(0);
when(client.getVar(Varbits.CORRUPTION_COOLDOWN)).thenReturn(1);
timersPlugin.onVarbitChanged(new VarbitChanged());
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(captor.capture());
TimerTimer infoBox = (TimerTimer) captor.getValue();
assertEquals(GameTimer.CORRUPTION_COOLDOWN, infoBox.getTimer());
}
@Test
public void testShadowVail()
{
when(timersConfig.showArceuus()).thenReturn(true);
when(client.getRealSkillLevel(Skill.MAGIC)).thenReturn(57);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=6800bf>Your thieving abilities have been enhanced.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(captor.capture());
TimerTimer infoBox = (TimerTimer) captor.getValue();
assertEquals(GameTimer.SHADOW_VEIL, infoBox.getTimer());
}
@Test
public void testShadowVailCooldown()
{
when(timersConfig.showArceuusCooldown()).thenReturn(true);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=6800bf>Your thieving abilities have been enhanced.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> captor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(captor.capture());
TimerTimer infoBox = (TimerTimer) captor.getValue();
assertEquals(GameTimer.SHADOW_VEIL_COOLDOWN, infoBox.getTimer());
}
@Test
public void testThrall()
{
when(timersConfig.showArceuus()).thenReturn(true);
when(client.getRealSkillLevel(Skill.MAGIC)).thenReturn(50);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=ef0083>You resurrect a greater zombified thrall.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> ibcaptor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(ibcaptor.capture());
TimerTimer infoBox = (TimerTimer) ibcaptor.getValue();
assertEquals(GameTimer.RESURRECT_THRALL, infoBox.getTimer());
}
@Test
public void testThrallCooldown()
{
when(timersConfig.showArceuusCooldown()).thenReturn(true);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=ef0083>You resurrect a greater zombified thrall.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
ArgumentCaptor<InfoBox> ibcaptor = ArgumentCaptor.forClass(InfoBox.class);
verify(infoBoxManager).addInfoBox(ibcaptor.capture());
TimerTimer infoBox = (TimerTimer) ibcaptor.getValue();
assertEquals(GameTimer.RESURRECT_THRALL_COOLDOWN, infoBox.getTimer());
}
@Test
public void testThrallEnd()
{
when(timersConfig.showArceuus()).thenReturn(true);
when(client.getRealSkillLevel(Skill.MAGIC)).thenReturn(50);
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", "<col=ef0083>Your greater zombified thrall returns to the grave.</col>", "", 0);
timersPlugin.onChatMessage(chatMessage);
verify(infoBoxManager).removeIf(any());
}
// endregion
@Test
public void testImbuedHeartBoost()
{