Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local logo = "TrinityCore"
- local package = true
- local notify = true
- local package_repeat = true
- local first_package = 55000
- local multiplication = 10000
- T = {9, 19, 29, 39, 49, 59, 69, 79};
- local function login(event, player)
- if(package == true) then
- 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)
- else
- 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)
- end
- end
- local function levelup(event, player, oldlevel)
- for k, v in ipairs(T) do
- if(oldlevel == v) then
- if(notify == true) then
- player:SendBroadcastMessage("|cFFFF0000You have recieved a mail from "..logo..".")
- end
- if(package == true) then
- if(package_repeat == true) then
- 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)
- else
- 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))
- end
- else
- 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)
- end
- end
- end
- end
- RegisterPlayerEvent(13, levelup)
- RegisterPlayerEvent(42, login)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement