Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Chat command color change script wanted

Maeve Morgan
ZOMG Resmod!
Join date: 2 Apr 2004
Posts: 1,512
12-13-2004 16:11
I'm looking for the really cool script used to change the colors of prims by typing to color you want. I'm a mediocre scripter at best so I'm hoping someone else has this. I'm willing to pay for it but I can't afford a lot.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
12-13-2004 17:03
Do you want to say it as a color vector or a color name? I'll assume the latter.
It's pretty trivial code...

default
{

state_entry()
{
llListen(0,"",llGetOwner(),"";);
}

listen(integer c, string n, key k, string m)
{
m=llToUpper(m);
if (m=="RED";) llSetColor(<1,0,0>, ALL_SIDES);
if (m=="GREEN";) llSetColor(<0,1,0>, ALL_SIDES);
if (m=="BLUE";) llSetColor(<0,0,1>, ALL_SIDES);
if (m=="BLACK";) llSetColor(<0,0,0>, ALL_SIDES);
if (m=="WHITE";) llSetColor(<1,1,1>, ALL_SIDES);
if (m=="YELLOW";) llSetColor(<1,1,0>, ALL_SIDES);
if (m=="CYAN";) llSetColor(<0,1,1>, ALL_SIDES);
if (m=="MAGENTA";) llSetColor(<1,0,1>, ALL_SIDES);
if (m=="GREY";) llSetColor(<0.5,0.5,0.5>, ALL_SIDES);
}

}

It should be something like that. If it doesn't work, bug someone else to fix it :)
Maeve Morgan
ZOMG Resmod!
Join date: 2 Apr 2004
Posts: 1,512
12-13-2004 21:17
works great TY soo much :D
Mhaijik Guillaume
Chadeaux Vamp
Join date: 18 Jun 2004
Posts: 620
Dang
12-14-2004 06:15
I just paid $100L for a pair of voice activated colour changing shoes :confused: that do not even work :eek:


Oh well - Thank you - now I can maybe fix them.
_____________________
Samhain Broom
Registered User
Join date: 1 Aug 2004
Posts: 298
12-14-2004 11:49
the cool thing about that code, is that you do not need to worry about the case of the colors you write. Eggy has saved you the trouble of worrying about how to write the colors...

in this case... red==Red==RED

you might also want to make it listen to channel 1 or something so your script doesn't have to listen to everything that everyone says... instead of saying

red

you might have to say:

/1 red

Saves LAG. Also no one will see your commands.
_____________________
rm -rf /bin/ladden #beware of geeks bearing grifts
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
12-14-2004 13:40
I sell a script that changes the color of an objects. But my script uses a list of favorites to chose from. If you change the color of the object manually it will give you an option to add that color to the list of favorites.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-15-2004 16:12
remember to reset the script on rez
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey