Advertisement
Terrah

tooltip

Oct 16th, 2014
350
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. local tooltip = function(msg, usr)
  2.  
  3.     local calc = msg;
  4.     local prefix = msg .. " deals "
  5.  
  6.     if not calc or calc == "" then
  7.         calc = usr;
  8.         prefix="";
  9.     end
  10.  
  11.     calc = calc:gsub(" ","");
  12.  
  13.     local dps = 0;
  14.  
  15.     for n=1,calc:len() do
  16.         dps = dps + calc:byte(n);
  17.     end
  18.  
  19.     return prefix .. tostring(dps).."k dps";
  20. end
  21.  
  22.  
  23. return tooltip;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement