Advertisement
Xzempt

Untitled

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