What's new

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?

Ask question

Ask Questions and Get Answers from Our Community

Answer

Answer Questions and Become an Expert on Your Topic

Contact Staff

Our Experts are Ready to Answer your Questions

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

Vanilla

Elite
Elite
Joined
Jan 28, 2019
Messages
631
Reaction score
3,852
Points
93
Credits
374
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
Joined
Apr 17, 2019
Messages
61
Reaction score
10
Points
8
Location
Rome
Credits
0
So this is to show time of message right? anyway thanks
 

Aioria

Banned
Banned
Joined
Apr 17, 2019
Messages
61
Reaction score
10
Points
8
Location
Rome
Credits
0
how can i change this color?

Code:
cff00ccff

should be hex right? but 9 number/letters?
 

Aioria

Banned
Banned
Joined
Apr 17, 2019
Messages
61
Reaction score
10
Points
8
Location
Rome
Credits
0
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
Joined
Jan 28, 2019
Messages
631
Reaction score
3,852
Points
93
Credits
374
If you change the hex you can use what color you want ... even white... select the hex for white and is white .. is simple..
 

Aioria

Banned
Banned
Joined
Apr 17, 2019
Messages
61
Reaction score
10
Points
8
Location
Rome
Credits
0
That's not what i mean, but my fault, i don't speak english very well, anyway thanks a lot!
 

Similar threads


shape1
shape2
shape3
shape4
shape7
shape8
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!