Compartilhe
Ir em baixo
avatar
BANIDO

BANIDO
Mensagens : 18
Data de inscrição : 04/12/2017
Idade : 16
Ver perfil do usuáriohttp://www.incimice.com

ChatColor

em Seg Dez 04, 2017 8:40 am
Server.py
#String 
Código:
this.chatColor = ""

Server.py : 

Código:
def sendAllChat(this, playerCode, playerName, message, langueID, isOnly, renk):
        if renk:
            message = '<font color="%s">%s</font>' % (renk, message)
        packet = ByteArray().writeInt(playerCode).writeUTF(playerName).writeByte(langueID).writeUTF(message)
        if not isOnly:
            for player in this.clients.values():
                if not playerName in player.ignoredsList:
                    player.sendPacket(Identifiers.send.Chat_Message, packet.toByteArray())
        else:
            player = this.clients.get(playerName)
            if player != None:
                player.sendPacket(Identifiers.send.Chat_Message, packet.toByteArray())
            this.server.sendStaffMessage(7, "<V>%s</R> karalisteden bir kelime yazdı: [<R>%s</R>]." %(playerName, message))

Parsepackets.py  first find code

Código:
this.client.room.sendAllChat(this.client.playerCode, this.client.playerName, message, this.client.langueID, this.server.checkMessage(message))


Change Code:

Código:
this.client.room.sendAllChat(this.client.playerCode, this.client.playerName, message, this.client.langueID, this.server.checkMessage(message), this.client.chatColor)


Parsecommands.py Add Code :

Código:
elif command in ["beyaz"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#FFFFFF"
 
            elif command in ["kırmızı"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#FF0000"

            elif command in ["denemess"]:
                if this.client.privLevel >= 1:
                    this.client.nameColor = "#FF0000"        

            elif command in ["mavi"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#0000CC"

            elif command in ["yesil"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#00FF00"

            elif command in ["pembe"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#FF00CC"

            elif command in ["sarı"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#FFFF00"

            elif command in ["turkuaz"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#00FFFF"        
 
            elif command in ["turuncu"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#FE8446"  
 
            elif command in ["ten"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#E3C07E"  
 
            elif command in ["kahverengi"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#78583A"  
 
            elif command in ["gri"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#878787"  
 
            elif command in ["siyah"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#000001"  
 
            elif command in ["mor"]:
                if this.client.privLevel >= 1:
                    this.client.chatColor = "#735B85"
MEMBRO

MEMBRO
Mensagens : 1
Data de inscrição : 21/05/2018
Ver perfil do usuário

Re: ChatColor

em Ter Jun 12, 2018 1:06 pm
donde se ponen los codigos
this.chatColor = ""
this.client.room.sendAllChat(this.client.playerCode, this.client.playerName, message, this.client.langueID, this.server.checkMessage(message), this.client.chatColor)
Voltar ao Topo
Permissão deste fórum:
Você não pode responder aos tópicos neste fórum