Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
HoverText Banner_Text  

Banner_Text

Banner Text.lsl

Category: HoverText
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Banner_Text
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Banner_Text_1.lsl
1
2 string gBanner = "...touch to get Female SL avi kit...";
3 integer gNumChars = 20;
4 integer gPosition = 0;
5 vector gColor = <1,1,1>;
6 float gRefreshRate = 1.0;
7 float gAlpha = 1.0;
8 integer gImPublic = FALSE;
9
10 sendIM(string s){
11 if(gImPublic){
12 llWhisper(0,s);
13 }else{
15 }
16 }
17
18 default
19 {
21 {
22 ",...touch to get Female SL avi kit...";
23 llListen(0, "", "", "");
24 llSetTimerEvent(gRefreshRate);
25 gPosition = 0;
26 }
27
28 timer(){
29 integer len = llStringLength(gBanner);
30 integer diff = (gPosition + gNumChars) - len;
31 string template = llGetSubString(gBanner,gPosition,gNumChars + gPosition);
32 while(llStringLength(template) < gNumChars){
33 template += " " + gBanner;
34 }
35 string sub = llGetSubString(template,0,gNumChars);
36 llSetText(sub + "\n.\n.\n.",gColor,gAlpha);
37 gPosition++;
38 if(gPosition > len){
39 gPosition = 0;
40 }
41 }
42
43 listen(integer number, string name, key id, string msg){
44 if(id != llGetOwner()){
45 return;
46 }
47 list argv = llParseString2List(msg, [" "], []);
48 integer argc = llGetListLength(argv);
49 string cmd = llToLower(llList2String(argv, 0));
50 if(cmd == "/banner"){
51 string arg = llToLower(llList2String(argv, 1));
52 if(arg == "length"){
53 gNumChars = llList2Integer(argv, 2);
54 if(gNumChars < 1){
55 gNumChars = 20;
56 }
57 }else if(arg == "speed"){
58 gRefreshRate = llList2Float(argv, 2);
59 if(gRefreshRate < 0.2){
60 gRefreshRate = 0.2;
61 }
62 }else if(arg == "rotate"){
63 llSetTimerEvent(gRefreshRate);
64 }else if(arg == "static"){
66 llSetText(gBanner + "\n.\n.\n.",<1,1,1>,1);
67 }else if(arg == "on"){
68 llSetTimerEvent(gRefreshRate);
69 }else if(arg == "off"){
71 llSetText("",<0,0,0>,0);
72 }else if(arg=="getrot"){
73 llSay(0,(string)llGetRot());
74 }else if(arg=="im"){
75 gImPublic = !gImPublic;
76 sendIM("gImPublic now set to " + (string)gImPublic);
77 }else if(arg == "help"){
78 sendIM("/banner on / off - enable / disable banner display");
79 sendIM("/banner <text> - set banner text to '<text>'");
80 sendIM("/banner length - set banner length in characters (for rotation)");
81 sendIM("/banner rotate - enable rotation");
82 sendIM("/banner static - disable rotation");
83 }else{
84 gBanner = llGetSubString(msg,8,128);
85 llSetText(gBanner + "\n.\n.\n.",<1,1,1>,1);
86 gPosition = 0;
87 }
88 }
89 }
90 }
91 // END //

Back to the Best Free Tools in Second Life and OpenSim.