Jump to content
  • 0
Sign in to follow this  
Kichi

Custom Global Message

Question

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 :(

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

Edited by Kichi

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Try using clif_broadcast2 with target = AREA. This should do what you want to achieve.

 

wew how mister?

/spin

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.