Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local origChatFrame_OnHyperlinkShow = ChatFrame_OnHyperlinkShow; -- (1)
- ChatFrame_OnHyperlinkShow = function(...) -- (2)
- local chatFrame, link, text, button = ...; -- (3)
- if type(text) == "string" and text:match("%[Pimp Hat%]") and not IsModifiedClick() then --(4)
- return ShowPimpHat(); -- (5)
- end
- return origChatFrame_OnHyperlinkShow(...); -- (6)
- end
- print("Click me: \124cff0070dd\124Hitem:8191:0:0:0:0:0:0:0:0:1\124h[Pimp Hat]\124h\124r"); -- (7)
- -- The code below deals mostly with the tinfoil hat tooltip and is irrelevant to hooking
- local function addLine(a, ...)
- if a then
- return ItemRefTooltip:AddLine(a,1,1,1,1), addLine(...);
- end
- end
- function ShowPimpHat()
- ShowUIPanel(ItemRefTooltip);
- if (not ItemRefTooltip:IsVisible()) then
- ItemRefTooltip:SetOwner(UIParent, "ANCHOR_PRESERVE");
- end
- ItemRefTooltip:ClearLines();
- addLine("\124cff0070ddPimp Hat\124r", "Binds when equipped");
- ItemRefTooltip:AddDoubleLine("Head","Cloth",1,1,1,1,1,1);
- addLine("+9001 Like a Boss", "+1000 Sex Appeal", "+1000 Trolling", (UnitLevel("player") < 10) and "\124cffff0000Requires Level 10\124r" or "Requires Level 10");
- addLine("\124cff00ff00Equip: Hides the wearer's profile from the Armory.\124r");
- addLine("\124cff00ff00Equip: You become amazing. The women want you, the men want to be you and the haters are speechless.\124r");
- addLine("\124cff00ff00Use: All women in a 50,000 yard radius show you their boobs.\124r");
- addLine("\124cffffd517On behalf of the International Gnomish Conspiracy, consider yourself a pimp.\124r");
- ItemRefTooltip:Show(); ItemRefTooltip:Show();
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement