Advertisement
Guest User

Untitled

a guest
Sep 16th, 2016
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.46 KB | None | 0 0
  1. function()    
  2.     local rollTheBonesBuffs = {193359, 193357, 193356, 199600, 199603, 193358};    
  3.     local names = "";    
  4.     local buffCount = 0;    
  5.     for j, buffId in ipairs(rollTheBonesBuffs) do        
  6.         for i = 1, 16 do            
  7.             local name, rank, icon, count, debuffType, duration, expirationTime, unitCaster, isStealable, shouldConsolidate, spellId = UnitBuff("player", i);
  8.             if spellId == buffId then
  9.                 if buffCount > 0 then
  10.                     names = names .. ", "
  11.                 end
  12.                 if spellId == 193359 then
  13.                     names = names .. "CDR";
  14.                 end
  15.                 if spellId == 193357 then
  16.                     names = names .. "Crt";
  17.                 end
  18.                 if spellId == 193356 then
  19.                     names = names .. "Cmb";
  20.                 end
  21.                 if spellId == 199600 then
  22.                     names = names .. "Nrg";
  23.                 end
  24.                 if spellId == 199603 then
  25.                     names = names .. "MS";
  26.                 end
  27.                 if spellId == 193358 then
  28.                     names = names .. "AS";
  29.                 end
  30.                 buffCount = buffCount + 1;
  31.             end        
  32.         end    
  33.     end    
  34.     if buffCount == 6 then
  35.         names = "ALL";
  36.     end
  37.     if string.len(names) > 39 then
  38.         names = strsub(names, 0, 36) .. "...";
  39.     end    
  40.     return names;
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement