Jump to content

Can somebody knows how to do in client?


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

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

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.