Onforum.net - Web and gaming resource community

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members .

Metin2 In Whisper Window (Color Message Attachment) + (Time) [PYTHON]

Vanilla

Elite
Elite
Credits
1,180
Code:
uiwhisper.py opens

# arat #

def SendWhisper(self):

# içinde #

net.SendWhisperPacket(self.targetName, text)
            self.chatLine.SetText("")

            chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() + " : " + text)

# değiştir #

SaatKac = time.strftime("%H:%M")
            net.SendWhisperPacket(self.targetName, " |cff00ccff[" + SaatKac + "]|cff00FF7F " + ":" + text)
            self.chatLine.SetText("")
            chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() +  ": " + " |cff00ccff[" + SaatKac + "]|cFFFF6060 " + ":" + text)


MUST BE

def SendWhisper(self):
        import time
        import player
        text = self.chatLine.GetText()
        textLength = len(text)
        if textLength > 0:
            if net.IsInsultIn(text):
                chat.AppendChat(chat.CHAT_TYPE_INFO, locale.CHAT_INSULT_STRING)
                return
            SaatKac = time.strftime("%H:%M")
            net.SendWhisperPacket(self.targetName, " |cff00ccff[" + SaatKac + "]|cff00FF7F " + ":" + text)
            self.chatLine.SetText("")
            chat.AppendWhisper(chat.WHISPER_TYPE_CHAT, self.targetName, player.GetName() +  ": " + " |cff00ccff[" + SaatKac + "]|cFFFF6060 " + ":" + text)
 
ok thanks :LOL: last question and then i'll go away, promise.

If i want to make txt color just as default (white), i should use:

Code:
net.SendWhisperPacket(self.targetName, " |cff00ccff[" + SaatKac + "]|FFFFFF " + ":" + text)

or there is another way to just don't insert other hex?
 
If you change the hex you can use what color you want ... even white... select the hex for white and is white .. is simple..
 

Similar threads


Top

Dear User!

We found that you are blocking the display of ads on our site.

Please add it to the exception list or disable AdBlock.

The advertises that you'll see aren't intrusive they just help us to keep the community alive

If you don't want to see those ads just buy an upgrade.

Thank you for understanding!

Rogue

Rogue Purchase

User upgrade! at

🔥 Upgrade Now
Baba2

Baba2 Purchase

User upgrade! at

🔥 Upgrade Now

Escanor25 Purchase

User upgrade! at

🔥 Upgrade Now