Jump to content

Recommended Posts

  • Active+ Member

Does anyone know how I have to modify the code to look like picture?

 

Spoiler

def SendWhisper(self):
        import time
        text = self.chatLine.GetText()
        textLength = len(text)

        if textLength > 0:
            if net.IsInsultIn(text):
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
                return
            time = time.strftime("%H:%M")
            net.SendWhisperPacket(self.targetName, ": |cFFFFA500|h[Lv. " + str(player.GetStatus(player.LEVEL)) + "] " "|cffffff00|h[" + time + "]:|cffffffff|h "  + text)
            self.chatLine.SetText("")

            chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + ": |cFFFFA500|h[Lv. " + str(player.GetStatus(player.LEVEL)) + "] " "|cffffff00|h[" + time + "]|cffffffff|h: "  + text)

Thanks for your answers!

Kind Regards ReFresh

 

I'll be always helpful!  😉

Link to comment
https://metin2.dev/topic/9752-can-somebody-knows-how-to-do-in-client/
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Here is the python function, have fun ;)

 

Spoiler

    def SendWhisper(self):

        text = self.chatLine.GetText()
        textLength = len(text)

        if textLength > 0:
            if net.IsInsultIn(text):
                chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.CHAT_INSULT_STRING)
                return

            PcLevel = str(player.GetStatus(player.LEVEL))
            Time = time.strftime("%H:%M")
            net.SendWhisperPacket(self.targetName, text)
            self.chatLine.SetText("")

            chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName,"[" + Time + "] " + player.GetName() + " (" + PcLevel + ") : " + text)

 

  • Active+ Member
20 hours ago, Frozen said:

Try this:

Go to game.py and search for OnRecvWhisper

add in the beggining:

line = line[len(name)+3:]

Thank you for your answer, but still doesn't work.

I'll be always helpful!  😉

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



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.