Author Topic: Colors  (Read 4159 times)

That's the tricky part. It's four numbers, separated by spaces. My guess is it's "R G B A".

Client:
Code: [Select]
%client.player.setNodeColor("ALL","R G B A");Player:
Code: [Select]
%player.setNodeColor("ALL","R G B A");

I found a node list:

accent, chest, hat, hip, larm, lhand, lleg, pack, rarm, rhand, rleg and secondPack
But no head?

Hwhat?



Code: [Select]
%player.setFaceName("memeGrinMan"); //Example

%client.accent     = 0;
%client.chest      = 0;
%client.chestColor = "0 0.686 0.686 1";
%client.decalName  = "AAA-None";
%client.hat        = 0;
%client.headColor  = "0.663 0.48 0.401 1";
%client.hip        = 0;
%client.hipColor   = "0.25 0.228 0.649 1";
%client.larm       = 0;
%client.larmColor  = "0 0.686 0.686 1";
%client.lHand      = 0;
%client.lhandColor = "0.663 0.49 0.401 1";
%client.lleg       = 0;
%client.llegColor  = "0.275 0.228 0.649 1";
%client.pack       = 0;
%client.rarm       = 0;
%client.rarmColor  = "0 0.686 0.686 1";
%client.rHand      = 0;
%client.rhandColor = "0.663 0.49 0.401 1";
%client.rleg       = 0;
%client.rlegColor  = "0.275 0.228 0.649 1";
%client.secondPack = 0;

%client.applyBodyColors();
%client.applyBodyParts();

This forces a player to look like "Minecraft Steve"

Also, if you want the players to never change their appearance back

package noChange{
    function serverCmdUpdateBodyColors() {}
    function serverCmdUpdateBodyParts()  {}
};
activatepackage(noChange);

This makes the commands a client sends to change their avatar ineffective


Use this if you plan on making players not have their avatars change back... ever
« Last Edit: August 19, 2013, 09:26:46 AM by MARBLE MAN »

Also, if you want the players to never change their appearance back

package noChange{
    function serverCmdUpdateBodyColors() {}
    function serverCmdUpdateBodyParts()  {}
};
activatepackage(noChange);

This makes the commands a client sends to change their avatar ineffective


Use this if you plan on making players not have their avatars change back... ever
If you don't plan on ever deactivating the package, then there's no point to put this in a package.

If you don't plan on ever deactivating the package, then there's no point to put this in a package.

Yes there is. What if you close the server and start one without the add-on enabled?

Yes there is. What if you close the server and start one without the add-on enabled?
Then the function reverts back to normal because the base codes were executed?

Then the function reverts back to normal because the base codes were executed?

Still, is there any reason to break the zen just because "it'll work without it"?

Still, is there any reason to break the zen just because "it'll work without it"?
I don't know. Less lines of code. Every line counts :)

Still, is there any reason to break the zen just because "it'll work without it"?

Nice avatar Port :D

OT: Thanks for the help, Marble Man. I was thinking of using my modified avatar change request kicker script but that is better. It'll turn into General Discussion where everyone gets banned for "lolz"

Ok, new problem. The script was working fine, changing my skin color to either black or white every time I respawned, except I think I got the colors wrong. Black = Blue, White = Green.

Also, I made it message the client "You have regenerated into a new form." Except, the message is red, like when you put no hex color codes when messaging the client in events. How would I do that? Please, give me an example

There's two ways of doing this...

You could use "<color:HEXCODE>" which allows for more specific colors, or..
Use "\cNUMBER" which is limited to 9 colors.

For the HEXCODE one you just replace HEXCODE with any hex color.  Here's a quick color sheet: http://www.htmlgoodies.com/tutorials/colors/article.php/3478961/So-You-Want-A-Basic-Color-Code-Huh.htm

The "\c" color code only allows for 9 colors.
\c0 - Red
\c1 - Blue
\c2 - Green
\c3 - Yellow
\c4 - Teal (It's more of a Cyan)
\c5 - Purple
\c6 - White
\c7 - Grey
\c8 - Black
« Last Edit: August 20, 2013, 12:17:27 AM by Vaux »