first
----
CODE
string c = "";
string c1 = "";
string c2 = "";
default
{
state_entry()
{
llListen(0,"",llGetOwner(),"");
llSetTimerEvent(1);
}
listen(integer channel, string name, key id, string message)
{
c = llGetSubString(message, 0, 2);
c1 = llGetSubString(message, 4, 4);
c2 = llGetSubString(message, -1,-1);
if(c == "set")
{
if(c1 == "r")
{
c1 = "r";
}
if(c1 == "b")
{
c1 = "b";
}
if(c1 == "y")
{
c1 = "y";
}
if(c1 == "w")
{
c1 = "w";
}
if(c2 == "y")
{
c2 = "y";
}
if(c2 == "w")
{
c2 = "w";
}
if(c2 == "r")
{
c2 = "r";
}
if(c2 == "b")
{
c2 = "b";
}
}
llOwnerSay("Color Being Reset");
llSleep(2);
llWhisper(-7564,(string)llGetOwner()+" "+c1+c2);
//-7564
llOwnerSay("Color Setting "+c1+c2);
}
timer()
{
integer own = llGetAgentInfo(llGetOwner());
if(own & AGENT_SITTING)
{
llSetLinkAlpha(LINK_SET, 1, ALL_SIDES);
}
else
{
llSetLinkAlpha(LINK_SET, 0, ALL_SIDES);
llWhisper(-7564,(string)llGetOwner()+" "+c1+c2);
}
}
}
second
--------
CODE
string c1 = "";
string c2 = "";
string c = "";
default
{
state_entry()
{
llListen(-7564, "", "", "");
}
listen(integer channel, string name, key id, string message)
{
c = llGetSubString(message, 0, 37);
c1 = llGetSubString(message, 39, 41);
c2 = llGetSubString(message, -1,-1);
llWhisper(0,message);
if (message == "l on")
{
llSetTexture("27bed03f-fb02-d0a6-35a9-67481dc1653e",6);
llSetTexture("1a083278-6701-c353-b5be-da0b6c95bf29",7);
llSetPrimitiveParams([25,6,.3]);
llSetPrimitiveParams([25,7,.3]);
llSetTextureAnim(ANIM_ON | LOOP, ALL_SIDES,1,2,0,0,10);
llSetPrimitiveParams([PRIM_FULLBRIGHT, 6, TRUE]);
llSetPrimitiveParams([PRIM_FULLBRIGHT, 7, TRUE]);
}
else if (message == "l off")
{
llSetTexture("137441a2-58f8-9a97-5c32-aba29a695241",6);
llSetTexture("137441a2-58f8-9a97-5c32-aba29a695241",7);
llSetPrimitiveParams([25,6,0]);
llSetPrimitiveParams([25,7,0]);
llSetTextureAnim(LOOP, ALL_SIDES,1,1,0,0,0);
llSetPrimitiveParams([PRIM_FULLBRIGHT, ALL_SIDES, FALSE]);
}
else
{
if(c == llGetOwner())
{
if(c1 == "r")
{
llSetColor(<1,0,0>,6);
}
if(c1 == "b")
{
llSetColor(<0,0,1>,6);
}
if(c1 == "y")
{
llSetColor(<1,1,0>,6);
}
if(c1 == "w")
{
llSetColor(<1,1,1>,6);
}
if(c2 == "y")
{
llSetColor(<1,1,0>,7);
}
if(c2 == "w")
{
llSetColor(<1,1,1>,7);
}
if(c2 == "r")
{
llSetColor(<1,0,0>,7);
}
if(c2 == "b")
{
llSetColor(<0,0,1>,7);
}
}
}
}
}