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
TV TV_Station_Script  

TV_Station_Script

TV Station Script.lsl

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

the Zip file

Download all files for TV_Station_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. TV_Station_Script_1.lsl
1
2 list teeVees;
3 integer listenID;
4 key programID = NULL_KEY;
5
6 updateTV(integer number)
7 {
8 //Scripts are delayed 20 seconds for each email
9 if(programID != NULL_KEY)
10 {
11 llWhisper(0, "Sending Notcard: " + (string)programID);
12 llEmail(llList2String(teeVees, number) +
13 "@lsl.secondlife.com", (string)programID, "");
14 }
15 }
16 default
17 {
19 {
20 listenID = llListen(1, "", NULL_KEY, "");
21 llSetText(llGetObjectName(), <1,1,1>, 1);
22 }
23
24 on_rez(integer startup_param)
25 {
27 }
28
29 listen(integer channel, string name,
30 key id, string message)
31 {
32 if(llGetOwner() == (key)message)
33 {
34 //Only register if the new TV isn't
35 //in the list of TVs
36 if(llListFindList(teeVees, [id]) == -1)
37 {
38 llWhisper(0, "Registering TV: " + (string)id);
39 teeVees += id; //Register TV in List
40 }
41 //Update the TV with the notecard
42 updateTV(llGetListLength(teeVees) - 1);
43 }
44 }
45
46 changed(integer change)
47 {
48 integer x;
49
50 if(change == CHANGED_INVENTORY)
51 {
52 string notecardName =
54 llWhisper(0, "Processing Notecard: " + notecardName);
55 programID = llGetInventoryKey(notecardName);
56 llRemoveInventory(notecardName);
57
58 //Loop through all the registered TVs
59 for (x = 0; x < llGetListLength(teeVees); x += 1)
60 {
61 updateTV(x);
62 }
63 }
64 }
65 }
66 // END //

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