Advertisement
Guest User

stats weakaura lua script

a guest
Aug 23rd, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1.  
  2.  
  3. function ()
  4. local now = GetTime();
  5. WA_STATS_LAST_UP = WA_STATS_LAST_UP or now - 1;
  6. if now >= WA_STATS_LAST_UP + 0.1 then
  7. WA_STATS_LAST_UP = now;
  8.  
  9. local agi = select(1, UnitStat("player", 2));
  10. local mas = GetMasteryEffect();
  11. local has = UnitSpellHaste("player");
  12. local crit = GetSpellCritChance(6);
  13.  
  14.  
  15. WA_STATS_RETURN = string.format([[
  16. Agi: %.0f
  17. Mastery: %.1f
  18. Haste: %.1f
  19. Crit: %.1f]],
  20. agi or 0,
  21. mas or 0,
  22. has or 0,
  23. crit or 0
  24.  
  25. );
  26. end
  27.  
  28. return WA_STATS_RETURN or "<no data>";
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement