From 35b0c2e9dfbbf811c12c9e3e7d4359a13b987977 Mon Sep 17 00:00:00 2001 From: Brian McBee Date: Mon, 7 Jan 2008 01:03:46 +0000 Subject: More inventory work for CharlieO. Final patch to make it all work yet to come. --- bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml | 135 +++++++++++++++++++++ bin/assets/ScriptsAssetSet/llAbs.lsl | 7 ++ bin/assets/ScriptsAssetSet/llAcos.lsl | 8 ++ bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl | 84 +++++++++++++ bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl | 84 +++++++++++++ bin/assets/ScriptsAssetSet/llAdjustSoundVolume.lsl | 13 ++ .../ScriptsAssetSet/llAllowInventoryDrop.lsl | 17 +++ bin/assets/ScriptsAssetSet/llAngleBetween.lsl | 11 ++ bin/assets/ScriptsAssetSet/llApplyImpulse.lsl | 16 +++ bin/assets/ScriptsAssetSet/llAsin.lsl | 9 ++ bin/assets/ScriptsAssetSet/llAtan2.lsl | 11 ++ bin/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl | 20 +++ bin/assets/ScriptsAssetSet/llBase64ToString.lsl | 8 ++ .../ScriptsAssetSet/llRemoveFromLandBanList.lsl | 84 +++++++++++++ .../ScriptsAssetSet/llRemoveFromLandPassList.lsl | 84 +++++++++++++ bin/assets/ScriptsAssetSet/llResetLandBanList.lsl | 84 +++++++++++++ bin/assets/ScriptsAssetSet/llResetLandPassList.lsl | 84 +++++++++++++ bin/assets/ScriptsAssetSet/llSay.lsl | 7 ++ bin/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl | 7 ++ bin/assets/ScriptsAssetSet/llSetRot.lsl | 13 ++ 20 files changed, 786 insertions(+) create mode 100644 bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml create mode 100644 bin/assets/ScriptsAssetSet/llAbs.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAcos.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAdjustSoundVolume.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAllowInventoryDrop.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAngleBetween.lsl create mode 100644 bin/assets/ScriptsAssetSet/llApplyImpulse.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAsin.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAtan2.lsl create mode 100644 bin/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl create mode 100644 bin/assets/ScriptsAssetSet/llBase64ToString.lsl create mode 100644 bin/assets/ScriptsAssetSet/llRemoveFromLandBanList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llRemoveFromLandPassList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llResetLandBanList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llResetLandPassList.lsl create mode 100644 bin/assets/ScriptsAssetSet/llSay.lsl create mode 100644 bin/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl create mode 100644 bin/assets/ScriptsAssetSet/llSetRot.lsl (limited to 'bin/assets/ScriptsAssetSet') diff --git a/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml new file mode 100644 index 0000000..bd82a12 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/ScriptsAssetSet.xml @@ -0,0 +1,135 @@ + +
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
+ + + + + +
+
diff --git a/bin/assets/ScriptsAssetSet/llAbs.lsl b/bin/assets/ScriptsAssetSet/llAbs.lsl new file mode 100644 index 0000000..aa39395 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llAbs.lsl @@ -0,0 +1,7 @@ +default +{ + state_entry() + { + llOwnerSay("The absolute value of -4 is: "+(string)llAbs(-4) ); + } +} diff --git a/bin/assets/ScriptsAssetSet/llAcos.lsl b/bin/assets/ScriptsAssetSet/llAcos.lsl new file mode 100644 index 0000000..da30a0d --- /dev/null +++ b/bin/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)); + } +} diff --git a/bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl b/bin/assets/ScriptsAssetSet/llAddToLandBanList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl b/bin/assets/ScriptsAssetSet/llAddToLandPassList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llAdjustSoundVolume.lsl b/bin/assets/ScriptsAssetSet/llAdjustSoundVolume.lsl new file mode 100644 index 0000000..25e90c0 --- /dev/null +++ b/bin/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"); + } +} diff --git a/bin/assets/ScriptsAssetSet/llAllowInventoryDrop.lsl b/bin/assets/ScriptsAssetSet/llAllowInventoryDrop.lsl new file mode 100644 index 0000000..162396a --- /dev/null +++ b/bin/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."); + } + } +} diff --git a/bin/assets/ScriptsAssetSet/llAngleBetween.lsl b/bin/assets/ScriptsAssetSet/llAngleBetween.lsl new file mode 100644 index 0000000..441be1b --- /dev/null +++ b/bin/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 + } +} diff --git a/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl b/bin/assets/ScriptsAssetSet/llApplyImpulse.lsl new file mode 100644 index 0000000..6b2461f --- /dev/null +++ b/bin/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); + } + } +} diff --git a/bin/assets/ScriptsAssetSet/llAsin.lsl b/bin/assets/ScriptsAssetSet/llAsin.lsl new file mode 100644 index 0000000..02e9bd5 --- /dev/null +++ b/bin/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)); + } +} diff --git a/bin/assets/ScriptsAssetSet/llAtan2.lsl b/bin/assets/ScriptsAssetSet/llAtan2.lsl new file mode 100644 index 0000000..95e0877 --- /dev/null +++ b/bin/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)); + } +} diff --git a/bin/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl b/bin/assets/ScriptsAssetSet/llAvatarOnSitTarget.lsl new file mode 100644 index 0000000..b4ab532 --- /dev/null +++ b/bin/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"); + } + } + } +} diff --git a/bin/assets/ScriptsAssetSet/llBase64ToString.lsl b/bin/assets/ScriptsAssetSet/llBase64ToString.lsl new file mode 100644 index 0000000..f8d4978 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llBase64ToString.lsl @@ -0,0 +1,8 @@ +default +{ + state_entry() + { + string test = llBase64ToString("U2VjcmV0Ok9wZW4="); + llOwnerSay(test); + } +} diff --git a/bin/assets/ScriptsAssetSet/llRemoveFromLandBanList.lsl b/bin/assets/ScriptsAssetSet/llRemoveFromLandBanList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llRemoveFromLandPassList.lsl b/bin/assets/ScriptsAssetSet/llRemoveFromLandPassList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llResetLandBanList.lsl b/bin/assets/ScriptsAssetSet/llResetLandBanList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llResetLandPassList.lsl b/bin/assets/ScriptsAssetSet/llResetLandPassList.lsl new file mode 100644 index 0000000..19ad704 --- /dev/null +++ b/bin/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 = ""; + } +} diff --git a/bin/assets/ScriptsAssetSet/llSay.lsl b/bin/assets/ScriptsAssetSet/llSay.lsl new file mode 100644 index 0000000..c64a355 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llSay.lsl @@ -0,0 +1,7 @@ +default +{ + state_entry() + { + llSay(0,"This is an incredibly useless program." ); + } +} diff --git a/bin/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl b/bin/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl new file mode 100644 index 0000000..fb5d035 --- /dev/null +++ b/bin/assets/ScriptsAssetSet/llSetParcelMusicURL.lsl @@ -0,0 +1,7 @@ +default +{ + state_entry() + { + llSetParcelMusicURL("http://www.crossstitchpatterngall.com/Enya_-_Watermark.mp3"); + } +} diff --git a/bin/assets/ScriptsAssetSet/llSetRot.lsl b/bin/assets/ScriptsAssetSet/llSetRot.lsl new file mode 100644 index 0000000..ce3009c --- /dev/null +++ b/bin/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 ); + } +} -- cgit v1.1