Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.06 KB | None | 0 0
  1. -- Darken all the graphics Ibo/Lorti UI style:
  2.  
  3. local frame=CreateFrame("Frame")
  4. frame:RegisterEvent("ADDON_LOADED")
  5.  
  6. frame:SetScript("OnEvent", function(self, event, addon)
  7. if (addon == "Blizzard_TimeManager") then
  8. for i, v in pairs({PlayerFrameTexture, TargetFrameTextureFrameTexture, PetFrameTexture, PartyMemberFrame1Texture, PartyMemberFrame2Texture, PartyMemberFrame3Texture, PartyMemberFrame4Texture,
  9. PartyMemberFrame1PetFrameTexture, PartyMemberFrame2PetFrameTexture, PartyMemberFrame3PetFrameTexture, PartyMemberFrame4PetFrameTexture, FocusFrameTextureFrameTexture,
  10. TargetFrameToTTextureFrameTexture, FocusFrameToTTextureFrameTexture, BonusActionBarFrameTexture0, BonusActionBarFrameTexture1, BonusActionBarFrameTexture2, BonusActionBarFrameTexture3,
  11. BonusActionBarFrameTexture4, MainMenuBarTexture0, MainMenuBarTexture1, MainMenuBarTexture2, MainMenuBarTexture3, MainMenuMaxLevelBar0, MainMenuMaxLevelBar1, MainMenuMaxLevelBar2,
  12. MainMenuMaxLevelBar3, MinimapBorder, CastingBarFrameBorder, FocusFrameSpellBarBorder, TargetFrameSpellBarBorder, MiniMapTrackingButtonBorder, MiniMapLFGFrameBorder, MiniMapBattlefieldBorder,
  13. MiniMapMailBorder, MinimapBorderTop,
  14. select(1, TimeManagerClockButton:GetRegions())
  15. }) do
  16. v:SetVertexColor(.4, .4, .4)
  17. end
  18.  
  19. for i,v in pairs({ select(2, TimeManagerClockButton:GetRegions()) }) do
  20. v:SetVertexColor(1, 1, 1)
  21. end
  22.  
  23. self:UnregisterEvent("ADDON_LOADED")
  24. frame:SetScript("OnEvent", nil)
  25. end
  26. end)
  27.  
  28. for i, v in pairs({ MainMenuBarLeftEndCap, MainMenuBarRightEndCap }) do
  29. v:SetVertexColor(.35, .35, .35)
  30. end
  31.  
  32. -- Class icons instead of portraits:
  33.  
  34. hooksecurefunc("UnitFramePortrait_Update",function(self)
  35. if self.portrait then
  36. if UnitIsPlayer(self.unit) then
  37. local t = CLASS_ICON_TCOORDS[select(2, UnitClass(self.unit))]
  38. if t then
  39. self.portrait:SetTexture("Interface\\TargetingFrame\\UI-Classes-Circles")
  40. self.portrait:SetTexCoord(unpack(t))
  41. end
  42. else
  43. self.portrait:SetTexCoord(0,1,0,1)
  44. end
  45. end
  46. end)
  47.  
  48.  
  49. -- Disable healing / damage spam over player / pet frame:
  50.  
  51. PlayerHitIndicator:SetText(nil)
  52. PlayerHitIndicator.SetText = function() end
  53.  
  54. PetHitIndicator:SetText(nil)
  55. PetHitIndicator.SetText = function() end
  56.  
  57. -- Change the format of hp/ mana text to absolute values ("140k"):
  58.  
  59. hooksecurefunc("TextStatusBar_UpdateTextStringWithValues", function()
  60. PlayerFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("player")))
  61. PlayerFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("player")))
  62.  
  63. TargetFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("target")))
  64. TargetFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("target")))
  65.  
  66. FocusFrameHealthBar.TextString:SetText(AbbreviateLargeNumbers(UnitHealth("focus")))
  67. FocusFrameManaBar.TextString:SetText(AbbreviateLargeNumbers(UnitMana("focus")))
  68. end)
  69.  
  70. -- Hide faction / PVP icon:
  71.  
  72. PlayerPVPIcon:SetAlpha(0)
  73. TargetFrameTextureFramePVPIcon:SetAlpha(0)
  74. FocusFrameTextureFramePVPIcon:SetAlpha(0)
  75.  
  76. -- Disable the group number frame:
  77.  
  78. PlayerFrameGroupIndicator.Show = function() return end
  79.  
  80. -- Hide Gryphons
  81.  
  82. MainMenuBarLeftEndCap:Hide()
  83. MainMenuBarRightEndCap:Hide()
  84.  
  85. -- Minimap tweaks:
  86.  
  87. MinimapZoomIn:Hide()
  88. MinimapZoomOut:Hide()
  89. Minimap:EnableMouseWheel(true)
  90. Minimap:SetScript('OnMouseWheel', function(self, delta)
  91. if delta > 0 then
  92. Minimap_ZoomIn()
  93. else
  94. Minimap_ZoomOut()
  95. end
  96. end)
  97. MiniMapTracking:ClearAllPoints()
  98. MiniMapTracking:SetPoint("TOPRIGHT", -26, 7)
  99.  
  100. -- Hide sPriest Shadow Orb Bar
  101. PriestBarFrame:SetScale(0.00001)
  102.  
  103. -- Minimap Enlargement
  104. MinimapCluster:SetScale(1.20)
  105.  
  106. -- Hide Calender Frame
  107. GameTimeFrame:SetAlpha(0);
  108. PlayerPVPIcon:SetAlpha(0)
  109. MiniMapWorldMapButton:Hide()
  110.  
  111. -- Player frames and target frames
  112. PlayerFrame:SetScale(1.03)
  113. TargetFrame:SetScale(1.03)
  114.  
  115. -- Class Colored
  116. local UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
  117.  
  118. UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS
  119.  
  120. local _, class, c
  121.  
  122. local function colour(statusbar, unit)
  123.  
  124. if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
  125.  
  126. _, class = UnitClass(unit)
  127.  
  128. c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
  129.  
  130. statusbar:SetStatusBarColor(c.r, c.g, c.b)
  131.  
  132. end
  133.  
  134. end
  135.  
  136. hooksecurefunc("UnitFrameHealthBar_Update", colour)
  137.  
  138. hooksecurefunc("HealthBar_OnValueChanged", function(self)
  139.  
  140. colour(self, self.unit)
  141.  
  142. end)
  143.  
  144. local sb = _G.GameTooltipStatusBar
  145.  
  146. local addon = CreateFrame("Frame", "StatusColour")
  147.  
  148. addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
  149.  
  150. addon:SetScript("OnEvent", function()
  151.  
  152. colour(sb, "mouseover")
  153.  
  154. end)
  155.  
  156. --Flashy Spells
  157.  
  158. local animationsCount, animations = 10, {}
  159. local animationNum = 1
  160. local replace = string.gsub
  161. local frame, texture, animationGroup, alpha1, scale1, scale2, rotation2
  162.  
  163. for i = 1, animationsCount do
  164. frame = CreateFrame("Frame")
  165.  
  166. texture = frame:CreateTexture()
  167. texture:SetTexture([[Interface\Cooldown\star4]])
  168. texture:SetAlpha(0)
  169. texture:SetAllPoints()
  170. texture:SetBlendMode("ADD")
  171.  
  172. animationGroup = texture:CreateAnimationGroup()
  173.  
  174. alpha1 = animationGroup:CreateAnimation("Alpha")
  175. alpha1:SetChange(1)
  176. alpha1:SetDuration(0)
  177. alpha1:SetOrder(1)
  178.  
  179. scale1 = animationGroup:CreateAnimation("Scale")
  180. scale1:SetScale(1.5, 1.5)
  181. scale1:SetDuration(0)
  182. scale1:SetOrder(1)
  183.  
  184. scale2 = animationGroup:CreateAnimation("Scale")
  185. scale2:SetScale(0, 0)
  186. scale2:SetDuration(0.3)
  187. scale2:SetOrder(2)
  188.  
  189. rotation2 = animationGroup:CreateAnimation("Rotation")
  190. rotation2:SetDegrees(90)
  191. rotation2:SetDuration(0.3)
  192. rotation2:SetOrder(2)
  193.  
  194. animations[i] = {frame = frame, animationGroup = animationGroup}
  195. end
  196.  
  197. local animate = function(button)
  198. if not button:IsVisible() then return true end
  199. local animation = animations[animationNum]
  200. local frame = animation.frame
  201. local animationGroup = animation.animationGroup
  202. frame:SetFrameStrata(button:GetFrameStrata())
  203. frame:SetFrameLevel(button:GetFrameLevel() + 10)
  204. frame:SetAllPoints(button)
  205. animationGroup:Stop()
  206. animationGroup:Play()
  207. animationNum = (animationNum % animationsCount) + 1
  208. return true
  209. end
  210.  
  211. hooksecurefunc('ActionButton_UpdateHotkeys', function(button, buttonType)
  212. if InCombatLockdown() then return end
  213. if not button.hooked then
  214. local id, actionButtonType, key
  215. if not actionButtonType then
  216. actionButtonType = string.upper(button:GetName())
  217. actionButtonType = replace(actionButtonType, 'BOTTOMLEFT', '1')
  218. actionButtonType = replace(actionButtonType, 'BOTTOMRIGHT', '2')
  219. actionButtonType = replace(actionButtonType, 'RIGHT', '3')
  220. actionButtonType = replace(actionButtonType, 'LEFT', '4')
  221. actionButtonType = replace(actionButtonType, 'MULTIBAR', 'MULTIACTIONBAR')
  222. end
  223.  
  224. local key = GetBindingKey(actionButtonType)
  225. if key then
  226. button:RegisterForClicks("AnyDown")
  227. SetOverrideBinding(button, true, key, 'CLICK '..button:GetName()..':LeftButton')
  228. end
  229. button.AnimateThis = animate
  230. SecureHandlerWrapScript(button, "OnClick", button, [[ control:CallMethod("AnimateThis", self) ]])
  231. button.hooked = true
  232. end
  233. end)
  234.  
  235. local frame = CreateFrame("FRAME")
  236. frame:RegisterEvent("GROUP_ROSTER_UPDATE")
  237. frame:RegisterEvent("PLAYER_TARGET_CHANGED")
  238. frame:RegisterEvent("PLAYER_FOCUS_CHANGED")
  239. frame:RegisterEvent("UNIT_FACTION")
  240.  
  241. local function eventHandler(self, event, ...)
  242. if UnitIsPlayer("target") then
  243. c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
  244. TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
  245. end
  246. if UnitIsPlayer("focus") then
  247. c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
  248. FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
  249. end
  250. end
  251.  
  252. frame:SetScript("OnEvent", eventHandler)
  253.  
  254. for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground}) do
  255. BarTextures:SetTexture("Interface\\TargetingFrame\\UI-StatusBar")
  256. end
  257.  
  258. -- Show Keybinds
  259. for i=1, 12 do
  260. _G["ActionButton"..i.."HotKey"]:SetAlpha(0) -- main bar
  261. _G["MultiBarBottomRightButton"..i.."HotKey"]:SetAlpha(0) -- bottom right bar
  262. _G["MultiBarBottomLeftButton"..i.."HotKey"]:SetAlpha(0) -- bottom left bar
  263. _G["MultiBarRightButton"..i.."HotKey"]:SetAlpha(0) -- right bar
  264. _G["MultiBarLeftButton"..i.."HotKey"]:SetAlpha(0) -- left bar
  265. end
  266.  
  267. -- Show Macro Names
  268. for i=1, 12 do
  269. _G["ActionButton"..i.."Name"]:SetAlpha(0) -- main bar
  270. _G["MultiBarBottomRightButton"..i.."Name"]:SetAlpha(0) -- bottom right bar
  271. _G["MultiBarBottomLeftButton"..i.."Name"]:SetAlpha(0) -- bottom left bar
  272. _G["MultiBarRightButton"..i.."Name"]:SetAlpha(0) -- right bar
  273. _G["MultiBarLeftButton"..i.."Name"]:SetAlpha(0) -- left bar
  274. end
  275.  
  276. --Move Cast bar and enlarge
  277.  
  278. CastingBarFrame:ClearAllPoints()
  279. CastingBarFrame:SetPoint("CENTER",UIParent,"CENTER", 0, -200)
  280. CastingBarFrame.SetPoint = function() end
  281. CastingBarFrame:SetScale(1.1)
  282.  
  283. -- Cast Bar Adjustment
  284. local CF=CreateFrame("Frame")
  285. CF:RegisterEvent("PLAYER_ENTERING_WORLD")
  286. CF:SetScript("OnEvent", function(self, event)
  287. if not (IsAddOnLoaded("Shadowed Unit Frames") or IsAddOnLoaded("PitBull Unit Frames 4.0") or IsAddOnLoaded("X-Perl UnitFrames")) then
  288. for i,v in pairs({
  289. CastingBarFrameBorder,
  290. FocusFrameSpellBarBorder,
  291. TargetFrameSpellBarBorder,
  292. }) do
  293. v:SetVertexColor(.05, .05, .05)
  294. end
  295. for i,v in pairs({
  296. PlayerPVPIcon,
  297. TargetFrameTextureFramePVPIcon,
  298. FocusFrameTextureFramePVPIcon,
  299. }) do
  300. v:SetAlpha(0)
  301. end
  302. for i=1,4 do
  303. _G["PartyMemberFrame"..i.."PVPIcon"]:SetAlpha(0)
  304. _G["PartyMemberFrame"..i.."NotPresentIcon"]:Hide()
  305. _G["PartyMemberFrame"..i.."NotPresentIcon"].Show = function() end
  306. end
  307. PlayerFrameGroupIndicator:SetAlpha(0)
  308. PlayerHitIndicator:SetText(nil)
  309. PlayerHitIndicator.SetText = function() end
  310. PetHitIndicator:SetText(nil)
  311. PetHitIndicator.SetText = function() end
  312. else
  313. CastingBarFrameBorder:SetVertexColor(.05,.05,.05)
  314. end
  315. self:UnregisterEvent("PLAYER_ENTERING_WORLD")
  316. CF:SetScript("OnEvent", nil)
  317. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement