Advertisement
Guest User

First Login and Levelup Mail

a guest
Sep 7th, 2015
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.30 KB | None | 0 0
  1. local logo = "TrinityCore"
  2. local package = true
  3. local notify = true
  4. local package_repeat = true
  5. local first_package = 55000
  6. local multiplication = 10000
  7.  
  8. T = {9, 19, 29, 39, 49, 59, 69, 79};
  9.  
  10. local function login(event, player)
  11.     if(package == true) then
  12.        SendMail("Welcome to "..logo.."", "Greetings "..player:GetName()..", We at "..logo.." would like to thank you for playing on our server and we deeply hope you will enjoy your stay! Best Regards "..logo..".", player:GetGUIDLow(), player:GetGUIDLow(), 61, 0, 0, 0, first_package, 1)
  13.    else
  14.        SendMail("Welcome to "..logo.."", "Greetings "..player:GetName()..", We at "..logo.." would like to thank you for playing on our server and we deeply hope you will enjoy your stay! Best Regards "..logo..".", player:GetGUIDLow(), player:GetGUIDLow(), 61)
  15.     end
  16. end
  17.  
  18. local function levelup(event, player, oldlevel)
  19.  for k, v in ipairs(T) do
  20.    if(oldlevel == v) then
  21. if(notify == true) then
  22.     player:SendBroadcastMessage("|cFFFF0000You have recieved a mail from "..logo..".")
  23.  end
  24.     if(package == true) then
  25.          if(package_repeat == true) then
  26.        SendMail("Congratulations!", "We at "..logo.." would like to congratulate you for reaching level "..player:GetLevel()..". But also thank you for spending your time and effort in our community therefor we at "..logo.." would like to give you a small token of our appreciation, best regards "..logo..".", player:GetGUIDLow(), player:GetGUIDLow(), 61, 0, math.floor(player:GetLevel()*multiplication), 0, first_package, 1)
  27.     else
  28.        SendMail("Congratulations!", "We at "..logo.." would like to congratulate you for reaching level "..player:GetLevel()..". But also thank you for spending your time and effort in our community therefor we at "..logo.." would like to give you a small token of our appreciation, best regards "..logo..".", player:GetGUIDLow(), player:GetGUIDLow(), 61, 0, math.floor(player:GetLevel()*multiplication))
  29.         end
  30.     else
  31.        SendMail("Congratulations!", "We at "..logo.." would like to congratulate you for reaching level "..player:GetLevel()..". But also thank you for spending your time and effort in our community, best regards "..logo..".", player:GetGUIDLow(), player:GetGUIDLow(), 61)
  32.       end
  33.     end
  34.   end
  35. end
  36.  
  37. RegisterPlayerEvent(13, levelup)
  38. RegisterPlayerEvent(42, login)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement