Jump to content
  • 0

Globalmes with color


Kichi

Question


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

Hi,

 

 

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);

}

Above is my custom code, that change all globalmes color into BLUE

 

i want to make globalmes support color, and sometime not show the name of NPC who send the message

 

and than the globalmes not send to player's Chatroom

 

help me to extended /hx

Edited by Kichi
Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  509
  • Reputation:   80
  • Joined:  11/20/11
  • Last Seen:  

bumb help

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...