Created
June 16, 2024 04:33
-
-
Save DeluxtDev/df795cbd67286be216306de10c979174 to your computer and use it in GitHub Desktop.
World Announcement On Level Up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Created for WowEmulation.com by Deluxt | |
-- This script will send a message to the all players when someone levels up. | |
-- If you want to announce this every level set it to false. | |
local maxLevelOnly = true | |
-- If your max level isnt 80 change this. | |
local maxLevel = 80 | |
local function AnnounceMaxLevel(player) | |
if (player:GetLevel() == maxLevel) then | |
SendWorldMessage("|cff60a9e4Congratulations to |cffffffff"..player:GetName().."|cff60a9e4 for reaching level |cffffffff"..maxLevel.."|cff60a9e4!") | |
end | |
end | |
local function OnLevelUp(event, player, oldLevel) | |
if (maxLevelOnly) then | |
AnnounceMaxLevel(player) | |
else | |
level = oldLevel + 1 | |
SendWorldMessage("|cff60a9e4Congratulations to |cffffffff"..player:GetName().."|cff60a9e4 for reaching level |cffffffff"..level.."|cff60a9e4!") | |
end | |
end | |
RegisterPlayerEvent(13, OnLevelUp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment