Changing color scripts?

Discussion in 'Help' started by Variant, Apr 28, 2010.

Moderators: E.T., Zoroark
  1. Variant

    Variant New Member

    Joined:
    Apr 24, 2010
    Messages:
    12
    Likes Received:
    0
    Hello there, people. As some of you may be able to tell I'm rather new.
    I run a server on the registry, and I really like how the server is really easy to run and easy to customize, as well as the client. Recently, I've had a (small) problem and it involves changing chat colors.
    On the beta server, I saw a mod kick a user, and the text was boldfaced and colored red. I want to know how to implement that into my server. Right now, to kick a user I use this script:
    Code (text):
    1.  
    2.         if (command == "kick") {
    3.             if (tar == undefined) {
    4.                 return;
    5.             }
    6.             sys.sendAll(sys.name(src) + " kicked " + commandData + "!");
    7.             sys.kick(tar);
    8.             return;
    9.         }
    (Yes, I'll be honest; I copied the codes from the Server Scripts area on the main site, then added a few more.)
    Also, I'd like to know how to change the color of the username for my "now playing" script (which is basically a clone of the /me script), because the standard sky blue is quite ugly. If it's at all possible, of course.
    Code (text):
    1.  
    2.         if (command == "np") {
    3.             sys.sendAll("♪♫ " + sys.name(src) + " is now playing: " + commandData);
    4.             return;
    5.         }
    Thanks in advance!
     
  2. Steve

    Steve Active Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    491
    Likes Received:
    45
    Colours cannot be changed through script. The bold red is from using the built-in kick option. If you're set as a moderator or administrator, right click a user then select the kick option.
     
  3. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    For the skyblue, the thing is you added some music tunes before the name. The colors of messages displayed are decided Client Side, so if the part before ":" doesn't match exactly someone's name, the color will be that of the bot color.
     
  4. Variant

    Variant New Member

    Joined:
    Apr 24, 2010
    Messages:
    12
    Likes Received:
    0
    I see. Thanks for clarifying.

    I didn't even notice the right-click kick option. xD

    EDIT: Is there a way to force the client to display a color?
     
    Last edited: Apr 29, 2010
  5. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    No, at least not for now.
     
Moderators: E.T., Zoroark