From b5c5e6c91b0b7009dc17492419c1f116fbd7d037 Mon Sep 17 00:00:00 2001 From: AnnieRuru Date: Mon, 14 Dec 2015 02:54:25 +0800 Subject: Add color constants for announcement and mes Added F_MesColor helper function Closes #897 as merged Signed-off-by: Haru --- npc/other/Global_Functions.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'npc') diff --git a/npc/other/Global_Functions.txt b/npc/other/Global_Functions.txt index 9fb4949fa..8f7899555 100644 --- a/npc/other/Global_Functions.txt +++ b/npc/other/Global_Functions.txt @@ -353,3 +353,11 @@ function script F_ShuffleNumbers { } return .@count; } + +//== Function F_MesColor =================================== +// Function to colorize npc dialog without having to memorize the color code +// Examples: +// mes callfunc("F_MesColor", C_BLUE) +"This message is now in BLUE"; +function script F_MesColor { + return sprintf("^%06X", min(getarg(0), 0xFFFFFF)); +} -- cgit v1.2.3-60-g2f50