Advertisement
Terrah

Odir

Nov 13th, 2014
1,586
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. return function(msg,usr)
  2.  
  3.     if type(MOD.Salt) ~= "number" then
  4.         MOD.Salt = os.time();
  5.     end
  6.  
  7.     local calc = msg;
  8.     local unchanged = msg;
  9.  
  10.     if not calc or calc == "" then
  11.             calc = usr;
  12.             unchanged = usr;
  13.     end
  14.  
  15.     calc = calc:gsub(" ",""):lower();
  16.  
  17.     local dps = 0;
  18.  
  19.     for n=1,calc:len() do
  20.             dps = dps + calc:byte(n);
  21.     end
  22.  
  23.     dps = ((dps+MOD.Salt)%10)+1;
  24.  
  25.     if unchanged == "Odir16" or calc == "himself" or calc == "odir" or calc == "brodir" then
  26.         dps = 10;
  27.     end
  28.  
  29.     local ret = "Brodir rates " .. unchanged .. " " .. tostring(dps) .. "/10";
  30.  
  31.     if dps == 10 then
  32.         ret = ret .. " PogChamp";
  33.     elseif dps == 1 then
  34.         ret = ret .. " DansGame";
  35.     end
  36.  
  37.     print(ret);
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement