Jump to content
  • 0
Dastgir

Chat Color Change

Question

Can someone help me with changing character name color for gm level 0?

I want multi color, i am working on something which is like

SELECT color from Char

if color=0 Red Color,

if color=1 Blue Color

if color=2 Green Color

if color=3 Yellow Color

Only names should be displayed in that color, not chat.

Can someone help me to do that?

Edited by dastgirpojee
Link to comment
Share on other sites

26 answers to this question

Recommended Posts

I believe this is source code related ...

and I also remember brainstorm reply something it have to be done inside clif.c something ...

weirdly, I can't get the topic now using search button...

Link to comment
Share on other sites

finally found it

( fuh ... over 30 mins search ... I suddenly remember it's done with @fakename )

http://www.eathena.ws/board/index.php?showtopic=270970

and again its not completed

@fakename doesn't seem to work

and I don't know how to do packet sending either even today

Link to comment
Share on other sites

Any info how to make it work with @send command?

"0195 <unit id>.L <char name>.24B <party name>.24B <guild name>.24B <position name>.24B"

What's unit id?

Please Help me to use @send!

Edited by dastgirpojee
Link to comment
Share on other sites

Posted · Hidden by Capuche, September 20, 2013 - No reason given
Hidden by Capuche, September 20, 2013 - No reason given

bump!

Link to comment
Posted · Hidden by Capuche, September 20, 2013 - No reason given
Hidden by Capuche, September 20, 2013 - No reason given

BUMP!

Link to comment

You can't do it without client reverse engineering. Brainstorm's assumption is totally false, ^COLOR is option for Ragnarok's dialog parser, and \033[1;37 is only for console.

Link to comment
Share on other sites

Can someone help me with changing chat color for players?

I want multi color, i am working on something which is like

SELECT color from Char

if color=0 Red Color,

if color=1 Blue Color

if color=2 Green Color

if color=3 Yellow Color

Chat should be changed.

Can someone help me to do that?

Link to comment
Share on other sites

You would have to wait that diff patch release and it affect ALL PLAYERS, not sure if source edit on clif.c can fake player's chat as Announce Color, GM Color, Dispbottom Color.

Link to comment
Share on other sites

Use 0x2C1 packet instead of 0x8d in function 'clif_parse_GlobalMessage' (clif.c), then add

unsigned long color1 = strtoul("0xFF0000",NULL,0); // for red messages.
...
if(pc_get_group_level(sd) >= 99)// only Admin's messages have red color.
WFIFOL(fd,8) = (color1&0x0000FF)<<16|(color1&0x00FF00)|(color1&0xFF0000)>>16;

Link to comment
Share on other sites

Thanks for the code Lililth :D

But it seems the code is not completed yet, because it still has a bug.

For example:

I create a char named "One Two" on a GM(99) account, then create another char named "Char02" on a non-GM account.

1. When char One Two talk, it shows white on overhead chat, and green on chat log. In Char02 client window, it only shows "Two: aaaaaa" with red color both on overhead chat and chat log.

2. When Char02 talk, it shows white on overhead chat, and green on chat log. In One Two client window, the color turns black both on overhead chat and chat log.

In short, the GM name is cropped, and the non GM name doesn't show at all.

Anyway, how do you know which packet should be used? (In this case 0x2C1).

Maybe it shows black because currently the code doesn't have an 'else' for char below gmlevel(99).

I add some lines to compensate the color for char with gmlevel < 99 with:

unsigned long color2 = strtoul("0x00FF00",NULL,0);
//...
WFIFOL(fd,8) = (color1&0x0000FF)<<16|(color1&0x00FF00)|(color1&0xFF0000)>>16;
else WFIFOL(fd,8) = (color2&0x0000FF)<<16|(color2&0x00FF00)|(color2&0xFF0000)>>16;

Edited by nanakiwurtz
Link to comment
Share on other sites

What i told is:

SELECT color from Char

if color=0 Red Color,

if color=1 Blue Color

if color=2 Green Color

if color=3 Yellow Color

WHERE charname=blabla

Link to comment
Share on other sites

Posted · Hidden by Capuche, September 20, 2013 - No reason given
Hidden by Capuche, September 20, 2013 - No reason given

Solved, Close please.

Link to comment

Suggestion:

How bout adding it on DB folder name_color.txt and chat_color.txt to make it more user friendly.

Ex:

<group_id>,<color>

99,FF0000 //GM level 99 would have a red name.

<group_id>,<color>

99,FF0000 //GM level 99 would have a red chat .

Edited by Lanz
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...

Important Information

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