Skip to content

Instantly share code, notes, and snippets.

@DeluxtDev
Created June 16, 2024 04:33
Show Gist options
  • Save DeluxtDev/df795cbd67286be216306de10c979174 to your computer and use it in GitHub Desktop.
Save DeluxtDev/df795cbd67286be216306de10c979174 to your computer and use it in GitHub Desktop.
World Announcement On Level Up
-- 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