Premium Sanchez 2466 Posted February 8, 2014 Premium Share Posted February 8, 2014 (edited) M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hi everyone, In this thread I will show you how to change the color of the chat messages without any client modification. I will use the 2 new ring slots in this example. First of all, the color codes: RED: |cFFFF0000|H|h GREEN: |cFF00FF00|H|h BLUE: |cFF0080FF|H|h YELLOW: |cFFFFFF00|H|h Open game/unique_item.h and add these: TEXT_COLOR_RED = ID_OF_THE_ITEM, TEXT_COLOR_GREEN = ID_OF_THE_ITEM, TEXT_COLOR_BLUE = ID_OF_THE_ITEM, TEXT_COLOR_YELLOW = ID_OF_THE_ITEM, Open game/input_main.cpp and search for this: const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Replace with this: int len; const TPacketCGChat* pinfo = reinterpret_cast<const TPacketCGChat*>(data); Remove this: int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); Search for this: if (CHAT_TYPE_SHOUT == pinfo->type) Add this over that: if (ch->IsEquipNewRingItem(TEXT_COLOR_RED)) { // RED len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFF0000|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_GREEN)) { // GREEN len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF00FF00|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_BLUE)) { // BLUE len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFF0080FF|H|h", buf); } else if (ch->IsEquipNewRingItem(TEXT_COLOR_YELLOW)) { // YELLOW len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s %s", ch->GetName(), "|cFFFFFF00|H|h", buf); } else { // DEFAULT COLOR len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf); } Open game/char.cpp and add this event: bool CHARACTER::IsEquipNewRingItem(DWORD dwItemVnum) const { { LPITEM u = GetWear(WEAR_RING1); if (u && u->GetVnum() == dwItemVnum) { return true; } } { LPITEM u = GetWear(WEAR_RING2); if (u && u->GetVnum() == dwItemVnum) { return true; } } return false; } Open game/char.h and search for this: bool IsEquipUniqueGroup(DWORD dwGroupVnum) const; Add this under that: bool IsEquipNewRingItem(DWORD dwItemVnum) const; And now how it looks in the game: Spoiler https://metin2.download/picture/r3F9504x09DVmF8K988YXgTtGTP6KMUj/.gif If you have any question or suggestion, please just reply to this topic. Kind Regards, Sanchez Edited August 21, 2022 by Metin2 Dev Core X - External 2 Internal 17 1 7 36 Link to comment Share on other sites More sharing options...
Saddler 680 Posted February 8, 2014 Share Posted February 8, 2014 #Boss Regards. 1 Link to comment Share on other sites More sharing options...
Rumor 2607 Posted February 8, 2014 Share Posted February 8, 2014 cool, I remember they had this in Metin2US before using the same color code system and it was removed because people didn't want to only use it to sell and buy items. I've been looking for this modification for such a long time. 1 Link to comment Share on other sites More sharing options...
Sphinx² 24 Posted February 15, 2014 Share Posted February 15, 2014 cool, I remember they had this in Metin2US before using the same color code system and it was removed because people didn't want to only use it to sell and buy items. I've been looking for this modification for such a long time. UndergroundMt2 used the same system but with python code. You can append the same color codes over python. @Topic: Not bad 1 Link to comment Share on other sites More sharing options...
Rumor 2607 Posted February 15, 2014 Share Posted February 15, 2014 yea I've seen it in some clients too 1 Link to comment Share on other sites More sharing options...
Mercury 5 Posted April 22, 2014 Share Posted April 22, 2014 Hi, how active these two boxes? I have the inventorywindow with activated cells but not activated, that flag used to place rings in box? Link to comment Share on other sites More sharing options...
Premium Sanchez 2466 Posted April 22, 2014 Author Premium Share Posted April 22, 2014 You have to add the new slots to the inventorywindow.py: ## Equipment Slot { "name" : "Equipment_Base", "type" : "image", "x" : 10, "y" : 33, "image" : "d:/ymir work/ui/equipment_bg_with_ring.tga", "children" : ( { "name" : "EquipmentSlot", "type" : "slot", "x" : 3, "y" : 3, "width" : 150, "height" : 182, "slot" : ( {"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64}, {"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96}, {"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32}, {"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32}, ## »ő ąÝÁö1 {"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32}, ## »ő ąÝÁö2 {"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32}, ## »ő ş§Ć® {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32}, ), }, 1 Link to comment Share on other sites More sharing options...
Mercury 5 Posted April 22, 2014 Share Posted April 22, 2014 Yes, If I have the file with the selected check boxes and tga is correct but are not activate on the subject of flags? Should the value of item selected go to the box? or do I need a special type, flag or antflag? Link to comment Share on other sites More sharing options...
Premium Sanchez 2466 Posted April 22, 2014 Author Premium Share Posted April 22, 2014 You need to use ITEM_RING (33) as type. 1 Link to comment Share on other sites More sharing options...
Mercury 5 Posted April 22, 2014 Share Posted April 22, 2014 I Could not use without glass? would be better without her having to use the glass, no? glass = item vnum 39035 Link to comment Share on other sites More sharing options...
Premium Sanchez 2466 Posted April 22, 2014 Author Premium Share Posted April 22, 2014 Sure you can use without glass, just deactivate in input_main.cpp. Search for ITEM_PRISM and you will see the function. Link to comment Share on other sites More sharing options...
HA MeCa 11 Posted April 23, 2014 Share Posted April 23, 2014 How to disable ITEM_PRISM ? Link to comment Share on other sites More sharing options...
Avertus 1 Posted September 15, 2014 Share Posted September 15, 2014 For me it doesn't work, just edited the same function. bool CHARACTER::IsEquipNewRingItem(DWORD dwItemVnum) const { { LPITEM u = GetWear(WEAR_RING1); if (u && u->GetVnum() == dwItemVnum) { return true; } } return false; } Link to comment Share on other sites More sharing options...
Premium Ocelot2606 140 Posted February 22, 2015 Premium Share Posted February 22, 2015 Can anyone Post what i have to do in item_proto.txt I try this 90014 Gelber Stift ITEM_RING NONE 1 NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 but if i use my Item it goes in the Right Slot but my Chat is still normal Link to comment Share on other sites More sharing options...
iRemain 17 Posted February 28, 2015 Share Posted February 28, 2015 is it possible to make it like, if my name starts with "[Dev]"iRemain to color what I'm typing with red? Link to comment Share on other sites More sharing options...
Aerrow 41 Posted June 29, 2015 Share Posted June 29, 2015 Can anyone Post what i have to do in item_proto.txt I try this 90014 Gelber Stift ITEM_RING NONE 1 NONE NONE NONE 0 0 0 0 0 LIMIT_NONE 0 LIMIT_NONE 0 APPLY_NONE 0 APPLY_NONE 0 APPLY_NONE 0 0 0 0 0 0 0 0 0 0 but if i use my Item it goes in the Right Slot but my Chat is still normal Same.. Link to comment Share on other sites More sharing options...
Enes 1 Posted March 22, 2020 Share Posted March 22, 2020 how to make whisper coloring ? Link to comment Share on other sites More sharing options...
Recommended Posts