Denis 1474 Posted April 21, 2014 Share Posted April 21, 2014 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) Hello, To make the shout chat work for all kingdoms you need to open the file: input_p2p.cpp and search for this: struct FuncShout then replace this: if (!d->GetCharacter() || (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire)) with this: if (!d->GetCharacter() /*|| (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire)*/) After that open the file input_main.cpp and find this: TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf, ch->GetEmpire()); and make it look like this: const char* kingdoms[3] = {"|cFFff000|h|h[Shinsoo]|cFFA7FFD4|H|h","|CFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h","|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h"}; char chatbuf_global[CHAT_MAX_LEN + 1]; int len_global_ = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s",kingdoms[ch->GetEmpire()-1], chatbuf); TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf_global, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf_global, ch->GetEmpire()); 44 2 2 1 1 1 15 2 47 Link to comment Share on other sites More sharing options...
Frozen 189 Posted April 21, 2014 Share Posted April 21, 2014 The Glass is needed? Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 21, 2014 Author Share Posted April 21, 2014 In the mainline no.I don't know for the other branches if it's needed or not 2 Link to comment Share on other sites More sharing options...
Marggraf 139 Posted April 28, 2014 Share Posted April 28, 2014 where input_p2p.cpp ? client/srv? Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 28, 2014 Author Share Posted April 28, 2014 game/src/ Link to comment Share on other sites More sharing options...
Marggraf 139 Posted April 28, 2014 Share Posted April 28, 2014 2089 goes on the game? Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 28, 2014 Author Share Posted April 28, 2014 What did you mean? Link to comment Share on other sites More sharing options...
Phantom 3 Posted April 28, 2014 Share Posted April 28, 2014 pls link download programme , for open input_p2p.cpp Link to comment Share on other sites More sharing options...
Summex 69 Posted April 28, 2014 Share Posted April 28, 2014 So thanks for that but what about a [Jinno], [shinsoo], [Chunjo] in colours before the text. Shall we use the py code from other global chat or ist that possible in the source too (I guess it is ) 1 Link to comment Share on other sites More sharing options...
Developer PACI 920 Posted April 28, 2014 Developer Share Posted April 28, 2014 It is already included on the code he posted. 1 when you return 0 and server doesn't boot: Link to comment Share on other sites More sharing options...
Summex 69 Posted April 28, 2014 Share Posted April 28, 2014 It is already included on the code he posted. Oh didnt know. Havent tried it but nice to know. Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 28, 2014 Author Share Posted April 28, 2014 You can change the colors if you want. Link to comment Share on other sites More sharing options...
mackabro 5 Posted April 29, 2014 Share Posted April 29, 2014 (edited) erro input_main.cpp:746: warning: unused variable 'len_global' gmake: *** [OBJDIR/input_main.o] Error 1 My imput_main https://metin2.download/picture/o9302rzdo7FlxjWvvBqQM6O092W9Oijz/.png Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 29, 2014 Author Share Posted April 29, 2014 It isn't an error just delete input_main.o from OBJDIR and try to compile it again Link to comment Share on other sites More sharing options...
Timasu 30 Posted April 29, 2014 Share Posted April 29, 2014 I use vanilla core and I don't want to change it. Can you make a tutorial for client? 1 Link to comment Share on other sites More sharing options...
mackabro 5 Posted April 29, 2014 Share Posted April 29, 2014 (edited) https://metin2.download/picture/rDkmMIL51UG2m4Y09e9cHrxmteRlpdj8/.png =( Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 3 Link to comment Share on other sites More sharing options...
Denis 1474 Posted April 29, 2014 Author Share Posted April 29, 2014 Do what I said Link to comment Share on other sites More sharing options...
ricky92 29 Posted April 30, 2014 Share Posted April 30, 2014 (edited) erro input_main.cpp:746: warning: unused variable 'len_global' gmake: *** [OBJDIR/input_main.o] Error 1 My imput_main https://metin2.download/picture/o9302rzdo7FlxjWvvBqQM6O092W9Oijz/.png On the line of the array "kingdoms", you are initializing the array using regular brackets "(" and ")", instead of curly ones "{" and "}". That's what's giving that error, just fix it and it should compile fine. Edited August 28, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
macacaldo 2 Posted May 1, 2014 Share Posted May 1, 2014 (edited) const char* kingdoms[3] = {"|cFFff0000|H|h[shinsoo]|cFFA7FFD4|H|h","|cFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h","|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h"}; char chatbuf_global[CHAT_MAX_LEN + 1]; int len_global = snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s",kingdoms[ch->GetEmpire()-1], chatbuf); TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf, ch->GetEmpire()); Edited August 22, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
macacaldo 2 Posted May 1, 2014 Share Posted May 1, 2014 error if (!d->GetCharacter() /*|| (d->GetCharacter()->GetGMLevel() == GM_PLAYER && d->GetEmpire() != m_bEmpire)*/) Link to comment Share on other sites More sharing options...
Avertus 1 Posted May 25, 2014 Share Posted May 25, 2014 Don't work. Link to comment Share on other sites More sharing options...
Leye 3 Posted July 25, 2014 Share Posted July 25, 2014 (edited) Works perfect, thanks https://metin2.download/picture/30gYVh9UKezZgu32cpzwPv4B5PUOX0jb/.png Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal 2 Link to comment Share on other sites More sharing options...
Cruel 4 Posted August 26, 2014 Share Posted August 26, 2014 const char* kingdoms[3] = {"|cFFff000|h|h[Shinsoo]|cFFA7FFD4|H|h","|CFFFFFF00|H|h[Chunjo]|cFFA7FFD4|H|h","|cFF0080FF|H|h[Jinno]|cFFA7FFD4|H|h"}; char chatbuf_global[CHAT_MAX_LEN + 1]; int len_global_ snprintf(chatbuf_global, sizeof(chatbuf_global), "%s %s",kingdoms[ch->GetEmpire()-1], chatbuf); TPacketGGShout p; p.bHeader = HEADER_GG_SHOUT; p.bEmpire = ch->GetEmpire(); strlcpy(p.szText, chatbuf_global, sizeof(p.szText)); P2P_MANAGER::instance().Send(&p, sizeof(TPacketGGShout)); SendShout(chatbuf_global, ch->GetEmpire()); I think all is right. 2 Link to comment Share on other sites More sharing options...
Lehel 14 Posted August 30, 2014 Share Posted August 30, 2014 Not working for me , need I have in config.cpp this line ? bool g_bGlobalShoutEnable = true; ? I use mainline_released. Link to comment Share on other sites More sharing options...
Premium ahynoa 15 Posted August 31, 2014 Premium Share Posted August 31, 2014 (edited) help error https://metin2.download/picture/B5U50R7xoHKZRDvjeSJVkfKd69sOeJO9/.jpg https://metin2.download/picture/AgTyosONarQCFAG6PYHeG4TheVJJcuS7/.jpg Edited August 30, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
Recommended Posts