Copy and paste the script:
list urls;
default
{
state_entry()
{
urls+= ["http://www.sciencemuseum.org.uk/images/I030/10297676.aspx"];
urls+= ["http://www.sciencemuseum.org.uk/images/I032/10303265.aspx"];
urls+= ["http://www.sciencemuseum.org.uk/images/I032/10303266.aspx"];
'
urls+= ["http://www.youtube.com/profile_videos?user=BenjaKepler" ];
}
touch_start(integer total_number)
{
integer entry;
string webPage;
for(entry = 0;
entry < llGetListLength(urls);
entry++)
{
webPage = llList2String(urls,entry);
llParcelMediaCommandList([PARCEL_MEDIA_COMMAND_URL,
webPage]);
llSleep(5);
}
}
}
Categories: Scripting · Tutorials
Copy and paste the script:
// Title: Music Streams
//
//
integer dialogChannel = 19242; // dialog channel
list stationMenu;
list streams;
string stationURL;
init()
{
llListen(dialogChannel, “”, NULL_KEY, “”); // listen for dialog answers
llSetTouchText(“Music”);
//
stationMenu = ["Radio Nigel","Club","Demented","80s","Top 500"];
streams = ["http://stream.radionigel.com:8020/"]; // Radio Nigel
streams+= ["http://scfire-chi0l-2.stream.aol.com:80/stream/1065"]; // Club
streams+= ["http://64.202.98.102:8000"]; // Demented radio
streams+= ["http://scfire-dll-aa01.stream.aol.com:80/stream/1040"]; // 80s
streams+= ["http://scfire-dll-aa01.stream.aol.com:80/stream/1074"]; // Top 500
}
default
{
state_entry()
{
init();
}
on_rez(integer start_param)
{
init();
}
touch(integer touchCounter)
{
llDialog(llDetectedKey(0), “Click a button to choose a different internet radio station”, stationMenu, dialogChannel); // present dialog on click
}
listen(integer channel, string name, key id, string chosenStation)
{
if(channel == dialogChannel){
integer place;
place = llListFindList(stationMenu,[chosenStation]);
stationURL = llList2String(streams, place);
llSetParcelMusicURL(stationURL);
llSetText(“Now playing ” + chosenStation + “\n” + stationURL,<1,0,0>,1.0);
} // end if
}// end listen
}
Categories: Scripting · Tutorials
Copy and paste the script:default
{
state_entry()
{
llListen(42,"",llGetOwner(),"");
}
listen(integer channel,string name,key id,string message)
{
if(message == "open") llSetPrimitiveParams([PRIM_PHANTOM,TRUE]);
if(message == "close") llSetPrimitiveParams([PRIM_PHANTOM,FALSE]);
}
}
Categories: Building · Scripting · Tutorials
Copy and paste the script:-
string previously_Welcomed;
default
{
touch_start(integer total_number)
{
llSetTimerEvent(30);
}
collision(integer numDetected)
{
if(llDetectedName(0) != previously_Welcomed)
{
previously_Welcomed=llDetectedName(0);
llSay(0,"Welcome " + llDetectedName(0));
}
}
timer()
{
previously_Welcomed = "";
}
}
Categories: Building · Scripting · Tutorials
Copy and paste the script:-
float sun_height;
vector sun_position;
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llSetTimerEvent(600.0);
}
timer()
{
sun_position = llGetSunDirection();
sun_height = sun_position.z;
if(sun_height < 0.0)
{
llSetPrimitiveParams([PRIM_FULLBRIGHT,
ALL_SIDES,
TRUE]);
}
else
{
llSetPrimitiveParams([PRIM_FULLBRIGHT,
ALL_SIDES,
FALSE]);
}
}
}
Categories: Building · Scripting · Tutorials
Copy and paste the script:-
// Title: British Birdsongs
// Written: 11/04/2007
// Comments:
//
//
//
string version = "version: 1.00"; // change for each version
list listSongs;
integer counter;
integer songCount;
integer song;
//
// GMT time display in HH:MM format
//
float seconds;
float hours;
float minutes;
integer hh;
integer mm;
integer ss;
string HH;
string MM;
string hhmm()
{
seconds = llGetGMTclock();
hours = (seconds/3600);
hh = (integer)hours;
HH = (string)hh;
if(hh < 10) HH = "0" + HH;
minutes = (hours - (integer)hours) * 60;
mm = (integer)minutes;
MM = (string)mm;
if(mm ";
}
//
zzDisplay(list out) { // output debug info
llOwnerSay(llList2CSV(out));
}
// global initialization function.
//
init()
{
llOwnerSay(hhmm() + version);
llSetObjectDesc(version);
//
listSongs = [];
songCount = llGetInventoryNumber(INVENTORY_SOUND);
for(counter=0;counter < songCount;counter++){
listSongs += llGetInventoryName(INVENTORY_SOUND,counter);
}
llSetTimerEvent(11);
}
default
{
state_entry()
{
init();
}
on_rez(integer start_param)
{
init();
}
timer()
{
song = (integer)llFrand(songCount);
llPlaySound(llList2String(listSongs,song),1.0);
}
}
Categories: Scripting · Tutorials
Copy and paste the script:
default
{
state_entry()
{
}
touch_start(integer touchCounter)
{
string fullname = llDetectedName(0);
key avatarKey = llDetectedKey(0);
vector size = llGetAgentSize(avatarKey);
float height = size.z;
llSay(0,fullname + " you are " + (string)height + " metres tall");
}
}
Categories: Scripting · Tutorials
Copy and paste the script:
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llSetPrimitiveParams([PRIM_PHANTOM,TRUE]);
llSleep(5.0);
llSetPrimitiveParams([PRIM_PHANTOM,FALSE]);
}
}
Categories: Building · Scripting · Tutorials
1. A single animation
Script:
default
{
state_entry()
{
}
touch_start(integer total_number)
{
llRequestPermissions(llDetectedKey(0),PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions( integer perm )
{
if(PERMISSION_TRIGGER_ANIMATION & perm)
{
llStartAnimation("Dance - Horizon Loop");
}
}
}
2. A choice of dances
Copy and paste the script:
list dances = ["Horizon","Kick"];
string dance_chosen;
key avatar;
default
{
state_entry()
{
}
touch_start(integer total_number)
{
avatar = llDetectedKey(0);
llDialog(avatar,
"Choose a Dance",
dances,
11);
llListen(11,"",NULL_KEY,"");
}
listen(integer channel,
string name,
key id,
string message)
{
dance_chosen = message;
llRequestPermissions(avatar,
PERMISSION_TRIGGER_ANIMATION);
}
run_time_permissions( integer perm )
{
if(PERMISSION_TRIGGER_ANIMATION & perm)
{
llStartAnimation(dance_chosen);
}
}
}
Categories: Scripting · Tutorials
The deck or base for a Sky Deck. Build it and set its Z-value to up in the sky.
Categories: Building · Tutorials