Ir para baixo
Accesito
Accesito
MEMBRO

MEMBRO
Mensagens : 6
Data de inscrição : 25/03/2015

ChatColor and mouse color with selector Empty ChatColor and mouse color with selector

Dom Dez 10, 2017 1:38 am
Reputação da mensagem: 100% (5 votos)
On all servers, if you use "colornick" command, swf open a popup with color selector.

On first, add variable for chat color on login.


Código:
this.colornick = "#C2C2DA"

On Packets that chat messages add this line:


Código:
message = "<font color='"+str(this.client.colornick)+"'>"+str(message)+"</font>"



Command:


Código:
if command == "colornick":
            if argsCount == 0:
                this.client.sendMessage("<font color='#FFFFFF'>Escribe</font> <font color='#FFFF00'><b>/colornick piel</b></font><font color='#FFFFFF'> y selecciona un color de piel</font>")
                this.client.sendMessage("<font color='#FFFFFF'>Escribe</font> <font color='#FFFF00'><b>/colornick chat</b></font><font color='#FFFFFF'> y selecciona un color de chat</font>")
            if argsCount == 2:
                variable = values[1].lower()
                colorelegido = values[2].lower()
                if variable == "piel":
                    xxxs = int(colorelegido)
                    color = hex(xxxs).replace("0x", "")
                    this.client.MouseColor = str(color)
                    this.client.sendMessage("<font color='#"+str(color)+"'>Este es el nuevo color de tu ratón</font>")
                    sql = sqls("update users set MouseColor = %s where name = %s", [color, this.client.Username])
                if variable == "chat":
                    if this.client.privLevel >= 2:
                       xxxs = int(colorelegido)
                       color = hex(xxxs).replace("0x", "")
                       this.client.colornick = "#"+str(color)
                       this.client.sendMessage("<font color='"+str(this.client.colornick)+"'>Este es tu nuevo color de chat</font>")
                       sql = sqls("update users set colornick = %s where name = %s", [this.client.colornick, this.client.Username])
                       this.client.sendMessage("<font color='"+str(this.client.colornick)+"'>SI USAS COLORES QUE CUESTEN LEER O DAÑEN LA VISTA SE TE PENALIZARÁ Y NO PODRÁS VOLVER A CAMBIAR EL COLOR.</font>")
                    else:
                        this.client.sendMessage("<font color='#FFFFFF'>Color de chat solo para VIPS o equipo administrativo</font>")
                        this.client.sendMessage("<font color='#FFFFFF'>Puedes ser vip consiguiendo referidos en el siguiente link:<font color='#FFFF00'>http://www.minitf.net/referidos</font>")
                if not variable == "piel" and not variable == "chat":
                    this.client.sendMessage("<font color='#FFFFFF'>Escribe</font> <font color='#FFFF00'><b>/colornick piel</b></font><font color='#FFFFFF'> y selecciona un color de piel</font>")
                    this.client.sendMessage("<font color='#FFFFFF'>Escribe</font> <font color='#FFFF00'><b>/colornick chat</b></font><font color='#FFFFFF'> y selecciona un color de chat</font>")



Razz
Becker
Becker
MEMBRO

MEMBRO
Mensagens : 261
Data de inscrição : 01/04/2015
Idade : 21
http://www.miceup.top

ChatColor and mouse color with selector Empty Re: ChatColor and mouse color with selector

Dom Dez 10, 2017 4:19 am
Muito bom ^^
jacksparroww
jacksparroww
BANIDO

BANIDO
Mensagens : 63
Data de inscrição : 17/08/2016
Idade : 24
Localização : Antalya
http://zeomice.com

ChatColor and mouse color with selector Empty Re: ChatColor and mouse color with selector

Dom Jan 07, 2018 10:09 am
Thanks bro ^^. Actually this chat message changes the color
Conteúdo patrocinado

ChatColor and mouse color with selector Empty Re: ChatColor and mouse color with selector

Ir para o topo
Permissões neste sub-fórum
Não podes responder a tópicos