Home |
Add a script
|
||
|---|---|---|---|
| Category: | Contributor: | Description | |
| HoverText | Anonymous | FlipTitle.lsl | |
FlipTitle.lsl
FlipTitle.lsl
Download this script - Please use this link to get this script. If you see all the code on one long line, please use Wordpad or another editor, such as LSLEdit.exe. The .LSL file you will download is an ordinary text file.
1 // CATEGORY:Titler 2 // DESCRIPTION:FlipTitle.lsl 3 // ARCHIVED BY:Ferd Frederix 4 5 string command = ""; 6 string person = ""; 7 key owner; 8 9 default 10 { 11 state_entry() 12 { 13 owner = llGetOwner(); 14 llListen(0,"",owner,""); 15 } 16 18 { 19 if (attached != NULL_KEY) 20 { 21 llInstantMessage(owner,"To set a title: title <color name> <title text>"); 22 llInstantMessage(owner,"To remove title: title off"); 23 llInstantMessage(owner,"<color name> can be: white, black, red, green, blue, pink, cyan, purple, yellow, orange"); 24 llResetScript(); 25 } 26 } 27 29 { 30 list strings = llParseString2List(message,[" "],[]); 31 string command=llList2String(strings,0); 32 string string1=llList2String(strings,1); 33 if(command=="title") 34 { 35 vector color=<0,0,0>; 36 if(string1=="blue") 37 { 38 color=<0,0,1>; 39 } 40 else if(string1=="orange") 41 { 42 color=<1,0.5,0>; 43 } 44 else if(string1=="cyan") 45 { 46 color=<0,1,1>; 47 } 48 else if(string1=="pink") 49 { 50 color=<1,0,1>; 51 } 52 else if(string1=="green") 53 { 54 color=<0,1,0>; 55 } 56 else if(string1=="red") 57 { 58 color=<1,0,0>; 59 } 60 else if(string1=="white") 61 { 62 color=<1,1,1>; 63 } 64 else if(string1=="yellow") 65 { 66 color=<1,1,0.1>; 67 } 68 else if(string1=="purple") 69 { 70 color=<0.7,0,0.7>; 71 } 72 else 73 { 74 color=<0,0,0>; 75 } 76 string title = ""; 77 integer i; 78 for(i=2; i<=12; i++) 79 { 80 if(llStringLength(llList2String(strings,i))) 81 { 82 title = title + llList2String(strings,i) + " "; 83 } 84 } 85 if(title == "off") 86 { 87 llSetText("",<0,0,0>,1.0); 88 } else { 89 llSetText(title, color, 1.0); 90 } 91 } 92 } 93 }// END //