Purpose

When a character enters the game, sends preconfigured notice lines, for example Level: 400 | Master: 200 | Majestic: 50. Each line can have substitution variables, its own font size and color.

How to enable

  1. The line LoadModule("WelcomeMessage\\WelcomeMessage") in Data\LuaAPI\Main.lua must not be commented out (enabled by default).
  2. Edit Data\LuaAPI\Includes\WelcomeMessage\Config.lua.
  3. Click Reload LuaAPI.

The module attaches to the OnCharacterEntry event (onPlayerLogin). No SQL needed.

Configuration (Config.lua)

KeyValueDefaultMeaning
Enabletrue / falsetrueTurns the module on / off.
Linestable of lines1 sample lineEach element is one notice, sent in order.
Lines[].Type0 / 1 / 2 / 3-0 = yellow (center of screen), 1 = blue, 2 = guild, 3 = red.
Lines[].Textstring-Content; you can use the variables in the table below.
Lines[].Sizenumberoptional (empty = default size)Font size.
Lines[].Color"#RRGGBB"optionalText color. Near-white colors (for example #FEFFFF) look like white.
VipNametableNormal, Bronze VIP...Display name of @Vip by VIP level; [-1] = no VIP.

Variables usable in Text:

VariableValue
@Name, @AccountCharacter name, account
@Level, @MasterLevel, @MajesticLevel, @TotalLevelThe levels
@ResetReset count
@VipVIP name from VipName
@Map, @Server, @OnlineMap, GameServer, number of players online
WelcomeMessageConfig = {
	Enable = true,
	Lines = {
		{ Type = 0, Size = 15, Color = "#FF0000", Text = "Level: @Level | Master: @MasterLevel | Majestic: @MajesticLevel" },
	},
	VipName = { [-1] = "Normal", [1] = "Bronze VIP", [2] = "Silver VIP", [3] = "Gold VIP", [4] = "Diamond VIP" },
}