Jump to content

How To Add Chat Channel and Level


Recommended Posts

Spoiler

221758HMBIWv1.png.6ea25872f7a376969584bc

 

Root uichat.py search;

def __SendShoutChatPacket(self, text):

Code block replace;

http://pastebin.com/EvUxNRe2

    def __SendShoutChatPacket(self, text):
        import player
        if 1 == len(text):
            self.RunCloseEvent()
            return
            
        if app.GetTime() < self.lastShoutTime + 15:
            chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_SHOUT_LIMIT)
            self.__ResetChat()
            return
            
        a = net.GetServerInfo()
        Vectors = a[-3:]
        if not self.Vectors_Map():
            self.__SendChatPacket("[Lv." + str(player.GetStatus(player.LEVEL)) + " " + Vectors + "]: " + text[1:], chat.CHAT_TYPE_SHOUT)
        else:
            self.__SendChatPacket("[Lv. " + str(player.GetStatus(player.LEVEL)) + "]: " + text[1:], chat.CHAT_TYPE_SHOUT)
        self.__ResetChat()
        self.lastShoutTime = app.GetTime()
        
    def Vectors_Map(self):
        import background
        Engellenen_Mapler = [
            "season1/metin2_map_oxevent",
            "season2/metin2_map_guild_inside01",
            "season2/metin2_map_empirewar01",
            "season2/metin2_map_empirewar02",
            "season2/metin2_map_empirewar03",
            "metin2_map_dragon_timeattack_01",
            "metin2_map_dragon_timeattack_02",
            "metin2_map_dragon_timeattack_03",
            "metin2_map_skipia_dungeon_boss",
            "metin2_map_skipia_dungeon_boss2",
            "metin2_map_devilsCatacomb",
            "metin2_map_deviltower1",
            "metin2_map_t1",
            "metin2_map_t2",
            "metin2_map_t3",
            "metin2_map_t4",
            "metin2_map_t5",
            "metin2_map_wedding_01",
            "gm_guild_build",
            "metin2_map_duel"
            "metin2_map_gemi",
            "map_ismi1",
            "map_ismi2",
            "map_ismi3",
            "map_ismi4",
            "map_ismi5",
        ]
        if str(background.GetCurrentMapName()) in Engellenen_Mapler:
            return TRUE

        return FALSE 

Example ox map;

https://metin2.download/picture/z98Ls96cLziOxt3d0hYd1jQFg7xQAjfA/.png

 

 

Kind Regards,

Vectors

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 2
  • Think 1
  • Good 1
  • Love 3
Link to comment
Share on other sites

 

Or just open input_main.cpp and replace this line:

int len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);

with this:

int len = snprintf(chatbuf, sizeof(chatbuf), "[%d] %s : %s", g_bChannel, ch->GetName(), buf);
int len = snprintf(chatbuf, sizeof(chatbuf), "[%s] %s [Lv. %d CH%d] : %s", EMPIRE_NAME(ch->GetEmpire()), ch->GetName(), ch->GetLevel(), g_bChannel, buf);
inline const char* EMPIRE_NAME( BYTE e)
{
	return LC_TEXT(g_nation_name[e]);
}

Kind Regards

Zerelth ~ Ellie

  • Love 4

Do not be sorry, be better.

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...
  • 2 months later...

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.