clockwerk-opensim-config

Subversion Repositories:
Compare Path: Rev
With Path: Rev
?path1? @ 8  →  ?path2? @ 9
/assets/ScriptsAssetSet/GrafittiBoard.lsl
@@ -0,0 +1,74 @@
// Grafitti board 0.0.2 for OpenSim
// By Justin Clark-Casey (justincc)
// http://justincc.wordpress.com
 
// This script is available under the BSD License
 
string text = "";
 
integer LISTENING_CHANNEL = 43;
 
// XXX Only putting this here as well to get around OpenSim's int -> string casting oddness
string LISTENING_CHANNEL_STRING = "43";
 
// FIXME: Should be dynamic!
integer CHARS_WIDTH = 42;
 
// Add some additional graffiti
addGraffiti(string message)
{
while (llStringLength(message) > CHARS_WIDTH)
{
text += "\n\n" + llGetSubString(message, 0, CHARS_WIDTH - 1);
message = llDeleteSubString(message, 0, CHARS_WIDTH - 1);
}
text += "\n\n" + message;
}
 
// Clear the existing graffiti
clearGraffiti()
{
text = "";
}
 
// Actually fires the graffiti out to the dynamic texture module
draw()
{
//llSay(0, text);
string drawList = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text " + text + ";";
 
osSetDynamicTextureData("", "vector", drawList, "1024", 0);
}
 
default
{
state_entry()
{
llSetText(
"Say /" + LISTENING_CHANNEL_STRING + " <message> to add text."
+ " Say /" + LISTENING_CHANNEL_STRING
+ " !clear to clear board",
<0.0, 1.0, 0.0>, 1.0);
llListen(LISTENING_CHANNEL, "", NULL_KEY, "");
addGraffiti("justincc's graffiti board v0.0.2");
addGraffiti("Now with primitive word wrap!");
draw();
}
listen(integer channel, string name, key id, string message)
{
if (message == "!clear")
{
clearGraffiti();
}
else
{
addGraffiti(message);
}
draw();
}
}
/assets/ScriptsAssetSet/KanEd-Test01.lsl
@@ -0,0 +1,13 @@
default
{
state_entry()
{
llSay( 0, "Hello, Avatar!");
}
 
touch_start(integer total_number)
{
llSay( 0, "Touched.");
}
}
 
/assets/ScriptsAssetSet/KanEd-Test02.lsl
@@ -0,0 +1,31 @@
integer counter;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar! Touch to change color and size.");
counter = 0;
}
 
touch_start(integer total_number)
{ // do these instructions when the object is touched.
counter = counter + 1;
 
// choose three random RGB color components between 0. and 1.0.
float redness = llFrand( 1.0 );
float greenness = llFrand( 1.0 );
float blueness = llFrand( 1.0 );
 
// combine color components into a vector and use that vector
// to set object color.
vector prim_color = < redness, greenness, blueness >;
llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
 
// choose a random number between 0. and 10. for use as a scale factor.
float new_scale = llFrand(10.0) + 1.0;
llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
llSay( 0, "Touched by angel number " + (string)counter);
}
}
 
/assets/ScriptsAssetSet/KanEd-Test03.lsl
@@ -0,0 +1,49 @@
integer counter;
integer second;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar! Touch to change color and size.");
counter = 0;
}
 
touch_start(integer total_number)
{
counter = counter + 1;
llSay( 0, "Touched by angel number " + (string)counter);
 
llSetTimerEvent( 2 ); // create a "timer event" every 2 seconds.
}
 
