Plugin additions (#19)
* Added getProjectile tranform & zeruths player transform cleaned up a bit of the imports / code * fixed equipment inspector & added more features to tob
This commit is contained in:
@@ -32,472 +32,471 @@ import lombok.Getter;
|
||||
*/
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum Varbits
|
||||
{
|
||||
/*
|
||||
* If chatbox is transparent or not
|
||||
*/
|
||||
TRANSPARENT_CHATBOX(4608),
|
||||
public enum Varbits {
|
||||
/*
|
||||
* If chatbox is transparent or not
|
||||
*/
|
||||
TRANSPARENT_CHATBOX(4608),
|
||||
|
||||
/*
|
||||
* If the player has an active stamina potion effect or not
|
||||
*/
|
||||
RUN_SLOWED_DEPLETION_ACTIVE(25),
|
||||
/*
|
||||
* If the player has an active stamina potion effect or not
|
||||
*/
|
||||
RUN_SLOWED_DEPLETION_ACTIVE(25),
|
||||
|
||||
/**
|
||||
* If scrollbar in resizable mode chat is on the left
|
||||
*/
|
||||
CHAT_SCROLLBAR_ON_LEFT(6374),
|
||||
/**
|
||||
* If scrollbar in resizable mode chat is on the left
|
||||
*/
|
||||
CHAT_SCROLLBAR_ON_LEFT(6374),
|
||||
|
||||
/**
|
||||
* Runepouch
|
||||
*/
|
||||
RUNE_POUCH_RUNE1(29),
|
||||
RUNE_POUCH_RUNE2(1622),
|
||||
RUNE_POUCH_RUNE3(1623),
|
||||
RUNE_POUCH_AMOUNT1(1624),
|
||||
RUNE_POUCH_AMOUNT2(1625),
|
||||
RUNE_POUCH_AMOUNT3(1626),
|
||||
/**
|
||||
* Runepouch
|
||||
*/
|
||||
RUNE_POUCH_RUNE1(29),
|
||||
RUNE_POUCH_RUNE2(1622),
|
||||
RUNE_POUCH_RUNE3(1623),
|
||||
RUNE_POUCH_AMOUNT1(1624),
|
||||
RUNE_POUCH_AMOUNT2(1625),
|
||||
RUNE_POUCH_AMOUNT3(1626),
|
||||
|
||||
/**
|
||||
* Prayers
|
||||
*/
|
||||
QUICK_PRAYER(4103),
|
||||
PRAYER_THICK_SKIN(4104),
|
||||
PRAYER_BURST_OF_STRENGTH(4105),
|
||||
PRAYER_CLARITY_OF_THOUGHT(4106),
|
||||
PRAYER_SHARP_EYE(4122),
|
||||
PRAYER_MYSTIC_WILL(4123),
|
||||
PRAYER_ROCK_SKIN(4107),
|
||||
PRAYER_SUPERHUMAN_STRENGTH(4108),
|
||||
PRAYER_IMPROVED_REFLEXES(4109),
|
||||
PRAYER_RAPID_RESTORE(4110),
|
||||
PRAYER_RAPID_HEAL(4111),
|
||||
PRAYER_PROTECT_ITEM(4112),
|
||||
PRAYER_HAWK_EYE(4124),
|
||||
PRAYER_MYSTIC_LORE(4125),
|
||||
PRAYER_STEEL_SKIN(4113),
|
||||
PRAYER_ULTIMATE_STRENGTH(4114),
|
||||
PRAYER_INCREDIBLE_REFLEXES(4115),
|
||||
PRAYER_PROTECT_FROM_MAGIC(4116),
|
||||
PRAYER_PROTECT_FROM_MISSILES(4117),
|
||||
PRAYER_PROTECT_FROM_MELEE(4118),
|
||||
PRAYER_EAGLE_EYE(4126),
|
||||
PRAYER_MYSTIC_MIGHT(4127),
|
||||
PRAYER_RETRIBUTION(4119),
|
||||
PRAYER_REDEMPTION(4120),
|
||||
PRAYER_SMITE(4121),
|
||||
PRAYER_CHIVALRY(4128),
|
||||
PRAYER_PIETY(4129),
|
||||
PRAYER_PRESERVE(5466),
|
||||
PRAYER_RIGOUR(5464),
|
||||
PRAYER_AUGURY(5465),
|
||||
/**
|
||||
* Prayers
|
||||
*/
|
||||
QUICK_PRAYER(4103),
|
||||
PRAYER_THICK_SKIN(4104),
|
||||
PRAYER_BURST_OF_STRENGTH(4105),
|
||||
PRAYER_CLARITY_OF_THOUGHT(4106),
|
||||
PRAYER_SHARP_EYE(4122),
|
||||
PRAYER_MYSTIC_WILL(4123),
|
||||
PRAYER_ROCK_SKIN(4107),
|
||||
PRAYER_SUPERHUMAN_STRENGTH(4108),
|
||||
PRAYER_IMPROVED_REFLEXES(4109),
|
||||
PRAYER_RAPID_RESTORE(4110),
|
||||
PRAYER_RAPID_HEAL(4111),
|
||||
PRAYER_PROTECT_ITEM(4112),
|
||||
PRAYER_HAWK_EYE(4124),
|
||||
PRAYER_MYSTIC_LORE(4125),
|
||||
PRAYER_STEEL_SKIN(4113),
|
||||
PRAYER_ULTIMATE_STRENGTH(4114),
|
||||
PRAYER_INCREDIBLE_REFLEXES(4115),
|
||||
PRAYER_PROTECT_FROM_MAGIC(4116),
|
||||
PRAYER_PROTECT_FROM_MISSILES(4117),
|
||||
PRAYER_PROTECT_FROM_MELEE(4118),
|
||||
PRAYER_EAGLE_EYE(4126),
|
||||
PRAYER_MYSTIC_MIGHT(4127),
|
||||
PRAYER_RETRIBUTION(4119),
|
||||
PRAYER_REDEMPTION(4120),
|
||||
PRAYER_SMITE(4121),
|
||||
PRAYER_CHIVALRY(4128),
|
||||
PRAYER_PIETY(4129),
|
||||
PRAYER_PRESERVE(5466),
|
||||
PRAYER_RIGOUR(5464),
|
||||
PRAYER_AUGURY(5465),
|
||||
|
||||
/**
|
||||
* Diary Entries
|
||||
*/
|
||||
DIARY_ARDOUGNE_EASY(4458),
|
||||
DIARY_ARDOUGNE_MEDIUM(4459),
|
||||
DIARY_ARDOUGNE_HARD(4460),
|
||||
DIARY_ARDOUGNE_ELITE(4461),
|
||||
/**
|
||||
* Diary Entries
|
||||
*/
|
||||
DIARY_ARDOUGNE_EASY(4458),
|
||||
DIARY_ARDOUGNE_MEDIUM(4459),
|
||||
DIARY_ARDOUGNE_HARD(4460),
|
||||
DIARY_ARDOUGNE_ELITE(4461),
|
||||
|
||||
DIARY_DESERT_EASY(4483),
|
||||
DIARY_DESERT_MEDIUM(4484),
|
||||
DIARY_DESERT_HARD(4485),
|
||||
DIARY_DESERT_ELITE(4486),
|
||||
DIARY_DESERT_EASY(4483),
|
||||
DIARY_DESERT_MEDIUM(4484),
|
||||
DIARY_DESERT_HARD(4485),
|
||||
DIARY_DESERT_ELITE(4486),
|
||||
|
||||
DIARY_FALADOR_EASY(4462),
|
||||
DIARY_FALADOR_MEDIUM(4463),
|
||||
DIARY_FALADOR_HARD(4464),
|
||||
DIARY_FALADOR_ELITE(4465),
|
||||
DIARY_FALADOR_EASY(4462),
|
||||
DIARY_FALADOR_MEDIUM(4463),
|
||||
DIARY_FALADOR_HARD(4464),
|
||||
DIARY_FALADOR_ELITE(4465),
|
||||
|
||||
DIARY_FREMENNIK_EASY(4491),
|
||||
DIARY_FREMENNIK_MEDIUM(4492),
|
||||
DIARY_FREMENNIK_HARD(4493),
|
||||
DIARY_FREMENNIK_ELITE(4494),
|
||||
DIARY_FREMENNIK_EASY(4491),
|
||||
DIARY_FREMENNIK_MEDIUM(4492),
|
||||
DIARY_FREMENNIK_HARD(4493),
|
||||
DIARY_FREMENNIK_ELITE(4494),
|
||||
|
||||
DIARY_KANDARIN_EASY(4475),
|
||||
DIARY_KANDARIN_MEDIUM(4476),
|
||||
DIARY_KANDARIN_HARD(4477),
|
||||
DIARY_KANDARIN_ELITE(4478),
|
||||
DIARY_KANDARIN_EASY(4475),
|
||||
DIARY_KANDARIN_MEDIUM(4476),
|
||||
DIARY_KANDARIN_HARD(4477),
|
||||
DIARY_KANDARIN_ELITE(4478),
|
||||
|
||||
DIARY_KARAMJA_EASY(3578),
|
||||
DIARY_KARAMJA_MEDIUM(3599),
|
||||
DIARY_KARAMJA_HARD(3611),
|
||||
DIARY_KARAMJA_ELITE(4566),
|
||||
DIARY_KARAMJA_EASY(3578),
|
||||
DIARY_KARAMJA_MEDIUM(3599),
|
||||
DIARY_KARAMJA_HARD(3611),
|
||||
DIARY_KARAMJA_ELITE(4566),
|
||||
|
||||
DIARY_LUMBRIDGE_EASY(4495),
|
||||
DIARY_LUMBRIDGE_MEDIUM(4496),
|
||||
DIARY_LUMBRIDGE_HARD(4497),
|
||||
DIARY_LUMBRIDGE_ELITE(4498),
|
||||
DIARY_LUMBRIDGE_EASY(4495),
|
||||
DIARY_LUMBRIDGE_MEDIUM(4496),
|
||||
DIARY_LUMBRIDGE_HARD(4497),
|
||||
DIARY_LUMBRIDGE_ELITE(4498),
|
||||
|
||||
DIARY_MORYTANIA_EASY(4487),
|
||||
DIARY_MORYTANIA_MEDIUM(4488),
|
||||
DIARY_MORYTANIA_HARD(4489),
|
||||
DIARY_MORYTANIA_ELITE(4490),
|
||||
DIARY_MORYTANIA_EASY(4487),
|
||||
DIARY_MORYTANIA_MEDIUM(4488),
|
||||
DIARY_MORYTANIA_HARD(4489),
|
||||
DIARY_MORYTANIA_ELITE(4490),
|
||||
|
||||
DIARY_VARROCK_EASY(4479),
|
||||
DIARY_VARROCK_MEDIUM(4480),
|
||||
DIARY_VARROCK_HARD(4481),
|
||||
DIARY_VARROCK_ELITE(4482),
|
||||
DIARY_VARROCK_EASY(4479),
|
||||
DIARY_VARROCK_MEDIUM(4480),
|
||||
DIARY_VARROCK_HARD(4481),
|
||||
DIARY_VARROCK_ELITE(4482),
|
||||
|
||||
DIARY_WESTERN_EASY(4471),
|
||||
DIARY_WESTERN_MEDIUM(4472),
|
||||
DIARY_WESTERN_HARD(4473),
|
||||
DIARY_WESTERN_ELITE(4474),
|
||||
DIARY_WESTERN_EASY(4471),
|
||||
DIARY_WESTERN_MEDIUM(4472),
|
||||
DIARY_WESTERN_HARD(4473),
|
||||
DIARY_WESTERN_ELITE(4474),
|
||||
|
||||
DIARY_WILDERNESS_EASY(4466),
|
||||
DIARY_WILDERNESS_MEDIUM(4467),
|
||||
DIARY_WILDERNESS_HARD(4468),
|
||||
DIARY_WILDERNESS_ELITE(4469),
|
||||
DIARY_WILDERNESS_EASY(4466),
|
||||
DIARY_WILDERNESS_MEDIUM(4467),
|
||||
DIARY_WILDERNESS_HARD(4468),
|
||||
DIARY_WILDERNESS_ELITE(4469),
|
||||
|
||||
/**
|
||||
* Kourend house favours
|
||||
*/
|
||||
KOUREND_FAVOR_ARCEUUS(4896),
|
||||
KOUREND_FAVOR_HOSIDIUS(4895),
|
||||
KOUREND_FAVOR_LOVAKENGJ(4898),
|
||||
KOUREND_FAVOR_PISCARILIUS(4899),
|
||||
KOUREND_FAVOR_SHAYZIEN(4894),
|
||||
/**
|
||||
* Kourend house favours
|
||||
*/
|
||||
KOUREND_FAVOR_ARCEUUS(4896),
|
||||
KOUREND_FAVOR_HOSIDIUS(4895),
|
||||
KOUREND_FAVOR_LOVAKENGJ(4898),
|
||||
KOUREND_FAVOR_PISCARILIUS(4899),
|
||||
KOUREND_FAVOR_SHAYZIEN(4894),
|
||||
|
||||
/**
|
||||
* Equipped weapon type
|
||||
*/
|
||||
EQUIPPED_WEAPON_TYPE(357),
|
||||
/**
|
||||
* Equipped weapon type
|
||||
*/
|
||||
EQUIPPED_WEAPON_TYPE(357),
|
||||
|
||||
/**
|
||||
* Defensive casting mode
|
||||
*/
|
||||
DEFENSIVE_CASTING_MODE(2668),
|
||||
/**
|
||||
* Defensive casting mode
|
||||
*/
|
||||
DEFENSIVE_CASTING_MODE(2668),
|
||||
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
SIDE_PANELS(4607),
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
SIDE_PANELS(4607),
|
||||
|
||||
/**
|
||||
* Herbiboar Trails
|
||||
*/
|
||||
HB_TRAIL_31303(5737),
|
||||
HB_TRAIL_31306(5738),
|
||||
HB_TRAIL_31309(5739),
|
||||
HB_TRAIL_31312(5740),
|
||||
HB_TRAIL_31315(5741),
|
||||
HB_TRAIL_31318(5742),
|
||||
HB_TRAIL_31321(5743),
|
||||
HB_TRAIL_31324(5744),
|
||||
HB_TRAIL_31327(5745),
|
||||
HB_TRAIL_31330(5746),
|
||||
/**
|
||||
* Herbiboar Trails
|
||||
*/
|
||||
HB_TRAIL_31303(5737),
|
||||
HB_TRAIL_31306(5738),
|
||||
HB_TRAIL_31309(5739),
|
||||
HB_TRAIL_31312(5740),
|
||||
HB_TRAIL_31315(5741),
|
||||
HB_TRAIL_31318(5742),
|
||||
HB_TRAIL_31321(5743),
|
||||
HB_TRAIL_31324(5744),
|
||||
HB_TRAIL_31327(5745),
|
||||
HB_TRAIL_31330(5746),
|
||||
|
||||
HB_TRAIL_31333(5768),
|
||||
HB_TRAIL_31336(5769),
|
||||
HB_TRAIL_31339(5770),
|
||||
HB_TRAIL_31342(5771),
|
||||
HB_TRAIL_31345(5772),
|
||||
HB_TRAIL_31348(5773),
|
||||
HB_TRAIL_31351(5774),
|
||||
HB_TRAIL_31354(5775),
|
||||
HB_TRAIL_31357(5776),
|
||||
HB_TRAIL_31360(5777),
|
||||
HB_TRAIL_31333(5768),
|
||||
HB_TRAIL_31336(5769),
|
||||
HB_TRAIL_31339(5770),
|
||||
HB_TRAIL_31342(5771),
|
||||
HB_TRAIL_31345(5772),
|
||||
HB_TRAIL_31348(5773),
|
||||
HB_TRAIL_31351(5774),
|
||||
HB_TRAIL_31354(5775),
|
||||
HB_TRAIL_31357(5776),
|
||||
HB_TRAIL_31360(5777),
|
||||
|
||||
HB_TRAIL_31363(5747),
|
||||
HB_TRAIL_31366(5748),
|
||||
HB_TRAIL_31369(5749),
|
||||
HB_TRAIL_31372(5750),
|
||||
HB_TRAIL_31363(5747),
|
||||
HB_TRAIL_31366(5748),
|
||||
HB_TRAIL_31369(5749),
|
||||
HB_TRAIL_31372(5750),
|
||||
|
||||
HB_FINISH(5766),
|
||||
HB_STARTED(5767), //not working
|
||||
HB_FINISH(5766),
|
||||
HB_STARTED(5767), //not working
|
||||
|
||||
/**
|
||||
* Barbarian Assault
|
||||
*/
|
||||
IN_GAME_BA(3923),
|
||||
/**
|
||||
* Barbarian Assault
|
||||
*/
|
||||
IN_GAME_BA(3923),
|
||||
|
||||
/**
|
||||
* 0 = Outside wilderness
|
||||
* 1 = In wilderness
|
||||
*/
|
||||
IN_WILDERNESS(5963),
|
||||
/**
|
||||
* 0 = Outside wilderness
|
||||
* 1 = In wilderness
|
||||
*/
|
||||
IN_WILDERNESS(5963),
|
||||
|
||||
/**
|
||||
* Fishing Trawler
|
||||
* FISHING_TRAWLER_ACTIVITY Expected values: 0-255
|
||||
*/
|
||||
FISHING_TRAWLER_ACTIVITY(3377),
|
||||
/**
|
||||
* Fishing Trawler
|
||||
* FISHING_TRAWLER_ACTIVITY Expected values: 0-255
|
||||
*/
|
||||
FISHING_TRAWLER_ACTIVITY(3377),
|
||||
|
||||
/**
|
||||
* Blast Furnace Bar Dispenser
|
||||
*
|
||||
* These are the expected values:
|
||||
* 0 = No bars being processed
|
||||
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
|
||||
* 2 = Bars are cooling down
|
||||
* 3 = Bars can be collected
|
||||
*/
|
||||
BAR_DISPENSER(936),
|
||||
/**
|
||||
* Blast Furnace Bar Dispenser
|
||||
* <p>
|
||||
* These are the expected values:
|
||||
* 0 = No bars being processed
|
||||
* 1 = Ores are being processed on the conveyor belt, bar dispenser cannot be checked
|
||||
* 2 = Bars are cooling down
|
||||
* 3 = Bars can be collected
|
||||
*/
|
||||
BAR_DISPENSER(936),
|
||||
|
||||
/**
|
||||
* Motherlode mine sack
|
||||
*/
|
||||
SACK_NUMBER(5558),
|
||||
SACK_UPGRADED(5556),
|
||||
/**
|
||||
* Motherlode mine sack
|
||||
*/
|
||||
SACK_NUMBER(5558),
|
||||
SACK_UPGRADED(5556),
|
||||
|
||||
/**
|
||||
* Experience tracker
|
||||
*
|
||||
* EXPERIENCE_TRACKER_POSITION expected values:
|
||||
* 0 = Right
|
||||
* 1 = Middle
|
||||
* 2 = Left
|
||||
*/
|
||||
EXPERIENCE_TRACKER_POSITION(4692),
|
||||
EXPERIENCE_TRACKER_COUNTER(4697),
|
||||
EXPERIENCE_TRACKER_PROGRESS_BAR(4698),
|
||||
/**
|
||||
* Experience tracker
|
||||
* <p>
|
||||
* EXPERIENCE_TRACKER_POSITION expected values:
|
||||
* 0 = Right
|
||||
* 1 = Middle
|
||||
* 2 = Left
|
||||
*/
|
||||
EXPERIENCE_TRACKER_POSITION(4692),
|
||||
EXPERIENCE_TRACKER_COUNTER(4697),
|
||||
EXPERIENCE_TRACKER_PROGRESS_BAR(4698),
|
||||
|
||||
/**
|
||||
* Experience drop color
|
||||
*/
|
||||
EXPERIENCE_DROP_COLOR(4695),
|
||||
/**
|
||||
* Experience drop color
|
||||
*/
|
||||
EXPERIENCE_DROP_COLOR(4695),
|
||||
|
||||
/**
|
||||
* Tithe Farm
|
||||
*/
|
||||
TITHE_FARM_SACK_AMOUNT(4900),
|
||||
TITHE_FARM_SACK_ICON(5370),
|
||||
TITHE_FARM_POINTS(4893),
|
||||
|
||||
/**
|
||||
* Blast Mine
|
||||
*/
|
||||
BLAST_MINE_COAL(4924),
|
||||
BLAST_MINE_GOLD(4925),
|
||||
BLAST_MINE_MITHRIL(4926),
|
||||
BLAST_MINE_ADAMANTITE(4921),
|
||||
BLAST_MINE_RUNITE(4922),
|
||||
/**
|
||||
* Tithe Farm
|
||||
*/
|
||||
TITHE_FARM_SACK_AMOUNT(4900),
|
||||
TITHE_FARM_SACK_ICON(5370),
|
||||
TITHE_FARM_POINTS(4893),
|
||||
|
||||
/**
|
||||
* Raids
|
||||
*/
|
||||
IN_RAID(5432),
|
||||
TOTAL_POINTS(5431),
|
||||
PERSONAL_POINTS(5422),
|
||||
RAID_PARTY_SIZE(5424),
|
||||
/**
|
||||
* Blast Mine
|
||||
*/
|
||||
BLAST_MINE_COAL(4924),
|
||||
BLAST_MINE_GOLD(4925),
|
||||
BLAST_MINE_MITHRIL(4926),
|
||||
BLAST_MINE_ADAMANTITE(4921),
|
||||
BLAST_MINE_RUNITE(4922),
|
||||
|
||||
/**
|
||||
* Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating
|
||||
*/
|
||||
THEATRE_OF_BLOOD(6440),
|
||||
/**
|
||||
* Raids
|
||||
*/
|
||||
IN_RAID(5432),
|
||||
TOTAL_POINTS(5431),
|
||||
PERSONAL_POINTS(5422),
|
||||
RAID_PARTY_SIZE(5424),
|
||||
|
||||
/**
|
||||
* Nightmare Zone
|
||||
*/
|
||||
NMZ_ABSORPTION(3956),
|
||||
NMZ_POINTS(3949),
|
||||
/**
|
||||
* Theatre of Blood 1=In Party, 2=Inside/Spectator, 3=Dead Spectating
|
||||
*/
|
||||
THEATRE_OF_BLOOD(6440),
|
||||
|
||||
/**
|
||||
* Blast Furnace
|
||||
*/
|
||||
BLAST_FURNACE_COPPER_ORE(959),
|
||||
BLAST_FURNACE_TIN_ORE(950),
|
||||
BLAST_FURNACE_IRON_ORE(951),
|
||||
BLAST_FURNACE_COAL(949),
|
||||
BLAST_FURNACE_MITHRIL_ORE(952),
|
||||
BLAST_FURNACE_ADAMANTITE_ORE(953),
|
||||
BLAST_FURNACE_RUNITE_ORE(954),
|
||||
BLAST_FURNACE_SILVER_ORE(956),
|
||||
BLAST_FURNACE_GOLD_ORE(955),
|
||||
/**
|
||||
* Nightmare Zone
|
||||
*/
|
||||
NMZ_ABSORPTION(3956),
|
||||
NMZ_POINTS(3949),
|
||||
|
||||
BLAST_FURNACE_BRONZE_BAR(941),
|
||||
BLAST_FURNACE_IRON_BAR(942),
|
||||
BLAST_FURNACE_STEEL_BAR(943),
|
||||
BLAST_FURNACE_MITHRIL_BAR(944),
|
||||
BLAST_FURNACE_ADAMANTITE_BAR(945),
|
||||
BLAST_FURNACE_RUNITE_BAR(946),
|
||||
BLAST_FURNACE_SILVER_BAR(948),
|
||||
BLAST_FURNACE_GOLD_BAR(947),
|
||||
/**
|
||||
* Blast Furnace
|
||||
*/
|
||||
BLAST_FURNACE_COPPER_ORE(959),
|
||||
BLAST_FURNACE_TIN_ORE(950),
|
||||
BLAST_FURNACE_IRON_ORE(951),
|
||||
BLAST_FURNACE_COAL(949),
|
||||
BLAST_FURNACE_MITHRIL_ORE(952),
|
||||
BLAST_FURNACE_ADAMANTITE_ORE(953),
|
||||
BLAST_FURNACE_RUNITE_ORE(954),
|
||||
BLAST_FURNACE_SILVER_ORE(956),
|
||||
BLAST_FURNACE_GOLD_ORE(955),
|
||||
|
||||
BLAST_FURNACE_COFFER(5357),
|
||||
BLAST_FURNACE_BRONZE_BAR(941),
|
||||
BLAST_FURNACE_IRON_BAR(942),
|
||||
BLAST_FURNACE_STEEL_BAR(943),
|
||||
BLAST_FURNACE_MITHRIL_BAR(944),
|
||||
BLAST_FURNACE_ADAMANTITE_BAR(945),
|
||||
BLAST_FURNACE_RUNITE_BAR(946),
|
||||
BLAST_FURNACE_SILVER_BAR(948),
|
||||
BLAST_FURNACE_GOLD_BAR(947),
|
||||
|
||||
/**
|
||||
* Pyramid plunder
|
||||
*/
|
||||
PYRAMID_PLUNDER_TIMER(2375),
|
||||
PYRAMID_PLUNDER_ROOM(2377),
|
||||
BLAST_FURNACE_COFFER(5357),
|
||||
|
||||
/**
|
||||
* Barrows
|
||||
*/
|
||||
BARROWS_KILLED_AHRIM(457),
|
||||
BARROWS_KILLED_DHAROK(458),
|
||||
BARROWS_KILLED_GUTHAN(459),
|
||||
BARROWS_KILLED_KARIL(460),
|
||||
BARROWS_KILLED_TORAG(461),
|
||||
BARROWS_KILLED_VERAC(462),
|
||||
BARROWS_REWARD_POTENTIAL(463),
|
||||
BARROWS_NPCS_SLAIN(464),
|
||||
/**
|
||||
* Pyramid plunder
|
||||
*/
|
||||
PYRAMID_PLUNDER_TIMER(2375),
|
||||
PYRAMID_PLUNDER_ROOM(2377),
|
||||
|
||||
/**
|
||||
* Spicy stew ingredients
|
||||
*/
|
||||
SPICY_STEW_RED_SPICES(1879),
|
||||
SPICY_STEW_YELLOW_SPICES(1880),
|
||||
SPICY_STEW_BROWN_SPICES(1881),
|
||||
SPICY_STEW_ORANGE_SPICES(1882),
|
||||
/**
|
||||
* Barrows
|
||||
*/
|
||||
BARROWS_KILLED_AHRIM(457),
|
||||
BARROWS_KILLED_DHAROK(458),
|
||||
BARROWS_KILLED_GUTHAN(459),
|
||||
BARROWS_KILLED_KARIL(460),
|
||||
BARROWS_KILLED_TORAG(461),
|
||||
BARROWS_KILLED_VERAC(462),
|
||||
BARROWS_REWARD_POTENTIAL(463),
|
||||
BARROWS_NPCS_SLAIN(464),
|
||||
|
||||
/**
|
||||
* Multicombat area
|
||||
*/
|
||||
MULTICOMBAT_AREA(4605),
|
||||
/**
|
||||
* Spicy stew ingredients
|
||||
*/
|
||||
SPICY_STEW_RED_SPICES(1879),
|
||||
SPICY_STEW_YELLOW_SPICES(1880),
|
||||
SPICY_STEW_BROWN_SPICES(1881),
|
||||
SPICY_STEW_ORANGE_SPICES(1882),
|
||||
|
||||
/**
|
||||
* In the Wilderness
|
||||
*/
|
||||
IN_THE_WILDERNESS(5963),
|
||||
/**
|
||||
* Multicombat area
|
||||
*/
|
||||
MULTICOMBAT_AREA(4605),
|
||||
|
||||
/**
|
||||
* Kingdom Management
|
||||
*/
|
||||
KINGDOM_FAVOR(72),
|
||||
KINGDOM_COFFER(74),
|
||||
/**
|
||||
* In the Wilderness
|
||||
*/
|
||||
IN_THE_WILDERNESS(5963),
|
||||
|
||||
/**
|
||||
* The Hand in the Sand quest status
|
||||
*/
|
||||
QUEST_THE_HAND_IN_THE_SAND(1527),
|
||||
/**
|
||||
* Kingdom Management
|
||||
*/
|
||||
KINGDOM_FAVOR(72),
|
||||
KINGDOM_COFFER(74),
|
||||
|
||||
/**
|
||||
* Daily Tasks (Collection availability)
|
||||
*/
|
||||
DAILY_HERB_BOXES_COLLECTED(3961),
|
||||
DAILY_STAVES_COLLECTED(4539),
|
||||
DAILY_ESSENCE_COLLECTED(4547),
|
||||
DAILY_RUNES_COLLECTED(4540),
|
||||
DAILY_SAND_COLLECTED(4549),
|
||||
DAILY_FLAX_STATE(4559),
|
||||
/**
|
||||
* This varbit tracks how much bonemeal has been redeemed from Robin
|
||||
* The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39
|
||||
*/
|
||||
DAILY_BONEMEAL_STATE(4543),
|
||||
/**
|
||||
* The Hand in the Sand quest status
|
||||
*/
|
||||
QUEST_THE_HAND_IN_THE_SAND(1527),
|
||||
|
||||
/**
|
||||
* Fairy Ring
|
||||
*/
|
||||
FAIR_RING_LAST_DESTINATION(5374),
|
||||
FAIRY_RING_DIAL_ADCB(3985), //Left dial
|
||||
FAIRY_RIGH_DIAL_ILJK(3986), //Middle dial
|
||||
FAIRY_RING_DIAL_PSRQ(3987), //Right dial
|
||||
/**
|
||||
* Daily Tasks (Collection availability)
|
||||
*/
|
||||
DAILY_HERB_BOXES_COLLECTED(3961),
|
||||
DAILY_STAVES_COLLECTED(4539),
|
||||
DAILY_ESSENCE_COLLECTED(4547),
|
||||
DAILY_RUNES_COLLECTED(4540),
|
||||
DAILY_SAND_COLLECTED(4549),
|
||||
DAILY_FLAX_STATE(4559),
|
||||
/**
|
||||
* This varbit tracks how much bonemeal has been redeemed from Robin
|
||||
* The player gets 13 for each diary completed above and including Medium, for a maxiumum of 39
|
||||
*/
|
||||
DAILY_BONEMEAL_STATE(4543),
|
||||
|
||||
/**
|
||||
* Transmog controllers for farming
|
||||
*/
|
||||
FARMING_4771(4771),
|
||||
FARMING_4772(4772),
|
||||
FARMING_4773(4773),
|
||||
FARMING_4774(4774),
|
||||
FARMING_4775(4775),
|
||||
FARMING_7904(7904),
|
||||
FARMING_7905(7905),
|
||||
FARMING_7906(7906),
|
||||
FARMING_7907(7907),
|
||||
FARMING_7908(7908),
|
||||
FARMING_7909(7909),
|
||||
FARMING_7910(7910),
|
||||
FARMING_7911(7911),
|
||||
/**
|
||||
* Fairy Ring
|
||||
*/
|
||||
FAIR_RING_LAST_DESTINATION(5374),
|
||||
FAIRY_RING_DIAL_ADCB(3985), //Left dial
|
||||
FAIRY_RIGH_DIAL_ILJK(3986), //Middle dial
|
||||
FAIRY_RING_DIAL_PSRQ(3987), //Right dial
|
||||
|
||||
/**
|
||||
* Transmog controllers for grapes
|
||||
*/
|
||||
GRAPES_4953(4953),
|
||||
GRAPES_4954(4954),
|
||||
GRAPES_4955(4955),
|
||||
GRAPES_4956(4956),
|
||||
GRAPES_4957(4957),
|
||||
GRAPES_4958(4958),
|
||||
GRAPES_4959(4959),
|
||||
GRAPES_4960(4960),
|
||||
GRAPES_4961(4961),
|
||||
GRAPES_4962(4962),
|
||||
GRAPES_4963(4963),
|
||||
GRAPES_4964(4964),
|
||||
/**
|
||||
* Transmog controllers for farming
|
||||
*/
|
||||
FARMING_4771(4771),
|
||||
FARMING_4772(4772),
|
||||
FARMING_4773(4773),
|
||||
FARMING_4774(4774),
|
||||
FARMING_4775(4775),
|
||||
FARMING_7904(7904),
|
||||
FARMING_7905(7905),
|
||||
FARMING_7906(7906),
|
||||
FARMING_7907(7907),
|
||||
FARMING_7908(7908),
|
||||
FARMING_7909(7909),
|
||||
FARMING_7910(7910),
|
||||
FARMING_7911(7911),
|
||||
|
||||
/**
|
||||
* Automatically weed farming patches
|
||||
*/
|
||||
AUTOWEED(5557),
|
||||
/**
|
||||
* Transmog controllers for grapes
|
||||
*/
|
||||
GRAPES_4953(4953),
|
||||
GRAPES_4954(4954),
|
||||
GRAPES_4955(4955),
|
||||
GRAPES_4956(4956),
|
||||
GRAPES_4957(4957),
|
||||
GRAPES_4958(4958),
|
||||
GRAPES_4959(4959),
|
||||
GRAPES_4960(4960),
|
||||
GRAPES_4961(4961),
|
||||
GRAPES_4962(4962),
|
||||
GRAPES_4963(4963),
|
||||
GRAPES_4964(4964),
|
||||
|
||||
/**
|
||||
* The varbit that stores the players {@code AccountType}.
|
||||
*/
|
||||
ACCOUNT_TYPE(1777),
|
||||
/**
|
||||
* Automatically weed farming patches
|
||||
*/
|
||||
AUTOWEED(5557),
|
||||
|
||||
/**
|
||||
* The varbit that stores the oxygen percentage for player
|
||||
*/
|
||||
OXYGEN_LEVEL(5811),
|
||||
|
||||
/**
|
||||
* Corp beast damage
|
||||
*/
|
||||
CORP_DAMAGE(999),
|
||||
/**
|
||||
* The varbit that stores the players {@code AccountType}.
|
||||
*/
|
||||
ACCOUNT_TYPE(1777),
|
||||
|
||||
/**
|
||||
* Toggleable slayer unlocks
|
||||
*/
|
||||
SUPERIOR_ENABLED(5362),
|
||||
FOSSIL_ISLAND_WYVERN_DISABLE(6251),
|
||||
/**
|
||||
* The varbit that stores the oxygen percentage for player
|
||||
*/
|
||||
OXYGEN_LEVEL(5811),
|
||||
|
||||
CURRENT_BANK_TAB(4150),
|
||||
/**
|
||||
* Corp beast damage
|
||||
*/
|
||||
CORP_DAMAGE(999),
|
||||
|
||||
WORLDHOPPER_FAVROITE_1(4597),
|
||||
WORLDHOPPER_FAVROITE_2(4598),
|
||||
/**
|
||||
* Toggleable slayer unlocks
|
||||
*/
|
||||
SUPERIOR_ENABLED(5362),
|
||||
FOSSIL_ISLAND_WYVERN_DISABLE(6251),
|
||||
|
||||
/**
|
||||
* Vengeance is active
|
||||
*/
|
||||
VENGEANCE_ACTIVE(2450),
|
||||
CURRENT_BANK_TAB(4150),
|
||||
|
||||
/**
|
||||
* Spell cooldowns
|
||||
*/
|
||||
VENGEANCE_COOLDOWN(2451),
|
||||
WORLDHOPPER_FAVROITE_1(4597),
|
||||
WORLDHOPPER_FAVROITE_2(4598),
|
||||
|
||||
/**
|
||||
* Amount of items in each bank tab
|
||||
*/
|
||||
BANK_TAB_ONE_COUNT(4171),
|
||||
BANK_TAB_TWO_COUNT(4172),
|
||||
BANK_TAB_THREE_COUNT(4173),
|
||||
BANK_TAB_FOUR_COUNT(4174),
|
||||
BANK_TAB_FIVE_COUNT(4175),
|
||||
BANK_TAB_SIX_COUNT(4176),
|
||||
BANK_TAB_SEVEN_COUNT(4177),
|
||||
BANK_TAB_EIGHT_COUNT(4178),
|
||||
BANK_TAB_NINE_COUNT(4179),
|
||||
/**
|
||||
* Vengeance is active
|
||||
*/
|
||||
VENGEANCE_ACTIVE(2450),
|
||||
|
||||
/**
|
||||
* Type of GE offer currently being created
|
||||
* 0 = buy
|
||||
* 1 = sell
|
||||
*/
|
||||
GE_OFFER_CREATION_TYPE(4397),
|
||||
/**
|
||||
* Spell cooldowns
|
||||
*/
|
||||
VENGEANCE_COOLDOWN(2451),
|
||||
|
||||
/**
|
||||
* The active tab within the quest interface
|
||||
*/
|
||||
QUEST_TAB(8168),
|
||||
|
||||
/**
|
||||
* Temple Trekking
|
||||
*/
|
||||
TREK_POINTS(1955),
|
||||
TREK_STARTED(1956),
|
||||
TREK_EVENT(1958),
|
||||
TREK_STATUS(6719);
|
||||
/**
|
||||
* Amount of items in each bank tab
|
||||
*/
|
||||
BANK_TAB_ONE_COUNT(4171),
|
||||
BANK_TAB_TWO_COUNT(4172),
|
||||
BANK_TAB_THREE_COUNT(4173),
|
||||
BANK_TAB_FOUR_COUNT(4174),
|
||||
BANK_TAB_FIVE_COUNT(4175),
|
||||
BANK_TAB_SIX_COUNT(4176),
|
||||
BANK_TAB_SEVEN_COUNT(4177),
|
||||
BANK_TAB_EIGHT_COUNT(4178),
|
||||
BANK_TAB_NINE_COUNT(4179),
|
||||
|
||||
/**
|
||||
* Type of GE offer currently being created
|
||||
* 0 = buy
|
||||
* 1 = sell
|
||||
*/
|
||||
GE_OFFER_CREATION_TYPE(4397),
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
*/
|
||||
private final int id;
|
||||
/**
|
||||
* The active tab within the quest interface
|
||||
*/
|
||||
QUEST_TAB(8168),
|
||||
|
||||
/**
|
||||
* Temple Trekking
|
||||
*/
|
||||
TREK_POINTS(1955),
|
||||
TREK_STARTED(1956),
|
||||
TREK_EVENT(1958),
|
||||
TREK_STATUS(6719),
|
||||
BLOAT_ENTERED_ROOM(6447);
|
||||
|
||||
/**
|
||||
* The raw varbit ID.
|
||||
*/
|
||||
private final int id;
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ public class EquipmentInspectorPanel extends PluginPanel
|
||||
c.weightx = 1;
|
||||
c.gridx = 0;
|
||||
c.gridy = 0;
|
||||
|
||||
header = new JPanel();
|
||||
header.setLayout(new BorderLayout());
|
||||
header.setBorder(new CompoundBorder(
|
||||
@@ -53,9 +52,7 @@ public class EquipmentInspectorPanel extends PluginPanel
|
||||
|
||||
nameLabel = new JLabel(NO_PLAYER_SELECTED);
|
||||
nameLabel.setForeground(Color.WHITE);
|
||||
|
||||
header.add(nameLabel, BorderLayout.CENTER);
|
||||
|
||||
layout.setHorizontalGroup(layout.createParallelGroup()
|
||||
.addComponent(equipmentPanels)
|
||||
.addComponent(header)
|
||||
@@ -65,7 +62,6 @@ public class EquipmentInspectorPanel extends PluginPanel
|
||||
.addGap(10)
|
||||
.addComponent(equipmentPanels)
|
||||
);
|
||||
|
||||
update(new HashMap<>(), "");
|
||||
}
|
||||
|
||||
@@ -79,7 +75,6 @@ public class EquipmentInspectorPanel extends PluginPanel
|
||||
{
|
||||
nameLabel.setText("Player: " + playerName);
|
||||
}
|
||||
|
||||
SwingUtilities.invokeLater(() ->
|
||||
{
|
||||
equipmentPanels.removeAll();
|
||||
|
||||
@@ -3,7 +3,10 @@ package net.runelite.client.plugins.equipmentinspector;
|
||||
|
||||
import com.google.inject.Provides;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.runelite.api.*;
|
||||
import net.runelite.api.ChatMessageType;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.ItemComposition;
|
||||
import net.runelite.api.Player;
|
||||
import net.runelite.api.events.PlayerMenuOptionClicked;
|
||||
import net.runelite.api.kit.KitType;
|
||||
import net.runelite.client.chat.ChatColorType;
|
||||
@@ -18,11 +21,10 @@ import net.runelite.client.plugins.Plugin;
|
||||
import net.runelite.client.plugins.PluginDescriptor;
|
||||
import net.runelite.client.ui.ClientToolbar;
|
||||
import net.runelite.client.ui.NavigationButton;
|
||||
import net.runelite.client.util.ImageUtil;
|
||||
import net.runelite.client.util.Text;
|
||||
import net.runelite.http.api.item.ItemPrice;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.inject.Inject;
|
||||
import javax.swing.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
@@ -32,211 +34,195 @@ import java.util.*;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
|
||||
@PluginDescriptor(
|
||||
name = "Equipment Inspector",
|
||||
description = "Inspects enemy equipment",
|
||||
enabledByDefault = false,
|
||||
type = "utility"
|
||||
name = "Equipment Inspector",
|
||||
enabledByDefault = false,
|
||||
type = "utility"
|
||||
)
|
||||
|
||||
@Slf4j
|
||||
|
||||
public class EquipmentInspectorPlugin extends Plugin {
|
||||
|
||||
private static final String INSPECT_EQUIPMENT = "Gear";
|
||||
private static final String KICK_OPTION = "Kick";
|
||||
private static final String INSPECT_EQUIPMENT = "Gear";
|
||||
private static final String KICK_OPTION = "Kick";
|
||||
|
||||
@Inject
|
||||
@Nullable
|
||||
private Client client;
|
||||
@Inject
|
||||
@Nullable
|
||||
private Client client;
|
||||
|
||||
@Inject
|
||||
private ItemManager itemManager;
|
||||
@Inject
|
||||
private ItemManager itemManager;
|
||||
|
||||
@Inject
|
||||
private EquipmentInspectorConfig config;
|
||||
@Inject
|
||||
private EquipmentInspectorConfig config;
|
||||
|
||||
@Inject
|
||||
private ChatMessageManager chatMessageManager;
|
||||
@Inject
|
||||
private MenuManager menuManager;
|
||||
@Inject
|
||||
private ChatMessageManager chatMessageManager;
|
||||
@Inject
|
||||
private MenuManager menuManager;
|
||||
|
||||
@Inject
|
||||
private ScheduledExecutorService executor;
|
||||
@Inject
|
||||
private ScheduledExecutorService executor;
|
||||
|
||||
@Inject
|
||||
private ClientToolbar pluginToolbar;
|
||||
@Inject
|
||||
private ClientToolbar pluginToolbar;
|
||||
private NavigationButton navButton;
|
||||
private EquipmentInspectorPanel equipmentInspectorPanel;
|
||||
private int TotalPrice = 0;
|
||||
private int Prot1 = 0;
|
||||
private int Prot2 = 0;
|
||||
private int Prot3 = 0;
|
||||
private int Prot4 = 0;
|
||||
|
||||
@Provides
|
||||
EquipmentInspectorConfig provideConfig(ConfigManager configManager)
|
||||
{
|
||||
return configManager.getConfig(EquipmentInspectorConfig.class);
|
||||
}
|
||||
@Provides
|
||||
EquipmentInspectorConfig provideConfig(ConfigManager configManager) {
|
||||
return configManager.getConfig(EquipmentInspectorConfig.class);
|
||||
}
|
||||
|
||||
private NavigationButton navButton;
|
||||
private EquipmentInspectorPanel equipmentInspectorPanel;
|
||||
private int TotalPrice = 0;
|
||||
private int Prot1 = 0;
|
||||
private int Prot2 = 0;
|
||||
private int Prot3 = 0;
|
||||
private int Prot4 = 0;
|
||||
@Override
|
||||
protected void startUp() throws Exception {
|
||||
|
||||
equipmentInspectorPanel = injector.getInstance(EquipmentInspectorPanel.class);
|
||||
if (client != null) {
|
||||
menuManager.addPlayerMenuItem(INSPECT_EQUIPMENT);
|
||||
}
|
||||
|
||||
//synchronized (ImageIO.class)
|
||||
//{
|
||||
final BufferedImage icon = ImageUtil.getResourceStreamFromClass(this.getClass(), "normal.png");
|
||||
//}
|
||||
|
||||
navButton = NavigationButton.builder()
|
||||
.tooltip("Equipment Inspector")
|
||||
.icon(icon)
|
||||
.priority(5)
|
||||
.panel(equipmentInspectorPanel)
|
||||
.build();
|
||||
|
||||
|
||||
@Override
|
||||
protected void startUp() throws Exception
|
||||
{
|
||||
pluginToolbar.addNavigation(navButton);
|
||||
|
||||
equipmentInspectorPanel = injector.getInstance(EquipmentInspectorPanel.class);
|
||||
if(client != null) {
|
||||
menuManager.addPlayerMenuItem(INSPECT_EQUIPMENT);
|
||||
}
|
||||
}
|
||||
|
||||
BufferedImage icon;
|
||||
synchronized (ImageIO.class)
|
||||
{
|
||||
icon = ImageIO.read(getClass().getResourceAsStream("normal.png"));
|
||||
}
|
||||
@Override
|
||||
protected void shutDown() throws Exception {
|
||||
|
||||
navButton = NavigationButton.builder()
|
||||
.tooltip("Equipment Inspector")
|
||||
.icon(icon)
|
||||
.priority(5)
|
||||
.panel(equipmentInspectorPanel)
|
||||
.build();
|
||||
menuManager.removePlayerMenuItem(INSPECT_EQUIPMENT);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void onPlayerMenuOptionClicked(PlayerMenuOptionClicked event) {
|
||||
if (event.getMenuOption().equals(INSPECT_EQUIPMENT)) {
|
||||
|
||||
|
||||
pluginToolbar.addNavigation(navButton);
|
||||
executor.execute(() ->
|
||||
{
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() ->
|
||||
{
|
||||
if (!navButton.isSelected()) {
|
||||
navButton.getOnSelect().run();
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException | InvocationTargetException e) {
|
||||
|
||||
}
|
||||
throw new RuntimeException(e);
|
||||
|
||||
@Override
|
||||
protected void shutDown() throws Exception
|
||||
{
|
||||
}
|
||||
String playerName = Text.removeTags(event.getMenuTarget());
|
||||
// The player menu uses a non-breaking space in the player name, we need to replace this to compare
|
||||
// against the playerName in the player cache.
|
||||
String finalPlayerName = playerName.replace('\u00A0', ' ');
|
||||
System.out.println(finalPlayerName);
|
||||
List<Player> players = client.getPlayers();
|
||||
Optional<Player> targetPlayer = players.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(p -> p.getName().equals(finalPlayerName)).findFirst();
|
||||
|
||||
menuManager.removePlayerMenuItem(INSPECT_EQUIPMENT);
|
||||
}
|
||||
if (targetPlayer.isPresent()) {
|
||||
TotalPrice = 0;
|
||||
Prot1 = 0;
|
||||
Prot2 = 0;
|
||||
Prot3 = 0;
|
||||
Prot4 = 0;
|
||||
Player p = targetPlayer.get();
|
||||
Map<KitType, ItemComposition> playerEquipment = new HashMap<>();
|
||||
|
||||
@Subscribe
|
||||
public void onPlayerMenuOptionClicked(PlayerMenuOptionClicked event)
|
||||
{
|
||||
if (event.getMenuOption().equals(INSPECT_EQUIPMENT))
|
||||
{
|
||||
for (KitType kitType : KitType.values()) {
|
||||
int itemId = p.getPlayerComposition().getEquipmentId(kitType);
|
||||
if (itemId != -1) {
|
||||
ItemComposition itemComposition = client.getItemDefinition(itemId);
|
||||
playerEquipment.put(kitType, itemComposition);
|
||||
int ItemPrice = itemManager.getItemPrice(itemId);
|
||||
TotalPrice += ItemPrice;
|
||||
if (ItemPrice > Prot1) {
|
||||
Prot4 = Prot3;
|
||||
Prot3 = Prot2;
|
||||
Prot2 = Prot1;
|
||||
|
||||
Prot1 = ItemPrice;
|
||||
} else if (ItemPrice > Prot2) {
|
||||
Prot4 = Prot3;
|
||||
Prot3 = Prot2;
|
||||
Prot2 = ItemPrice;
|
||||
} else if (ItemPrice > Prot3) {
|
||||
Prot4 = Prot3;
|
||||
Prot3 = ItemPrice;
|
||||
} else if (ItemPrice > Prot4) {
|
||||
Prot4 = ItemPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
int IgnoredItems = config.protecteditems();
|
||||
if (IgnoredItems != 0 && IgnoredItems != 1 && IgnoredItems != 2 && IgnoredItems != 3) {
|
||||
IgnoredItems = 4;
|
||||
|
||||
executor.execute(() ->
|
||||
{
|
||||
try
|
||||
{
|
||||
SwingUtilities.invokeAndWait(() ->
|
||||
{
|
||||
if (!navButton.isSelected())
|
||||
{
|
||||
navButton.getOnSelect().run();
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (InterruptedException | InvocationTargetException e)
|
||||
{
|
||||
}
|
||||
if (config.ShowValue()) {
|
||||
switch (IgnoredItems) {
|
||||
case 1:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
break;
|
||||
case 2:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
|
||||
throw new RuntimeException(e);
|
||||
break;
|
||||
case 3:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
TotalPrice = TotalPrice - Prot3;
|
||||
break;
|
||||
case 4:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
TotalPrice = TotalPrice - Prot3;
|
||||
TotalPrice = TotalPrice - Prot4;
|
||||
break;
|
||||
}
|
||||
String StringPrice = "";
|
||||
if (!config.ExactValue()) {
|
||||
TotalPrice = TotalPrice / 1000;
|
||||
StringPrice = NumberFormat.getIntegerInstance().format(TotalPrice);
|
||||
StringPrice = StringPrice + 'K';
|
||||
}
|
||||
if (config.ExactValue()) {
|
||||
StringPrice = NumberFormat.getIntegerInstance().format(TotalPrice);
|
||||
}
|
||||
chatMessageManager.queue(QueuedMessage.builder()
|
||||
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
|
||||
.runeLiteFormattedMessage(new ChatMessageBuilder()
|
||||
.append(ChatColorType.HIGHLIGHT)
|
||||
.append("Risked Value: ")
|
||||
.append(ChatColorType.NORMAL)
|
||||
.append(StringPrice)
|
||||
.build())
|
||||
.build());
|
||||
}
|
||||
equipmentInspectorPanel.update(playerEquipment, playerName);
|
||||
|
||||
}
|
||||
String playerName = Text.removeTags(event.getMenuTarget());
|
||||
// The player menu uses a non-breaking space in the player name, we need to replace this to compare
|
||||
// against the playerName in the player cache.
|
||||
String finalPlayerName = playerName.replace('\u00A0', ' ');
|
||||
System.out.println(finalPlayerName);
|
||||
List<Player> players = client.getPlayers();
|
||||
Optional<Player> targetPlayer = players.stream()
|
||||
.filter(Objects::nonNull)
|
||||
.filter(p -> p.getName().equals(finalPlayerName)).findFirst();
|
||||
|
||||
if (targetPlayer.isPresent())
|
||||
{
|
||||
TotalPrice = 0;
|
||||
Prot1 = 0;
|
||||
Prot2 = 0;
|
||||
Prot3 = 0;
|
||||
Prot4 = 0;
|
||||
Player p = targetPlayer.get();
|
||||
Map<KitType, ItemComposition> playerEquipment = new HashMap<>();
|
||||
|
||||
for (KitType kitType : KitType.values())
|
||||
{
|
||||
int itemId = p.getPlayerComposition().getEquipmentId(kitType);
|
||||
if (itemId != -1)
|
||||
{
|
||||
ItemComposition itemComposition = client.getItemDefinition(itemId);
|
||||
playerEquipment.put(kitType, itemComposition);
|
||||
int ItemPrice = itemManager.getItemPrice(itemId);
|
||||
TotalPrice += ItemPrice;
|
||||
if (ItemPrice > Prot1 ) {
|
||||
Prot4 = Prot3;
|
||||
Prot3 = Prot2;
|
||||
Prot2 = Prot1;
|
||||
|
||||
Prot1 = ItemPrice;
|
||||
} else if (ItemPrice > Prot2){
|
||||
Prot4 = Prot3;
|
||||
Prot3 = Prot2;
|
||||
Prot2 = ItemPrice;
|
||||
} else if (ItemPrice > Prot3){
|
||||
Prot4 = Prot3;
|
||||
Prot3 = ItemPrice;
|
||||
} else if (ItemPrice > Prot4){
|
||||
Prot4 = ItemPrice;
|
||||
}
|
||||
}
|
||||
}
|
||||
int IgnoredItems = config.protecteditems();
|
||||
if (IgnoredItems != 0 && IgnoredItems != 1 && IgnoredItems != 2 && IgnoredItems != 3) {
|
||||
IgnoredItems = 4;
|
||||
|
||||
}
|
||||
if (config.ShowValue()) {
|
||||
switch (IgnoredItems) {
|
||||
case 1:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
break;
|
||||
case 2:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
|
||||
break;
|
||||
case 3:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
TotalPrice = TotalPrice - Prot3;
|
||||
break;
|
||||
case 4:
|
||||
TotalPrice = TotalPrice - Prot1;
|
||||
TotalPrice = TotalPrice - Prot2;
|
||||
TotalPrice = TotalPrice - Prot3;
|
||||
TotalPrice = TotalPrice - Prot4;
|
||||
break;
|
||||
}
|
||||
String StringPrice = "";
|
||||
if (!config.ExactValue()) {
|
||||
TotalPrice = TotalPrice / 1000;
|
||||
StringPrice = NumberFormat.getIntegerInstance().format(TotalPrice);
|
||||
StringPrice = StringPrice + 'K';
|
||||
}
|
||||
if (config.ExactValue()) {
|
||||
StringPrice = NumberFormat.getIntegerInstance().format(TotalPrice);
|
||||
}
|
||||
chatMessageManager.queue(QueuedMessage.builder()
|
||||
.type(ChatMessageType.FRIENDSCHATNOTIFICATION)
|
||||
.runeLiteFormattedMessage(new ChatMessageBuilder()
|
||||
.append(ChatColorType.HIGHLIGHT)
|
||||
.append("Risked Value: ")
|
||||
.append(ChatColorType.NORMAL)
|
||||
.append(StringPrice)
|
||||
.build())
|
||||
.build());
|
||||
}
|
||||
equipmentInspectorPanel.update(playerEquipment, playerName);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ class ItemPanel extends JPanel
|
||||
|
||||
ItemPanel(ItemComposition item, KitType kitType, AsyncBufferedImage icon)
|
||||
{
|
||||
setBorder(new EmptyBorder(3, 3, 3, 3));
|
||||
|
||||
setBorder(new EmptyBorder(3, 3, 3, 3));
|
||||
setBackground(ColorScheme.DARK_GRAY_COLOR);
|
||||
|
||||
GroupLayout layout = new GroupLayout(this);
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
package net.runelite.client.plugins.ztob;
|
||||
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Perspective;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.client.ui.overlay.*;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.awt.*;
|
||||
|
||||
public class BloatTimerOverlay extends Overlay {
|
||||
|
||||
private final Client client;
|
||||
private final TheatrePlugin plugin;
|
||||
private final TheatreConfig config;
|
||||
|
||||
@Inject
|
||||
private BloatTimerOverlay(Client client, TheatrePlugin plugin, TheatreConfig config) {
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPriority(OverlayPriority.HIGH);
|
||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||
}
|
||||
|
||||
public Dimension render(Graphics2D graphics) {
|
||||
|
||||
if (config.bloatTimer()) {
|
||||
final String tickCounter = String.valueOf(plugin.bloatTimer);
|
||||
int secondConversion = (int) (plugin.bloatTimer * .6);
|
||||
if (plugin.getBloat_NPC() != null) {
|
||||
Point canvasPoint = plugin.getBloat_NPC().getCanvasTextLocation(graphics, tickCounter, 60);
|
||||
if (plugin.bloatTimer <= 37) {
|
||||
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
} else {
|
||||
renderTextLocation(graphics, tickCounter + "( " + secondConversion + " )", 15, Font.BOLD, Color.RED, canvasPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void drawTile(Graphics2D graphics, WorldPoint point, Color color, int strokeWidth, int outlineAlpha, int fillAlpha) {
|
||||
WorldPoint playerLocation = client.getLocalPlayer().getWorldLocation();
|
||||
if (point.distanceTo(playerLocation) >= 32) {
|
||||
return;
|
||||
}
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, point);
|
||||
if (lp == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Polygon poly = Perspective.getCanvasTilePoly(client, lp);
|
||||
if (poly == null) {
|
||||
return;
|
||||
}
|
||||
//OverlayUtil.renderPolygon(graphics, poly, color);
|
||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
||||
graphics.setStroke(new BasicStroke(strokeWidth));
|
||||
graphics.draw(poly);
|
||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), fillAlpha));
|
||||
graphics.fill(poly);
|
||||
}
|
||||
|
||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, net.runelite.api.Point canvasPoint) {
|
||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||
if (canvasPoint != null) {
|
||||
final net.runelite.api.Point canvasCenterPoint = new net.runelite.api.Point(
|
||||
canvasPoint.getX(),
|
||||
canvasPoint.getY());
|
||||
final net.runelite.api.Point canvasCenterPoint_shadow = new Point(
|
||||
canvasPoint.getX() + 1,
|
||||
canvasPoint.getY() + 1);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,15 +14,16 @@ import net.runelite.client.config.ConfigItem;
|
||||
|
||||
@ConfigGroup("Theatre")
|
||||
|
||||
public interface TheatreConfig extends Config
|
||||
{
|
||||
public interface TheatreConfig extends Config {
|
||||
@ConfigItem(
|
||||
position = 0,
|
||||
keyName = "MaidenBlood",
|
||||
name = "Maiden blood attack",
|
||||
description = ""
|
||||
)
|
||||
default boolean MaidenBlood(){ return false; }
|
||||
default boolean MaidenBlood() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 1,
|
||||
@@ -30,109 +31,181 @@ public interface TheatreConfig extends Config
|
||||
name = "Maiden blood spawns",
|
||||
description = ""
|
||||
)
|
||||
default boolean MaidenSpawns(){ return false; }
|
||||
default boolean MaidenSpawns() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 2,
|
||||
keyName = "BloatIndicator",
|
||||
name = "Bloat indicator",
|
||||
name = "Bloat Indicator",
|
||||
description = ""
|
||||
)
|
||||
default boolean BloatIndicator(){ return false; }
|
||||
default boolean BloatIndicator() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 3,
|
||||
keyName = "BloatHands",
|
||||
name = "Bloat Falling Hands",
|
||||
keyName = "bloat Timer",
|
||||
name = "Bloat Timer",
|
||||
description = ""
|
||||
)
|
||||
default boolean BloatHands(){ return false; }
|
||||
default boolean bloatTimer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 4,
|
||||
keyName = "bloatFeet",
|
||||
name = "Bloat Feet",
|
||||
description = ""
|
||||
)
|
||||
default boolean bloatFeetIndicator() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
keyName = "NyloPillars",
|
||||
name = "Nylocas pillar health",
|
||||
description = ""
|
||||
)
|
||||
default boolean NyloPillars(){ return false; }
|
||||
default boolean NyloPillars() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ConfigItem(
|
||||
position = 5,
|
||||
position = 6,
|
||||
keyName = "NyloBlasts",
|
||||
name = "Nylocas explosions",
|
||||
description = ""
|
||||
)
|
||||
default boolean NyloBlasts(){ return false; }
|
||||
default boolean NyloBlasts() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 6,
|
||||
position = 7,
|
||||
keyName = "NyloMenu",
|
||||
name = "Hide Attack options for Nylocas",
|
||||
description = ""
|
||||
)
|
||||
|
||||
default boolean NyloMenu() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 8,
|
||||
keyName = "SotetsegMaze1",
|
||||
name = "Sotetseg maze",
|
||||
description = ""
|
||||
)
|
||||
default boolean SotetsegMaze1(){ return false; }
|
||||
default boolean SotetsegMaze1() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 7,
|
||||
position = 9,
|
||||
keyName = "SotetsegMaze2",
|
||||
name = "Sotetseg maze (solo mode)",
|
||||
description = ""
|
||||
)
|
||||
default boolean SotetsegMaze2(){ return false; }
|
||||
|
||||
@ConfigItem(
|
||||
position = 8,
|
||||
keyName = "SotetsegTick",
|
||||
name = "Sotetseg tick eat",
|
||||
description = ""
|
||||
)
|
||||
default boolean SotetsegTick(){ return false; }
|
||||
|
||||
@ConfigItem(
|
||||
position = 9,
|
||||
keyName = "XarpusExhumed",
|
||||
name = "Xarpus exhumed",
|
||||
description = ""
|
||||
)
|
||||
default boolean XarpusExhumed(){ return false; }
|
||||
default boolean SotetsegMaze2() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 10,
|
||||
keyName = "XarpusTick",
|
||||
name = "Xarpus tick",
|
||||
keyName = "XarpusExhumed",
|
||||
name = "Xarpus Exhumed",
|
||||
description = ""
|
||||
)
|
||||
default boolean XarpusTick(){ return false; }
|
||||
default boolean XarpusExhumed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 11,
|
||||
keyName = "VerzikCupcakes",
|
||||
name = "Verzik cupcakes",
|
||||
description = " "
|
||||
keyName = "XarpusTick",
|
||||
name = "Xarpus Tick",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikCupcakes(){ return false; }
|
||||
default boolean XarpusTick() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 12,
|
||||
keyName = "VerzikTick",
|
||||
name = "Verzik p3 tick",
|
||||
keyName = "xarpusExhumes",
|
||||
name = "Xarpus Exhume Counter",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikTick(){ return false; }
|
||||
default boolean XarpusExhumeOverlay() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 13,
|
||||
keyName = "VerzikMelee",
|
||||
name = "Verzik p3 melee range",
|
||||
keyName = "VerzikCupcakes",
|
||||
name = "Verzik Projectile Markers",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikMelee(){ return false; }
|
||||
default boolean VerzikCupcakes() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 14,
|
||||
keyName = "VerzikYellow",
|
||||
name = "Verzik yellow timing",
|
||||
keyName = "VerzikTick",
|
||||
name = "Verzik P3 Tick",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikYellow(){ return false; }
|
||||
}
|
||||
default boolean VerzikTick() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 15,
|
||||
keyName = "VerzikMelee",
|
||||
name = "Verzik P3 Melee Range",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikMelee() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 16,
|
||||
keyName = "VerzikYellow",
|
||||
name = "Verzik Yellow Timing",
|
||||
description = ""
|
||||
)
|
||||
default boolean VerzikYellow() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 17,
|
||||
keyName = "Verzik Nylo",
|
||||
name = "Verzik Nylo Overlay",
|
||||
description = ""
|
||||
)
|
||||
default boolean NyloTargetOverlay() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 18,
|
||||
keyName = "VerzikTankTile",
|
||||
name = "Verzik P3 Tile Overlay",
|
||||
description = ""
|
||||
)
|
||||
default boolean verzikTankTile() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,27 +8,21 @@
|
||||
|
||||
package net.runelite.client.plugins.ztob;
|
||||
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.*;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldArea;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
import net.runelite.client.ui.overlay.*;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.awt.*;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import net.runelite.api.*;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.api.coords.LocalPoint;
|
||||
import net.runelite.api.coords.WorldArea;
|
||||
import net.runelite.api.coords.WorldPoint;
|
||||
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.ui.overlay.OverlayUtil;
|
||||
|
||||
public class TheatreOverlay extends Overlay {
|
||||
private final Client client;
|
||||
|
||||
|
||||
private final TheatrePlugin plugin;
|
||||
private final TheatreConfig config;
|
||||
|
||||
@@ -43,69 +37,71 @@ public class TheatreOverlay extends Overlay {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics)
|
||||
{
|
||||
if (plugin.isRunMaiden())
|
||||
{
|
||||
if (config.MaidenBlood())
|
||||
{
|
||||
for (WorldPoint point : plugin.getMaiden_BloodSpatters())
|
||||
{
|
||||
drawTile(graphics, point, new Color(0,150,200), 2, 150, 10);
|
||||
public Dimension render(Graphics2D graphics) {
|
||||
if (plugin.isRunMaiden()) {
|
||||
if (config.MaidenBlood()) {
|
||||
for (WorldPoint point : plugin.getMaiden_BloodSpatters()) {
|
||||
drawTile(graphics, point, new Color(36, 248, 229), 2, 150, 10);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.MaidenSpawns())
|
||||
{
|
||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations())
|
||||
{
|
||||
drawTile(graphics, point, new Color(0,150,200), 2, 180, 20);
|
||||
if (config.MaidenSpawns()) {
|
||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations()) {
|
||||
drawTile(graphics, point, new Color(36, 248, 229), 2, 180, 20);
|
||||
}
|
||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations2())
|
||||
{
|
||||
drawTile(graphics, point, new Color(0,150,200), 1,120, 10);
|
||||
for (WorldPoint point : plugin.getMaiden_SpawnLocations2()) {
|
||||
drawTile(graphics, point, new Color(36, 248, 229), 1, 120, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.isRunBloat())
|
||||
{
|
||||
if (plugin.isRunBloat() && config.BloatIndicator()) {
|
||||
if (config.bloatFeetIndicator()) {
|
||||
if (plugin.getTemp().size() > 0) {
|
||||
if (plugin.isTempFlag()) {
|
||||
for (WorldPoint point : plugin.getTemp()) {
|
||||
|
||||
if (config.BloatHands())
|
||||
{
|
||||
for (WorldPoint p : plugin.getBloat_Hands())
|
||||
{
|
||||
drawTile(graphics, p, Color.BLACK,3,255,0);
|
||||
drawTile(graphics, point, Color.black, 4, 255, 0);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else if (plugin.getTemp2().size() > 0) {
|
||||
if (plugin.isTemp2Flag()) {
|
||||
for (WorldPoint point : plugin.getTemp2()) {
|
||||
|
||||
drawTile(graphics, point, Color.black, 4, 255, 0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if(config.BloatIndicator()) {
|
||||
NPC bloat = plugin.getBloat_NPC();
|
||||
int state = plugin.getBloat_State();
|
||||
if (bloat == null) {
|
||||
return null;
|
||||
}
|
||||
switch (state) {
|
||||
case 2:
|
||||
renderNpcOverlay(graphics, bloat, Color.GREEN, 3, 150, 0);
|
||||
break;
|
||||
case 3:
|
||||
renderNpcOverlay(graphics, bloat, Color.YELLOW, 3, 150, 0);
|
||||
break;
|
||||
default:
|
||||
renderNpcOverlay(graphics, bloat, new Color(223, 109, 255), 3, 150, 0);
|
||||
break;
|
||||
}
|
||||
NPC bloat = plugin.getBloat_NPC();
|
||||
int state = plugin.getBloat_State();
|
||||
if (bloat == null) {
|
||||
return null;
|
||||
}
|
||||
switch (state) {
|
||||
case 2:
|
||||
renderNpcOverlay(graphics, bloat, Color.GREEN, 3, 150, 0);
|
||||
break;
|
||||
case 3:
|
||||
renderNpcOverlay(graphics, bloat, Color.YELLOW, 3, 150, 0);
|
||||
break;
|
||||
default:
|
||||
renderNpcOverlay(graphics, bloat, new Color(223, 109, 255), 3, 150, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.isRunNylocas())
|
||||
{
|
||||
if (config.NyloPillars())
|
||||
{
|
||||
if (plugin.isRunNylocas()) {
|
||||
if (config.NyloPillars()) {
|
||||
Map<NPC, Integer> pillars = plugin.getNylocas_Pillars();
|
||||
for (NPC npc : pillars.keySet()) {
|
||||
final int health = pillars.get(npc);
|
||||
final String healthStr = String.valueOf(health) + "%";
|
||||
final String healthStr = health + "%";
|
||||
WorldPoint p = npc.getWorldLocation();
|
||||
LocalPoint lp = LocalPoint.fromWorld(client, p.getX() + 1, p.getY() + 1);
|
||||
final double rMod = 130.0 * health / 100.0;
|
||||
@@ -118,41 +114,34 @@ public class TheatreOverlay extends Overlay {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.NyloBlasts())
|
||||
{
|
||||
if (config.NyloBlasts()) {
|
||||
final Map<NPC, Integer> npcMap = plugin.getNylocas_Map();
|
||||
for (NPC npc : npcMap.keySet())
|
||||
{
|
||||
for (NPC npc : npcMap.keySet()) {
|
||||
int ticksLeft = npcMap.get(npc);
|
||||
if (ticksLeft > -1) {
|
||||
if (ticksLeft <= 6) {
|
||||
Color color = new Color(255, 255,0 ,180);
|
||||
Color color = new Color(255, 255, 0, 180);
|
||||
int outlineWidth = 2;
|
||||
int outlineAlpha = 150;
|
||||
renderNpcOverlay(graphics, npc, color, outlineWidth, outlineAlpha, 0);
|
||||
renderNpcOverlay(graphics, npc, color, outlineWidth, outlineAlpha, 15);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin.isRunSotetseg())
|
||||
{
|
||||
if (config.SotetsegMaze1())
|
||||
{
|
||||
if (plugin.isRunSotetseg()) {
|
||||
if (config.SotetsegMaze1()) {
|
||||
int i = 1;
|
||||
for (GroundObject z : plugin.getRedTiles().keySet())
|
||||
{
|
||||
Polygon poly = z.getCanvasTilePoly();
|
||||
if (poly != null)
|
||||
{
|
||||
for (GroundObject o : plugin.getRedTiles().keySet()) {
|
||||
Polygon poly = o.getCanvasTilePoly();
|
||||
if (poly != null) {
|
||||
graphics.setColor(Color.WHITE);
|
||||
graphics.setStroke(new BasicStroke(2));
|
||||
graphics.draw(poly);
|
||||
}
|
||||
Point textLocation = z.getCanvasTextLocation(graphics, String.valueOf(i), 0);
|
||||
if (textLocation != null)
|
||||
{
|
||||
Point textLocation = o.getCanvasTextLocation(graphics, String.valueOf(i), 0);
|
||||
if (textLocation != null) {
|
||||
OverlayUtil.renderTextLocation(graphics, textLocation, String.valueOf(i), Color.WHITE);
|
||||
}
|
||||
|
||||
@@ -160,111 +149,111 @@ public class TheatreOverlay extends Overlay {
|
||||
}
|
||||
}
|
||||
|
||||
if (config.SotetsegMaze2())
|
||||
{
|
||||
for (WorldPoint p : plugin.getRedTilesOverworld())
|
||||
{
|
||||
if (config.SotetsegMaze2()) {
|
||||
for (WorldPoint p : plugin.getRedTilesOverworld()) {
|
||||
drawTile(graphics, p, Color.WHITE, 2, 255, 10);
|
||||
}
|
||||
}
|
||||
if (config.SotetsegTick()) {
|
||||
NPC boss = plugin.getSotetseg_NPC();
|
||||
int eattick = plugin.getTickTillEat();
|
||||
if (eattick > -1)
|
||||
{
|
||||
final String eatTicksStr = String.valueOf(eattick);
|
||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, eatTicksStr, 130);
|
||||
renderTextLocation(graphics, eatTicksStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (plugin.isRunXarpus())
|
||||
{
|
||||
if (plugin.isRunXarpus()) {
|
||||
NPC boss = plugin.getXarpus_NPC();
|
||||
|
||||
if (boss.getId() == NpcID.XARPUS_8340 && !plugin.isXarpus_Stare() && config.XarpusTick())
|
||||
{
|
||||
if (boss.getId() == NpcID.XARPUS_8340 && !plugin.isXarpus_Stare() && config.XarpusTick()) {
|
||||
int tick = plugin.getXarpus_TicksUntilShoot();
|
||||
if (tick < 1)
|
||||
{
|
||||
if (tick < 1) {
|
||||
tick = tick % 4 + 4;
|
||||
}
|
||||
final String ticksLeftStr = String.valueOf(tick);
|
||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 130);
|
||||
renderTextLocation(graphics, ticksLeftStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
}
|
||||
if (boss.getId() == NpcID.XARPUS_8339 && config.XarpusExhumed())
|
||||
{
|
||||
for (GroundObject o : plugin.getXarpus_Exhumeds().keySet())
|
||||
{
|
||||
if (boss.getId() == NpcID.XARPUS_8339 && config.XarpusExhumed()) {
|
||||
for (GroundObject o : plugin.getXarpus_Exhumeds().keySet()) {
|
||||
|
||||
|
||||
Polygon poly = o.getCanvasTilePoly();
|
||||
if (poly != null)
|
||||
{
|
||||
if (poly != null) {
|
||||
graphics.setColor(new Color(0, 255, 0, 130));
|
||||
graphics.setStroke(new BasicStroke(1));
|
||||
graphics.draw(poly);
|
||||
}
|
||||
}
|
||||
for (Map.Entry<GroundObject, Integer> exhumes : plugin.getXarpusExhumedsTimer().entrySet()) {
|
||||
final String ticksremaining = String.valueOf(exhumes.getValue());
|
||||
if (Integer.valueOf(ticksremaining) > 0) {
|
||||
GroundObject ex = exhumes.getKey();
|
||||
Point point = ex.getCanvasTextLocation(graphics, ticksremaining, 0);
|
||||
renderTextLocation(graphics, ticksremaining, 12, Font.BOLD, Color.white, point);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (plugin.isRunVerzik())
|
||||
{
|
||||
if (config.VerzikCupcakes())
|
||||
{
|
||||
for (WorldPoint p : plugin.getVerzik_RangeProjectiles().values())
|
||||
{
|
||||
|
||||
if (plugin.isRunVerzik()) {
|
||||
|
||||
|
||||
if (config.VerzikCupcakes()) {
|
||||
for (WorldPoint p : plugin.getVerzik_RangeProjectiles().values()) {
|
||||
drawTile(graphics, p, Color.RED, 2, 180, 50);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.VerzikYellow())
|
||||
{
|
||||
for (WorldPoint p : plugin.getVerzik_YellowTiles())
|
||||
{
|
||||
drawTile(graphics, p, Color.YELLOW,3,255,0);
|
||||
|
||||
if (config.VerzikYellow()) {
|
||||
for (WorldPoint p : plugin.getVerzik_YellowTiles()) {
|
||||
drawTile(graphics, p, Color.YELLOW, 3, 255, 0);
|
||||
Projectile yellowBall = plugin.getVerzik_YellowBall();
|
||||
if (yellowBall != null)
|
||||
{
|
||||
final int ticksToImpact = yellowBall.getRemainingCycles()/30;
|
||||
if (yellowBall != null) {
|
||||
final int ticksToImpact = yellowBall.getRemainingCycles() / 30;
|
||||
final String countdownStr = String.valueOf(ticksToImpact);
|
||||
Point canvasPoint = Perspective.getCanvasTextLocation(client, graphics, LocalPoint.fromWorld(client, p), countdownStr, 0);
|
||||
renderTextLocation(graphics, countdownStr, 12, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plugin.getVerzik_NPC_P3() != null) {
|
||||
final NPC boss = plugin.getVerzik_NPC_P3();
|
||||
if (boss.getId() == NpcID.VERZIK_VITUR_8374)
|
||||
{
|
||||
if (config.VerzikTick())
|
||||
{
|
||||
final int ticksLeft = plugin.getP3_TicksUntilAttack();
|
||||
if (ticksLeft > 0 && ticksLeft < 8)
|
||||
{
|
||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
||||
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
}
|
||||
|
||||
final NPC boss = plugin.getVerzik_NPC();
|
||||
if (boss.getId() == NpcID.VERZIK_VITUR_8374) {
|
||||
if (config.verzikTankTile()) {
|
||||
renderNpcOverlay(graphics, boss, new Color(75, 0, 130), 1, 255, 0);
|
||||
}
|
||||
|
||||
if (config.VerzikTick()) {
|
||||
final int ticksLeft = plugin.getP3_TicksUntilAttack();
|
||||
if (ticksLeft > 0 && ticksLeft < 8) {
|
||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
||||
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
}
|
||||
}
|
||||
|
||||
if (config.VerzikMelee() && boss.getAnimation() != 8127)
|
||||
{
|
||||
List<WorldPoint> meleeRange = getHitSquares(boss.getWorldLocation(), 7, 1, false);
|
||||
if (config.VerzikMelee()) {
|
||||
List<WorldPoint> meleeRange = getHitSquares(boss.getWorldLocation(), 7, 1, false);
|
||||
|
||||
for (WorldPoint p : meleeRange)
|
||||
{
|
||||
drawTile(graphics, p, Color.WHITE, 1,155, 10);
|
||||
}
|
||||
for (WorldPoint p : meleeRange) {
|
||||
drawTile(graphics, p, Color.WHITE, 1, 155, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (boss.getAnimation() == 8117) {
|
||||
final int ticksLeft = plugin.getRedCrabsTimer();
|
||||
if (ticksLeft > 0) {
|
||||
final String ticksLeftStr = String.valueOf(ticksLeft);
|
||||
Point canvasPoint = boss.getCanvasTextLocation(graphics, ticksLeftStr, 60);
|
||||
renderTextLocation(graphics, ticksLeftStr, 15, Font.BOLD, Color.WHITE, canvasPoint);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -290,19 +279,16 @@ public class TheatreOverlay extends Overlay {
|
||||
graphics.fill(poly);
|
||||
}
|
||||
|
||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha)
|
||||
{
|
||||
private void renderNpcOverlay(Graphics2D graphics, NPC actor, Color color, int outlineWidth, int outlineAlpha, int fillAlpha) {
|
||||
int size = 1;
|
||||
NPCComposition composition = actor.getTransformedComposition();
|
||||
if (composition != null)
|
||||
{
|
||||
if (composition != null) {
|
||||
size = composition.getSize();
|
||||
}
|
||||
LocalPoint lp = actor.getLocalLocation();
|
||||
Polygon tilePoly = Perspective.getCanvasTileAreaPoly(client, lp, size);
|
||||
|
||||
if (tilePoly != null)
|
||||
{
|
||||
if (tilePoly != null) {
|
||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), outlineAlpha));
|
||||
graphics.setStroke(new BasicStroke(outlineWidth));
|
||||
graphics.draw(tilePoly);
|
||||
@@ -311,37 +297,31 @@ public class TheatreOverlay extends Overlay {
|
||||
}
|
||||
}
|
||||
|
||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint)
|
||||
{
|
||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint) {
|
||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||
if (canvasPoint != null)
|
||||
{
|
||||
if (canvasPoint != null) {
|
||||
final Point canvasCenterPoint = new Point(
|
||||
canvasPoint.getX(),
|
||||
canvasPoint.getY());
|
||||
final Point canvasCenterPoint_shadow = new Point(
|
||||
canvasPoint.getX() + 1,
|
||||
canvasPoint.getY() + 1) ;
|
||||
canvasPoint.getY() + 1);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||
}
|
||||
}
|
||||
|
||||
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder)
|
||||
{
|
||||
private List<WorldPoint> getHitSquares(WorldPoint npcLoc, int npcSize, int thickness, boolean includeUnder) {
|
||||
List<WorldPoint> little = new WorldArea(npcLoc, npcSize, npcSize).toWorldPointList();
|
||||
List<WorldPoint> big = new WorldArea(npcLoc.getX()-thickness, npcLoc.getY()-thickness, npcSize + (thickness * 2), npcSize + (thickness * 2), npcLoc.getPlane()).toWorldPointList();
|
||||
if (!includeUnder)
|
||||
{
|
||||
for (Iterator<WorldPoint> it = big.iterator(); it.hasNext();)
|
||||
{
|
||||
List<WorldPoint> big = new WorldArea(npcLoc.getX() - thickness, npcLoc.getY() - thickness, npcSize + (thickness * 2), npcSize + (thickness * 2), npcLoc.getPlane()).toWorldPointList();
|
||||
if (!includeUnder) {
|
||||
for (Iterator<WorldPoint> it = big.iterator(); it.hasNext(); ) {
|
||||
WorldPoint p = it.next();
|
||||
if (little.contains(p))
|
||||
{
|
||||
if (little.contains(p)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
return big;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,68 @@
|
||||
package net.runelite.client.plugins.ztob;
|
||||
|
||||
import com.google.inject.Inject;
|
||||
import net.runelite.client.ui.overlay.Overlay;
|
||||
import net.runelite.client.ui.overlay.OverlayMenuEntry;
|
||||
import net.runelite.client.ui.overlay.OverlayPosition;
|
||||
import net.runelite.client.ui.overlay.components.LineComponent;
|
||||
import net.runelite.client.ui.overlay.components.PanelComponent;
|
||||
import net.runelite.client.ui.overlay.components.TitleComponent;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
import static net.runelite.api.MenuAction.RUNELITE_OVERLAY_CONFIG;
|
||||
import static net.runelite.client.ui.overlay.OverlayManager.OPTION_CONFIGURE;
|
||||
|
||||
public class TheatreXarpusOverlay extends Overlay {
|
||||
private final TheatrePlugin plugin;
|
||||
private final TheatreConfig config;
|
||||
PanelComponent panelComponent = new PanelComponent();
|
||||
|
||||
@Inject
|
||||
private TheatreXarpusOverlay(TheatrePlugin plugin, TheatreConfig config) {
|
||||
super(plugin);
|
||||
setPosition(OverlayPosition.ABOVE_CHATBOX_RIGHT);
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPosition(OverlayPosition.DETACHED);
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
getMenuEntries().add(new OverlayMenuEntry(RUNELITE_OVERLAY_CONFIG, OPTION_CONFIGURE, "Theatre xarpus overlay"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Dimension render(Graphics2D graphics) {
|
||||
if (plugin.isRunXarpus()) {
|
||||
if (config.XarpusExhumeOverlay()) {
|
||||
if (plugin.getXarpus_NPC().getId() == 8339) {
|
||||
panelComponent.getChildren().clear();
|
||||
String overlayTitle = "Exhume Counter";
|
||||
|
||||
|
||||
// Build overlay title
|
||||
panelComponent.getChildren().add(TitleComponent.builder()
|
||||
.text(overlayTitle)
|
||||
.color(Color.GREEN)
|
||||
.build());
|
||||
|
||||
//Set the size of overlay
|
||||
panelComponent.setPreferredSize(new Dimension(
|
||||
graphics.getFontMetrics().stringWidth(overlayTitle) + 30, 0
|
||||
));
|
||||
|
||||
panelComponent.getChildren().add(LineComponent.builder()
|
||||
.left("Exhumes: ")
|
||||
.right(String.valueOf(plugin.getExhumecount()))
|
||||
.build());
|
||||
}
|
||||
}
|
||||
return panelComponent.render(graphics);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
package net.runelite.client.plugins.ztob;
|
||||
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.NPC;
|
||||
import net.runelite.api.Point;
|
||||
import net.runelite.client.ui.overlay.*;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.awt.*;
|
||||
|
||||
public class VerzikNyloOverlay extends Overlay {
|
||||
|
||||
private final Client client;
|
||||
private final TheatrePlugin plugin;
|
||||
private final TheatreConfig config;
|
||||
|
||||
@Inject
|
||||
private VerzikNyloOverlay(Client client, TheatrePlugin plugin, TheatreConfig config) {
|
||||
this.client = client;
|
||||
this.plugin = plugin;
|
||||
this.config = config;
|
||||
setPosition(OverlayPosition.DYNAMIC);
|
||||
setPriority(OverlayPriority.HIGH);
|
||||
setLayer(OverlayLayer.ABOVE_SCENE);
|
||||
}
|
||||
|
||||
public Dimension render(Graphics2D graphics) {
|
||||
|
||||
if (plugin.isRunVerzik()) {
|
||||
if (config.NyloTargetOverlay()) {
|
||||
if (plugin.getCrabList().size() > 0) {
|
||||
|
||||
for (NPC npc : plugin.getCrabList()) {
|
||||
if (npc.isDead()) {
|
||||
continue;
|
||||
}
|
||||
String renderText = "";
|
||||
if (npc.getInteracting() != null) {
|
||||
|
||||
renderText = npc.getInteracting().getName();
|
||||
Point point = npc.getCanvasTextLocation(graphics, npc.getInteracting().getName(), 0);
|
||||
|
||||
|
||||
if (npc.getInteracting().getName().toLowerCase().equals(client.getLocalPlayer().getName().toLowerCase())) {
|
||||
point = npc.getCanvasTextLocation(graphics, client.getLocalPlayer().getName(), 0);
|
||||
renderText = "YOU NIGGA RUN!";
|
||||
|
||||
} else if (npc.getInteracting().getName().toLowerCase().equals("afyy")) {
|
||||
point = npc.getCanvasTextLocation(graphics, "Ricecup", 0);
|
||||
renderText = "Ricecup";
|
||||
}
|
||||
if (renderText.equals("YOU NIGGA RUN!")) {
|
||||
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.RED, point);
|
||||
} else {
|
||||
renderTextLocation(graphics, renderText, 12, Font.BOLD, Color.GREEN, point);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void renderTextLocation(Graphics2D graphics, String txtString, int fontSize, int fontStyle, Color fontColor, Point canvasPoint) {
|
||||
graphics.setFont(new Font("Arial", fontStyle, fontSize));
|
||||
if (canvasPoint != null) {
|
||||
final Point canvasCenterPoint = new Point(
|
||||
canvasPoint.getX(),
|
||||
canvasPoint.getY());
|
||||
final Point canvasCenterPoint_shadow = new Point(
|
||||
canvasPoint.getX() + 1,
|
||||
canvasPoint.getY() + 1);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint_shadow, txtString, Color.BLACK);
|
||||
OverlayUtil.renderTextLocation(graphics, canvasCenterPoint, txtString, fontColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 624 B |
Reference in New Issue
Block a user