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;

Hidden Content

    Give reaction to this post to see the hidden content.

    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;

Hidden Content

    Give reaction to this post to see the hidden content.

 

 

Kind Regards,

Vectors

  • Love 2
Link to comment

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);
  • Love 7
Link to comment

 

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);

Thanks

This does not prevent Map

Link to comment

 

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
  • 2 weeks later...
  • 7 months later...

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);

And how can add the (real) time?

Link to comment
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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