Custom Global Message

Kichi

New member
Messages
97
Points
0
Emulator
Helo, i need help to solve my problem

that is

void clif_GlobalMessage(struct block_list* bl, const char* message) { char buf[100]; int len; unsigned long color1 = strtoul("0x00FFFF",NULL,0); // DEFAULT: BLUE SEA nullpo_retv(bl); if(!message) return; len = strlen(message)+1; if( len > sizeof(buf)-12 ) { ShowWarning("clif_GlobalMessage: Truncating too long message '%s' (len=%d).n", message, len); len = sizeof(buf)-12; } WBUFW(buf,0)=0x2C1; WBUFW(buf,2)=len+12; WBUFL(buf,4)=bl->id; WBUFL(buf,8) = (color1&0x0000FF) << 16 | (color1&0x00FF00) | (color1&0xFF0000) >> 16; safestrncpy((char *) WBUFP(buf,12),message,len); clif_send((unsigned char *) buf,WBUFW(buf,2),bl,ALL_CLIENT);}
my custom just make globalmes color blue, and that is static
default_sad.png


i want the globalmes read a custom color

example:

globalmes " hello World",00FFFF;

and the globalmes not appear in pub chat, but only in message box

thank you /thx

 
Last edited by a moderator:
Try using clif_broadcast2 with target = AREA. This should do what you want to achieve.

 
Last edited by a moderator:
Back
Top