summaryrefslogtreecommitdiff
path: root/npc/other
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2015-12-14 02:54:25 +0800
committerHaru <haru@dotalux.com>2015-12-20 17:58:29 +0100
commitb5c5e6c91b0b7009dc17492419c1f116fbd7d037 (patch)
treeb23af7c809d44dc1240699190b51135cd2c49fd8 /npc/other
parente7c09d41c6106a0939f981162df695b224a1f6f6 (diff)
downloadhercules-b5c5e6c91b0b7009dc17492419c1f116fbd7d037.tar.gz
hercules-b5c5e6c91b0b7009dc17492419c1f116fbd7d037.tar.bz2
hercules-b5c5e6c91b0b7009dc17492419c1f116fbd7d037.tar.xz
hercules-b5c5e6c91b0b7009dc17492419c1f116fbd7d037.zip
Add color constants for announcement and mes
Added F_MesColor helper function Closes #897 as merged Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'npc/other')
-rw-r--r--npc/other/Global_Functions.txt8
1 files changed, 8 insertions, 0 deletions
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));
+}