Add files via upload

This commit is contained in:
totalllyswede
2026-06-05 22:07:41 -07:00
committed by GitHub
parent b547e3c496
commit 6131be57a8
3 changed files with 155 additions and 32 deletions
+152 -31
View File
@@ -54,25 +54,32 @@ local LOCKABLE_OBJECTS = {
["Practice Lockbox"] = 0, -- Alliance rogue quest, Alther's Mill in Redridge ["Practice Lockbox"] = 0, -- Alliance rogue quest, Alther's Mill in Redridge
-- ===== Doors ===== -- ===== Doors =====
["Gnomeregan Door"] = 150, -- Gnomeregan entrance ["Ironclad Cove Gate"] = 150, -- Deadmines
["Gnomeregan Entry Door"] = 150, ["Water Gate"] = 150, -- Deadmines
["Gnomeregan Door"] = 150, -- Gnomeregan backdoor
["Gnomeregan Entry Door"] = 150, -- Gnomeregan backdoor (alternate name)
["Armory Door"] = 175, -- Scarlet Monastery Armory
["Cathedral Door"] = 175, -- Scarlet Monastery Cathedral ["Cathedral Door"] = 175, -- Scarlet Monastery Cathedral
["Searing Gorge Gate"] = 225, -- Thorium Point gate ["Searing Gorge Gate"] = 225, -- Loch Modan / Searing Gorge gate
["Prison Door"] = 280, -- Blackrock Depths ["Prison Door"] = 250, -- Blackrock Depths prison cells
["Shadowforge Door"] = 280, -- Blackrock Depths ["Shadowforge Door"] = 250, -- Blackrock Depths Shadowforge gates
["Scholomance Door"] = 280, -- Scholomance entrance ["Shadowforge Lock"] = 250, -- Blackrock Depths Shadowforge mechanism (alternate name)
["Service Entrance Door"] = 300, -- Stratholme service entrance ["Crescent Door"] = 300, -- Dire Maul
["Stratholme Gate"] = 300, ["Gordok Inner Door"] = 300, -- Dire Maul North
["Hidden Reach Door"] = 300, -- Dire Maul
["Scholomance Door"] = 280, -- Scholomance main entrance
["Service Entrance Door"] = 300, -- Stratholme servant's entrance
["Stratholme Gate"] = 300, -- Stratholme (alternate name)
-- ===== Silverpine Forest ===== -- ===== Silverpine Forest =====
["Decrepit Chest"] = 1, ["Decrepit Chest"] = 1,
-- ===== The Barrens / Ashenvale ===== -- ===== The Barrens / Ashenvale =====
["Battered Chest"] = 1, ["Battered Chest"] = 1,
["Waterlogged Footlocker"] = 70, -- Zoram Strand (Ashenvale), Lake Everstill (Redridge) ["Waterlogged Footlocker"] = 70, -- Ashenvale, Redridge (150 in Desolace; handled in AppendObjectLockLine)
-- ===== Stonetalon / Hillsbrad / Wetlands / Badlands ===== -- ===== Stonetalon / Hillsbrad / Wetlands / Badlands =====
-- Requirement is zone-dependent; handled in AppendObjectLockLine -- Multiple variants with different requirements; handled in AppendObjectLockLine
["Battered Footlocker"] = 70, ["Battered Footlocker"] = 70,
-- ===== Shadowfang Keep ===== -- ===== Shadowfang Keep =====
@@ -106,10 +113,12 @@ local LOCKABLE_OBJECTS = {
-- ===== Sunken Temple ===== -- ===== Sunken Temple =====
["Sunken Temple Chest"] = 200, ["Sunken Temple Chest"] = 200,
["Troll Chest"] = 175, ["Troll Chest"] = 175,
["Mossy Footlocker"] = 175, -- Pool of Tears, Swamp of Sorrows (outside) -- Mossy Footlocker: 175 in Desolace/Swamp of Sorrows, 225 in Azshara; handled in AppendObjectLockLine
["Mossy Footlocker"] = 175,
-- ===== Badlands ===== -- ===== Badlands / Searing Gorge / Tanaris =====
["Dented Footlocker"] = 175, -- Angor Fortress -- Dented Footlocker: 175 in Badlands, 200/225 in Searing Gorge, 225 in Tanaris; handled in AppendObjectLockLine
["Dented Footlocker"] = 175,
-- ===== Searing Gorge ===== -- ===== Searing Gorge =====
["Slag Pit Footlocker"] = 200, -- Lower Slag Pit ["Slag Pit Footlocker"] = 200, -- Lower Slag Pit
@@ -144,6 +153,7 @@ local LOCKABLE_OBJECTS = {
-- ===== Eastern Plaguelands ===== -- ===== Eastern Plaguelands =====
["Mossflayer Chest"] = 225, ["Mossflayer Chest"] = 225,
["Lich's Box"] = 275, ["Lich's Box"] = 275,
["Scarlet Footlocker"] = 250, -- Eastern Plaguelands
-- ===== Silithus ===== -- ===== Silithus =====
["Silithid Cache"] = 250, ["Silithid Cache"] = 250,
@@ -202,31 +212,142 @@ local function AppendItemLockLine(itemID)
end end
end end
-- Append lockpick line for a known object name -- Returns "red" if the "Locked" line is red (skill too low),
local function AppendObjectLockLine(name) -- "other" if Locked is present but any other colour (orange/yellow/green/grey = pickable),
if not name then return end -- nil if no Locked line found.
local function GetLockedLineColor()
local req = LOCKABLE_OBJECTS[name] for i = 1, 30 do
local left = getglobal("GameTooltipTextLeft" .. i)
-- Battered Footlocker has different requirements depending on zone if not left then break end
if name == "Battered Footlocker" then local t = left:GetText()
local zone = GetRealZoneText() if t and string.find(t, "Locked") then
if zone == "Badlands" then local r, g, b = left:GetTextColor()
req = 165 r = r or 0
g = g or 0
b = b or 0
-- Red: high red channel, low green and blue
if r > 0.8 and g < 0.3 and b < 0.3 then
return "red"
else else
-- Two variants exist outside Badlands, can't distinguish by name alone return "other"
if CanPickLock(110) then end
GameTooltip:AddLine("|cff00ff00Pickable (70) or (110)|r") end
elseif CanPickLock(70) then end
GameTooltip:AddLine("|cff00ff00Pickable (70) |r|cffff2020or (110)|r") return nil
end
-- Returns true if the tooltip contains a "Locked" line (any colour)
local function IsTooltipLocked()
return GetLockedLineColor() ~= nil
end
-- Helper to display a line for objects with multiple possible skill requirements.
-- Uses the colour of the game's own "Locked" text to determine which variant it is:
-- If "Locked" is red and playerSkill is between low and high, it must be the higher variant.
local function AddMultiLevelLine(levels)
-- Single level: straightforward
if table.getn(levels) == 1 then
local req = levels[1]
if CanPickLock(req) then
GameTooltip:AddLine("|cff00ff00Pickable (" .. req .. ")|r")
else else
GameTooltip:AddLine("|cffff2020Skill Level Too Low (70) or (110)|r") GameTooltip:AddLine("|cffff2020Skill Level Too Low (" .. req .. ")|r")
end end
GameTooltip:Show() GameTooltip:Show()
return return
end end
-- Multiple levels: use the Locked line colour to disambiguate
local lockedColor = GetLockedLineColor()
local low = levels[1]
local high = levels[table.getn(levels)]
if lockedColor == "red" and CanPickLock(low) then
-- Locked is red but player can pick the low variant - must be the higher one
GameTooltip:AddLine("|cffff2020Skill Level Too Low (" .. high .. ")|r")
elseif lockedColor == "red" then
-- Locked is red and player can't pick either - too low for even the lowest
GameTooltip:AddLine("|cffff2020Skill Level Too Low (" .. low .. ")|r")
else
-- Locked is not red (orange/yellow/green/grey) - player can pick it
GameTooltip:AddLine("|cff00ff00Pickable (" .. low .. ")|r")
end
GameTooltip:Show()
end end
-- Append lockpick line for a known object name
local function AppendObjectLockLine(name)
if not name then return end
if not IsTooltipLocked() then return end
local zone = GetRealZoneText()
-- -----------------------------------------------------------------------
-- Battered Footlocker: varies by zone
-- Stonetalon Mountains: 70 or 110
-- Wetlands: 70 or 115
-- Hillsbrad Foothills: 110
-- Badlands: 150
-- -----------------------------------------------------------------------
if name == "Battered Footlocker" then
if zone == "Stonetalon Mountains" then
AddMultiLevelLine({70, 110})
elseif zone == "Wetlands" then
AddMultiLevelLine({70, 115})
elseif zone == "Hillsbrad Foothills" then
AddMultiLevelLine({110})
elseif zone == "Badlands" then
AddMultiLevelLine({150})
else
AddMultiLevelLine({70, 110}) -- fallback: show both common levels
end
return
end
-- -----------------------------------------------------------------------
-- Waterlogged Footlocker: 70 in Ashenvale/Redridge, 150 in Desolace
-- -----------------------------------------------------------------------
if name == "Waterlogged Footlocker" then
if zone == "Desolace" then
AddMultiLevelLine({150})
else
AddMultiLevelLine({70, 115})
end
return
end
-- -----------------------------------------------------------------------
-- Mossy Footlocker: 175 in Desolace/Swamp of Sorrows, 225 in Azshara
-- -----------------------------------------------------------------------
if name == "Mossy Footlocker" then
if zone == "Azshara" then
AddMultiLevelLine({225})
else
AddMultiLevelLine({175})
end
return
end
-- -----------------------------------------------------------------------
-- Dented Footlocker: 175 in Badlands, 200 or 225 in Searing Gorge, 225 in Tanaris
-- -----------------------------------------------------------------------
if name == "Dented Footlocker" then
if zone == "Badlands" then
AddMultiLevelLine({175})
elseif zone == "Searing Gorge" then
AddMultiLevelLine({200, 225})
elseif zone == "Tanaris" then
AddMultiLevelLine({225})
else
AddMultiLevelLine({175, 225}) -- fallback
end
return
end
-- -----------------------------------------------------------------------
-- All other objects: single fixed requirement
-- -----------------------------------------------------------------------
local req = LOCKABLE_OBJECTS[name]
if req then if req then
if CanPickLock(req) then if CanPickLock(req) then
GameTooltip:AddLine("|cff00ff00Pickable (" .. req .. ")|r") GameTooltip:AddLine("|cff00ff00Pickable (" .. req .. ")|r")
@@ -384,4 +505,4 @@ SlashCmdList["LOCKPICKTIP"] = function(msg)
end end
end end
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00LockpickTooltip v1.1.0|r loaded. Type |cffaaddff/lpt|r for help.") DEFAULT_CHAT_FRAME:AddMessage("|cffffff00LockpickTooltip v1.2.0|r loaded. Type |cffaaddff/lpt|r for help.")
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: LockpickTooltip ## Title: LockpickTooltip
## Notes: Shows required lockpicking skill on item/object tooltips ## Notes: Shows required lockpicking skill on item/object tooltips
## Author: Olzon ## Author: Olzon
## Version: 1.1.0 ## Version: 1.2.0
## SavedVariables: ## SavedVariables:
LockpickTooltip.lua LockpickTooltip.lua
+4 -2
View File
@@ -1,5 +1,5 @@
# LockpickTooltip # LockpickTooltip
### World of Warcraft 1.12.1 (Vanilla) Addon — v1.1.0 Stable ### World of Warcraft 1.12.1 (Vanilla) Addon — v1.2.0 Stable
Adds a line to item and world-object tooltips showing the required Lockpicking skill, colour-coded green if you can pick it or red if your skill is too low. Adds a line to item and world-object tooltips showing the required Lockpicking skill, colour-coded green if you can pick it or red if your skill is too low.
@@ -54,7 +54,9 @@ Adds a line to item and world-object tooltips showing the required Lockpicking s
## Version History ## Version History
**1.1.0** — Stable. Zone-aware skill requirements for Battered Footlocker (Badlands vs elsewhere). Corrected all item IDs against wowhead.com/classic. Tooltip now shows Pickable/Skill Level Too Low in green/red. **1.2.0** — Stable. Full zone-aware footlocker coverage from spreadsheet data (Battered, Waterlogged, Mossy, Dented). Multi-variant footlockers now use the game's own "Locked" text colour to determine which variant is present, showing a single accurate line instead of multiple. Added Scarlet Footlocker (Eastern Plaguelands, 250). All dungeon door skill requirements corrected. Added Deadmines and Dire Maul doors.
**1.1.0** — Zone-aware skill requirements for Battered Footlocker. Corrected all item IDs against wowhead.com/classic. Tooltip now shows Pickable/Skill Level Too Low in green/red.
**1.0.0** — Initial stable release. Full coverage of vanilla lockboxes, junkboxes, and dungeon/outdoor chests. **1.0.0** — Initial stable release. Full coverage of vanilla lockboxes, junkboxes, and dungeon/outdoor chests.