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
Radio Public_Radio_Tuner_Script  

Public_Radio_Tuner_Script

Public Radio Tuner Script.lsl

Category: Radio
By : Angrybeth Shortbread
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Public_Radio_Tuner_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Public_Radio_Tuner_Script_1.lsl
1
2 // Random Tuner by Angrybeth Shortbread - 2005
3 //
4 // Attach this script to an object in your parcel, to randomly change the current
5 // streaming audio track on touch. This script is set to the Soma FM channels.
6 // Change the URL's to your own streams.
7
8 integer voice;
9
10 default
11 {
12 on_rez(integer start_param)
13 {
15 }
16
17
19 {
20 llSay(0, "Touch me for a serendipitous choice of tunes");
21 llOwnerSay("Say radio 1 thru to 6 to change stations, list - to gets stations , or stop - to switch me off");
22 voice = llListen(0, "", NULL_KEY, "");
23 }
24
25 touch_start(integer total_number) // This allows any on to change the music..
26 {
27 state Radio;
28 }
29
30 listen(integer channel, string name, key id, string message) { // this is for the owner only...
31 if(message == "stop")
32 {
34 llSay(0, "No more tunes :(");
35 state default;
36 }
37
38 if(message == "list")
39 {
40
41 llOwnerSay("radio 1 for Groove Salad.");
42 llOwnerSay("radio 2 for Drone Zone.");
43 llOwnerSay("radio 3 for cliqhop.");
44 llOwnerSay("radio 4 for Secret Agent.");
45 llOwnerSay("radio 5 for Indie Pop Rocks!");
46 llOwnerSay("radio 6 for BeatBlender.");
47 state default;
48 }
49
50 if(message == "radio 1")
51 {
52 llSay(0, "..Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM]");
53 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8066");
54 state default;
55 }
56
57 else if(message == "radio 2")
58 {
59 llSay(0, "..Drone Zone: Atmospheric ambient space music. Serve Best Chilled. Safe with most medications. [SomaFM]");
60 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8054");
61 state default;
62 }
63
64 else if(message == "radio 3")
65 {
66 llSay(0, "..<-- cliqhop --> blips'n'bleeps backed w/ beats. broadband. [SomaFM]");
67 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8062");
68 state default;
69 }
70
71 else if(message == "radio 4")
72 {
73 llSay(0, "..Secret Agent: The soundtrack for your stylish, mysterious, dangerous life. For Spys and P.I.'s too! [SomaFM]");
74 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8052");
75 state default;
76 }
77
78 else if(message == "radio 5")
79 {
80 llSay(0, "..SomaFM presents: Indie Pop Rocks! [SomaFM]");
81 llSetParcelMusicURL("http://207.200.96.231:8022");
82 state default;
83 }
84
85 else if(message == "radio 6")
86 {
87 llSay(0, "..BeatBlender: A late night blend of deep-house & downtempo chill [SomaFM]");
88 llSetParcelMusicURL("http://64.124.44.102:8388");
89 state default;
90 }
91
92 }
93 }
94
95 state Radio
96 {
98 {
99 llSay(0, "Tuning in...");
100
101 float FloatValue;
102 integer IntValue;
103 string StringValue;
104
105 FloatValue = llFrand(5);
106 IntValue = llRound(FloatValue);
107 StringValue = (string)IntValue;
108
109 if(StringValue == "0")
110 {
111 llSay(0, "..Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM]");
112 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8066");
113 state default;
114 }
115
116 else if(StringValue == "1")
117 {
118 llSay(0, "..Drone Zone: Atmospheric ambient space music. Serve Best Chilled. Safe with most medications. [SomaFM]");
119 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8054");
120 state default;
121 }
122
123 else if(StringValue == "2")
124 {
125 llSay(0, "..<-- cliqhop --> blips'n'bleeps backed w/ beats. broadband. [SomaFM]");
126 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8062");
127 state default;
128 }
129
130 else if(StringValue == "3")
131 {
132 llSay(0, "..Secret Agent: The soundtrack for your stylish, mysterious, dangerous life. For Spys and P.I.'s too! [SomaFM]");
133 llSetParcelMusicURL("http://somafm-sc.streamguys.com:8052");
134 state default;
135 }
136
137 else if(StringValue == "4")
138 {
139 llSay(0, "..SomaFM presents: Indie Pop Rocks! [SomaFM]");
140 llSetParcelMusicURL("http://207.200.96.231:8022");
141 state default;
142 }
143
144 else if(StringValue == "5")
145 {
146 llSay(0, "..BeatBlender: A late night blend of deep-house & downtempo chill [SomaFM]");
147 llSetParcelMusicURL("http://204.15.0.150:80");
148 state default;
149 }
150
151
152 }
153 }// END //

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