I am not sure if its just as simple as changing the color picker statements but I can seem to get it right.
Can some one help? Thanks
integer listen_channel = 2; // Channel to listen for color commands
list colors = [ // List of named colors recognized
"yellow", <1.0, 1.0, 0.0>,
"cyan", <0.0, 1.0, 1.0>,
"blue", <0.0, 0.0, 1.0>,
"green", <0.0, 1.0, 0.0>,
"red", <1.0, 0.0, 0.0>,
"salmon", <1.0, 0.5, 0.5>,
"pink", <1.0, 0.3, 0.6>,
"black", <0.0, 0.0, 0.0>,
"white", <1.0, 1.0, 1.0>
];
list link_channels = [ // Channels for linked prim groups like "straps"
"straps", 5,
"base", 2
];
integer callback; // Used to cleanup old listeners.
vector parse_named_color(string color_name)
{
vector color = <-1, -1, -1>;
integer index = 0;
integer stride = 2;
integer length = llGetListLength(colors);
integer found = FALSE;
color_name = llToLower(color_name);
do{
if(color_name == llList2String(colors, index))
{
color = llList2Vector(colors, index + 1);
found = TRUE;
}
index += stride;
}while(index < length && !found);
return color;
}
activate()
{
callback = llListen(listen_channel, "", llGetOwner(), ""
;llOwnerSay("Color Changer v1.0 Activated"
;llOwnerSay("Use chat commands to set the color of the entire object."
;llOwnerSay("For instance say /" + (string) listen_channel + " color red"
;llOwnerSay("You can also say /" + (string) listen_channel + " color 1 0 0"
;llOwnerSay("To set individual parts use: "
;integer index = llGetListLength(link_channels) - 1;
integer stride = 2;
do
{
llOwnerSay("/" + (string) listen_channel + " " + llList2String(link_channels, index - 1) + " color blue"
; index -= stride;
}while(index > 0);
}
deactivate()
{
llListenRemove(callback);
llOwnerSay("Color Changer v1.0 Deactivated. Touch to reactivate."
; }
set_all(list args)
{
vector color = <0,0,0>;
if(llGetListLength(args) == 2)
{
color = parse_named_color(llList2String(args, 1));
}
else if(llGetListLength(args) >= 4)
{
color = <llList2Float(args, 1), llList2Float(args, 2), llList2Float(args, 3)>;
}
if(color == <-1, -1, -1>

{
llOwnerSay("Unable to find color"
;}
else
{
llOwnerSay("Setting color of all to: " + (string) color);
llSetColor(color, ALL_SIDES);
integer index = llGetListLength(link_channels) - 1;
integer stride = 2;
string message = "color " + (string) color.x + " " + (string) color.y + " " + (string) color.z;
do
{
llMessageLinked(LINK_ALL_OTHERS, llList2Integer(link_channels, index), message, NULL_KEY);
index -= stride;
}while(index > 0);
}
}
set_one(list args)
{
vector color = <0,0,0>;
string channel = llToLower(llList2String(args, 0));
// Handle a common typo gracefully
if(llList2String(args, 1) != "color"

args = llListInsertList(args, ["color"], 1);
if(llGetListLength(args) == 3)
{
color = parse_named_color(llList2String(args, 2));
}
else if(llGetListLength(args) >= 5)
{
color = <llList2Float(args, 2), llList2Float(args, 3), llList2Float(args, 4)>;
}
if(color == <-1, -1, -1>

{
llOwnerSay("Unable to find color"
;}
else
{
llOwnerSay("Setting color of " + channel + " to: " + (string) color);
integer index = llGetListLength(link_channels) - 1;
integer stride = 2;
string message = "color " + (string) color.x + " " + (string) color.y + " " + (string) color.z;
integer found = FALSE;
do
{
if(llList2String(link_channels, index - 1) == channel)
{
llMessageLinked(LINK_SET, llList2Integer(link_channels, index), message, NULL_KEY);
found = TRUE;
}
index -= stride;
}while(!found && index > 0);
if(!found) llOwnerSay("Didn't find a " + channel + "to change."
;}
}
default
{
listen( integer channel, string name, key id, string message )
{
list args = llParseString2List(message, [" "],[]);
if(llList2String(args, 0) == "color"

{
set_all(args);
}
else
{
set_one(args);
}
}
touch_start(integer num_detected)
{
if(llDetectedKey(0) == llGetOwner()){
llSetTimerEvent(15);
activate();
}
}
timer()
{
deactivate();
llSetTimerEvent(0);
}
}