Welcome to Onforum.net - Web and gaming resource community

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?
  • elefant.ro%20

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

Vanilla

Elite
Elite
Credits
1,073
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)
 

Aioria

Banned
Banned
Credits
1
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?
 

Vanilla

Elite
Elite
Credits
1,073
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


About us

OnForum.net is a resource community where aspiring webmasters and designers can share content and receive support for a wide variety of software platforms. We are working every day to make sure our community is one of the best.

PARTNERS

Follow us

We recommend

Doza de Blog
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!