Advertisement
Guest User

Untitled

a guest
Oct 14th, 2014
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.10 KB | None | 0 0
  1. local icons = {
  2.     {
  3.         '|TInterface\\Icons\\spell_holy_wordfortitude:20:20:0:0:20:20:2:18:2:18|t',   ---:height(pixels):width(pixels):x-offset:y-offset:set equal to height:set equal to width:inset left: inset right: inset top: inset bottom
  4.         (GetSpellInfo(469)),    --Commanding Shout              (All Warriors)
  5.         (GetSpellInfo(109773)), --Dark Intent                   (All Warlocks)
  6.         (GetSpellInfo(21562)),  --Power Word: Fortitude         (All Priests)
  7.         (GetSpellInfo(90364)),  --Qiraji Fortitude              (Silithid (Beast Mastery Hunter))
  8.         (GetSpellInfo(111922))  --Fortitude                     (Runescroll of Fortitude III)
  9.     },
  10.     {
  11.         '|TInterface\\Icons\\spell_nature_regeneration:20:20:0:0:20:20:2:18:2:18|t',
  12.         (GetSpellInfo(115921)), --Legacy of the Emperor         (All Monks)
  13.         (GetSpellInfo(20217)),  --Blessing of Kings             (All Paladins)
  14.         (GetSpellInfo(1126)),   --Mark of the Wild              (All Druids)
  15.         (GetSpellInfo(90363)),  --Embrace of the Shale Spider   (Shale Spider (Beast Mastery Hunter))
  16.         (GetSpellInfo(69378))   --Blessing of Forgotten Kings   (Drums of Forgotten Kings)
  17.     },
  18.     {
  19.         '|TInterface\\Icons\\ability_warrior_battleshout:20:20:0:0:20:20:2:18:2:18|t',
  20.         (GetSpellInfo(6673)),   --Battle Shout                  (All Warriors)
  21.         (GetSpellInfo(57330)),  --Horn of Winter                (All Death Knights)
  22.         (GetSpellInfo(19506))   --Trueshot Aura                 (All Hunters)
  23.     },
  24.     {
  25.         '|TInterface\\Icons\\spell_fire_totemofwrath:20:20:0:0:20:20:2:18:2:18|t',
  26.         (GetSpellInfo(1459)),   --Arcane Brilliance             (All Mages)
  27.         (GetSpellInfo(77747)),  --Burning Wrath                 (All Shamans)
  28.         (GetSpellInfo(109773)), --Dark Intent                   (All Warlocks)
  29.         (GetSpellInfo(61316)),  --Dalaran Brilliance            (All Mages)
  30.         (GetSpellInfo(126309))  --Still Water                   (Waterstrider (Beast Mastery Hunter))
  31.     },
  32.     {
  33.         '|TInterface\\Icons\\ability_rogue_disembowel:20:20:0:0:20:20:2:18:2:18|t',
  34.         (GetSpellInfo(55610)),  --Unholy Aura                   (Frost/Unholy Death Knights)
  35.         (GetSpellInfo(113742)), --Swiftblade's Cunning          (All Rogues)
  36.         (GetSpellInfo(30809)),  --Unleashed Rage                (Enhancement Shaman)
  37.         (GetSpellInfo(128432)), --Cackling Howl                 (Hyena (All Hunters))
  38.         (GetSpellInfo(128433))  --Serpent's Swiftness           (Serpent (All Hunters))
  39.     },
  40.     {
  41.         '|TInterface\\Icons\\spell_shaman_elementaloath:20:20:0:0:20:20:2:18:2:18|t',
  42.         (GetSpellInfo(51470)),  --Elemental Oath                (Elemental Shaman)
  43.         (GetSpellInfo(24907)),  --Moonkin Aura                  (Balance Druid)
  44.         (GetSpellInfo(49868)),  --Mind Quickening               (Shadow Priest)
  45.         (GetSpellInfo(135678))  --Energizing Spores             (Sporebat (All Hunters))
  46.     },
  47.     {
  48.         '|TInterface\\Icons\\spell_nature_unyeildingstamina:20:20:0:0:20:20:2:18:2:18|t',
  49.         (GetSpellInfo(116781)), --Legacy of the White Tiger     (Windwalker Monk)
  50.         (GetSpellInfo(17007)),  --Leader of the Pack            (Feral/Guardian Druid)
  51.         (GetSpellInfo(1459)),   --Arcane Brilliance             (All Mages)
  52.         (GetSpellInfo(61316)),  --Dalaran Brilliance            (All Mages)
  53.         (GetSpellInfo(97229)),  --Bellowing Roar                (Hydra (All Hunters))
  54.         (GetSpellInfo(24604)),  --Furious Howl                  (Wolf (All Hunters))
  55.         (GetSpellInfo(90309)),  --Terrifying Roar               (Devilsaur (Beast Mastery Hunter))
  56.         (GetSpellInfo(126373)), --Fearless Roar                 (Quilen (Beast Mastery Hunter))
  57.         (GetSpellInfo(126309))  --Still Water                   (Waterstrider (Beast Mastery Hunter))
  58.     },
  59.     {
  60.         '|TInterface\\Icons\\spell_nature_invisibilitytotem:20:20:0:0:20:20:2:18:2:18|t',
  61.         (GetSpellInfo(19740)),  --Blessing of Might             (All Paladins)
  62.         (GetSpellInfo(116956)), --Grace of Air                  (All Shamans)
  63.         (GetSpellInfo(93435)),  --Roar of Courage               (Cat (All Hunters))
  64.         (GetSpellInfo(128997))  --Spirit Beast Blessing         (Spirit Beast (Beast Mastery Hunter))
  65.     },
  66.     {
  67.         '|TInterface\\Icons\\trade_alchemy_potione3:20:20:0:0:20:20:2:18:2:18|t',
  68.         (GetSpellInfo(105689))  --300 Agility                   (Flask of Spring Blossoms)
  69.     },
  70.     {
  71.         '|TInterface\\Icons\\spell_misc_food:20:20:0:0:20:20:2:18:2:18|t',
  72.         (GetSpellInfo(104275)), --300 Agility                   (Sea Mist Rice Noodles)
  73.         (GetSpellInfo(104273)), --250 Agility                   (Sauteed Carrots)
  74.         (GetSpellInfo(104274)), --275 Agility                   (Valley Stir Fry)
  75.         (GetSpellInfo(146805))  --300 Agility                   (Seasoned Pomfruit Slices)
  76.     }
  77. }
  78. local PBF = CreateFrame('Button', 'PlayerBuffFrame', UIParent)
  79.     PBF:SetSize(164,20)
  80.     PBF:SetPoint('LEFT', UIParent, 'CENTER', -470, -16)
  81.     PBF:EnableMouse(false)
  82.     PBF:RegisterEvent('PLAYER_ENTERING_WORLD')
  83.     PBF:RegisterUnitEvent('UNIT_AURA', 'player')
  84.    
  85.    
  86. local PBFText = PBF:CreateFontString('PlayerBuffFrameText', 'OVERLAY')
  87.     PBFText:SetAllPoints(true)
  88.     PBFText:SetFont('Fonts\\MORPHEUS.ttf', 10)
  89.     PBFText:SetJustifyH('LEFT')
  90.     PBFText:SetJustifyV('BOTTOM')
  91.  
  92.     PBF:SetScript('OnEvent', function(self, event, unit)
  93.         local text = ''
  94.         for i = 1,10 do
  95.             local buffs = icons[i]
  96.             local icon = buffs[1]
  97.             for j = 2, #buffs do
  98.                 if UnitAura('player', buffs[j]) then
  99.                     icon = nil
  100.                     break
  101.                 end
  102.             end
  103.             if icon then
  104.                 text = text .. icon
  105.             end
  106.         end
  107.         PBFText:SetText(text)
  108.     end)
  109.  
  110. local raidleadhelper = CreateFrame('Frame', 'RaidLeadHelperFrame', UIParent)
  111. local isInstance, instanceType
  112. raidleadhelper:RegisterEvent('PLAYER_ENTERING_WORLD')
  113. raidleadhelper:RegisterEvent('PARTY_LEADER_CHANGED')
  114.  
  115. raidleadhelper:SetScript('OnEvent', function(self, event, ...)
  116.     isInstance, instanceType = IsInInstance()
  117.     if (event == 'PLAYER_ENTERING_WORLD' and isInstance and instanceType == 'raid') then
  118.         LoggingCombat(true)
  119.         if UnitIsGroupLeader('player') then
  120.             if select(1, GetLootMethod()) ~= 'master' then
  121.                 SetLootMethod('master', 'player')
  122.                 SetLootThreshold(4)
  123.             end
  124.             PromoteToAssistant('Elera')
  125.         end
  126.     elseif (event == 'PARTY_LEADER_CHANGED' and isInstance and instanceType == 'raid' and UnitIsGroupLeader('player')) then
  127.         PromoteToAssistant('Elera')
  128.         if select(1, GetLootMethod()) ~= 'master' then
  129.             SetLootMethod('master', 'player')
  130.             SetLootThreshold(4)
  131.         end
  132.     else
  133.         LoggingCombat(false)
  134.     end
  135. end)
  136.    
  137. SLASH_SHOP1 = '/shop'
  138. SLASH_RELOAD1 = '/rl'
  139. SLASH_GM1 = '/gm'
  140. SLASH_READYCHECK1 = '/rc'
  141. SlashCmdList.SHOP = function()
  142.     ToggleStoreUI()
  143. end
  144. SlashCmdList.RELOAD = function()
  145.     ReloadUI()
  146. end
  147. SlashCmdList.GM = function()
  148.     ToggleHelpFrame()
  149. end
  150. SlashCmdList.READYCHECK = function ()
  151.     DoReadyCheck()
  152. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement