Dastgir Posted October 14, 2012 Posted October 14, 2012 (edited) 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 October 21, 2012 by dastgirpojee Quote
0 Ice Bear Posted April 20, 2018 Posted April 20, 2018 sir @Dastgir is this posible ung 17704? 1 Quote
AnnieRuru Posted October 14, 2012 Posted October 14, 2012 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... Quote
Dastgir Posted October 14, 2012 Author Posted October 14, 2012 Any help how to do it in source? Quote
AnnieRuru Posted October 14, 2012 Posted October 14, 2012 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 Quote
Dastgir Posted October 15, 2012 Author Posted October 15, 2012 (edited) 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 October 15, 2012 by dastgirpojee Quote
Dastgir Posted October 16, 2012 Author Posted October 16, 2012 · Hidden by Capuche, September 20, 2013 - No reason given Hidden by Capuche, September 20, 2013 - No reason given bump!
Dastgir Posted October 17, 2012 Author Posted October 17, 2012 · Hidden by Capuche, September 20, 2013 - No reason given Hidden by Capuche, September 20, 2013 - No reason given BUMP!
AnnieRuru Posted October 19, 2012 Posted October 19, 2012 because nobody know the answer except Brainstorm o.O Quote
ph1047 Posted October 20, 2012 Posted October 20, 2012 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. Quote
Dastgir Posted October 21, 2012 Author Posted October 21, 2012 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? Quote
Bin4ry Posted October 21, 2012 Posted October 21, 2012 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. Quote
Dastgir Posted October 21, 2012 Author Posted October 21, 2012 Just the main chat color change. Quote
nanakiwurtz Posted October 21, 2012 Posted October 21, 2012 Which one? The chat over head, or in the chat log? Quote
Dastgir Posted October 21, 2012 Author Posted October 21, 2012 (edited) Both. I guess its editable by clif.c Edited October 21, 2012 by dastgirpojee Quote
Lilith Posted October 21, 2012 Posted October 21, 2012 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; Quote
nanakiwurtz Posted October 21, 2012 Posted October 21, 2012 (edited) Thanks for the code Lililth 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 October 21, 2012 by nanakiwurtz Quote
Dastgir Posted October 22, 2012 Author Posted October 22, 2012 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 Quote
Dastgir Posted October 23, 2012 Author Posted October 23, 2012 · Hidden by Capuche, September 20, 2013 - No reason given Hidden by Capuche, September 20, 2013 - No reason given Solved, Close please.
Lanz Posted October 23, 2012 Posted October 23, 2012 (edited) 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 October 23, 2012 by Lanz Quote
Dastgir Posted October 23, 2012 Author Posted October 23, 2012 Anyways my question was not about gm level if you read properly my post. Quote
x13th Posted August 19, 2013 Posted August 19, 2013 Sorry for bumping this ancient thread... But how did you solved this? Can you share it? Quote
Question
Dastgir
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 dastgirpojee26 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.