timer() // do these instructions every time the timer event occurs.
{
second++;
// choose three random RGB color components between 0. and 1.0.
float red = llFrand( 1.0 );
float green = llFrand( 1.0 );
float blue = llFrand( 1.0 );
// combine color components into a vector and use that vector
// to set object color.
vector prim_color = < red, green, blue >;
llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
// a choose random number between 0. and 10 for use as a scale factor.
float new_scale = llFrand( 10.0 );
llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
if ( second > 19 ) // then time to wrap this up.
{
// turn object black, print "resting" message, and reset object....
llSetColor( < 0, 0, 0 >, ALL_SIDES );
llSay( 0, "Object now resting and resetting script." );
llResetScript(); // return object to ready state.
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test04.lsl
@@ -0,0 +1,51 @@
integer counter;
integer second;
vector startPosition;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar! Touch to change position.");
counter = 0;
startPosition = llGetPos();
}
 
touch_start(integer total_number)
{
counter = counter + 1;
llSay( 0, "Touched by angel number " + (string)counter);
 
llSetTimerEvent( 1 ); // arrange for a "timer event" every second.
}
 
timer() // do these instructions every time the timer event occurs.
{
second++;
 
// choose three random distances between 0. and 10.0.
float X_distance = llFrand( 10.0 );
float Y_distance = llFrand( 10.0 );
float Z_distance = llFrand( 10.0 );
// combine these distance components into a vector and use it
// to increment the starting position and reposition the object.
vector increment = < X_distance, Y_distance, Z_distance >;
vector newPosition = startPosition + increment;
llSetPos( newPosition ); // reposition object.
if ( second > 19 ) // then time to wrap this up.
{
// move object back to starting position...
while ( llVecDist( llGetPos(), startPosition ) > 0.001)
{
llSetPos( startPosition );
}
llSay( 0, "Object now resting and resetting script." );
llResetScript(); // return object to ready state.
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test05.lsl
@@ -0,0 +1,30 @@
default
{
state_entry()
{
llSay( 0, "Hello, Avatar!");
vector startPoint = llGetPos();
}
 
touch_start(integer total_number)
{
llSay( 0, "Touched." );
 
// Define a rotation of 10 degrees around the Y-axis.
rotation Y_10 = llEuler2Rot( < 0, 10 * DEG_TO_RAD, 0 > );
// now rotate the object 10 degrees in the X-Z plane during
// each loop iteration. note that each call to llSetRot
// causes a .2 second delay.
integer i;
for( i = 1; i < 100; i++ )
{
// rotate object in the X-Z plane around its own Y-axis.
rotation newRotation = llGetRot() * Y_10;
 
llSetRot( newRotation );
}
llSay( 0, "Rotation stopped" );
}
}
 
/assets/ScriptsAssetSet/KanEd-Test06.lsl
@@ -0,0 +1,8 @@
default
{
state_entry()
{
llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
}
}
 
/assets/ScriptsAssetSet/KanEd-Test07.lsl
@@ -0,0 +1,38 @@
vector rotationCenter;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar!");
vector startPoint = llGetPos();
rotationCenter = startPoint + < 3, 3, 3 >;
// distance to the point of rotation should probably be a
// function of the max dimension of the object.
}
 
touch_start(integer total_number)
{
llSay( 0, "Touched." );
 
// Define a "rotation" of 10 degrees around the z-axis.
rotation Z_15 = llEuler2Rot( < 0, 0, 15 * DEG_TO_RAD > );
integer i;
for( i = 1; i < 100; i++ ) // limit simulation time in case of
{ // unexpected behavior.
vector currentPosition = llGetPos();
 
vector currentOffset = currentPosition - rotationCenter;
// rotate the offset vector in the X-Y plane around the
// distant point of rotation.
vector rotatedOffset = currentOffset * Z_15;
vector newPosition = rotationCenter + rotatedOffset;
 
llSetPos( newPosition );
}
llSay( 0, "Orbiting stopped" );
}
}
 
/assets/ScriptsAssetSet/KanEd-Test08.lsl
@@ -0,0 +1,23 @@
default
{
state_entry()
{
llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
llSetStatus( 1, TRUE ); // turn on physics.
}
 
touch_start(integer total_number)
{
vector start_color = llGetColor( ALL_SIDES ); // save current color.
llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
float objMass = llGetMass();
float Z_force = 20.0 * objMass;
llApplyImpulse( < 0.0, 0.0, Z_force >, FALSE );
llSay( 0, "Impulse of " + (string)Z_force + " applied." );
llSetColor( start_color , ALL_SIDES ); // set color to green.
}
}
 
/assets/ScriptsAssetSet/KanEd-Test09.lsl
@@ -0,0 +1,71 @@
vector startPos;
vector curPos;
vector curForce;
integer second;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
llSetStatus( 1, TRUE );
startPos = < 0, 0, 0 >;
}
touch_start(integer total_number)
{
startPos = llGetPos();
curPos = startPos;
curForce = < 0, 0, 0 >;
second = 0;
llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
float objMass = llGetMass();
float Z_force = 10.2 * objMass;
llSetForce( < 0.0, 0.0, Z_force >, FALSE );
llSay( 0, "Force of " + (string)Z_force + " being applied." );
llSetTimerEvent(1);
}
timer()
{
second++;
curPos = llGetPos();
float curDisplacement = llVecMag( curPos - startPos );
if( ( curDisplacement > 30. ) && // then object is too far away, and
( llGetForce() != < 0.0, 0.0, 0.0 > ) ) // force not already zero,
{ // then let gravity take over, and change color to green.
llSetForce( < 0.0, 0.0, 0.0 >, FALSE );
llSetColor( < 0, 1.0, 0 >, ALL_SIDES );
llSay( 0, "Force removed; object in free flight." );
}
if ( second > 19 ) // then time to wrap this up.
{
// turn object blue and zero force to be safe....
llSetColor( < 0, 0, 1.0 >, ALL_SIDES ); // change color to blue.
llSetForce( < 0, 0, 0 >, FALSE );
 
// ...move object back to starting position...
// ...after saving current status of Physics attribute.
integer savedStatus = llGetStatus( 1 );
llSetStatus( 1, FALSE ); // turn physics off.
while ( llVecDist( llGetPos(), startPos ) > 0.001)
{
llSetPos( startPos );
}
llSetStatus( 1, savedStatus ); // restore Physics status.
//...and then turn color to black and Reset the script.
llSetColor( < 1, 1, 1 >, ALL_SIDES );
llSetTimerEvent( 0 ); // turn off timer events.
llSay( 0, "Done and resetting script." );
llResetScript(); // return object to ready state.
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test10.lsl
@@ -0,0 +1,57 @@
vector startPosition;
float groundLevel;
default
{
state_entry()
{
llListen( 0, "", llGetOwner(), "");
 
startPosition = llGetPos();
groundLevel = llGround( startPosition );
llSay( 0, "Control this object with chat commands like:" );
llSay( 0, "'up' or 'down' followed by a distance." );
}
listen( integer channel, string name, key id, string message )
{
// separate the input into blank-delmited tokens.
list parsed = llParseString2List( message, [ " " ], [] );
 
// get the first part--the "command".
string command = llList2String( parsed, 0 );
// get the second part--the "distance".
string distance_string = llList2String( parsed, 1 );
float distance = ( float )distance_string;
vector position = llGetPos();
if( command == "up" )
{
if( ( position.z + distance ) < (startPosition.z + 10.0 ) )
{
llSetPos( llGetPos() + < 0, 0, distance > ); // move up
llSetText( "Went up " + (string)distance, < 1, 0, 0 >, 1 );
}
else
{
llSetText( "Can't go so high.", < 1, 0, 0 >, 1 );
}
}
else if( command == "down" )
{
if( ( position.z - distance ) > groundLevel )
{
llSetPos( llGetPos() + < 0, 0, -distance > ); // move down
llSetText( "Went down " + (string)distance, < 1, 0, 0 >, 1 );
}
else
{
llSetText( "Can't go so low.", < 1, 0, 0 >, 1 );
}
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test11.lsl
@@ -0,0 +1,52 @@
integer dialog_channel= 427; // set a dialog channel
list menu = [ "Go up", "Go down" ];
vector startPosition;
float groundLevel;
 
default
{
state_entry()
{
// arrange to listen for dialog answers (from multiple users)
llListen( dialog_channel, "", NULL_KEY, "");
 
startPosition = llGetPos();
groundLevel = llGround( startPosition );
}
touch_start(integer total_number)
{
llDialog( llDetectedKey( 0 ), "What do you want to do?", menu,
dialog_channel );
}
listen(integer channel, string name, key id, string choice )
{
vector position = llGetPos();
// if a valid choice was made, implement that choice if possible.
// (llListFindList returns -1 if choice is not in the menu list.)
if ( llListFindList( menu, [ choice ]) != -1 )
{
if ( choice == "Go up" )
{
if( position.z < ( startPosition.z + 10.0 ) )
{
llSetPos( llGetPos() + < 0, 0, 1.0 > ); // move up
}
}
else if( choice == "Go down" )
{
if( position.z > ( groundLevel + 1.0 ) )
{
llSetPos( llGetPos() + < 0, 0, -1.0 > ); // move down
}
}
}
else
{
llSay( 0, "Invalid choice: " + choice );
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test12.lsl
@@ -0,0 +1,46 @@
vector startPosition;
float groundLevel;
 
default
{
state_entry()
{
// get permission to take over the avatar's control inputs.
llRequestPermissions( llGetOwner(), PERMISSION_TAKE_CONTROLS );
startPosition = llGetPos();
groundLevel = llGround( startPosition );
}
 
run_time_permissions( integer perm ) // event for processing
// permission dialog.
{
if ( perm & PERMISSION_TAKE_CONTROLS ) // permission has been given.
{
// go ahead and take over the forward and backward controls.
llTakeControls( CONTROL_FWD | CONTROL_BACK, TRUE, FALSE );
}
}
control( key id, integer held, integer change ) // event for processing
// key press.
{
vector position = llGetPos();
if ( change & held & CONTROL_FWD )
{ // the "move forward" control has been activated.
if( position.z < (startPosition.z + 10.0) )
{
llSetPos( llGetPos() + < 0, 0, 1.0 >); // move up
}
}
else if ( change & held & CONTROL_BACK )
{ // the "move backward" key has been activated.
if( position.z > groundLevel + 1.0 )
{
llSetPos( llGetPos() + < 0, 0, -1.0 >); // move down
}
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test13.lsl
@@ -0,0 +1,16 @@
default
{
state_entry()
{
llSay( 0, "Hello, Avatar!");
}
 
touch_start(integer total_number)
{
llSay( 0, "Touched.");
llRezObject("Object1", llGetPos() + < 0, 0, 2 >, ZERO_VECTOR,
ZERO_ROTATION, 42);
}
}
 
/assets/ScriptsAssetSet/KanEd-Test14.lsl
@@ -0,0 +1,70 @@
integer createdObjectCounter;
integer linkedObjectCounter;
 
default
{
state_entry()
{
llSay( 0, "Hello, Avatar!");
linkedObjectCounter = 0; // zero the linked object counter.
}
 
touch_start(integer total_number)
{
if( createdObjectCounter <= 0 ) // nothing has yet been linked,
{ // begin object creation sequence...
// ask for permissions now, since it will be too late later.
llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
}
else // just do whatever should be done upon touch without
{ // creating new objects to link.
// insert commands here to respond to a touch.
}
}
run_time_permissions( integer permissions_granted )
{
if( permissions_granted == PERMISSION_CHANGE_LINKS )
{ // create 2 objects.
llRezObject("Object1", llGetPos() + < 1, 0, 2 >,
ZERO_VECTOR, ZERO_ROTATION, 42);
createdObjectCounter = createdObjectCounter + 1;
 
llRezObject("Object1", llGetPos() + < -1, 0, 2 >,
ZERO_VECTOR, ZERO_ROTATION, 42);
createdObjectCounter = createdObjectCounter + 1;
 
}
else
{
llOwnerSay( "Didn't get permission to change links." );
return;
}
}
object_rez( key child_id )
{
llOwnerSay( "rez happened and produced object with key " +
(string)child_id );
// link as parent to the just created child.
llCreateLink( child_id, TRUE );
// if all child objects have been created then the script can
// continue to work as a linked set of objects.
linkedObjectCounter++;
if( linkedObjectCounter >= 2 )
{
// Change all child objects in the set to red (including parent).
llSetLinkColor( LINK_ALL_CHILDREN, < 1, 0, 0 >, ALL_SIDES );
// Make child object "2" half-tranparent.
llSetLinkAlpha( 2, .5, ALL_SIDES );
 
// Insert commands here to manage subsequent activity of the
// linkset, like this command to rotate the result:
// llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
}
}
}
 
/assets/ScriptsAssetSet/KanEd-Test15.lsl
@@ -0,0 +1,10 @@
default
{
state_entry()
{
llSetStatus(STATUS_PHANTOM,TRUE);
llSetTexture("lit_texture", ALL_SIDES);
llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 15.0);
}
}
 
/assets/ScriptsAssetSet/KanEd-Test16.lsl
@@ -0,0 +1,66 @@
// This is a script designed to orbit its owner.
vector startPos;
vector curPos;
 
vector offset; // offset from Agent
integer iteration;
float rotationRate; // degrees of rotation per iteration
float sensorInterval; // seconds between sensor scan.
 
default
{
state_entry()
{
llOwnerSay( "Hello, Avatar! Touch to start orbiting." );
llSetStatus( 1, FALSE ); // turn Physics off.
offset = < 2, 2, 1 >;
iteration = 0;
rotationRate = .5;
sensorInterval = .3;
}
 
touch_start(integer total_number)
{
startPos = llGetPos();
curPos = startPos;
llSleep( .1 );
 
key id = llGetOwner();
llSensorRepeat( "", id, AGENT, 96, PI, sensorInterval );
}
 
sensor(integer total_number)
{
iteration++;
 
if( iteration > 300 )
{
llResetScript();
}
 
if( llDetectedOwner( 0 ) == llGetOwner() )
{ // the detected Agent is my owner.
vector position = llDetectedPos(0); // find Owner position.
 
// calculate next object position relative both to the Owner's
// position and the current time interval counter. That is,
// use the iteration counter to define a rotation, multiply
// the rotation by the constant offset to get a rotated offset
// vector, and add that rotated offset to the current position
// to defne the new position.
float degreeRotation = llRound( rotationRate * iteration ) % 360;
rotation Rotation =
llEuler2Rot( < 0, 0, degreeRotation * DEG_TO_RAD > );
vector rotatedOffset = offset * Rotation;
position += rotatedOffset;
// change the location of the object and save the current (rotated)
// offset for use during the next iteration.
llSetPos( position );
offset = rotatedOffset;
}
}
}
 
/assets/ScriptsAssetSet/ScriptsAssetSet.xml
@@ -0,0 +1,243 @@
<Nini>
<Section Name="llAbs">
<Key Name="assetID" Value="3b055e3f-b19d-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAbs" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAbs.lsl" />
</Section>
<Section Name="llAcos">
<Key Name="assetID" Value="6519bf39-b19f-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAcos" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAcos.lsl" />
</Section>
<Section Name="llAddToLandBanList">
<Key Name="assetID" Value="7ceba3f1-b1a0-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAddToLandBanList" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAddToLandBanList.lsl" />
</Section>
<Section Name="llAddToLandPassList">
<Key Name="assetID" Value="609047e7-b390-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAddToLandPassList" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAddToLandPassList.lsl" />
</Section>
<Section Name="llAdjustSoundVolume">
<Key Name="assetID" Value="56df4bcd-b393-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAdjustSoundVolume" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAdjustSoundVolume.lsl" />
</Section>
<Section Name="llAllowInventoryDrop">
<Key Name="assetID" Value="54d6962d-b394-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAllowInventoryDrop" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAllowInventoryDrop.lsl" />
</Section>
<Section Name="llAngleBetween">
<Key Name="assetID" Value="6b341609-b34e-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAngleBetween" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAngleBetween.lsl" />
</Section>
<Section Name="llAsin">
<Key Name="assetID" Value="7e7422ed-b425-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAsin" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAsin.lsl" />
</Section>
<Section Name="llAtan2">
<Key Name="assetID" Value="7e7422ef-b425-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAtan2" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAtan2.lsl" />
</Section>
<Section Name="llApplyImpulse">
<Key Name="assetID" Value="714ec679-b419-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llApplyImpulse" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llApplyImpulse.lsl" />
</Section>
<Section Name="llAvatarOnSitTarget">
<Key Name="assetID" Value="579fc821-b426-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llAvatarOnSitTarget" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llAvatarOnSitTarget.lsl" />
</Section>
<Section Name="llBase64ToString">
<Key Name="assetID" Value="1d4c71d9-b428-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llBase64ToString" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llBase64ToString.lsl" />
</Section>
<Section Name="llRemoveFromLandBanList">
<Key Name="assetID" Value="299b2101-b392-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llRemoveFromLandBanList" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llRemoveFromLandBanList.lsl" />
</Section>
<Section Name="llRemoveFromLandPassList">
<Key Name="assetID" Value="299b2103-b392-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llRemoveFromLandPassList" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llRemoveFromLandPassList.lsl" />
</Section>
<Section Name="llResetLandBanList">
<Key Name="assetID" Value="366ac8e7-b391-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llResetLandBanList" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llResetLandBanList.lsl" />
</Section>
<Section Name="llSay">
<Key Name="assetID" Value="366ac8e9-b391-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llSay" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llSay.lsl" />
</Section>
<Section Name="llSetParcelMusicURL">
<Key Name="assetID" Value="3603a4f8-b360-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llSetParcelMusicURL" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llSetParcelMusicURL.lsl" />
</Section>
<Section Name="llSetRot">
<Key Name="assetID" Value="220baef9-b376-11dc-8314-0800200c9a66" />
<Key Name="name" Value="llSetRot" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="llSetRot.lsl" />
</Section>
<Section Name="osTextBoard">
<Key Name="assetID" Value="2ddcb059-20c5-d169-4c42-673f16d3284b" />
<Key Name="name" Value="osTextBoard" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="osTextBoard.lsl" />
</Section>
<Section Name="osWeatherMap">
<Key Name="assetID" Value="d63ad3ec-b687-6c38-410d-31ba3e50ce4d" />
<Key Name="name" Value="osWeatherMap" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="osWeatherMap.lsl" />
</Section>
<Section Name="GrafittiBoard">
<Key Name="assetID" Value="81305ee4-8caa-9e0a-69a4-76ed57df0c8f" />
<Key Name="name" Value="GrafittiBoard" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="GrafittiBoard.lsl" />
</Section>
<!-- Adding the Kan-ED tests to the Assets -->
 
<Section Name="Kan-Ed Test1">
<Key Name="assetID" Value="42b6ac70-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test1" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test01.lsl" />
</Section>
<Section Name="Kan-Ed Test2">
<Key Name="assetID" Value="42b6ac71-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test2" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test02.lsl" />
</Section>
 
<Section Name="Kan-Ed Test3">
<Key Name="assetID" Value="42b6ac72-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test3" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test03.lsl" />
</Section>
 
<Section Name="Kan-Ed Test4">
<Key Name="assetID" Value="42b6ac73-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test4" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test04.lsl" />
</Section>
 
<Section Name="Kan-Ed Test5">
<Key Name="assetID" Value="42b6ac74-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test5" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test05.lsl" />
</Section>
 
<Section Name="Kan-Ed Test6">
<Key Name="assetID" Value="42b6ac75-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test6" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test06.lsl" />
</Section>
 
<Section Name="Kan-Ed Test7">
<Key Name="assetID" Value="42b6ac76-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test7" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test07.lsl" />
</Section>
 
<Section Name="Kan-Ed Test8">
<Key Name="assetID" Value="42b6ac77-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test8" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test08.lsl" />
</Section>
 
<Section Name="Kan-Ed Test9">
<Key Name="assetID" Value="42b6ac78-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test9" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test09.lsl" />
</Section>
 
<Section Name="Kan-Ed Test10">
<Key Name="assetID" Value="42b6ac79-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test10" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test10.lsl" />
</Section>
 
<Section Name="Kan-Ed Test11">
<Key Name="assetID" Value="42b6ac7a-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test11" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test11.lsl" />
</Section>
 
<Section Name="Kan-Ed Test12">
<Key Name="assetID" Value="42b6ac7b-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test12" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test12.lsl" />
</Section>
 
<Section Name="Kan-Ed Test13">
<Key Name="assetID" Value="42b6ac7c-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test13" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test13.lsl" />
</Section>
 
<Section Name="Kan-Ed Test14">
<Key Name="assetID" Value="42b6ac7d-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test14" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test14.lsl" />
</Section>
 
<Section Name="Kan-Ed Test15">
<Key Name="assetID" Value="42b6ac7e-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test15" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test15.lsl" />
</Section>
 
<Section Name="Kan-Ed Test16">
<Key Name="assetID" Value="42b6ac7f-d21f-11dd-ad8b-0800200c9a66" />
<Key Name="name" Value="Kan-Ed Test16" />
<Key Name="assetType" Value="10" />
<Key Name="fileName" Value="KanEd-Test16.lsl" />
</Section>
 
</Nini>
/assets/ScriptsAssetSet/llAbs.lsl
@@ -0,0 +1,7 @@
default
{
state_entry()
{
llOwnerSay("The absolute value of -4 is: "+(string)llAbs(-4) );
}
}
/assets/ScriptsAssetSet/llAcos.lsl
@@ -0,0 +1,8 @@
default
{
state_entry()
{
float r = llFrand(2) - 1.0;
llOwnerSay("The arccosine of " + (string)r + " is " + llAcos(r));
}
}
/assets/ScriptsAssetSet/llAddToLandBanList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llAddToLandPassList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llAdjustSoundVolume.lsl
@@ -0,0 +1,13 @@
default
{
state_entry()
{
llListen(42, "", llGetOwner(), "");
}
listen(integer chan, string name, key id, string msg)
{
float value = (float)msg;
llAdjustSoundVolume(value);
llOwnerSay("Volume set to: " + (string)value + " of 1.0");
}
}
/assets/ScriptsAssetSet/llAllowInventoryDrop.lsl
@@ -0,0 +1,17 @@
integer allow;
 
default
{
touch_start(integer num)
{
llAllowInventoryDrop(allow = !allow);
llOwnerSay("llAllowInventoryDrop == "+llList2String(["FALSE","TRUE"],allow));
}
changed(integer change)
{
if (change & CHANGED_ALLOWED_DROP) //note that it's & and not &&... it's bitwise!
{
llOwnerSay("The inventory has changed as a result of a user without mod permissions dropping an item on the prim and it being allowed by the script.");
}
}
}
/assets/ScriptsAssetSet/llAngleBetween.lsl
@@ -0,0 +1,11 @@
default
{
state_entry()
{
rotation aRot = ZERO_ROTATION;
rotation bRot = llGetRot();
float aBetween = llAngleBetween( aRot, bRot );
llOwnerSay((string)aBetween);
//llGetRot() being < 0, 0, 90 > this should report 1.570796
}
}
/assets/ScriptsAssetSet/llApplyImpulse.lsl
@@ -0,0 +1,16 @@
//Rez an object, and drop this script in it.
//This will launch it at the owner.
default
{
state_entry()
{
list p = llGetObjectDetails(llGetOwner(), [OBJECT_POS]);
if(p != [])
{
llSetStatus(STATUS_PHYSICS, TRUE);
vector pos = llList2Vector(p, 0);
vector direction = llVecNorm(pos - llGetPos());
llApplyImpulse(direction * 100, 0);
}
}
}
/assets/ScriptsAssetSet/llAsin.lsl
@@ -0,0 +1,9 @@
// Touch the object with this script in it to see the arcsine of random numbers!
default
{
touch_start(integer num)
{
float r = llFrand(2) - 1.0;
llOwnerSay("The arcsine of " + (string)r + " is " + llAsin(r));
}
}
/assets/ScriptsAssetSet/llAtan2.lsl
@@ -0,0 +1,11 @@
default
{
state_entry()
{
float num1 = llFrand(100.0);
float num2 = llFrand(100.0);
llOwnerSay("y = " + (string)num1);
llOwnerSay("x = " + (string)num2);
llOwnerSay("The tangent of y divided by x is " + (string)llAtan2(num1, num2));
}
}
/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl
@@ -0,0 +1,20 @@
default
{
state_entry()
{
// set sit target, otherwise this will not work
llSitTarget(<0.0, 0.0, 0.1>, ZERO_ROTATION);
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key av = llAvatarOnSitTarget();
//evaluated as true if not NULL_KEY or invalid
if (av)
{
llSay(0, "Hello " + llKey2Name(av) + ", thank you for sitting down");
}
}
}
}
/assets/ScriptsAssetSet/llBase64ToString.lsl
@@ -0,0 +1,8 @@
default
{
state_entry()
{
string test = llBase64ToString("U2VjcmV0Ok9wZW4=");
llOwnerSay(test);
}
}
/assets/ScriptsAssetSet/llRemoveFromLandBanList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llRemoveFromLandPassList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llResetLandBanList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llResetLandPassList.lsl
@@ -0,0 +1,84 @@
//Commands are:
///5 ban:full_avatar_name
///5 tempban:full_avatar_name
///5 unban:full_avatar_name
///5 pass:full_avatar_name
///5 unpass:full_avatar_name
///5 clearban
///5 clearpass
 
string command;
 
default
{
state_entry()
{
llListen(5, "", llGetOwner(), "");
}
on_rez(integer param)
{
llResetScript();
}
 
listen(integer chan, string name, key id, string message)
{
if (command != "")
{
llOwnerSay("Sorry, still processing last command, try again in a second.");
}
list args = llParseString2List(message,[":"],[]);
command = llToLower(llList2String(args,0));
if (command == "clearbans")
{
llResetLandBanList();
}
if (command == "clearpass")
{
llResetLandPassList();
}
else
{
llSensor(llList2String(args,1),NULL_KEY,AGENT,96,PI);
}
}
no_sensor()
{
command = "";
}
sensor(integer num)
{
integer i;
for (i=0; i< num; ++i)
{
if (command == "ban")
{
// Ban indefinetely
llAddToLandBanList(llDetectedKey(i),0.0);
}
if (command == "tempban")
{
// Ban for 1 hour.
llAddToLandBanList(llDetectedKey(i),1.0);
}
if (command == "unban")
{
llRemoveFromLandBanList(llDetectedKey(i));
}
if (command == "pass")
{
// Add to land pass list for 1 hour
llAddToLandPassList(llDetectedKey(i),1.0);
}
if (command == "unpass")
{
llRemoveFromLandPassList(llDetectedKey(i));
}
}
command = "";
}
}
/assets/ScriptsAssetSet/llSay.lsl
@@ -0,0 +1,7 @@
default
{
state_entry()
{
llSay(0,"This is an incredibly useless program." );
}
}
/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl
@@ -0,0 +1,7 @@
default
{
state_entry()
{
llSetParcelMusicURL("http://www.archive.org/download/Torley_Wong_-_The_Final_Selection/Torley_Wong-Lovers__Dance.mp3");
}
}
/assets/ScriptsAssetSet/llSetRot.lsl
@@ -0,0 +1,13 @@
default
{
state_entry()
{
llOwnerSay("Touch me");
}
touch_start(integer total_number)
{
rotation Y_10 = llEuler2Rot( < 0, 0, 30 * DEG_TO_RAD > );
rotation newRotation = llGetRot() * Y_10;
llSetRot( newRotation );
}
}
/assets/ScriptsAssetSet/osTextBoard.lsl
@@ -0,0 +1,48 @@
string title = "";
string subtitle = "";
string text = "";
string add = "";
integer channel = 0; // if this is >= 0, llSay on that channel on updates
 
push_text()
{
compile_text();
draw_text();
}
 
compile_text()
{
title = "Some Title";
subtitle = "Some subtitle";
 
text = "Plenty of text for the main body.\n";
text += "You need to manual do line breaks\n";
text += "here. No word wrap yet.";
 
add = "Additional text at the bottom";
}
 
draw_text()
{
string drawList = "MoveTo 40,80; PenColour RED; FontSize 48; Text " + title + ";";
drawList += "MoveTo 160,160; FontSize 32; Text " + subtitle + ";";
drawList += "PenColour BLACK; MoveTo 40,220; FontSize 24; Text " + text + ";";
drawList += "PenColour RED; FontName Times New Roman; MoveTo 40,900; Text " + add + ";";
osSetDynamicTextureData("", "vector", drawList, "1024", 0);
}
 
default {
state_entry()
{
push_text();
}
touch_start(integer count)
{
push_text();
if (channel >= 0) {
llSay(channel, text);
}
}
}
/assets/ScriptsAssetSet/osWeatherMap.lsl
@@ -0,0 +1,43 @@
integer count = 0;
integer refreshRate = 300;
string URL1 = "http://icons.wunderground.com/data/640x480/2xus_rd.gif";
string URL2 = "http://icons.wunderground.com/data/640x480/2xus_sf.gif";
string URL3 = "http://icons.wunderground.com/data/640x480/2xus_st.gif";
string dynamicID="";
string contentType="image";
refresh_texture()
{
count++;
string url = "";
integer c = count % 3;
if (c == 0) {
url = URL1;
} else if (c == 1) {
url = URL2;
} else {
url = URL3;
}
// refresh rate is not yet respected here, which is why we need the timer
osSetDynamicTextureURL(dynamicID, contentType ,url , "", refreshRate );
}
default
{
state_entry()
{
refresh_texture();
llSetTimerEvent(refreshRate); // create a "timer event" every 300 seconds.
}
timer()
{
refresh_texture();
}
touch_start(integer times)
{
refresh_texture();
}
}