Merge branch 'pr/8' into upstream
This commit is contained in:
@@ -66,7 +66,8 @@ public enum ItemMapping
|
||||
ITEM_DRAGON_SCIMITAR(DRAGON_SCIMITAR, DRAGON_SCIMITAR_OR),
|
||||
ITEM_DRAGON_SCIMITAR_ORNAMENT_KIT(DRAGON_SCIMITAR_ORNAMENT_KIT, DRAGON_SCIMITAR_OR),
|
||||
ITEM_DRAGON_DEFENDER(DRAGON_DEFENDER_ORNAMENT_KIT, DRAGON_DEFENDER_T),
|
||||
ITEM_DRAGON_PICKAXE(DRAGON_PICKAXE, DRAGON_PICKAXE_12797),
|
||||
ITEM_DRAGON_PICKAXE(DRAGON_PICKAXE, DRAGON_PICKAXE_12797, DRAGON_PICKAXEOR),
|
||||
ITEM_DRAGON_PICKAXE_OR(ZALCANO_SHARD, DRAGON_PICKAXEOR),
|
||||
ITEM_DRAGON_KITESHIELD(DRAGON_KITESHIELD, DRAGON_KITESHIELD_G),
|
||||
ITEM_DRAGON_KITESHIELD_ORNAMENT_KIT(DRAGON_KITESHIELD_ORNAMENT_KIT, DRAGON_KITESHIELD_G),
|
||||
ITEM_DRAGON_FULL_HELM(DRAGON_FULL_HELM, DRAGON_FULL_HELM_G),
|
||||
@@ -214,7 +215,17 @@ public enum ItemMapping
|
||||
ITEM_HYDRA_LEATHER(HYDRA_LEATHER, FEROCIOUS_GLOVES),
|
||||
ITEM_HYDRA_TAIL(HYDRA_TAIL, BONECRUSHER_NECKLACE),
|
||||
ITEM_DRAGONBONE_NECKLACE(DRAGONBONE_NECKLACE, BONECRUSHER_NECKLACE),
|
||||
ITEM_BOTTOMLESS_COMPOST_BUCKET(BOTTOMLESS_COMPOST_BUCKET, BOTTOMLESS_COMPOST_BUCKET_22997);
|
||||
ITEM_BOTTOMLESS_COMPOST_BUCKET(BOTTOMLESS_COMPOST_BUCKET, BOTTOMLESS_COMPOST_BUCKET_22997),
|
||||
|
||||
// Crystal items
|
||||
ITEM_CRYSTAL_TOOL_SEED(CRYSTAL_TOOL_SEED, CRYSTAL_AXE, CRYSTAL_AXE_INACTIVE, CRYSTAL_HARPOON, CRYSTAL_HARPOON_INACTIVE, CRYSTAL_PICKAXE, CRYSTAL_PICKAXE_INACTIVE),
|
||||
ITEM_CRYSTAL_AXE(DRAGON_AXE, CRYSTAL_AXE, CRYSTAL_AXE_INACTIVE),
|
||||
ITEM_CRYSTAL_HARPOON(DRAGON_HARPOON, CRYSTAL_HARPOON, CRYSTAL_HARPOON_INACTIVE),
|
||||
ITEM_CRYSTAL_PICKAXE(DRAGON_PICKAXE, CRYSTAL_PICKAXE, CRYSTAL_PICKAXE_INACTIVE),
|
||||
ITEM_BLADE_OF_SAELDOR(BLADE_OF_SAELDOR_INACTIVE, BLADE_OF_SAELDOR),
|
||||
ITEM_CRYSTAL_BOW(CRYSTAL_WEAPON_SEED, CRYSTAL_BOW, CRYSTAL_BOW_INACTIVE),
|
||||
ITEM_CRYSTAL_HALBERD(CRYSTAL_WEAPON_SEED, CRYSTAL_HALBERD, CRYSTAL_HALBERD_INACTIVE),
|
||||
ITEM_CRYSTAL_SHIELD(CRYSTAL_WEAPON_SEED, CRYSTAL_SHIELD, CRYSTAL_SHIELD_INACTIVE);
|
||||
|
||||
private static final Multimap<Integer, Integer> MAPPINGS = HashMultimap.create();
|
||||
private final int tradeableItem;
|
||||
|
||||
@@ -46,7 +46,14 @@ public enum UntradeableItemMapping
|
||||
PROSPECTOR_HELMET(ItemID.PROSPECTOR_HELMET, 32, ItemID.GOLDEN_NUGGET),
|
||||
PROSPECTOR_JACKET(ItemID.PROSPECTOR_JACKET, 48, ItemID.GOLDEN_NUGGET),
|
||||
PROSPECTOR_LEGS(ItemID.PROSPECTOR_LEGS, 40, ItemID.GOLDEN_NUGGET),
|
||||
PROSPECTOR_BOOTS(ItemID.PROSPECTOR_BOOTS, 24, ItemID.GOLDEN_NUGGET);
|
||||
PROSPECTOR_BOOTS(ItemID.PROSPECTOR_BOOTS, 24, ItemID.GOLDEN_NUGGET),
|
||||
|
||||
CRYSTAL_HELMET(ItemID.CRYSTAL_HELM, 1, ItemID.CRYSTAL_ARMOUR_SEED),
|
||||
CRYSTAL_HELMET_INACTIVE(ItemID.CRYSTAL_HELM_INACTIVE, 1, ItemID.CRYSTAL_ARMOUR_SEED),
|
||||
CRYSTAL_LEGS(ItemID.CRYSTAL_LEGS, 2, ItemID.CRYSTAL_ARMOUR_SEED),
|
||||
CRYSTAL_LEGS_INACTIVE(ItemID.CRYSTAL_LEGS_INACTIVE, 2, ItemID.CRYSTAL_ARMOUR_SEED),
|
||||
CRYSTAL_BODY(ItemID.CRYSTAL_BODY, 3, ItemID.CRYSTAL_ARMOUR_SEED),
|
||||
CRYSTAL_BODY_INACTIVE(ItemID.CRYSTAL_BODY_INACTIVE, 3, ItemID.CRYSTAL_ARMOUR_SEED);
|
||||
|
||||
private static final ImmutableMap<Integer, UntradeableItemMapping> UNTRADEABLE_RECLAIM_MAP;
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ import org.apache.commons.text.WordUtils;
|
||||
@Slf4j
|
||||
public class ChatCommandsPlugin extends Plugin
|
||||
{
|
||||
private static final Pattern KILLCOUNT_PATTERN = Pattern.compile("Your (.+) (?:kill|harvest|lap) count is: <col=ff0000>(\\d+)</col>");
|
||||
private static final Pattern KILLCOUNT_PATTERN = Pattern.compile("Your (.+) (?:kill|harvest|lap|completion) 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 BARROWS_PATTERN = Pattern.compile("Your Barrows chest count is: <col=ff0000>(\\d+)</col>");
|
||||
@@ -1382,6 +1382,16 @@ public class ChatCommandsPlugin extends Plugin
|
||||
case "prifddinas":
|
||||
return "Prifddinas Agility Course";
|
||||
|
||||
// The Gauntlet
|
||||
case "gaunt":
|
||||
case "gauntlet":
|
||||
return "Gauntlet";
|
||||
|
||||
// Corrupted Gauntlet
|
||||
case "cgaunt":
|
||||
case "cgauntlet":
|
||||
return "Corrupted Gauntlet";
|
||||
|
||||
default:
|
||||
return WordUtils.capitalize(boss);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
||||
new EmoteClue("Cry in the Catherby Ranging shop. Bow before you talk to me. Equip blue gnome boots, a hard leather body and an unblessed silver sickle.", "Catherby", HICKTONS_ARCHERY_EMPORIUM, new WorldPoint(2823, 3443, 0), CRY, BOW, item(BLUE_BOOTS), item(HARDLEATHER_BODY), item(SILVER_SICKLE)),
|
||||
new EmoteClue("Cry on the shore of Catherby beach. Laugh before you talk to me, equip an adamant sq shield, a bone dagger and mithril platebody.", "Catherby", OUTSIDE_HARRYS_FISHING_SHOP_IN_CATHERBY, new WorldPoint(2852, 3429, 0), CRY, LAUGH, item(ADAMANT_SQ_SHIELD), item(BONE_DAGGER), item(MITHRIL_PLATEBODY)),
|
||||
new EmoteClue("Cry on top of the western tree in the Gnome Agility Arena. Indicate 'no' before you talk to me. Equip a steel kiteshield, ring of forging and green dragonhide chaps.", "Gnome Stronghold", GNOME_STRONGHOLD_BALANCING_ROPE, new WorldPoint(2473, 3420, 2), CRY, NO, item(STEEL_KITESHIELD), item(RING_OF_FORGING), item(GREEN_DHIDE_CHAPS)),
|
||||
new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_MAX_CAPE)), item(TOKTZXILUL)),
|
||||
new EmoteClue("Cry in the TzHaar gem store. Beware of double agents! Equip a fire cape and TokTz-Xil-Ul.", "Tzhaar gem store", TZHAAR_GEM_STORE, new WorldPoint(2463, 5149, 0), CRY, any("Fire cape", item(FIRE_CAPE), item(FIRE_MAX_CAPE), item(INFERNAL_CAPE), item(INFERNAL_MAX_CAPE)), item(TOKTZXILUL)),
|
||||
new EmoteClue("Cry in the Draynor Village jail. Jump for joy before you talk to me. Equip an adamant sword, a sapphire amulet and an adamant plateskirt.", "Draynor Village jail", OUTSIDE_DRAYNOR_VILLAGE_JAIL, new WorldPoint(3128, 3245, 0), CRY, JUMP_FOR_JOY, item(ADAMANT_SWORD), item(SAPPHIRE_AMULET), item(ADAMANT_PLATESKIRT)),
|
||||
new EmoteClue("Dance at the crossroads north of Draynor. Equip an iron chain body, a sapphire ring and a longbow.", "Draynor Village", CROSSROADS_NORTH_OF_DRAYNOR_VILLAGE, new WorldPoint(3109, 3294, 0), DANCE, item(IRON_CHAINBODY), item(SAPPHIRE_RING), item(LONGBOW)),
|
||||
new EmoteClue("Dance in the Party Room. Equip a steel full helmet, steel platebody and an iron plateskirt.", "Falador Party Room", OUTSIDE_THE_FALADOR_PARTY_ROOM, new WorldPoint(3045, 3376, 0), DANCE, item(STEEL_FULL_HELM), item(STEEL_PLATEBODY), item(IRON_PLATESKIRT)),
|
||||
@@ -155,7 +155,7 @@ public class EmoteClue extends ClueScroll implements TextClueScroll, LocationClu
|
||||
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), 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)),
|
||||
new EmoteClue("Spin in front of the Soul altar. Beware of double agents! Equip a dragon pickaxe, helm of neitiznot and a pair of rune boots.", "Soul altar", SOUL_ALTAR, new WorldPoint(1815, 3856, 0), SPIN, any("Dragon pickaxe", item(DRAGON_PICKAXE), item(DRAGON_PICKAXE_12797), item(INFERNAL_PICKAXE), item(INFERNAL_PICKAXE_UNCHARGED)), item(HELM_OF_NEITIZNOT), item(RUNE_BOOTS)),
|
||||
new EmoteClue("Spin in front of the Soul altar. Beware of double agents! Equip a dragon pickaxe, helm of neitiznot and a pair of rune boots.", "Soul altar", SOUL_ALTAR, new WorldPoint(1815, 3856, 0), SPIN, any("Dragon pickaxe", item(DRAGON_PICKAXE), item(DRAGON_PICKAXE_12797), item(INFERNAL_PICKAXE), item(INFERNAL_PICKAXE_UNCHARGED), item(DRAGON_PICKAXEOR)), item(HELM_OF_NEITIZNOT), item(RUNE_BOOTS)),
|
||||
new EmoteClue("Spin in the Varrock Castle courtyard. Equip a black axe, a coif and a ruby ring.", "Varrock Castle", OUTSIDE_VARROCK_PALACE_COURTYARD, new WorldPoint(3213, 3463, 0), SPIN, item(BLACK_AXE), item(COIF), item(RUBY_RING)),
|
||||
new EmoteClue("Spin in West Ardougne Church. Equip a dragon spear and red dragonhide chaps.", "Ardougne", CHAPEL_IN_WEST_ARDOUGNE, new WorldPoint(2530, 3290, 0), SPIN, item(DRAGON_SPEAR), item(RED_DHIDE_CHAPS)),
|
||||
new EmoteClue("Spin on the bridge by the Barbarian Village. Salute before you talk to me. Equip purple gloves, a steel kiteshield and a mithril full helmet.", "Barbarian Village", EAST_OF_THE_BARBARIAN_VILLAGE_BRIDGE, new WorldPoint(3105, 3420, 0), SPIN, SALUTE, item(PURPLE_GLOVES), item(STEEL_KITESHIELD), item(MITHRIL_FULL_HELM)),
|
||||
|
||||
@@ -153,12 +153,12 @@ public enum HotColdLocation
|
||||
WILDERNESS_32(new WorldPoint(3311, 3773, 0), WILDERNESS, "North of Venenatis' nest, level 32 Wilderness."),
|
||||
WILDERNESS_35(new WorldPoint(3153, 3795, 0), WILDERNESS, "East of the Wilderness canoe exit, level 35 Wilderness."),
|
||||
WILDERNESS_37(new WorldPoint(2975, 3811, 0), WILDERNESS, "South-east of the Chaos Temple, level 37 Wilderness."),
|
||||
WILDERNESS_38(new WorldPoint(3294, 3817, 0), WILDERNESS, "South of Callisto, level 38 Wilderness."),
|
||||
WILDERNESS_38(new WorldPoint(3293, 3813, 0), WILDERNESS, "South of Callisto, level 38 Wilderness."),
|
||||
WILDERNESS_49(new WorldPoint(3140, 3910, 0), WILDERNESS, "South-west of the Deserted Keep, level 49 Wilderness."),
|
||||
WILDERNESS_54(new WorldPoint(2983, 3946, 0), WILDERNESS, "West of the Wilderness Agility Course, level 54 Wilderness."),
|
||||
ZEAH_BLASTMINE_BANK(new WorldPoint(1507, 3856, 0), ZEAH, "Next to the bank in the Lovakengj blast mine."),
|
||||
ZEAH_BLASTMINE_NORTH(new WorldPoint(1490, 3883, 0), ZEAH, "Northern part of the Lovakengj blast mine."),
|
||||
ZEAH_LOVAKITE_FURNACE(new WorldPoint(1505, 3814, 0), ZEAH, "Next to the lovakite furnace in Lovakengj."),
|
||||
ZEAH_LOVAKITE_FURNACE(new WorldPoint(1507, 3819, 0), ZEAH, "Next to the lovakite furnace in Lovakengj."),
|
||||
ZEAH_LOVAKENGJ_MINE(new WorldPoint(1477, 3779, 0), ZEAH, "Next to mithril rock in the Lovakengj mine."),
|
||||
ZEAH_SULPHR_MINE(new WorldPoint(1428, 3866, 0), ZEAH, "Western entrance in the Lovakengj sulphur mine."),
|
||||
ZEAH_SHAYZIEN_BANK(new WorldPoint(1517, 3603, 0), ZEAH, "South-east of the bank in Shayzien."),
|
||||
|
||||
@@ -99,6 +99,8 @@ import static net.runelite.api.NpcID.ROD_FISHING_SPOT_7464;
|
||||
import static net.runelite.api.NpcID.ROD_FISHING_SPOT_7468;
|
||||
import static net.runelite.api.NpcID.ROD_FISHING_SPOT_7676;
|
||||
import static net.runelite.api.NpcID.ROD_FISHING_SPOT_8524;
|
||||
import static net.runelite.api.NpcID.FISHING_SPOT_4928;
|
||||
import static net.runelite.api.NpcID.FISHING_SPOT_6784;
|
||||
|
||||
@Getter
|
||||
enum FishingSpot
|
||||
@@ -132,6 +134,9 @@ enum FishingSpot
|
||||
ROD_FISHING_SPOT_1526, ROD_FISHING_SPOT_1527, ROD_FISHING_SPOT_7463,
|
||||
ROD_FISHING_SPOT_7464, ROD_FISHING_SPOT_7468, ROD_FISHING_SPOT_8524
|
||||
),
|
||||
LAVA_EEL("Lava eel", ItemID.LAVA_EEL,
|
||||
FISHING_SPOT_4928, FISHING_SPOT_6784
|
||||
),
|
||||
BARB_FISH("Sturgeon, Salmon, Trout", ItemID.LEAPING_STURGEON,
|
||||
FISHING_SPOT_1542, FISHING_SPOT_7323
|
||||
),
|
||||
|
||||
@@ -80,6 +80,24 @@ enum Impling
|
||||
CRYSTAL_17(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8757),
|
||||
|
||||
|
||||
CRYSTAL(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING),
|
||||
CRYSTAL_2(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8742),
|
||||
CRYSTAL_3(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8743),
|
||||
CRYSTAL_4(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8744),
|
||||
CRYSTAL_5(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8745),
|
||||
CRYSTAL_6(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8746),
|
||||
CRYSTAL_7(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8747),
|
||||
CRYSTAL_8(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8748),
|
||||
CRYSTAL_9(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8749),
|
||||
CRYSTAL_10(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8750),
|
||||
CRYSTAL_11(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8751),
|
||||
CRYSTAL_12(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8752),
|
||||
CRYSTAL_13(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8753),
|
||||
CRYSTAL_14(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8754),
|
||||
CRYSTAL_15(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8755),
|
||||
CRYSTAL_16(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8756),
|
||||
CRYSTAL_17(ImplingType.CRYSTAL, NpcID.CRYSTAL_IMPLING_8757),
|
||||
|
||||
DRAGON(ImplingType.DRAGON, NpcID.DRAGON_IMPLING),
|
||||
DRAGON_2(ImplingType.DRAGON, NpcID.DRAGON_IMPLING_1654),
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ public interface ImplingsConfig extends Config
|
||||
|
||||
@ConfigItem(
|
||||
position = 19,
|
||||
keyName = "showcrystal",
|
||||
keyName = "showCrystal",
|
||||
name = "Show Crystal implings",
|
||||
description = "Configures whether or not Crystal impling tags are displayed"
|
||||
)
|
||||
@@ -252,7 +252,7 @@ public interface ImplingsConfig extends Config
|
||||
)
|
||||
default Color getCrystalColor()
|
||||
{
|
||||
return new Color(2, 255, 251);
|
||||
return new Color(93, 188, 210);
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
|
||||
@@ -309,6 +309,7 @@ public class ImplingsPlugin extends Plugin
|
||||
return this.getNinjaColor;
|
||||
case CRYSTAL:
|
||||
return this.getCrystalColor;
|
||||
|
||||
case DRAGON:
|
||||
return this.getDragonColor;
|
||||
case LUCKY:
|
||||
|
||||
@@ -429,6 +429,7 @@ import static net.runelite.client.plugins.itemstats.Builders.heal;
|
||||
import static net.runelite.client.plugins.itemstats.Builders.perc;
|
||||
import static net.runelite.client.plugins.itemstats.Builders.range;
|
||||
import net.runelite.client.plugins.itemstats.food.Anglerfish;
|
||||
import net.runelite.client.plugins.itemstats.potions.GauntletPotion;
|
||||
import net.runelite.client.plugins.itemstats.potions.PrayerPotion;
|
||||
import net.runelite.client.plugins.itemstats.potions.SaradominBrew;
|
||||
import net.runelite.client.plugins.itemstats.potions.SuperRestore;
|
||||
@@ -609,6 +610,10 @@ public class ItemStatChanges
|
||||
add(boost(MAGIC, perc(.10, 1)), IMBUED_HEART);
|
||||
add(combo(boost(ATTACK, 2), boost(STRENGTH, 1), heal(DEFENCE, -1)), JANGERBERRIES);
|
||||
|
||||
// Gauntlet items
|
||||
add(heal(HITPOINTS, 20), PADDLEFISH);
|
||||
add(new GauntletPotion(), EGNIOL_POTION_1, EGNIOL_POTION_2, EGNIOL_POTION_3, EGNIOL_POTION_4);
|
||||
|
||||
log.debug("{} items; {} behaviours loaded", effects.size(), new HashSet<>(effects.values()).size());
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2019, TheStonedTurtle <https://github.com/TheStonedTurtle>
|
||||
* 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.itemstats.potions;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Skill;
|
||||
import static net.runelite.client.plugins.itemstats.Builders.heal;
|
||||
import net.runelite.client.plugins.itemstats.Effect;
|
||||
import net.runelite.client.plugins.itemstats.StatChange;
|
||||
import net.runelite.client.plugins.itemstats.StatsChanges;
|
||||
import net.runelite.client.plugins.itemstats.stats.Stats;
|
||||
|
||||
/**
|
||||
* Acts like a prayer potion and stamina dose combined but restores 40 energy instead of 20
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
public class GauntletPotion implements Effect
|
||||
{
|
||||
private static final int PRAYER_RESTORE_DELTA = 7;
|
||||
private static final double PRAYER_RESTORE_PERCENT = .25;
|
||||
|
||||
@Override
|
||||
public StatsChanges calculate(Client client)
|
||||
{
|
||||
// Restores prayer similar to PrayerPotion but there aren't any possible boost so simplify the calculation
|
||||
final int restorePerc = (int) (client.getRealSkillLevel(Skill.PRAYER) * PRAYER_RESTORE_PERCENT);
|
||||
final StatChange prayer = heal(Stats.PRAYER, restorePerc + PRAYER_RESTORE_DELTA).effect(client);
|
||||
|
||||
final StatChange runEnergy = heal(Stats.RUN_ENERGY, 40).effect(client);
|
||||
|
||||
final StatsChanges changes = new StatsChanges(2);
|
||||
changes.setStatChanges(new StatChange[]{runEnergy, prayer});
|
||||
return changes;
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ enum Rock
|
||||
{
|
||||
TIN(Duration.ofMillis(2400), 0, ROCKS_11360, ROCKS_11361),
|
||||
COPPER(Duration.ofMillis(2400), 0, ROCKS_10943, ROCKS_11161),
|
||||
IRON(Duration.ofMillis(5400), 0, ROCKS_11364, ROCKS_11365)
|
||||
IRON(Duration.ofMillis(5400), 0, ROCKS_11364, ROCKS_11365, ROCKS_36203)
|
||||
{
|
||||
@Override
|
||||
Duration getRespawnTime(boolean inMiningGuild)
|
||||
@@ -43,7 +43,7 @@ enum Rock
|
||||
return inMiningGuild ? Duration.ofMillis(2400) : super.respawnTime;
|
||||
}
|
||||
},
|
||||
COAL(Duration.ofMillis(29400), 0, ROCKS_11366, ROCKS_11367)
|
||||
COAL(Duration.ofMillis(29400), 0, ROCKS_11366, ROCKS_11367, ROCKS_36204)
|
||||
{
|
||||
@Override
|
||||
Duration getRespawnTime(boolean inMiningGuild)
|
||||
@@ -51,11 +51,11 @@ enum Rock
|
||||
return inMiningGuild ? Duration.ofMillis(14400) : super.respawnTime;
|
||||
}
|
||||
},
|
||||
SILVER(Duration.ofMinutes(1), 0, ROCKS_11368, ROCKS_11369),
|
||||
SILVER(Duration.ofMinutes(1), 0, ROCKS_11368, ROCKS_11369, ROCKS_36205),
|
||||
SANDSTONE(Duration.ofMillis(5400), 0, ROCKS_11386),
|
||||
GOLD(Duration.ofMinutes(1), 0, ROCKS_11370, ROCKS_11371),
|
||||
GOLD(Duration.ofMinutes(1), 0, ROCKS_11370, ROCKS_11371, ROCKS_36206),
|
||||
GRANITE(Duration.ofMillis(5400), 0, ROCKS_11387),
|
||||
MITHRIL(Duration.ofMinutes(2), 0, ROCKS_11372, ROCKS_11373)
|
||||
MITHRIL(Duration.ofMinutes(2), 0, ROCKS_11372, ROCKS_11373, ROCKS_36207)
|
||||
{
|
||||
@Override
|
||||
Duration getRespawnTime(boolean inMiningGuild)
|
||||
@@ -63,7 +63,7 @@ enum Rock
|
||||
return inMiningGuild ? Duration.ofMinutes(1) : super.respawnTime;
|
||||
}
|
||||
},
|
||||
ADAMANTITE(Duration.ofMinutes(4), 0, ROCKS_11374, ROCKS_11375)
|
||||
ADAMANTITE(Duration.ofMinutes(4), 0, ROCKS_11374, ROCKS_11375, ROCKS_36208)
|
||||
{
|
||||
@Override
|
||||
Duration getRespawnTime(boolean inMiningGuild)
|
||||
@@ -71,7 +71,7 @@ enum Rock
|
||||
return inMiningGuild ? Duration.ofMinutes(2) : super.respawnTime;
|
||||
}
|
||||
},
|
||||
RUNITE(Duration.ofMinutes(12), 0, ROCKS_11376, ROCKS_11377)
|
||||
RUNITE(Duration.ofMinutes(12), 0, ROCKS_11376, ROCKS_11377, ROCKS_36209)
|
||||
{
|
||||
@Override
|
||||
Duration getRespawnTime(boolean inMiningGuild)
|
||||
|
||||
@@ -73,7 +73,13 @@ enum GameTimer
|
||||
SKULL(SpriteID.PLAYER_KILLER_SKULL_523, GameTimerImageType.SPRITE, "Skull", 20, ChronoUnit.MINUTES),
|
||||
ANTIPOISON(ItemID.ANTIPOISON4, GameTimerImageType.ITEM, "Antipoison"),
|
||||
ANTIVENOM(ItemID.ANTIVENOM4, GameTimerImageType.ITEM, "Anti-venom"),
|
||||
DRAGON_FIRE_SHIELD(ItemID.DRAGONFIRE_SHIELD_11284, GameTimerImageType.ITEM, "Dragonfire Shield Special", 2, ChronoUnit.MINUTES);
|
||||
DRAGON_FIRE_SHIELD(ItemID.DRAGONFIRE_SHIELD_11284, GameTimerImageType.ITEM, "Dragonfire Shield Special", 2, ChronoUnit.MINUTES),
|
||||
DIVINE_SUPER_ATTACK(ItemID.DIVINE_SUPER_ATTACK_POTION4, GameTimerImageType.ITEM, "Divine Super Attack", 5, ChronoUnit.MINUTES, true),
|
||||
DIVINE_SUPER_STRENGTH(ItemID.DIVINE_SUPER_STRENGTH_POTION4, GameTimerImageType.ITEM, "Divine Super Strength", 5, ChronoUnit.MINUTES, true),
|
||||
DIVINE_SUPER_DEFENCE(ItemID.DIVINE_SUPER_DEFENCE_POTION4, GameTimerImageType.ITEM, "Divine Super Defence", 5, ChronoUnit.MINUTES, true),
|
||||
DIVINE_SUPER_COMBAT(ItemID.DIVINE_SUPER_COMBAT_POTION4, GameTimerImageType.ITEM, "Divine Super Combat", 5, ChronoUnit.MINUTES, true),
|
||||
DIVINE_RANGING(ItemID.DIVINE_RANGING_POTION4, GameTimerImageType.ITEM, "Divine Ranging", 5, ChronoUnit.MINUTES, true),
|
||||
DIVINE_MAGIC(ItemID.DIVINE_MAGIC_POTION4, GameTimerImageType.ITEM, "Divine Magic", 5, ChronoUnit.MINUTES, true);
|
||||
|
||||
private final Duration duration;
|
||||
private final Integer graphicId;
|
||||
|
||||
@@ -91,6 +91,16 @@ public interface TimersConfig extends Config
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showDivine",
|
||||
name = "Divine potion timer",
|
||||
description = "Configures whether divine potion timer is displayed"
|
||||
)
|
||||
default boolean showDivine()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
keyName = "showCannon",
|
||||
name = "Cannon timer",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
package net.runelite.client.plugins.timers;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Singleton;
|
||||
@@ -113,10 +114,12 @@ public class TimersPlugin extends Plugin
|
||||
private static final String SUPER_ANTIFIRE_EXPIRED_MESSAGE = "<col=7f007f>Your super antifire potion has expired.</col>";
|
||||
private static final int VENOM_VALUE_CUTOFF = -40; // Antivenom < -40 =< Antipoison < 0
|
||||
private static final int POISON_TICK_LENGTH = 30;
|
||||
|
||||
private static final Pattern DEADMAN_HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+). It will expire in 1 minute, 15 seconds.</col>");
|
||||
private static final Pattern FULL_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+). It will expire in 5 minutes, 0 seconds.</col>");
|
||||
private static final Pattern HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+). It will expire in 2 minutes, 30 seconds.</col>");
|
||||
private static final String SUPER_ANTIVENOM_DRINK_MESSAGE = "You drink some of your super antivenom potion";
|
||||
private static final String KILLED_TELEBLOCK_OPPONENT_TEXT = "<col=4f006f>Your Tele Block has been removed because you killed ";
|
||||
private static final Pattern DEADMAN_HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 1 minute, 15 seconds\\.</col>");
|
||||
private static final Pattern FULL_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 5 minutes, 0 seconds\\.</col>");
|
||||
private static final Pattern HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 2 minutes, 30 seconds\\.</col>");
|
||||
private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\.");
|
||||
|
||||
private TimerTimer freezeTimer;
|
||||
private int freezeTime = -1; // time frozen, in game ticks
|
||||
@@ -172,6 +175,7 @@ public class TimersPlugin extends Plugin
|
||||
private boolean showSkull;
|
||||
private boolean showStaffOfTheDead;
|
||||
private boolean showAbyssalSireStun;
|
||||
private boolean showDivine;
|
||||
|
||||
@Provides
|
||||
TimersConfig getConfig(ConfigManager configManager)
|
||||
@@ -355,6 +359,16 @@ public class TimersPlugin extends Plugin
|
||||
removeGameTimer(PRAYER_ENHANCE);
|
||||
}
|
||||
|
||||
if (!this.showDivine)
|
||||
{
|
||||
removeGameTimer(DIVINE_SUPER_ATTACK);
|
||||
removeGameTimer(DIVINE_SUPER_STRENGTH);
|
||||
removeGameTimer(DIVINE_SUPER_DEFENCE);
|
||||
removeGameTimer(DIVINE_SUPER_COMBAT);
|
||||
removeGameTimer(DIVINE_RANGING);
|
||||
removeGameTimer(DIVINE_MAGIC);
|
||||
}
|
||||
|
||||
if (!this.showCannon)
|
||||
{
|
||||
removeGameTimer(CANNON);
|
||||
@@ -421,7 +435,11 @@ public class TimersPlugin extends Plugin
|
||||
if (this.showStamina
|
||||
&& event.getOption().contains("Drink")
|
||||
&& (event.getIdentifier() == ItemID.STAMINA_MIX1
|
||||
|| event.getIdentifier() == ItemID.STAMINA_MIX2))
|
||||
|| event.getIdentifier() == ItemID.STAMINA_MIX2
|
||||
|| event.getIdentifier() == ItemID.EGNIOL_POTION_1
|
||||
|| event.getIdentifier() == ItemID.EGNIOL_POTION_2
|
||||
|| event.getIdentifier() == ItemID.EGNIOL_POTION_3
|
||||
|| event.getIdentifier() == ItemID.EGNIOL_POTION_4))
|
||||
{
|
||||
// Needs menu option hook because mixes use a common drink message, distinct from their standard potion messages
|
||||
createGameTimer(STAMINA);
|
||||
@@ -582,6 +600,10 @@ public class TimersPlugin extends Plugin
|
||||
{
|
||||
createGameTimer(DMM_HALFTB);
|
||||
}
|
||||
else if (event.getMessage().startsWith(KILLED_TELEBLOCK_OPPONENT_TEXT))
|
||||
{
|
||||
removeTbTimers();
|
||||
}
|
||||
}
|
||||
|
||||
if (this.showAntiFire && event.getMessage().contains(SUPER_ANTIFIRE_DRINK_MESSAGE))
|
||||
@@ -635,6 +657,40 @@ public class TimersPlugin extends Plugin
|
||||
freezeTimer = createGameTimer(ICEBARRAGE);
|
||||
freezeTime = client.getTickCount();
|
||||
}
|
||||
|
||||
if (config.showDivine())
|
||||
{
|
||||
Matcher mDivine = DIVINE_POTION_PATTERN.matcher(event.getMessage());
|
||||
if (mDivine.find())
|
||||
{
|
||||
switch (mDivine.group(1))
|
||||
{
|
||||
case "super attack":
|
||||
createGameTimer(DIVINE_SUPER_ATTACK);
|
||||
break;
|
||||
|
||||
case "super strength":
|
||||
createGameTimer(DIVINE_SUPER_STRENGTH);
|
||||
break;
|
||||
|
||||
case "super defence":
|
||||
createGameTimer(DIVINE_SUPER_DEFENCE);
|
||||
break;
|
||||
|
||||
case "combat":
|
||||
createGameTimer(DIVINE_SUPER_COMBAT);
|
||||
break;
|
||||
|
||||
case "ranging":
|
||||
createGameTimer(DIVINE_RANGING);
|
||||
break;
|
||||
|
||||
case "magic":
|
||||
createGameTimer(DIVINE_MAGIC);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void onGameTick(GameTick event)
|
||||
@@ -1020,5 +1076,6 @@ public class TimersPlugin extends Plugin
|
||||
this.showSkull = config.showSkull();
|
||||
this.showStaffOfTheDead = config.showStaffOfTheDead();
|
||||
this.showAbyssalSireStun = config.showAbyssalSireStun();
|
||||
this.showDivine = config.showDivine();
|
||||
}
|
||||
}
|
||||
@@ -38,11 +38,11 @@ import net.runelite.client.config.ConfigManager;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import static org.mockito.ArgumentMatchers.eq;
|
||||
import static org.mockito.Matchers.eq;
|
||||
import org.mockito.Mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
import org.mockito.junit.MockitoJUnitRunner;
|
||||
import org.mockito.runners.MockitoJUnitRunner;
|
||||
|
||||
@RunWith(MockitoJUnitRunner.class)
|
||||
public class ChatCommandsPluginTest
|
||||
@@ -142,6 +142,28 @@ public class ChatCommandsPluginTest
|
||||
verify(configManager).setConfiguration("killcount.adam", "herbiboar", 4091);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGauntlet()
|
||||
{
|
||||
when(client.getUsername()).thenReturn("Adam");
|
||||
|
||||
ChatMessage gauntletMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Gauntlet completion count is: <col=ff0000>123</col>.", null, 0);
|
||||
chatCommandsPlugin.onChatMessage(gauntletMessage);
|
||||
|
||||
verify(configManager).setConfiguration("killcount.adam", "gauntlet", 123);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCorruptedGauntlet()
|
||||
{
|
||||
when(client.getUsername()).thenReturn("Adam");
|
||||
|
||||
ChatMessage corruptedGauntletMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your Corrupted Gauntlet completion count is: <col=ff0000>4729</col>.", null, 0);
|
||||
chatCommandsPlugin.onChatMessage(corruptedGauntletMessage);
|
||||
|
||||
verify(configManager).setConfiguration("killcount.adam", "corrupted gauntlet", 4729);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPersonalBest()
|
||||
{
|
||||
@@ -244,4 +266,4 @@ public class ChatCommandsPluginTest
|
||||
verify(configManager).setConfiguration(eq("personalbest.adam"), eq("prifddinas agility course"), eq(61));
|
||||
verify(configManager).setConfiguration(eq("killcount.adam"), eq("prifddinas agility course"), eq(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user