Jump to content
  • 0

Chat Color Change


Dastgir

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   26
  • Joined:  11/20/11
  • Last Seen:  

sir @Dastgir is this posible ung 17704?

  • Love 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Any help how to do it in source?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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

bump!

Link to comment

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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

BUMP!

Link to comment

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

BUMP! no help yet?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

because nobody know the answer except Brainstorm o.O

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  7
  • Reputation:   0
  • Joined:  04/05/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  30
  • Topics Per Day:  0.01
  • Content Count:  782
  • Reputation:   82
  • Joined:  01/01/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Just the main chat color change.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Which one? The chat over head, or in the chat log?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Both. I guess its editable by clif.c

Edited by dastgirpojee
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Simple patch

clif.c.patch

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

Please be patient dastgirpojee :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

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

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   2
  • Joined:  11/22/11
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  331
  • Reputation:   63
  • Joined:  11/29/11
  • Last Seen:  

Anyways my question was not about gm level if you read properly my post.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   2
  • Joined:  11/22/11
  • Last Seen:  

oops Sorry Post updated..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  55
  • Topics Per Day:  0.01
  • Content Count:  206
  • Reputation:   13
  • Joined:  11/20/11
  • Last Seen:  

Sorry for bumping this ancient thread... But how did you solved this? Can you share it?  /thx

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...