ToolTip help menu

User Tag List

Thread: ToolTip help

Results 1 to 5 of 5
  1. #1
    Paludan's Avatar Private
    Reputation
    1
    Join Date
    May 2012
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ToolTip help

    Hi OwnedCore ^-^

    I've been looking at this addon called IdTip, and I'd like to make an addon that displayes the .pinfo command (trinitycore) in the tooltip when you mouseover a player. Is it possible? If yes, can you help me?

    I suppose I have to tell the addon that it needs to add a new line in the tooltip. In that line it needs to "write" the .pinfo of that player which I'm mousing over. I'm not too familiar with lua.

    Thank you!

    ToolTip help
  2. #2
    Strath's Avatar Elite User
    Reputation
    586
    Join Date
    Apr 2013
    Posts
    524
    Thanks G/R
    76/136
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    pinfo is a command on trinity only, it has no power on live wow. but if you look at the coding of IdTip, you should be able to figure out how to get more info out of it.

  3. #3
    Paludan's Avatar Private
    Reputation
    1
    Join Date
    May 2012
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Strath2121 View Post
    pinfo is a command on trinity only, it has no power on live wow. but if you look at the coding of IdTip, you should be able to figure out how to get more info out of it.
    I'm only interested in trinitycore servers:P And I've looked at it, but I'm not sure how I tell the addon to "read" the players name, and then automatically add the .pinfo of that player to a new line in the tooltip.

    EDIT: It's probably really easy, but I'm just not too familiar with lua, and I hope this will grant me more insight in the creating of addons

    Code of IdTip:

    Code:
    local select, UnitBuff, UnitDebuff, UnitAura, tonumber, strfind, hooksecurefunc =
    	select, UnitBuff, UnitDebuff, UnitAura, tonumber, strfind, hooksecurefunc
    
    local function addLine(self,id,isItem)
    	if isItem then
    		self:AddDoubleLine("ItemID:","|cffffffff"..id)
    	else
    		self:AddDoubleLine("SpellID:","|cffffffff"..id)
    	end
    	self:Show()
    end
    
    -- Spell Hooks ----------------------------------------------------------------
    hooksecurefunc(GameTooltip, "SetUnitBuff", function(self,...)
    	local id = select(11,UnitBuff(...))
    	if id then addLine(self,id) end
    end)
    
    hooksecurefunc(GameTooltip, "SetUnitDebuff", function(self,...)
    	local id = select(11,UnitDebuff(...))
    	if id then addLine(self,id) end
    end)
    
    hooksecurefunc(GameTooltip, "SetUnitAura", function(self,...)
    	local id = select(11,UnitAura(...))
    	if id then addLine(self,id) end
    end)
    
    GameTooltip:HookScript("OnTooltipSetSpell", function(self)
    	local id = select(3,self:GetSpell())
    	if id then addLine(self,id) end
    end)
    
    hooksecurefunc("SetItemRef", function(link, ...)
    	local id = tonumber(link:match("spell:(%d+)"))
    	if id then addLine(ItemRefTooltip,id) end
    end)
    
    -- Item Hooks -----------------------------------------------------------------
    
    local function attachItemTooltip(self)
    	local link = select(2,self:GetItem())
    	if not link then return end
    	local id = select(3,strfind(link, "^|%x+|Hitem:(%-?%d+):(%d+):(%d+):(%d+):(%d+):(%d+):(%-?%d+):(%-?%d+)"))
    	if id then addLine(self,id,true) end
    end
    
    GameTooltip:HookScript("OnTooltipSetItem", attachItemTooltip)
    ItemRefTooltip:HookScript("OnTooltipSetItem", attachItemTooltip)
    ItemRefShoppingTooltip1:HookScript("OnTooltipSetItem", attachItemTooltip)
    ItemRefShoppingTooltip2:HookScript("OnTooltipSetItem", attachItemTooltip)
    ItemRefShoppingTooltip3:HookScript("OnTooltipSetItem", attachItemTooltip)
    ShoppingTooltip1:HookScript("OnTooltipSetItem", attachItemTooltip)
    ShoppingTooltip2:HookScript("OnTooltipSetItem", attachItemTooltip)
    ShoppingTooltip3:HookScript("OnTooltipSetItem", attachItemTooltip)

  4. #4
    Strath's Avatar Elite User
    Reputation
    586
    Join Date
    Apr 2013
    Posts
    524
    Thanks G/R
    76/136
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll deconstruct it later, I'm interested in adding some other stuff for livr anyway

  5. #5
    Paludan's Avatar Private
    Reputation
    1
    Join Date
    May 2012
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Strath2121 View Post
    I'll deconstruct it later, I'm interested in adding some other stuff for livr anyway
    Awesome, anyway we can talk, perhaps via Skype? There's a quicker response rate^_^

Similar Threads

  1. Help WoW Fish-Bot
    By Eliteplague in forum World of Warcraft General
    Replies: 2
    Last Post: 12-10-2024, 05:46 PM
  2. Replies: 4
    Last Post: 05-06-2013, 08:03 AM
  3. HELP: Gold Scam Exploit
    By GoldDragon in forum World of Warcraft General
    Replies: 11
    Last Post: 01-23-2007, 07:26 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 05:54 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search