From fbb2cecd2f8fbdf6fa212f157fa7d946e6751a79 Mon Sep 17 00:00:00 2001 From: L0ne_W0lf Date: Wed, 24 Mar 2010 03:49:39 +0000 Subject: * Implemented NPC_TALK (Credit to SnakeDrak and Daegaladh) - Also added in the ability to use '@npctalkc' as a GM command. - Added supporting information to the databases. - Sneaking in a fix to the Refined Ballista. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14270 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 1d8c2e752..7d14ac446 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -7381,6 +7381,29 @@ void clif_specialeffect_single(struct block_list* bl, int type, int fd) WFIFOSET(fd,10); } +/****************************************************** + * W. W. L. L. S. + * Mob/NPC Color Talk [SnakeDrak] + ******************************************************/ +int clif_messagecolor(struct block_list* bl, unsigned long color, const char* msg) +{ + unsigned short msg_len = strlen(msg) + 1; + uint8 buf[256]; + color = (color & 0x0000FF) << 16 | (color & 0x00FF00) | (color & 0xFF0000) >> 16; // RGB to BGR + + nullpo_retr(0, bl); + + WBUFW(buf,0) = 0x2C1; + WBUFW(buf,2) = msg_len + 12; + WBUFL(buf,4) = bl->id; + WBUFL(buf,8) = color; + memcpy(WBUFP(buf,12), msg, msg_len); + + clif_send(buf, WBUFW(buf,2), bl, AREA_CHAT_WOC); + + return 0; +} + // messages (from mobs/npcs) [Valaris] int clif_message(struct block_list* bl, const char* msg) { -- cgit v1.2.3-70-g09d2