------------ Script Start -----------------------------
// Random Tuner by Angrybeth Shortbread - 2005
// Modified by Claire Kanno - 2007
// Attach this script to an object in your parcel, to randomly change the current
// streaming audio track on touch. This script is set to the Soma FM channels.
// Change the URL's to your own streams.
// Changed Channels 3,4 and 6 from original because streams have stopped. (effective Apr-21-07, Claire Kanno)
integer voice;
default
{
on_rez(integer start_param)
{
llResetScript();
}
state_entry()
{
llSay(0, "Touch me for a serendipitous choice of tunes"
;llOwnerSay("I also listen to my owner, - say radio 1 thru to 6 to change stations, list - to gets stations , or stop - to switch me off"
;voice = llListen(0, "", llGetOwner(), ""
;}
touch_start(integer total_number) // This allows any on to change the music..
{
state Radio;
}
listen(integer channel, string name, key id, string message) { // this is for the owner only...
if (message == "stop"
{
llSetParcelMusicURL(" "
;llSay(0, "No more tunes
"
;state default;
}
if (message == "list"
{
llOwnerSay("radio 1 for Groove Salad."
;llOwnerSay("radio 2 for Drone Zone."
;llOwnerSay("radio 3 for Oldies"
;llOwnerSay("radio 4 for Radio Linden"
;llOwnerSay("radio 5 for Indie Pop Rocks!"
;llOwnerSay("radio 6 for Smooth Jazz"
;state default;
}
if (message == "radio 1"

{
llSay(0, "..Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM]"
;llSetParcelMusicURL("http://somafm-sc.streamguys.com:8066"
;state default;
}
else if (message == "radio 2"

{
llSay(0, "..Drone Zone: Atmospheric ambient space music. Serve Best Chilled. Safe with most medications. [SomaFM]"
;llSetParcelMusicURL("http://somafm-sc.streamguys.com:8054"
;state default;
}
else if (message == "radio 3"

{
llSay(0, "..Oldies KCSM"
;llSetParcelMusicURL("http://hifi.kcsm.org:8002"
;state default;
}
else if (message == "radio 4"

{
llSay(0, "..Radio Linden"
;llSetParcelMusicURL("http://66.221.51.119:9008"
;state default;
}
else if (message == "radio 5"

{
llSay(0, "..SomaFM presents: Indie Pop Rocks! [SomaFM]"
;llSetParcelMusicURL("http://207.200.96.231:8022"
;state default;
}
else if (message == "radio 6"

{
llSay(0, "Smooth Jazz"
;llSetParcelMusicURL("http://64.236.34.97:80/stream/1005"
;state default;
}
}
}
state Radio
{
state_entry()
{
llSay(0, "Tuning in..."
;float FloatValue;
integer IntValue;
string StringValue;
FloatValue = llFrand(5);
IntValue = llRound(FloatValue);
StringValue = (string)IntValue;
if (StringValue == "0"

{
llSay(0, "..Groove Salad: a nicely chilled plate of ambient beats and grooves. [SomaFM]"
;llSetParcelMusicURL("http://somafm-sc.streamguys.com:8066"
;state default;
}
else if (StringValue == "1"

{
llSay(0, "..Drone Zone: Atmospheric ambient space music. Serve Best Chilled. Safe with most medications. [SomaFM]"
;llSetParcelMusicURL("http://somafm-sc.streamguys.com:8054"
;state default;
}
else if (StringValue == "2"

{
llSay(0, "..Oldies KCSM"
;llSetParcelMusicURL("http://hifi.kcsm.org:8002"
;state default;
}
else if (StringValue == "3"

{
llSay(0, "Radio Linden"
;llSetParcelMusicURL("http://66.221.51.119:9008"
;state default;
}
else if (StringValue == "4"

{
llSay(0, "..SomaFM presents: Indie Pop Rocks! [SomaFM]"
;llSetParcelMusicURL("http://207.200.96.231:8022"
;state default;
}
else if (StringValue == "5"

{
llSay(0, "..Smooth Jazz"
;llSetParcelMusicURL("http://64.236.34.97:80/stream/1005"
;state default;
}
}
}
-------------- Script End ------------------