aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clarke Casey2009-01-12 18:00:46 +0000
committerJustin Clarke Casey2009-01-12 18:00:46 +0000
commitfb8faa8336ddb795ccd6840259b06a2608350a57 (patch)
tree1f4977b9918d416602af88709e15aecf9499b969
parent* Remove FunSLUDP code since this has moved to http://forge.opensimulator.org... (diff)
downloadopensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.zip
opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.gz
opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.bz2
opensim-SC_OLD-fb8faa8336ddb795ccd6840259b06a2608350a57.tar.xz
* Apply http://opensimulator.org/mantis/view.php?id=2913
* Add the KanEd scripts to the standard library * Thanks Fly-Man-
Diffstat (limited to '')
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test01.lsl13
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test02.lsl31
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test03.lsl49
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test04.lsl51
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test05.lsl30
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test06.lsl8
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test07.lsl38
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test08.lsl23
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test09.lsl71
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test10.lsl57
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test11.lsl52
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test12.lsl46
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test13.lsl16
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test14.lsl70
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test15.lsl10
-rw-r--r--bin/assets/ScriptsAssetSet/KanEd-Test16.lsl66
-rw-r--r--bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml118
-rw-r--r--bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml208
18 files changed, 955 insertions, 2 deletions
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl
new file mode 100644
index 0000000..5f8a0aa
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test01.lsl
@@ -0,0 +1,13 @@
1default
2{
3 state_entry()
4 {
5 llSay( 0, "Hello, Avatar!");
6 }
7
8 touch_start(integer total_number)
9 {
10 llSay( 0, "Touched.");
11 }
12}
13
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
new file mode 100644
index 0000000..2506d95
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test02.lsl
@@ -0,0 +1,31 @@
1integer counter;
2
3default
4{
5 state_entry()
6 {
7 llSay( 0, "Hello, Avatar! Touch to change color and size.");
8 counter = 0;
9 }
10
11 touch_start(integer total_number)
12 { // do these instructions when the object is touched.
13 counter = counter + 1;
14
15 // choose three random RGB color components between 0. and 1.0.
16 float redness = llFrand( 1.0 );
17 float greenness = llFrand( 1.0 );
18 float blueness = llFrand( 1.0 );
19
20 // combine color components into a vector and use that vector
21 // to set object color.
22 vector prim_color = < redness, greenness, blueness >;
23 llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
24
25 // choose a random number between 0. and 10. for use as a scale factor.
26 float new_scale = llFrand(10.0) + 1.0;
27 llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
28 llSay( 0, "Touched by angel number " + (string)counter);
29 }
30}
31
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl
new file mode 100644
index 0000000..f371ee9
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test03.lsl
@@ -0,0 +1,49 @@
1integer counter;
2integer second;
3
4default
5{
6 state_entry()
7 {
8 llSay( 0, "Hello, Avatar! Touch to change color and size.");
9 counter = 0;
10 }
11
12 touch_start(integer total_number)
13 {
14 counter = counter + 1;
15
16 llSay( 0, "Touched by angel number " + (string)counter);
17
18 llSetTimerEvent( 2 ); // create a "timer event" every 2 seconds.
19 }
20
21 timer() // do these instructions every time the timer event occurs.
22 {
23 second++;
24
25 // choose three random RGB color components between 0. and 1.0.
26 float red = llFrand( 1.0 );
27 float green = llFrand( 1.0 );
28 float blue = llFrand( 1.0 );
29
30 // combine color components into a vector and use that vector
31 // to set object color.
32 vector prim_color = < red, green, blue >;
33 llSetColor( prim_color, ALL_SIDES ); // set object color to new color.
34
35 // a choose random number between 0. and 10 for use as a scale factor.
36 float new_scale = llFrand( 10.0 );
37 llSetScale(< new_scale, new_scale, new_scale > ); // set object scale.
38
39 if ( second > 19 ) // then time to wrap this up.
40 {
41 // turn object black, print "resting" message, and reset object....
42 llSetColor( < 0, 0, 0 >, ALL_SIDES );
43
44 llSay( 0, "Object now resting and resetting script." );
45 llResetScript(); // return object to ready state.
46 }
47 }
48}
49
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl
new file mode 100644
index 0000000..5aa25af
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test04.lsl
@@ -0,0 +1,51 @@
1integer counter;
2integer second;
3vector startPosition;
4
5default
6{
7 state_entry()
8 {
9 llSay( 0, "Hello, Avatar! Touch to change position.");
10 counter = 0;
11 startPosition = llGetPos();
12 }
13
14 touch_start(integer total_number)
15 {
16 counter = counter + 1;
17
18 llSay( 0, "Touched by angel number " + (string)counter);
19
20 llSetTimerEvent( 1 ); // arrange for a "timer event" every second.
21 }
22
23 timer() // do these instructions every time the timer event occurs.
24 {
25 second++;
26
27 // choose three random distances between 0. and 10.0.
28 float X_distance = llFrand( 10.0 );
29 float Y_distance = llFrand( 10.0 );
30 float Z_distance = llFrand( 10.0 );
31
32 // combine these distance components into a vector and use it
33 // to increment the starting position and reposition the object.
34 vector increment = < X_distance, Y_distance, Z_distance >;
35 vector newPosition = startPosition + increment;
36 llSetPos( newPosition ); // reposition object.
37
38 if ( second > 19 ) // then time to wrap this up.
39 {
40 // move object back to starting position...
41 while ( llVecDist( llGetPos(), startPosition ) > 0.001)
42 {
43 llSetPos( startPosition );
44 }
45
46 llSay( 0, "Object now resting and resetting script." );
47 llResetScript(); // return object to ready state.
48 }
49 }
50}
51
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
new file mode 100644
index 0000000..86727cf
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test05.lsl
@@ -0,0 +1,30 @@
1default
2{
3 state_entry()
4 {
5 llSay( 0, "Hello, Avatar!");
6 vector startPoint = llGetPos();
7 }
8
9 touch_start(integer total_number)
10 {
11 llSay( 0, "Touched." );
12
13 // Define a rotation of 10 degrees around the Y-axis.
14 rotation Y_10 = llEuler2Rot( < 0, 10 * DEG_TO_RAD, 0 > );
15
16 // now rotate the object 10 degrees in the X-Z plane during
17 // each loop iteration. note that each call to llSetRot
18 // causes a .2 second delay.
19 integer i;
20 for( i = 1; i < 100; i++ )
21 {
22 // rotate object in the X-Z plane around its own Y-axis.
23 rotation newRotation = llGetRot() * Y_10;
24
25 llSetRot( newRotation );
26 }
27 llSay( 0, "Rotation stopped" );
28 }
29}
30
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl
new file mode 100644
index 0000000..158d676
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test06.lsl
@@ -0,0 +1,8 @@
1default
2{
3 state_entry()
4 {
5 llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
6 }
7}
8
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl
new file mode 100644
index 0000000..a1258f9
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test07.lsl
@@ -0,0 +1,38 @@
1vector rotationCenter;
2
3default
4{
5 state_entry()
6 {
7 llSay( 0, "Hello, Avatar!");
8 vector startPoint = llGetPos();
9 rotationCenter = startPoint + < 3, 3, 3 >;
10 // distance to the point of rotation should probably be a
11 // function of the max dimension of the object.
12 }
13
14 touch_start(integer total_number)
15 {
16 llSay( 0, "Touched." );
17
18 // Define a "rotation" of 10 degrees around the z-axis.
19 rotation Z_15 = llEuler2Rot( < 0, 0, 15 * DEG_TO_RAD > );
20
21 integer i;
22 for( i = 1; i < 100; i++ ) // limit simulation time in case of
23 { // unexpected behavior.
24 vector currentPosition = llGetPos();
25
26 vector currentOffset = currentPosition - rotationCenter;
27
28 // rotate the offset vector in the X-Y plane around the
29 // distant point of rotation.
30 vector rotatedOffset = currentOffset * Z_15;
31 vector newPosition = rotationCenter + rotatedOffset;
32
33 llSetPos( newPosition );
34 }
35 llSay( 0, "Orbiting stopped" );
36 }
37}
38
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl
new file mode 100644
index 0000000..d29428c
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test08.lsl
@@ -0,0 +1,23 @@
1default
2{
3 state_entry()
4 {
5 llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
6 llSetStatus( 1, TRUE ); // turn on physics.
7 }
8
9 touch_start(integer total_number)
10 {
11 vector start_color = llGetColor( ALL_SIDES ); // save current color.
12 llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
13
14 float objMass = llGetMass();
15 float Z_force = 20.0 * objMass;
16
17 llApplyImpulse( < 0.0, 0.0, Z_force >, FALSE );
18
19 llSay( 0, "Impulse of " + (string)Z_force + " applied." );
20 llSetColor( start_color , ALL_SIDES ); // set color to green.
21 }
22}
23
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl
new file mode 100644
index 0000000..095f942
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test09.lsl
@@ -0,0 +1,71 @@
1vector startPos;
2vector curPos;
3vector curForce;
4integer second;
5
6default
7{
8 state_entry()
9 {
10 llSay( 0, "Hello, Avatar! Touch to launch me straight up.");
11 llSetStatus( 1, TRUE );
12 startPos = < 0, 0, 0 >;
13 }
14
15 touch_start(integer total_number)
16 {
17 startPos = llGetPos();
18 curPos = startPos;
19 curForce = < 0, 0, 0 >;
20 second = 0;
21
22 llSetColor( < 1.0, 0.0, 0.0 > , ALL_SIDES ); // set color to red.
23
24 float objMass = llGetMass();
25 float Z_force = 10.2 * objMass;
26
27 llSetForce( < 0.0, 0.0, Z_force >, FALSE );
28
29 llSay( 0, "Force of " + (string)Z_force + " being applied." );
30 llSetTimerEvent(1);
31 }
32
33 timer()
34 {
35 second++;
36 curPos = llGetPos();
37 float curDisplacement = llVecMag( curPos - startPos );
38
39 if( ( curDisplacement > 30. ) && // then object is too far away, and
40 ( llGetForce() != < 0.0, 0.0, 0.0 > ) ) // force not already zero,
41 { // then let gravity take over, and change color to green.
42 llSetForce( < 0.0, 0.0, 0.0 >, FALSE );
43 llSetColor( < 0, 1.0, 0 >, ALL_SIDES );
44 llSay( 0, "Force removed; object in free flight." );
45 }
46
47 if ( second > 19 ) // then time to wrap this up.
48 {
49 // turn object blue and zero force to be safe....
50 llSetColor( < 0, 0, 1.0 >, ALL_SIDES ); // change color to blue.
51 llSetForce( < 0, 0, 0 >, FALSE );
52
53 // ...move object back to starting position...
54 // ...after saving current status of Physics attribute.
55 integer savedStatus = llGetStatus( 1 );
56 llSetStatus( 1, FALSE ); // turn physics off.
57 while ( llVecDist( llGetPos(), startPos ) > 0.001)
58 {
59 llSetPos( startPos );
60 }
61 llSetStatus( 1, savedStatus ); // restore Physics status.
62
63 //...and then turn color to black and Reset the script.
64 llSetColor( < 1, 1, 1 >, ALL_SIDES );
65 llSetTimerEvent( 0 ); // turn off timer events.
66 llSay( 0, "Done and resetting script." );
67 llResetScript(); // return object to ready state.
68 }
69 }
70}
71
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl
new file mode 100644
index 0000000..de16df7
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test10.lsl
@@ -0,0 +1,57 @@
1vector startPosition;
2float groundLevel;
3
4default
5{
6 state_entry()
7 {
8 llListen( 0, "", llGetOwner(), "");
9
10 startPosition = llGetPos();
11 groundLevel = llGround( startPosition );
12
13 llSay( 0, "Control this object with chat commands like:" );
14 llSay( 0, "'up' or 'down' followed by a distance." );
15 }
16
17 listen( integer channel, string name, key id, string message )
18 {
19 // separate the input into blank-delmited tokens.
20 list parsed = llParseString2List( message, [ " " ], [] );
21
22 // get the first part--the "command".
23 string command = llList2String( parsed, 0 );
24
25 // get the second part--the "distance".
26 string distance_string = llList2String( parsed, 1 );
27 float distance = ( float )distance_string;
28
29 vector position = llGetPos();
30
31 if( command == "up" )
32 {
33 if( ( position.z + distance ) < (startPosition.z + 10.0 ) )
34 {
35 llSetPos( llGetPos() + < 0, 0, distance > ); // move up
36 llSetText( "Went up " + (string)distance, < 1, 0, 0 >, 1 );
37 }
38 else
39 {
40 llSetText( "Can't go so high.", < 1, 0, 0 >, 1 );
41 }
42 }
43 else if( command == "down" )
44 {
45 if( ( position.z - distance ) > groundLevel )
46 {
47 llSetPos( llGetPos() + < 0, 0, -distance > ); // move down
48 llSetText( "Went down " + (string)distance, < 1, 0, 0 >, 1 );
49 }
50 else
51 {
52 llSetText( "Can't go so low.", < 1, 0, 0 >, 1 );
53 }
54 }
55 }
56}
57
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl
new file mode 100644
index 0000000..e4b4048
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test11.lsl
@@ -0,0 +1,52 @@
1integer dialog_channel= 427; // set a dialog channel
2list menu = [ "Go up", "Go down" ];
3vector startPosition;
4float groundLevel;
5
6default
7{
8 state_entry()
9 {
10 // arrange to listen for dialog answers (from multiple users)
11 llListen( dialog_channel, "", NULL_KEY, "");
12
13 startPosition = llGetPos();
14 groundLevel = llGround( startPosition );
15 }
16
17 touch_start(integer total_number)
18 {
19 llDialog( llDetectedKey( 0 ), "What do you want to do?", menu,
20 dialog_channel );
21 }
22
23 listen(integer channel, string name, key id, string choice )
24 {
25 vector position = llGetPos();
26
27 // if a valid choice was made, implement that choice if possible.
28 // (llListFindList returns -1 if choice is not in the menu list.)
29 if ( llListFindList( menu, [ choice ]) != -1 )
30 {
31 if ( choice == "Go up" )
32 {
33 if( position.z < ( startPosition.z + 10.0 ) )
34 {
35 llSetPos( llGetPos() + < 0, 0, 1.0 > ); // move up
36 }
37 }
38 else if( choice == "Go down" )
39 {
40 if( position.z > ( groundLevel + 1.0 ) )
41 {
42 llSetPos( llGetPos() + < 0, 0, -1.0 > ); // move down
43 }
44 }
45 }
46 else
47 {
48 llSay( 0, "Invalid choice: " + choice );
49 }
50 }
51}
52
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl
new file mode 100644
index 0000000..eaa885b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test12.lsl
@@ -0,0 +1,46 @@
1vector startPosition;
2float groundLevel;
3
4default
5{
6 state_entry()
7 {
8 // get permission to take over the avatar's control inputs.
9 llRequestPermissions( llGetOwner(), PERMISSION_TAKE_CONTROLS );
10
11 startPosition = llGetPos();
12 groundLevel = llGround( startPosition );
13 }
14
15 run_time_permissions( integer perm ) // event for processing
16 // permission dialog.
17 {
18 if ( perm & PERMISSION_TAKE_CONTROLS ) // permission has been given.
19 {
20 // go ahead and take over the forward and backward controls.
21 llTakeControls( CONTROL_FWD | CONTROL_BACK, TRUE, FALSE );
22 }
23 }
24
25 control( key id, integer held, integer change ) // event for processing
26 // key press.
27 {
28 vector position = llGetPos();
29
30 if ( change & held & CONTROL_FWD )
31 { // the "move forward" control has been activated.
32 if( position.z < (startPosition.z + 10.0) )
33 {
34 llSetPos( llGetPos() + < 0, 0, 1.0 >); // move up
35 }
36 }
37 else if ( change & held & CONTROL_BACK )
38 { // the "move backward" key has been activated.
39 if( position.z > groundLevel + 1.0 )
40 {
41 llSetPos( llGetPos() + < 0, 0, -1.0 >); // move down
42 }
43 }
44 }
45}
46
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl
new file mode 100644
index 0000000..7238a9b
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test13.lsl
@@ -0,0 +1,16 @@
1default
2{
3 state_entry()
4 {
5 llSay( 0, "Hello, Avatar!");
6 }
7
8 touch_start(integer total_number)
9 {
10 llSay( 0, "Touched.");
11
12 llRezObject("Object1", llGetPos() + < 0, 0, 2 >, ZERO_VECTOR,
13 ZERO_ROTATION, 42);
14 }
15}
16
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl
new file mode 100644
index 0000000..2c60035
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test14.lsl
@@ -0,0 +1,70 @@
1integer createdObjectCounter;
2integer linkedObjectCounter;
3
4default
5{
6 state_entry()
7 {
8 llSay( 0, "Hello, Avatar!");
9 linkedObjectCounter = 0; // zero the linked object counter.
10 }
11
12 touch_start(integer total_number)
13 {
14 if( createdObjectCounter <= 0 ) // nothing has yet been linked,
15 { // begin object creation sequence...
16 // ask for permissions now, since it will be too late later.
17 llRequestPermissions( llGetOwner(), PERMISSION_CHANGE_LINKS );
18 }
19 else // just do whatever should be done upon touch without
20 { // creating new objects to link.
21 // insert commands here to respond to a touch.
22 }
23 }
24
25 run_time_permissions( integer permissions_granted )
26 {
27 if( permissions_granted == PERMISSION_CHANGE_LINKS )
28 { // create 2 objects.
29 llRezObject("Object1", llGetPos() + < 1, 0, 2 >,
30 ZERO_VECTOR, ZERO_ROTATION, 42);
31 createdObjectCounter = createdObjectCounter + 1;
32
33 llRezObject("Object1", llGetPos() + < -1, 0, 2 >,
34 ZERO_VECTOR, ZERO_ROTATION, 42);
35 createdObjectCounter = createdObjectCounter + 1;
36
37 }
38 else
39 {
40 llOwnerSay( "Didn't get permission to change links." );
41 return;
42 }
43 }
44
45 object_rez( key child_id )
46 {
47 llOwnerSay( "rez happened and produced object with key " +
48 (string)child_id );
49
50 // link as parent to the just created child.
51 llCreateLink( child_id, TRUE );
52
53 // if all child objects have been created then the script can
54 // continue to work as a linked set of objects.
55 linkedObjectCounter++;
56 if( linkedObjectCounter >= 2 )
57 {
58 // Change all child objects in the set to red (including parent).
59 llSetLinkColor( LINK_ALL_CHILDREN, < 1, 0, 0 >, ALL_SIDES );
60
61 // Make child object "2" half-tranparent.
62 llSetLinkAlpha( 2, .5, ALL_SIDES );
63
64 // Insert commands here to manage subsequent activity of the
65 // linkset, like this command to rotate the result:
66 // llTargetOmega( < 0, 1, 1 >, .2 * PI, 1.0 );
67 }
68 }
69}
70
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
new file mode 100644
index 0000000..425c9ee
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test15.lsl
@@ -0,0 +1,10 @@
1default
2{
3 state_entry()
4 {
5 llSetStatus(STATUS_PHANTOM,TRUE);
6 llSetTexture("lit_texture", ALL_SIDES);
7 llSetTextureAnim (ANIM_ON | LOOP, ALL_SIDES, 4, 4, 0, 0, 15.0);
8 }
9}
10
diff --git a/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl b/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl
new file mode 100644
index 0000000..536ff19
--- /dev/null
+++ b/bin/assets/ScriptsAssetSet/KanEd-Test16.lsl
@@ -0,0 +1,66 @@
1// This is a script designed to orbit its owner.
2vector startPos;
3vector curPos;
4
5vector offset; // offset from Agent
6integer iteration;
7float rotationRate; // degrees of rotation per iteration
8float sensorInterval; // seconds between sensor scan.
9
10default
11{
12 state_entry()
13 {
14 llOwnerSay( "Hello, Avatar! Touch to start orbiting." );
15 llSetStatus( 1, FALSE ); // turn Physics off.
16 offset = < 2, 2, 1 >;
17 iteration = 0;
18 rotationRate = .5;
19 sensorInterval = .3;
20 }
21
22 touch_start(integer total_number)
23 {
24 startPos = llGetPos();
25 curPos = startPos;
26
27 llSleep( .1 );
28
29 key id = llGetOwner();
30 llSensorRepeat( "", id, AGENT, 96, PI, sensorInterval );
31 }
32
33 sensor(integer total_number)
34 {
35 iteration++;
36
37 if( iteration > 300 )
38 {
39 llResetScript();
40 }
41
42 if( llDetectedOwner( 0 ) == llGetOwner() )
43 { // the detected Agent is my owner.
44 vector position = llDetectedPos(0); // find Owner position.
45
46 // calculate next object position relative both to the Owner's
47 // position and the current time interval counter. That is,
48 // use the iteration counter to define a rotation, multiply
49 // the rotation by the constant offset to get a rotated offset
50 // vector, and add that rotated offset to the current position
51 // to defne the new position.
52
53 float degreeRotation = llRound( rotationRate * iteration ) % 360;
54 rotation Rotation =
55 llEuler2Rot( < 0, 0, degreeRotation * DEG_TO_RAD > );
56 vector rotatedOffset = offset * Rotation;
57 position += rotatedOffset;
58
59 // change the location of the object and save the current (rotated)
60 // offset for use during the next iteration.
61 llSetPos( position );
62 offset = rotatedOffset;
63 }
64 }
65}
66
diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
index 6585f7d..c76cb78 100644
--- a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
+++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml
@@ -125,5 +125,119 @@
125 <Key Name="assetType" Value="10" /> 125 <Key Name="assetType" Value="10" />
126 <Key Name="fileName" Value="GrafittiBoard.lsl" /> 126 <Key Name="fileName" Value="GrafittiBoard.lsl" />
127 </Section> 127 </Section>
128 128
129</Nini> 129 <!-- Adding the Kan-ED tests to the Assets -->
130
131 <Section Name="Kan-Ed Test1">
132 <Key Name="assetID" Value="42b6ac70-d21f-11dd-ad8b-0800200c9a66" />
133 <Key Name="name" Value="Kan-Ed Test1" />
134 <Key Name="assetType" Value="10" />
135 <Key Name="fileName" Value="KanEd-Test01.lsl" />
136 </Section>
137
138 <Section Name="Kan-Ed Test2">
139 <Key Name="assetID" Value="42b6ac71-d21f-11dd-ad8b-0800200c9a66" />
140 <Key Name="name" Value="Kan-Ed Test2" />
141 <Key Name="assetType" Value="10" />
142 <Key Name="fileName" Value="KanEd-Test02.lsl" />
143 </Section>
144
145 <Section Name="Kan-Ed Test3">
146 <Key Name="assetID" Value="42b6ac72-d21f-11dd-ad8b-0800200c9a66" />
147 <Key Name="name" Value="Kan-Ed Test3" />
148 <Key Name="assetType" Value="10" />
149 <Key Name="fileName" Value="KanEd-Test03.lsl" />
150 </Section>
151
152 <Section Name="Kan-Ed Test4">
153 <Key Name="assetID" Value="42b6ac73-d21f-11dd-ad8b-0800200c9a66" />
154 <Key Name="name" Value="Kan-Ed Test4" />
155 <Key Name="assetType" Value="10" />
156 <Key Name="fileName" Value="KanEd-Test04.lsl" />
157 </Section>
158
159 <Section Name="Kan-Ed Test5">
160 <Key Name="assetID" Value="42b6ac74-d21f-11dd-ad8b-0800200c9a66" />
161 <Key Name="name" Value="Kan-Ed Test5" />
162 <Key Name="assetType" Value="10" />
163 <Key Name="fileName" Value="KanEd-Test05.lsl" />
164 </Section>
165
166 <Section Name="Kan-Ed Test6">
167 <Key Name="assetID" Value="42b6ac75-d21f-11dd-ad8b-0800200c9a66" />
168 <Key Name="name" Value="Kan-Ed Test6" />
169 <Key Name="assetType" Value="10" />
170 <Key Name="fileName" Value="KanEd-Test06.lsl" />
171 </Section>
172
173 <Section Name="Kan-Ed Test7">
174 <Key Name="assetID" Value="42b6ac76-d21f-11dd-ad8b-0800200c9a66" />
175 <Key Name="name" Value="Kan-Ed Test7" />
176 <Key Name="assetType" Value="10" />
177 <Key Name="fileName" Value="KanEd-Test07.lsl" />
178 </Section>
179
180 <Section Name="Kan-Ed Test8">
181 <Key Name="assetID" Value="42b6ac77-d21f-11dd-ad8b-0800200c9a66" />
182 <Key Name="name" Value="Kan-Ed Test8" />
183 <Key Name="assetType" Value="10" />
184 <Key Name="fileName" Value="KanEd-Test08.lsl" />
185 </Section>
186
187 <Section Name="Kan-Ed Test9">
188 <Key Name="assetID" Value="42b6ac78-d21f-11dd-ad8b-0800200c9a66" />
189 <Key Name="name" Value="Kan-Ed Test9" />
190 <Key Name="assetType" Value="10" />
191 <Key Name="fileName" Value="KanEd-Test09.lsl" />
192 </Section>
193
194 <Section Name="Kan-Ed Test10">
195 <Key Name="assetID" Value="42b6ac79-d21f-11dd-ad8b-0800200c9a66" />
196 <Key Name="name" Value="Kan-Ed Test10" />
197 <Key Name="assetType" Value="10" />
198 <Key Name="fileName" Value="KanEd-Test10.lsl" />
199 </Section>
200
201 <Section Name="Kan-Ed Test11">
202 <Key Name="assetID" Value="42b6ac7a-d21f-11dd-ad8b-0800200c9a66" />
203 <Key Name="name" Value="Kan-Ed Test11" />
204 <Key Name="assetType" Value="10" />
205 <Key Name="fileName" Value="KanEd-Test11.lsl" />
206 </Section>
207
208 <Section Name="Kan-Ed Test12">
209 <Key Name="assetID" Value="42b6ac7b-d21f-11dd-ad8b-0800200c9a66" />
210 <Key Name="name" Value="Kan-Ed Test12" />
211 <Key Name="assetType" Value="10" />
212 <Key Name="fileName" Value="KanEd-Test12.lsl" />
213 </Section>
214
215 <Section Name="Kan-Ed Test13">
216 <Key Name="assetID" Value="42b6ac7c-d21f-11dd-ad8b-0800200c9a66" />
217 <Key Name="name" Value="Kan-Ed Test13" />
218 <Key Name="assetType" Value="10" />
219 <Key Name="fileName" Value="KanEd-Test13.lsl" />
220 </Section>
221
222 <Section Name="Kan-Ed Test14">
223 <Key Name="assetID" Value="42b6ac7d-d21f-11dd-ad8b-0800200c9a66" />
224 <Key Name="name" Value="Kan-Ed Test14" />
225 <Key Name="assetType" Value="10" />
226 <Key Name="fileName" Value="KanEd-Test14.lsl" />
227 </Section>
228
229 <Section Name="Kan-Ed Test15">
230 <Key Name="assetID" Value="42b6ac7e-d21f-11dd-ad8b-0800200c9a66" />
231 <Key Name="name" Value="Kan-Ed Test15" />
232 <Key Name="assetType" Value="10" />
233 <Key Name="fileName" Value="KanEd-Test15.lsl" />
234 </Section>
235
236 <Section Name="Kan-Ed Test16">
237 <Key Name="assetID" Value="42b6ac7f-d21f-11dd-ad8b-0800200c9a66" />
238 <Key Name="name" Value="Kan-Ed Test16" />
239 <Key Name="assetType" Value="10" />
240 <Key Name="fileName" Value="KanEd-Test16.lsl" />
241 </Section>
242
243</Nini> \ No newline at end of file
diff --git a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml
index 6c590a6..6477a08 100644
--- a/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml
+++ b/bin/inventory/ScriptsLibrary/ScriptsLibraryItems.xml
@@ -285,6 +285,214 @@
285<!-- W == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba022"/> --> 285<!-- W == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba022"/> -->
286<!-- X == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba023"/> --> 286<!-- X == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba023"/> -->
287<!-- .Kan-ED Scripts == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/> --> 287<!-- .Kan-ED Scripts == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/> -->
288 <Section Name="Kan-Ed Test1">
289 <Key Name="inventoryID" Value="42b6ac70-d21f-11dd-ad8b-0800200c9a66" />
290 <Key Name="assetID" Value="42b6ac70-d21f-11dd-ad8b-0800200c9a66" />
291 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
292 <Key Name="description" Value="Kan-Ed Test1" />
293 <Key Name="name" Value="Kan-Ed Test1" />
294 <Key Name="assetType" Value="10" />
295 <Key Name="inventoryType" Value="10" />
296 <Key Name="currentPermissions" Value="257487132" />
297 <Key Name="nextPermissions" Value="257487132" />
298 <Key Name="everyonePermissions" Value="257487132" />
299 <Key Name="basePermissions" Value="257487132" />
300 </Section>
301 <Section Name="Kan-Ed Test2">
302 <Key Name="inventoryID" Value="42b6ac71-d21f-11dd-ad8b-0800200c9a66" />
303 <Key Name="assetID" Value="42b6ac71-d21f-11dd-ad8b-0800200c9a66" />
304 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
305 <Key Name="description" Value="Kan-Ed Test2" />
306 <Key Name="name" Value="Kan-Ed Test2" />
307 <Key Name="assetType" Value="10" />
308 <Key Name="inventoryType" Value="10" />
309 <Key Name="currentPermissions" Value="257487132" />
310 <Key Name="nextPermissions" Value="257487132" />
311 <Key Name="everyonePermissions" Value="257487132" />
312 <Key Name="basePermissions" Value="257487132" />
313 </Section>
314 <Section Name="Kan-Ed Test3">
315 <Key Name="inventoryID" Value="42b6ac72-d21f-11dd-ad8b-0800200c9a66" />
316 <Key Name="assetID" Value="42b6ac72-d21f-11dd-ad8b-0800200c9a66" />
317 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
318 <Key Name="description" Value="Kan-Ed Test3" />
319 <Key Name="name" Value="Kan-Ed Test3" />
320 <Key Name="assetType" Value="10" />
321 <Key Name="inventoryType" Value="10" />
322 <Key Name="currentPermissions" Value="257487132" />
323 <Key Name="nextPermissions" Value="257487132" />
324 <Key Name="everyonePermissions" Value="257487132" />
325 <Key Name="basePermissions" Value="257487132" />
326 </Section>
327 <Section Name="Kan-Ed Test4">
328 <Key Name="inventoryID" Value="42b6ac73-d21f-11dd-ad8b-0800200c9a66" />
329 <Key Name="assetID" Value="42b6ac73-d21f-11dd-ad8b-0800200c9a66" />
330 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
331 <Key Name="description" Value="Kan-Ed Test4" />
332 <Key Name="name" Value="Kan-Ed Test4" />
333 <Key Name="assetType" Value="10" />
334 <Key Name="inventoryType" Value="10" />
335 <Key Name="currentPermissions" Value="257487132" />
336 <Key Name="nextPermissions" Value="257487132" />
337 <Key Name="everyonePermissions" Value="257487132" />
338 <Key Name="basePermissions" Value="257487132" />
339 </Section>
340 <Section Name="Kan-Ed Test5">
341 <Key Name="inventoryID" Value="42b6ac74-d21f-11dd-ad8b-0800200c9a66" />
342 <Key Name="assetID" Value="42b6ac74-d21f-11dd-ad8b-0800200c9a66" />
343 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
344 <Key Name="description" Value="Kan-Ed Test5" />
345 <Key Name="name" Value="Kan-Ed Test5" />
346 <Key Name="assetType" Value="10" />
347 <Key Name="inventoryType" Value="10" />
348 <Key Name="currentPermissions" Value="257487132" />
349 <Key Name="nextPermissions" Value="257487132" />
350 <Key Name="everyonePermissions" Value="257487132" />
351 <Key Name="basePermissions" Value="257487132" />
352 </Section>
353 <Section Name="Kan-Ed Test6">
354 <Key Name="inventoryID" Value="42b6ac75-d21f-11dd-ad8b-0800200c9a66" />
355 <Key Name="assetID" Value="42b6ac75-d21f-11dd-ad8b-0800200c9a66" />
356 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
357 <Key Name="description" Value="Kan-Ed Test6" />
358 <Key Name="name" Value="Kan-Ed Test6" />
359 <Key Name="assetType" Value="10" />
360 <Key Name="inventoryType" Value="10" />
361 <Key Name="currentPermissions" Value="257487132" />
362 <Key Name="nextPermissions" Value="257487132" />
363 <Key Name="everyonePermissions" Value="257487132" />
364 <Key Name="basePermissions" Value="257487132" />
365 </Section>
366 <Section Name="Kan-Ed Test7">
367 <Key Name="inventoryID" Value="42b6ac76-d21f-11dd-ad8b-0800200c9a66" />
368 <Key Name="assetID" Value="42b6ac76-d21f-11dd-ad8b-0800200c9a66" />
369 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
370 <Key Name="description" Value="Kan-Ed Test7" />
371 <Key Name="name" Value="Kan-Ed Test7" />
372 <Key Name="assetType" Value="10" />
373 <Key Name="inventoryType" Value="10" />
374 <Key Name="currentPermissions" Value="257487132" />
375 <Key Name="nextPermissions" Value="257487132" />
376 <Key Name="everyonePermissions" Value="257487132" />
377 <Key Name="basePermissions" Value="257487132" />
378 </Section>
379 <Section Name="Kan-Ed Test8">
380 <Key Name="inventoryID" Value="42b6ac77-d21f-11dd-ad8b-0800200c9a66" />
381 <Key Name="assetID" Value="42b6ac77-d21f-11dd-ad8b-0800200c9a66" />
382 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
383 <Key Name="description" Value="Kan-Ed Test8" />
384 <Key Name="name" Value="Kan-Ed Test8" />
385 <Key Name="assetType" Value="10" />
386 <Key Name="inventoryType" Value="10" />
387 <Key Name="currentPermissions" Value="257487132" />
388 <Key Name="nextPermissions" Value="257487132" />
389 <Key Name="everyonePermissions" Value="257487132" />
390 <Key Name="basePermissions" Value="257487132" />
391 </Section>
392 <Section Name="Kan-Ed Test9">
393 <Key Name="inventoryID" Value="42b6ac78-d21f-11dd-ad8b-0800200c9a66" />
394 <Key Name="assetID" Value="42b6ac78-d21f-11dd-ad8b-0800200c9a66" />
395 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
396 <Key Name="description" Value="Kan-Ed Test9" />
397 <Key Name="name" Value="Kan-Ed Test9" />
398 <Key Name="assetType" Value="10" />
399 <Key Name="inventoryType" Value="10" />
400 <Key Name="currentPermissions" Value="257487132" />
401 <Key Name="nextPermissions" Value="257487132" />
402 <Key Name="everyonePermissions" Value="257487132" />
403 <Key Name="basePermissions" Value="257487132" />
404 </Section>
405 <Section Name="Kan-Ed Test10">
406 <Key Name="inventoryID" Value="42b6ac79-d21f-11dd-ad8b-0800200c9a66" />
407 <Key Name="assetID" Value="42b6ac79-d21f-11dd-ad8b-0800200c9a66" />
408 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
409 <Key Name="description" Value="Kan-Ed Test10" />
410 <Key Name="name" Value="Kan-Ed Test10" />
411 <Key Name="assetType" Value="10" />
412 <Key Name="inventoryType" Value="10" />
413 <Key Name="currentPermissions" Value="257487132" />
414 <Key Name="nextPermissions" Value="257487132" />
415 <Key Name="everyonePermissions" Value="257487132" />
416 <Key Name="basePermissions" Value="257487132" />
417 </Section>
418 <Section Name="Kan-Ed Test11">
419 <Key Name="inventoryID" Value="42b6ac7a-d21f-11dd-ad8b-0800200c9a66" />
420 <Key Name="assetID" Value="42b6ac7a-d21f-11dd-ad8b-0800200c9a66" />
421 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
422 <Key Name="description" Value="Kan-Ed Test11" />
423 <Key Name="name" Value="Kan-Ed Test11" />
424 <Key Name="assetType" Value="10" />
425 <Key Name="inventoryType" Value="10" />
426 <Key Name="currentPermissions" Value="257487132" />
427 <Key Name="nextPermissions" Value="257487132" />
428 <Key Name="everyonePermissions" Value="257487132" />
429 <Key Name="basePermissions" Value="257487132" />
430 </Section>
431 <Section Name="Kan-Ed Test12">
432 <Key Name="inventoryID" Value="42b6ac7b-d21f-11dd-ad8b-0800200c9a66" />
433 <Key Name="assetID" Value="42b6ac7b-d21f-11dd-ad8b-0800200c9a66" />
434 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
435 <Key Name="description" Value="Kan-Ed Test12" />
436 <Key Name="name" Value="Kan-Ed Test12" />
437 <Key Name="assetType" Value="10" />
438 <Key Name="inventoryType" Value="10" />
439 <Key Name="currentPermissions" Value="257487132" />
440 <Key Name="nextPermissions" Value="257487132" />
441 <Key Name="everyonePermissions" Value="257487132" />
442 <Key Name="basePermissions" Value="257487132" />
443 </Section>
444 <Section Name="Kan-Ed Test13">
445 <Key Name="inventoryID" Value="42b6ac7c-d21f-11dd-ad8b-0800200c9a66" />
446 <Key Name="assetID" Value="42b6ac7c-d21f-11dd-ad8b-0800200c9a66" />
447 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
448 <Key Name="description" Value="Kan-Ed Test13" />
449 <Key Name="name" Value="Kan-Ed Test13" />
450 <Key Name="assetType" Value="10" />
451 <Key Name="inventoryType" Value="10" />
452 <Key Name="currentPermissions" Value="257487132" />
453 <Key Name="nextPermissions" Value="257487132" />
454 <Key Name="everyonePermissions" Value="257487132" />
455 <Key Name="basePermissions" Value="257487132" />
456 </Section>
457 <Section Name="Kan-Ed Test14">
458 <Key Name="inventoryID" Value="42b6ac7d-d21f-11dd-ad8b-0800200c9a66" />
459 <Key Name="assetID" Value="42b6ac7d-d21f-11dd-ad8b-0800200c9a66" />
460 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
461 <Key Name="description" Value="Kan-Ed Test14" />
462 <Key Name="name" Value="Kan-Ed Test14" />
463 <Key Name="assetType" Value="10" />
464 <Key Name="inventoryType" Value="10" />
465 <Key Name="currentPermissions" Value="257487132" />
466 <Key Name="nextPermissions" Value="257487132" />
467 <Key Name="everyonePermissions" Value="257487132" />
468 <Key Name="basePermissions" Value="257487132" />
469 </Section>
470 <Section Name="Kan-Ed Test15">
471 <Key Name="inventoryID" Value="42b6ac7e-d21f-11dd-ad8b-0800200c9a66" />
472 <Key Name="assetID" Value="42b6ac7e-d21f-11dd-ad8b-0800200c9a66" />
473 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
474 <Key Name="description" Value="Kan-Ed Test15" />
475 <Key Name="name" Value="Kan-Ed Test15" />
476 <Key Name="assetType" Value="10" />
477 <Key Name="inventoryType" Value="10" />
478 <Key Name="currentPermissions" Value="257487132" />
479 <Key Name="nextPermissions" Value="257487132" />
480 <Key Name="everyonePermissions" Value="257487132" />
481 <Key Name="basePermissions" Value="257487132" />
482 </Section>
483 <Section Name="Kan-Ed Test16">
484 <Key Name="inventoryID" Value="42b6ac7f-d21f-11dd-ad8b-0800200c9a66" />
485 <Key Name="assetID" Value="42b6ac7f-d21f-11dd-ad8b-0800200c9a66" />
486 <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba024"/>
487 <Key Name="description" Value="Kan-Ed Test16" />
488 <Key Name="name" Value="Kan-Ed Test16" />
489 <Key Name="assetType" Value="10" />
490 <Key Name="inventoryType" Value="10" />
491 <Key Name="currentPermissions" Value="257487132" />
492 <Key Name="nextPermissions" Value="257487132" />
493 <Key Name="everyonePermissions" Value="257487132" />
494 <Key Name="basePermissions" Value="257487132" />
495 </Section>
288<!-- .Other testing scripts == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba025"/> --> 496<!-- .Other testing scripts == <Key Name="folderID" Value="30000112-000f-0000-0000-000100bba025"/> -->
289<!-- OpenSim Specific Scripts == <Key Name="folderID" Value="284858c8-9391-6bf1-ddf5-b936f73de853"/> --> 497<!-- OpenSim Specific Scripts == <Key Name="folderID" Value="284858c8-9391-6bf1-ddf5-b936f73de853"/> -->
290 <Section Name="osTextBoard"> 498 <Section Name="osTextBoard">