09-06-2006 10:19
The two scripts below I would like to somehow put them both as one script....the far bottom I would have to go into the script to type the text which I do not want to have to do...With the top script all I have to do is type this in chat /63 title (type color here) type message here ....I would love to have the title flashing the different colors if that is possible but since I do not know anything about scripting I do not know how to incorporate both into the better titler...If someone could be so kind as to please do this it would be most apprecieated... These are two freebie scripts I got long ago in SL.
Thank You,
Juliea (Sweetheart Baskerville)

**********************************************************************

string command = "";
string person = "";
key owner;

default
{
state_entry()
{
owner = llGetOwner();
llListen(63,"",owner,"";);
}

attach(key attached)
{
if (attached != NULL_KEY)
{
llInstantMessage(owner,"To set a title: title <color name> <title text>";);
llInstantMessage(owner,"To remove title: title off";);
llInstantMessage(owner,"<color name> can be: white, black, red, green, blue, pink, cyan, purple, yellow, orange";);
llResetScript();
}
}

listen(integer channel, string name, key id, string message)
{
list strings = llParseString2List(message,[" "],[]);
string command=llList2String(strings,0);
string string1=llList2String(strings,1);
if(command=="title";)
{
vector color=<0,0,0>;
if(string1=="blue";)
{
color=<0,0,1>;
}
else if(string1=="orange";)
{
color=<1,0.5,0>;
}
else if(string1=="cyan";)
{
color=<0,1,1>;
}
else if(string1=="pink";)
{
color=<1,0,1>;
}
else if(string1=="green";)
{
color=<0,1,0>;
}
else if(string1=="red";)
{
color=<1,0,0>;
}
else if(string1=="white";)
{
color=<1,1,1>;
}
else if(string1=="yellow";)
{
color=<1,1,0.1>;
}
else if(string1=="purple";)
{
color=<0.7,0,0.7>;
}
else
{
color=<0,0,0>;
}
string title = "";
integer i;
for(i=2; i<=12; i++)
{
if(llStringLength(llList2String(strings,i)))
{
title = title + llList2String(strings,i) + " ";
}
}
if(title == "off";)
{
llSetText("",<0,0,0>,1.0);
} else {
llSetText(title, color, 1.0);
}
}
}
}



**********************************************************************


default
{
state_entry()
{
llSetTimerEvent(5.0);
}
timer()
{
float red=llFrand(1);
float green=llFrand(1);
float blue=llFrand(1);
llSetText("type your text here", <red,green,blue>, 2);
}
}