libai 2 Posted February 25, 2024 Share Posted February 25, 2024 HearthstoneID: 6948 Binds when picked up Unique Use: Returns you to <Inn>. Speak to an Innkeeper in a different place to change your home location. Hi,Is there any way to get where my current home is from Hearthstone? I don't known how to get the green color part of The item(Use: Returns you to <Inn>. Speak to an Innkeeper in a different place to change your home location.) it's nothing about green info in itemlink ItemLink - Wowpedia - Your wiki guide to the World of Warcraft (fandom.com) thank you . Link to comment https://wrobot.eu/forums/topic/15419-how-to-get-green-part-info-of-item/ Share on other sites More sharing options...
nax 10 Posted February 26, 2024 Share Posted February 26, 2024 Could use tooltip reader to get the each lines. Link to comment https://wrobot.eu/forums/topic/15419-how-to-get-green-part-info-of-item/#findComment-69190 Share on other sites More sharing options...
nax 10 Posted February 26, 2024 Share Posted February 26, 2024 local tooltip; local function CreateToolTipFrame() tooltip = CreateFrame("GameTooltip", "MyTempTooltip", UIParent, "GameTooltipTemplate") tooltip:SetOwner(UIParent, "ANCHOR_NONE") end local function OnTooltipSetItemFromLink(itemLink) if itemLink then tooltip:SetHyperlink(itemLink) local numLines = tooltip:NumLines() if numLines > 0 then for i = 1, numLines do local line = _G[tooltip:GetName() .. "TextLeft" .. i] if line then print(line:GetText()) end end end tooltip:Hide() end end Link to comment https://wrobot.eu/forums/topic/15419-how-to-get-green-part-info-of-item/#findComment-69191 Share on other sites More sharing options...
libai 2 Posted March 5, 2024 Author Share Posted March 5, 2024 thank you, but is it not work on 1.12? local tooltip; local function CreateToolTipFrame() tooltip = CreateFrame("GameTooltip", "MyTempTooltip", UIParent, "GameTooltipTemplate") tooltip:SetOwner(UIParent, "ANCHOR_NONE") end local function OnTooltipSetItemFromLink(itemLink) if itemLink then tooltip:SetHyperlink(itemLink) local numLines = tooltip:NumLines() if numLines > 0 then for i = 1, numLines do local line = _G[tooltip:GetName() .. "TextLeft" .. i] if line then print(line:GetText()) end end end tooltip:Hide() end end ----------- local link = GetContainerItemLink(0,1) -- the hearthstone at 0,1 CreateToolTipFrame() -- create the frame OnTooltipSetItemFromLink(link) --then error says: [string "Areizogu.lua]:10 Unknown link type -- if i run it again error change to : Interface\FrameXML\MoneyFrame.lua:185: attempt to perform arithmetic on local `money'(a nil value) On 2/27/2024 at 5:00 AM, Nax said: local tooltip; local function CreateToolTipFrame() tooltip = CreateFrame("GameTooltip", "MyTempTooltip", UIParent, "GameTooltipTemplate") tooltip:SetOwner(UIParent, "ANCHOR_NONE") end local function OnTooltipSetItemFromLink(itemLink) if itemLink then tooltip:SetHyperlink(itemLink) local numLines = tooltip:NumLines() if numLines > 0 then for i = 1, numLines do local line = _G[tooltip:GetName() .. "TextLeft" .. i] if line then print(line:GetText()) end end end tooltip:Hide() end end Link to comment https://wrobot.eu/forums/topic/15419-how-to-get-green-part-info-of-item/#findComment-69203 Share on other sites More sharing options...
nax 10 Posted March 5, 2024 Share Posted March 5, 2024 local tooltip local function CreateToolTipFrame() tooltip = CreateFrame("GameTooltip", "MyTempTooltip", UIParent, "GameTooltipTemplate") tooltip:SetOwner(UIParent, "ANCHOR_NONE") end local function OnTooltipSetItemFromLink(itemLink) if itemLink then CreateToolTipFrame() -- Ensure tooltip is created tooltip:SetHyperlink(itemLink) local numLines = tooltip:NumLines() if numLines > 0 then for i = 1, numLines do local line = getglobal(tooltip:GetName() .. "TextLeft" .. i) if line then DEFAULT_CHAT_FRAME:AddMessage(line:GetText()) end end end tooltip:Hide() end end Link to comment https://wrobot.eu/forums/topic/15419-how-to-get-green-part-info-of-item/#findComment-69204 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now