All In One NPC updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<Project name="All In One NPC Recorder and Player" guid="4f083be4-b9ae-4962-a3aa-e9d1c7e09e56">
|
||||
<Object name="Object" guid="d971c37c-79d7-4705-82bf-f4312af560e8" active="true">
|
||||
<Object name="Object" guid="d971c37c-79d7-4705-82bf-f4312af560e8" active="true" description="key=00000000-0000-0000-0000-000000000000">
|
||||
<Notecard name="!Appearance.txt" guid="b3be600d-c3d5-43dd-9fbb-e95c441f4c33">
|
||||
</Notecard>
|
||||
<Notecard name="!Appearance2.txt" guid="cb7435a2-5194-495a-852f-d977ae709d33">
|
||||
@@ -28,6 +28,18 @@
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.0.lsl" guid="83d1368e-2074-4b14-ac62-e2d6f3823c69">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.1.lsl" guid="f8bb755f-1411-4d43-aded-39aeb0031546">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.2.lsl" guid="247429f3-3a16-4775-ade5-98fce4d5eb47">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.3.lsl" guid="4270a4c6-ff41-4c4b-a44b-be773fabb190">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.4.lsl" guid="4db0dc60-da65-4375-b78f-99a1dcdf766a">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.5.lsl" guid="9f75ecf5-880f-4514-bdd8-62406fa3d138">
|
||||
</Script>
|
||||
<Script name="NPC Recorder Script v 4.6.lsl" guid="e5924259-8d43-4144-85f6-4f5dea58c5c2">
|
||||
</Script>
|
||||
</Object>
|
||||
<Object name="Test Object" guid="add040bc-55a8-42bb-a41a-d7cde2b0ae86">
|
||||
<Script name="Chat commands.lsl" guid="7b7ecdbf-dd55-4e2c-be27-e7047ed30aee">
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2013-09-08 18:27:47
|
||||
// :EDITED:2015-08-02 21:09:13
|
||||
// :EDITED:2015-09-24 13:25:15
|
||||
// :ID:27
|
||||
// :NUM:1603
|
||||
// :REV:1.3
|
||||
// :REV:1.4
|
||||
// :WORLD:OpenSim
|
||||
// :DESCRIPTION:
|
||||
// All in one NPC recorder player set of debug functions. Add these ONLY if you are compileing in LSLEditor.
|
||||
@@ -79,7 +79,7 @@ osNpcRemove (key target) {
|
||||
llSay(0,"NPC removed");
|
||||
}
|
||||
list osGetAvatarList () {
|
||||
list lStuff = [(key) "12345000-0000-0000-0000-0000000000002", vDestPos, "Digit Gorilla"];
|
||||
list lStuff = [(key) "12345000-0000-0000-0000-0000000000002", <1,2,3>, "Digit Gorilla"];
|
||||
return lStuff;
|
||||
}
|
||||
osMakeNotecard(string notecardName, string contents) {
|
||||
@@ -132,8 +132,9 @@ osForceAttachToOtherAvatarFromInventory(key npc, string inventory, integer point
|
||||
llSay(0,"attach " + inventory + " to " + (string) point);
|
||||
}
|
||||
|
||||
osTeleportAgent( key avi, string name, vector dest, vector lookat) {;}
|
||||
|
||||
// END commented code for OpenSim vs Editor environments
|
||||
//*******************************************************************//
|
||||
// comment this out, is only here for testing in LSLEditor.
|
||||
// default {}
|
||||
default {}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:NPC, Puppeteer
|
||||
// :CREATED:2013-09-08 18:27:47
|
||||
// :EDITED:2015-09-17 08:21:19
|
||||
// :ID:27
|
||||
// :NUM:1812
|
||||
// :REV:3.3
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,20 +4,22 @@
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2015-07-17 13:15:49
|
||||
// :EDITED:2015-07-20 00:23:28
|
||||
// :EDITED:2015-09-23 12:06:52
|
||||
// :ID:27
|
||||
// :NUM:1808
|
||||
// :REV:2
|
||||
// :REV:3
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Sample collision script for NPC animator
|
||||
// :CODE:
|
||||
// rev 3: added on_rez() and STATUS_PHANTOM to state_entry - otherwise reset on Linux boxes did no collide any more.
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSetText("",<1,1,1>,1.0);
|
||||
llSetStatus(STATUS_PHANTOM,FALSE);
|
||||
llVolumeDetect(FALSE);
|
||||
llSleep(0.1);
|
||||
llVolumeDetect(TRUE);
|
||||
}
|
||||
|
||||
@@ -38,4 +40,8 @@ default
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
on_rez(integer p)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,86 +0,0 @@
|
||||
// :SHOW:
|
||||
// :CATEGORY:Tour
|
||||
// :NAME:Endless Loop Mover
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS: Movement, Walking, Teleporting
|
||||
// :CREATED:2013-09-06
|
||||
// :ID:1084
|
||||
// :NUM:1817
|
||||
// :REV:1
|
||||
// :WORLD:OpenSim
|
||||
// :DESCRIPTION:
|
||||
// Rez this from inventory to make a route. Use the recorder to gather the route.
|
||||
// :CODE:
|
||||
|
||||
// name this prim '10' without the double quotes. You will use the prim #10 to establish a path of waypoints to follow.
|
||||
// Rez a prim ad name it '10', or any other number without the double quotes, at a spot at the beginning of the ride.
|
||||
// Mark the prim as 'Phantom'. The final gadget will pass through the #10 prim on its route.
|
||||
// Put the following script in it. Take a copy of that prim back into inventory.
|
||||
// Left-click and drag from inventory the '10' prim at a spot nearby, in the direction you want the object to travel.
|
||||
// If you use shift-copy, move it slightly, then grab the one you r left behind!
|
||||
// The prim you shift copy will be in reverse order, as the original #10 moves, and leaves behind a copy.
|
||||
// You canm also just drag out a new one each time you need another waypoint.
|
||||
|
||||
// Each prim will rename itself to the largest number found +10, about 5 seconds after it rezzes.
|
||||
// Since you started with prim #10, the second prim will rename itself as #20, the next will be 30, and so on.
|
||||
// When finsihes, click the tour object
|
||||
|
||||
|
||||
integer wanted = 0;
|
||||
integer debugger = 1;
|
||||
|
||||
list prims;
|
||||
|
||||
|
||||
debug(string message)
|
||||
{
|
||||
if (debugger)
|
||||
llOwnerSay(message);
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llListen(300,"","","");
|
||||
wanted++;
|
||||
llRegionSay(300,"number");
|
||||
llSetTimerEvent(5.0); // 5 seconds to hear from all prims
|
||||
llOwnerSay("Setting coordinates");
|
||||
}
|
||||
|
||||
listen(integer channel,string name, key id, string message)
|
||||
{
|
||||
if (message == "die")
|
||||
llDie();
|
||||
|
||||
else if (message =="where")
|
||||
llRegionSay(300,llGetObjectName() + "|" + (string) llGetPos() + "|" + (string) llGetRot() + "|" + llGetObjectDesc());
|
||||
|
||||
else if (message =="number")
|
||||
llRegionSay(300,llGetObjectName());
|
||||
|
||||
else if (wanted)
|
||||
{
|
||||
prims += (integer) message; // add to memory list
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
wanted = 0;
|
||||
prims = llListSort(prims,1,0); // sort descending
|
||||
integer num = (integer) llList2Integer(prims,0); // get highest number
|
||||
llSetObjectName((string) (num + 10)); // leave room for more prims to be added
|
||||
llOwnerSay("Name set to " + llGetObjectName() + ". You can add text to be spoken when the tour reaches this location by adding some text to the description of this object.");
|
||||
|
||||
llSetTimerEvent(0);
|
||||
}
|
||||
|
||||
on_rez(integer p)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
// :SHOW:
|
||||
// :CATEGORY:Tour
|
||||
// :NAME:Endless Loop Mover
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS: Movement, Walking, Teleporting
|
||||
// :CREATED:2013-09-06
|
||||
// :ID:1084
|
||||
// :REV:1
|
||||
// :WORLD:OpenSim
|
||||
// :DESCRIPTION:
|
||||
// Help notecard for the walker
|
||||
// :CODE:
|
||||
|
||||
// Open Source CC-BY-NC by Ferd Frederix
|
||||
================
|
||||
|
||||
The walker can be set to auto start in an endless loop(default), or it can be set to wait for a NPC to sit on it. It then unsits the NPC at the end of the route, and returns to the start at high speed.
|
||||
|
||||
The default route I set is a square in mid-air. Rez the prim, it should start moving. Sit on it, you should start walking. In production, make the box invsiible for a NPC to appear to walk at any orientation.
|
||||
|
||||
|
||||
|
||||
'10' Box
|
||||
|
||||
Name this prim '10' without the double quotes. You will use the prim #10 to establish a path of waypoints to follow. It can actually be named any INTEGER such as a 0 ot the number 310, but 10 is the standard start point.
|
||||
|
||||
Rez this at the beginning of the ride.
|
||||
|
||||
The final gadget will start at the #10 prim location and rotation/
|
||||
|
||||
Shift-copy the 10 prim, move it slightly, then GRAB THE ONE YOU LEFT BEHIND and move it to the next place. The prim you shift-copy will be #10, the one left behind will become #20. The original #10 moves, and leaves behind a copy. This copy will automatically make it itself the next larger number.
|
||||
|
||||
You can also just drag out a new one each time you need another waypoint.
|
||||
|
||||
Each prim will rename itself to the largest number found ANYWHERE in the sim, plus 10, about 5 seconds after it rezzes. Since you started with prim #10, the second prim will rename itself as #20, the next will be 30, and so on.
|
||||
|
||||
When finished, click the tour object.
|
||||
|
||||
If you make a mistake, and need to fix it, you can move the prims around. You can renumber them. You can add more prims in between 10 and 20, just renumber them 11, 12, 13, or whatever.
|
||||
|
||||
==============================
|
||||
Walker Prim - rez the #10 prims, and then touch the tour prim to record a route
|
||||
|
||||
The route prim will follow the route. Fix any issues by replacing, removing or adding the numbered prims, and touch to save
|
||||
|
||||
When finished, delete the Recorder script that is inside the walker as it is not needed.
|
||||
|
||||
The walker can be set to auto start in an endless loop(default), or it can be set to wait for a NPC to sit on it. It then unsits the NPC at the end of the route, and returns to the start at high speed.
|
||||
|
||||
.
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// :SHOW:
|
||||
// :CATEGORY:Tour
|
||||
// :NAME:Endless Loop Mover
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS: Movement, Walking, Teleporting
|
||||
// :CREATED:2013-09-06
|
||||
// :ID:1084
|
||||
// :REV:1
|
||||
// :WORLD:OpenSim
|
||||
// :DESCRIPTION:
|
||||
// Sample route card to walk in a vertical square
|
||||
// :CODE:
|
||||
|
||||
130|<133.538467,130.615784,23.190590>|<0.000000,0.026177,0.000000,0.999657>|
|
||||
140|<133.779236,130.620636,24.137348>|<0.000000,-0.719340,0.000000,0.694658>|
|
||||
150|<133.779236,130.620636,26.521872>|<0.000000,-0.719340,0.000000,0.694658>|
|
||||
160|<133.310989,130.620636,27.378088>|<0.000000,-0.999962,0.000000,0.008728>|
|
||||
170|<131.158035,130.620636,27.165934>|<0.000000,-0.999962,0.000000,0.008728>|
|
||||
180|<130.844910,130.620636,26.573608>|<0.000000,0.700910,0.000000,0.713250>|
|
||||
210|<130.844910,130.620636,24.083681>|<0.006117,0.700884,-0.006224,0.713222>|
|
||||
220|<131.174484,130.620636,23.452608>|<0.008725,-0.034897,0.000152,0.999353>|
|
||||
@@ -1,122 +0,0 @@
|
||||
// :SHOW:
|
||||
// :CATEGORY:Telepad
|
||||
// :NAME:Endless Loop Mover
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2015-08-05 09:56:03
|
||||
// :ID:1084
|
||||
// :NUM:1818
|
||||
// :REV:1
|
||||
// :WORLD:Opensim
|
||||
// :DESCRIPTION:
|
||||
// Route Recorder Script - touch to make a route
|
||||
// :CODE:
|
||||
// Open Source CC-BY-NC
|
||||
|
||||
// Recorder script - put this in the touring prim, rez thre #10 prims, and then touch the tour prim to record a route
|
||||
// the route prim will follow the route. Fix any issues by replacing, removing or adding the numbered prims, and touch to save
|
||||
// When finished, delete this script as it is not needed.
|
||||
|
||||
integer debugger = FALSE;
|
||||
list prims;
|
||||
|
||||
debug(string message)
|
||||
{
|
||||
if (debugger)
|
||||
llOwnerSay(message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
string left(string src, string divider) {
|
||||
integer index = llSubStringIndex( src, divider );
|
||||
if(~index)
|
||||
return llDeleteSubString( src, index , -1);
|
||||
return src;
|
||||
}
|
||||
|
||||
string right(string src, string divider) {
|
||||
integer index = llSubStringIndex( src, divider );
|
||||
if(~index)
|
||||
return llDeleteSubString( src, 0, index + llStringLength(divider) - 1);
|
||||
return src;
|
||||
}
|
||||
|
||||
|
||||
list lines;
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSetText("Click after setting up all tour prims. \nShout on channel '/300 die' to clear all prims", <1.0, 1.0, 1.0>, 2.0);
|
||||
|
||||
}
|
||||
|
||||
touch_start(integer n)
|
||||
{
|
||||
if (llDetectedKey(0) == llGetOwner()) {
|
||||
llOwnerSay("Looking for Route Prims, please wait");
|
||||
prims = [];
|
||||
|
||||
lines = [];
|
||||
|
||||
llListen(300,"","","");
|
||||
llRegionSay(300,"where");
|
||||
}
|
||||
}
|
||||
|
||||
listen(integer channel,string name, key id, string message)
|
||||
{
|
||||
debug(llGetObjectName() + " heard " + message);
|
||||
list parts = llParseString2List(message,["|"],[]);
|
||||
|
||||
integer l = (integer) llList2String(parts,0);
|
||||
vector p = (vector) llList2String(parts,1);
|
||||
rotation r = (rotation) llList2String(parts,2);
|
||||
string text = llList2String(parts,3);
|
||||
|
||||
integer isthere = llListFindList(prims,[(integer) l]);
|
||||
|
||||
if (isthere > -1)
|
||||
{
|
||||
llOwnerSay("Error, there are two prims named " + l + ". Please make sure each prim is uniquely numbered from - to N in sequence from the start prim to the finish prim. Gaps in the sequence are allowed.");
|
||||
}
|
||||
prims += (integer) l;
|
||||
prims += (vector) p;
|
||||
prims += (rotation) r;
|
||||
prims += text;
|
||||
llSetTimerEvent(5.0);
|
||||
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
llSetTimerEvent(0);
|
||||
integer i = 0;
|
||||
|
||||
prims = llListSort(prims,4,1);
|
||||
|
||||
for (i = 0; i < llGetListLength(prims); i+=4)
|
||||
{
|
||||
integer primnum = llList2Integer(prims,i);
|
||||
vector loc = llList2Vector(prims,i+1);
|
||||
rotation rot = llList2Rot(prims,i+2);
|
||||
string text = llList2String(prims,i+3);
|
||||
lines += [(string) primnum + "|" + (string) loc + "|" + (string) rot + "|" + text];
|
||||
|
||||
}
|
||||
if (llGetInventoryType("Route") == INVENTORY_NOTECARD)
|
||||
llRemoveInventory("Route");
|
||||
|
||||
osMakeNotecard("Route",lines);
|
||||
llOwnerSay("Route updated");
|
||||
llResetOtherScript("Walker");
|
||||
llSetText("",<1,1,1>,1.0);
|
||||
}
|
||||
|
||||
on_rez(integer p)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
@@ -1,264 +0,0 @@
|
||||
// :SHOW:
|
||||
// :CATEGORY:Telepad
|
||||
// :NAME:Endless Loop Mover
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2015-08-05 09:54:56
|
||||
// :ID:1084
|
||||
// :NUM:1816
|
||||
// :REV:1
|
||||
// :WORLD:OpenSim
|
||||
// :DESCRIPTION:
|
||||
// Sit on this prim, it will move you to a destination and unseat you, optionally repeat forever.
|
||||
// :CODE:
|
||||
// Open Source CC-BY-NC
|
||||
// Please keep open source Open!
|
||||
|
||||
|
||||
integer _debug = FALSE; // print in chats what i s happening.
|
||||
integer Endless = TRUE;
|
||||
vector OFFSET = <0,0,0>; // if you want the tour to ride hiogher or lower or to one side...
|
||||
|
||||
float SPEED = 1.0; // speed of vehicle in meters per second
|
||||
|
||||
// Sit for the NPC
|
||||
vector TARGET = <0,0,.7>;
|
||||
vector ROT = <0, 0, 0>;
|
||||
key av;
|
||||
|
||||
float INTERVAL = 0.5; // how often we check
|
||||
float TOLERANCE = 1; // how close to get
|
||||
|
||||
vector startPos;
|
||||
list lCoordinate;
|
||||
list lRotation ;
|
||||
list lText;
|
||||
|
||||
string NOTECARD = "Route"; // the notecard for configuring
|
||||
|
||||
integer count = 0;
|
||||
|
||||
vector TargetLocation;
|
||||
rotation TargetRotation;
|
||||
|
||||
|
||||
Goto(float speed)
|
||||
{
|
||||
if (_debug)
|
||||
llOwnerSay("Looking at Target Location = " + (string) TargetLocation);
|
||||
|
||||
vector ownPosition = llGetPos();
|
||||
float dist = llVecDist(ownPosition, TargetLocation);
|
||||
|
||||
float rate = dist / speed;
|
||||
|
||||
rotation ownRotation = llGetRot();
|
||||
|
||||
llSetKeyframedMotion(
|
||||
[(TargetLocation - ownPosition) + <0.0, 0.0, -.5> * TargetRotation,
|
||||
NormRot(TargetRotation/ownRotation), rate],
|
||||
[]);
|
||||
|
||||
}
|
||||
|
||||
rotation NormRot(rotation Q)
|
||||
{
|
||||
float MagQ = llSqrt(Q.x*Q.x + Q.y*Q.y +Q.z*Q.z + Q.s*Q.s);
|
||||
|
||||
return
|
||||
<Q.x/MagQ, Q.y/MagQ, Q.z/MagQ, Q.s/MagQ>;
|
||||
}
|
||||
|
||||
integer locationLength;
|
||||
|
||||
|
||||
default
|
||||
{
|
||||
on_rez(integer param)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
state_entry()
|
||||
{
|
||||
if (_debug)
|
||||
llOwnerSay("Reset");
|
||||
|
||||
|
||||
rotation rot = llEuler2Rot(ROT * DEG_TO_RAD); // convert the degrees to radians, then convert that vector into a rotation, rot30x
|
||||
llSitTarget(TARGET, rot); // where they sit
|
||||
|
||||
// read the notecard
|
||||
string data = osGetNotecard(NOTECARD);
|
||||
list lLine = llParseString2List(data, ["\n"], []);
|
||||
integer i;
|
||||
integer j = llGetListLength(lLine);
|
||||
for (i = 0; i < j; i++)
|
||||
{
|
||||
string aLine = llList2String(lLine,i);
|
||||
|
||||
list iList = llParseString2List(aLine, ["|"], []);
|
||||
if (_debug ) llOwnerSay("Line = " + llDumpList2String(iList,":"));
|
||||
|
||||
vector TempLocation = (vector) llList2Vector(iList,1);
|
||||
if (TempLocation != ZERO_VECTOR)
|
||||
{
|
||||
rotation Rot = (rotation) llList2String(iList,2);
|
||||
string text = llList2String(iList,3);
|
||||
|
||||
if (_debug) llOwnerSay((string)TempLocation);
|
||||
|
||||
TempLocation += OFFSET;
|
||||
|
||||
lCoordinate += [TempLocation];
|
||||
|
||||
lRotation += [Rot];
|
||||
lText += [text];
|
||||
|
||||
locationLength = (llGetListLength(lCoordinate));
|
||||
}
|
||||
}
|
||||
state paused;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
state paused {
|
||||
|
||||
state_entry()
|
||||
{
|
||||
if (_debug) llOwnerSay("Pause");
|
||||
|
||||
if (!Endless) {
|
||||
|
||||
av = llAvatarOnSitTarget();
|
||||
if (av != NULL_KEY) {
|
||||
llStopAnimation("avatar_walk");
|
||||
llUnSit(av);
|
||||
}
|
||||
}
|
||||
|
||||
TargetLocation = llList2Vector(lCoordinate, 0); // Look at 0th
|
||||
TargetRotation = llList2Rot(lRotation, 0); // Look at 0th
|
||||
startPos = TargetLocation;
|
||||
Goto(50); // go fast
|
||||
|
||||
count = 0;
|
||||
|
||||
|
||||
if (Endless)
|
||||
state moving;
|
||||
}
|
||||
|
||||
changed(integer change)
|
||||
{
|
||||
if (change & CHANGED_LINK)
|
||||
{
|
||||
key av = llAvatarOnSitTarget();
|
||||
if (_debug) llOwnerSay("Sit by " + (string) av);
|
||||
|
||||
if (av!= NULL_KEY)
|
||||
{
|
||||
llRequestPermissions(av,PERMISSION_TRIGGER_ANIMATION);
|
||||
}
|
||||
}
|
||||
|
||||
if (change & CHANGED_REGION_START)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
}
|
||||
|
||||
run_time_permissions(integer n)
|
||||
{
|
||||
if (n & PERMISSION_TRIGGER_ANIMATION) {
|
||||
|
||||
llStopAnimation("sit");
|
||||
llStartAnimation("avatar_walk");
|
||||
state moving;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
state moving
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
if (_debug) llOwnerSay("State Moving entered, is pointing to target " + (string) TargetLocation );
|
||||
|
||||
count ++;
|
||||
|
||||
TargetLocation = llList2Vector(lCoordinate, count); // Look at nth
|
||||
TargetRotation = llList2Rot(lRotation, count); // Look at nth
|
||||
string SpeakThis = llList2String(lText, count);
|
||||
|
||||
if (llStringLength(SpeakThis))
|
||||
llSay(0,SpeakThis);
|
||||
|
||||
Goto(SPEED);
|
||||
llSetTimerEvent(INTERVAL);
|
||||
}
|
||||
|
||||
changed(integer change)
|
||||
{
|
||||
if (change & CHANGED_LINK)
|
||||
{
|
||||
av = llAvatarOnSitTarget();
|
||||
if (av == NULL_KEY) //evaluated as true if not NULL_KEY or invalid
|
||||
{
|
||||
state paused;
|
||||
} else {
|
||||
llRequestPermissions(av,PERMISSION_TRIGGER_ANIMATION);
|
||||
}
|
||||
}
|
||||
if (change & CHANGED_REGION_START)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
run_time_permissions(integer n)
|
||||
{
|
||||
if (n & PERMISSION_TRIGGER_ANIMATION) {
|
||||
|
||||
llStopAnimation("sit");
|
||||
llStartAnimation("avatar_walk");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
on_rez(integer param)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
if (_debug) llOwnerSay("tick");
|
||||
if (llVecMag(llGetPos() - TargetLocation) <= TOLERANCE) {
|
||||
if (_debug) llOwnerSay("At location: " + (string) llGetPos());
|
||||
|
||||
count ++;
|
||||
|
||||
if (count >= locationLength) {
|
||||
if (_debug) llOwnerSay("EOF");
|
||||
state paused;
|
||||
|
||||
} else {
|
||||
TargetLocation = llList2Vector(lCoordinate, count); // Look at nth
|
||||
TargetRotation = llList2Rot(lRotation, count); // Look at nth
|
||||
|
||||
Goto(SPEED);
|
||||
if (_debug) llOwnerSay("New Target: " + (string) TargetLocation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
state_exit()
|
||||
{
|
||||
llSetTimerEvent(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<Solution name="Phaze TipJar">
|
||||
<Project name="Phaze TipJar" path="Phaze TipJar\Phaze TipJar.prj" active="true"/>
|
||||
</Solution>
|
||||
@@ -1,168 +0,0 @@
|
||||
// Particle Script 0.4j
|
||||
// Created by Ama Omega 3-7-2004
|
||||
// Updated by Jopsy Pendragon 5-11-2004
|
||||
// For classes/tutorials/tricks, visit the Particle Labratory in Teal
|
||||
// Values marked with (*) are defaults.
|
||||
|
||||
integer flagger = 0;
|
||||
|
||||
// SECTION ONE: APPEARANCE -- These settings affect how each particle LOOKS.
|
||||
integer glow = TRUE; // TRUE or FALSE(*)
|
||||
vector startColor = <1,1,1>; // RGB color, black<0,0,0> to white<1,1,1>(*)
|
||||
vector endColor = <1,1,1>; //
|
||||
float startAlpha = 1.0; // 0.0 to 1.0(*), lower = more transparent
|
||||
float endAlpha = 1.0; //
|
||||
vector startSize = <0.0,0.0,0>; // <0.04,0.04,0>(min) to <10,10,0>(max>, <1,1,0>(*)
|
||||
vector endSize = <0.05,0.05,0>; // (Z part of vector is discarded)
|
||||
string texture = "44c04376-637b-ef18-9404-723acd0fce91"; // Texture used for particles. Texture must be in prim's inventory.
|
||||
|
||||
// SECTION TWO: FLOW -- These settings affect how Many, how Quickly, and for how Long particles are created.
|
||||
// Note,
|
||||
integer count = 1; // Number of particles created per burst, 1(*) to 4096
|
||||
float rate = 1; // Delay between bursts of new particles, 0.0 to 60, 0.1(*)
|
||||
float age = 5.0; // How long each particle lives, 0.1 to 60, 10.0(*)
|
||||
float life = 0.0; // When to stop creating new particles. never stops if 0.0(*)
|
||||
|
||||
// SECTION THREE: PLACEMENT -- Where are new particles created, and what direction are they facing?
|
||||
float radius = 0.15; // 0.0(default) to 64? Distance from Emitter where new particles are created.
|
||||
float innerAngle = .1 ; // "spread", for all ANGLE patterns, 0(default) to PI
|
||||
float outerAngle = .1; // "tilt", for ANGLE patterns, 0(default) to TWO_PI, can use PI_BY_TWO or PI as well.
|
||||
integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE; // Choose one of the following:
|
||||
// PSYS_SRC_PATTERN_EXPLODE (sends particles in all directions)
|
||||
// PSYS_SRC_PATTERN_DROP (ignores minSpeed and maxSpeed. Don't bother with count>1 )
|
||||
// PSYS_SRC_PATTERN_ANGLE_CONE (set innerangle/outerange to make rings/cones of particles)
|
||||
// PSYS_SRC_PATTERN_ANGLE (set innerangle/outerangle to make flat fanshapes of particles)
|
||||
vector omega = <0,0,0>; // How much to rotate the emitter around the <X,Y,Z> axises. <0,0,0>(*)
|
||||
// Warning, there's no way to RESET the emitter direction once you use Omega!!
|
||||
// You must attach the script to a new prim to clear the effect of omega.
|
||||
|
||||
// SECTION FOUR: MOVEMENT -- How do the particles move once they're created?
|
||||
integer followSource = FALSE; // TRUE or FALSE(*), Particles move as the emitter moves, (TRUE disables radius!)
|
||||
integer followVel = TRUE; // TRUE or FALSE(*), Particles rotate towards their direction
|
||||
integer wind = FALSE; // TRUE or FALSE(*), Particles get blown away by wind in the sim
|
||||
integer bounce = FALSE; // TRUE or FALSE(*), Make particles bounce on Z altitude of emitter
|
||||
float minSpeed = 0.04; // 0.01 to ? Min speed each particle is spit out at, 1.0(*)
|
||||
float maxSpeed = 0.08; // 0.01 to ? Max speed each particle is spit out at, 1.0(*)
|
||||
vector push = <0,0,-0.03>; // Continuous force pushed on particles, use small settings for long lived particles
|
||||
key target = ""; // Select a target for particles to arrive at when they die
|
||||
// can be "self" (emitter), "owner" (you), "" or any prim/persons KEY.
|
||||
|
||||
// SECTION FIVE: Ama's "Create Short Particle Settings List"
|
||||
integer enableoutput = FALSE; // If this is TRUE, clicking on your emitter prim will cause it to speak
|
||||
// very terse "shorthand" version of your particle settings. You can cut'n'paste
|
||||
// this abbreviated version into a call to llParticleSystem([ ]); in another script.
|
||||
// Pros: Takes up far less scripting space, letting you focus on the rest of your code.
|
||||
// Cons: makes tune your settings afterwards rather awkward
|
||||
|
||||
// === Don't muck about below this line unless you're comfortable with the LSL scripting language ====
|
||||
|
||||
// Script variables
|
||||
integer pre = 2; //Adjust the precision of the generated list.
|
||||
integer flags;
|
||||
list sys;
|
||||
integer type;
|
||||
vector tempVector;
|
||||
rotation tempRot;
|
||||
string tempString;
|
||||
integer i;
|
||||
|
||||
|
||||
Play()
|
||||
{
|
||||
//llOwnerSay("Touched");
|
||||
count = 10;
|
||||
age = 30;
|
||||
//minSpeed = 1.0;
|
||||
maxSpeed = 0.5 ;
|
||||
endSize = <1.5,1.5,0>; // (Z part of vector is discarded)
|
||||
float x = llFrand(0.1);
|
||||
float y = llFrand(0.1);
|
||||
push = <x,y,0.03>; // Continuous force pushed on particles
|
||||
wind = TRUE;
|
||||
updateParticles();
|
||||
llSleep(8);
|
||||
reset();
|
||||
updateParticles();
|
||||
}
|
||||
|
||||
|
||||
|
||||
reset()
|
||||
{
|
||||
|
||||
count = 1; // Number of particles created per burst, 1(*) to 4096
|
||||
age = 5.0; // How long each particle lives, 0.1 to 60, 10.0(*)
|
||||
maxSpeed = 0.08; // speed issued at
|
||||
endSize = <0.05,0.05,0>; // (Z part of vector is discarded)
|
||||
push = <0,0,-0.03>; // Continuous force pushed on particles
|
||||
wind = FALSE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
updateParticles()
|
||||
{
|
||||
flags = 0;
|
||||
if (target == "owner") target = llGetOwner();
|
||||
if (target == "self") target = llGetKey();
|
||||
if (glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
|
||||
if (bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
|
||||
if (startColor != endColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
|
||||
if (startSize != endSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
|
||||
if (wind) flags = flags | PSYS_PART_WIND_MASK;
|
||||
if (followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
|
||||
if (followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
|
||||
if (target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
|
||||
sys = [ PSYS_PART_MAX_AGE,age,
|
||||
PSYS_PART_FLAGS,flags,
|
||||
PSYS_PART_START_COLOR, startColor,
|
||||
PSYS_PART_END_COLOR, endColor,
|
||||
PSYS_PART_START_SCALE,startSize,
|
||||
PSYS_PART_END_SCALE,endSize,
|
||||
PSYS_SRC_PATTERN, pattern,
|
||||
PSYS_SRC_BURST_RATE,rate,
|
||||
PSYS_SRC_ACCEL, push,
|
||||
PSYS_SRC_BURST_PART_COUNT,count,
|
||||
PSYS_SRC_BURST_RADIUS,radius,
|
||||
PSYS_SRC_BURST_SPEED_MIN,minSpeed,
|
||||
PSYS_SRC_BURST_SPEED_MAX,maxSpeed,
|
||||
PSYS_SRC_TARGET_KEY,target,
|
||||
PSYS_SRC_INNERANGLE,innerAngle,
|
||||
PSYS_SRC_OUTERANGLE,outerAngle,
|
||||
PSYS_SRC_OMEGA, omega,
|
||||
PSYS_SRC_MAX_AGE, life,
|
||||
PSYS_SRC_TEXTURE, texture,
|
||||
PSYS_PART_START_ALPHA, startAlpha,
|
||||
PSYS_PART_END_ALPHA, endAlpha
|
||||
];
|
||||
float newrate = rate;
|
||||
if (newrate == 0.0) newrate=.01;
|
||||
if ( (age/rate)*count < 4096) llParticleSystem(sys);
|
||||
else {
|
||||
llInstantMessage(llGetOwner(),"Your particle system creates too many concurrent particles.");
|
||||
llInstantMessage(llGetOwner(),"Reduce count or age, or increate rate.");
|
||||
llParticleSystem( [ ] );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
reset();
|
||||
updateParticles();
|
||||
}
|
||||
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
llSay(0,"Butterfly Tip Jar for 'Phase Demesnes', pay it to pop!");
|
||||
}
|
||||
|
||||
link_message(integer sender_num, integer num, string msg, key id)
|
||||
{
|
||||
Play();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<Project name="Phaze TipJar" guid="5fa87a8e-5e68-4972-ae51-a87b1e11106c">
|
||||
<Object name="Top Half sphere" guid="1299d0f3-3612-47a7-b21c-133cb6e1577d" active="true">
|
||||
<Script name="Script.lsl" guid="7133cfe5-b191-4fbd-ae69-0694b05b539d">
|
||||
</Script>
|
||||
<Sound name="pop" guid="0e0d8c3d-c207-4cb3-9840-b17650dca9e2">
|
||||
</Sound>
|
||||
</Object>
|
||||
<Object name="Base" guid="ac61b009-a6d6-470f-a53f-0dfd1caf34bf">
|
||||
<Script name="Butterflies.lsl" guid="46fb3504-f57f-4595-ad42-4cc7aaa61bb3">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -1,66 +0,0 @@
|
||||
//Keknehv Psaltery Updated Version of DONATION BOX By jean cook, ama omega, and nada epoch Debugged by YadNi Monde.
|
||||
// changed into a butterfly dispenser by Ferd Frederix
|
||||
// (LoL) Yea, that s a Bunch O Peeps =)
|
||||
|
||||
//Summary: The following script will make an object accept donations on your behalf.
|
||||
//Usage: stick it on any object you own(my favorite is a top hat), and it will promptly display:
|
||||
//"<your name>'s donation hat.
|
||||
//Donate if you are so inclined."
|
||||
//at which point anyone can right click on it and give you a tip. also, the script tells the donator thanks, and then tells you who donated how much
|
||||
//also shows the total amount donated
|
||||
|
||||
|
||||
|
||||
integer totaldonated = 103793;
|
||||
string owner;
|
||||
|
||||
default
|
||||
{
|
||||
on_rez( integer sparam )
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
state_entry()
|
||||
{
|
||||
llSetPayPrice(PAY_HIDE, [50 ,100, 200, 500]);
|
||||
owner = llKey2Name( llGetOwner() );
|
||||
llSetText( owner + "'s Tip Jar.\nRelease the butterflies!",<.25,1,.65>,1);
|
||||
}
|
||||
|
||||
money(key id, integer amount)
|
||||
{
|
||||
|
||||
totaldonated += amount;
|
||||
string name= llKey2Name(id);
|
||||
llSetText( owner + "'s Tip Jar.\nRelease the butterflies!\n \nLast Donor:\n " + name + " gave $L" + (string)amount ,<.25,1,.65>,1);
|
||||
//llInstantMessage(id,"Thanks for the tip! I really appreciate it. ~ Ferd Frederix");
|
||||
|
||||
if (amount == 1)
|
||||
llSay(0,"Uhh, thanks I think, " + name );
|
||||
|
||||
if (amount > 0)
|
||||
llSay(0,"Thanks for the tip, " + name +"! I really appreciate it. ~ Ferd Frederix");
|
||||
else if (amount > 100)
|
||||
llSay(0,"Thanks for the awesome tip, " + name +"! I appreciate it. ~ Ferd Frederix");
|
||||
else if (amount > 300)
|
||||
llSay(0,"Thanks for the AWESOME tip, " + name +"! I really appreciate it. ~ Ferd Frederix");
|
||||
|
||||
llInstantMessage(llGetOwner(),(string)llKey2Name(id)+" donated $" + (string)amount);
|
||||
|
||||
llMessageLinked(LINK_ALL_OTHERS, 0, "touched", "");
|
||||
llPlaySound("pop",1.0);
|
||||
llSetAlpha(0,ALL_SIDES);
|
||||
llSetTimerEvent(10.0);
|
||||
llEmail("fred@mitsi.com",(string)llKey2Name(id)+" donated $" + (string)amount,"");
|
||||
}
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
llWhisper(0,"Butterfly Tip Jar for 'Phase Demesnes', total donated so far: " + (string) totaldonated );
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
llSetAlpha(0.1,ALL_SIDES);
|
||||
llSetTimerEvent(0.0);
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
<h1>Home Security Prim Documentation</h1>
|
||||
<h2><span editable="true" id="PageTitle">Index</span></h2>
|
||||
<h3><span editable="true" id="SectionTitle1">Chapters</span></h3>
|
||||
<!--center><img src="http://www.outworldz.com/images/warn40px.png" align="middle"> <a href="/mediaprivacy"><font color="red">Important message about Second Life Shared Media security risks.</font></a></center-->
|
||||
<!--center><img src="/images/warn40px.png" align="middle"> <a href="/mediaprivacy"><font color="red">Important message about Second Life Shared Media security risks.</font></a></center-->
|
||||
<ul>
|
||||
<li style="text-align: left;"><a href="what.html">What does it do?</a></li>
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<Solution name="Synced Pose balls">
|
||||
<Project name="Synced Pose balls" path="Synced Pose balls\Synced Pose balls.prj" active="true"/>
|
||||
</Solution>
|
||||
@@ -1,89 +0,0 @@
|
||||
//:AUTHOR: Ferd Frederix
|
||||
//:DESCRIPTION: Two Or more people sit on two or more pose balls. The pose balls play a series of animation in sync
|
||||
//:CODE:
|
||||
// To use this, just put several dances in a prim and add this script.
|
||||
// Shift-copy the prim. Anyone who touches it will dance in sync with anyone else who touches it.
|
||||
|
||||
|
||||
float RATE = 10.0; // rate to play animations
|
||||
|
||||
string lastDance; // the last dance played on the slave script
|
||||
string animation ; // the currwent animation name we must play
|
||||
integer index; // the num,ber of that animation found in inventory
|
||||
key avatarK; // the key of tjhe seated avatar
|
||||
integer channel = -12134; // some random number
|
||||
integer granted = FALSE;
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llSetClickAction(CLICK_ACTION_SIT);
|
||||
llListen(channel,"","","");
|
||||
}
|
||||
|
||||
on_rez(integer p)
|
||||
{
|
||||
llResetScript();
|
||||
}
|
||||
|
||||
|
||||
changed (integer detected)
|
||||
{
|
||||
if (detected & CHANGED_LINK)
|
||||
{
|
||||
avatarK = llAvatarOnSitTarget();
|
||||
if (avatarK != NULL_KEY)
|
||||
{
|
||||
index = 0;
|
||||
llRequestPermissions(avatarK, PERMISSION_TRIGGER_ANIMATION);
|
||||
} else {
|
||||
granted = FALSE;
|
||||
llSetTimerEvent(0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
run_time_permissions(integer perm)
|
||||
{
|
||||
if (perm & PERMISSION_TRIGGER_ANIMATION)
|
||||
{
|
||||
granted = TRUE;
|
||||
animation = llGetInventoryName(INVENTORY_ANIMATION, index); // first animation
|
||||
llSay(channel,animation); // tell another poseball to let them dance.
|
||||
llStartAnimation(animation);
|
||||
llSetTimerEvent(RATE);
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
integer newindex = index; // We must stop old animation
|
||||
newindex++; // and play new one
|
||||
|
||||
// test to see if we are past the end
|
||||
if (newindex >= llGetInventoryNumber(INVENTORY_ANIMATION))
|
||||
newindex = 0;
|
||||
|
||||
llSay(channel,llGetInventoryName(INVENTORY_ANIMATION, newindex)); // tell another poseball to let them dance.
|
||||
llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, newindex));
|
||||
llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, index));
|
||||
|
||||
index = newindex; // get ready for the next animation
|
||||
}
|
||||
|
||||
listen(integer channel, string name, key id, string message)
|
||||
{
|
||||
llSetTimerEvent(0); // last one to send a message wins control
|
||||
|
||||
if (granted)
|
||||
{
|
||||
llStartAnimation(message);
|
||||
if (llStringLength(lastDance))
|
||||
llStopAnimation(lastDance);
|
||||
lastDance = message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<Project name="Synced Pose balls" guid="c2feccdf-1f0e-4cf5-adfb-832e917d81d0">
|
||||
<Object name="Poseball1" guid="6ea403c0-3678-43b6-9f73-c96eccbe6cda" active="true">
|
||||
<Animation name="Animation.ani" guid="fb23999c-ea78-4011-9712-9cd225b7488b">
|
||||
</Animation>
|
||||
<Animation name="Animation2.ani" guid="2d4132a9-c6ac-497d-bafc-3f620746db17">
|
||||
</Animation>
|
||||
<Script name="Script.lsl" guid="6b443a7a-d27a-4773-82d8-010adca31758">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -1,2 +0,0 @@
|
||||
[InternetShortcut]
|
||||
URL=https://thingspeak.com/channels/47964
|
||||
@@ -1,3 +0,0 @@
|
||||
<Solution name="ThingSpeak Chart">
|
||||
<Project name="ThingSpeak Chart" path="ThingSpeak Chart\ThingSpeak Chart.prj" active="true"/>
|
||||
</Solution>
|
||||
@@ -1,6 +0,0 @@
|
||||
<Project name="ThingSpeak Chart" guid="7baf63b5-8d5e-4185-9a19-f63fa9137e66">
|
||||
<Object name="Web Chart Sender" guid="55798561-38d6-4ad2-91fc-d8ea5997ad19" active="true">
|
||||
<Script name="Script.lsl" guid="255edfda-df79-4ddd-aa76-c67ed1b0859d">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -1,131 +0,0 @@
|
||||
|
||||
integer osIsNpc(key UUID) { return 0; }
|
||||
|
||||
|
||||
string wAPIKey = "419JVLGPPTCM5TZ1";
|
||||
|
||||
string ChannelID = "47964";
|
||||
string fieldID = "field1";
|
||||
|
||||
list exclude = [];
|
||||
// You can add a list of name of people to exclude, such as your name.
|
||||
// list exclude = ["Nara Malone","Ferd Frederix"];
|
||||
|
||||
integer debug = FALSE;
|
||||
integer hovertext = TRUE; // shows visitor count, or not
|
||||
integer ToDo;
|
||||
integer timeGoneBy = 0;
|
||||
|
||||
DEBUG(string msg)
|
||||
{
|
||||
if (debug ) llOwnerSay(msg);
|
||||
}
|
||||
|
||||
key http_request_id;
|
||||
list ToDoURL;
|
||||
|
||||
default
|
||||
{
|
||||
|
||||
state_entry()
|
||||
{
|
||||
llSetText("", <1,1,1>, 1);
|
||||
|
||||
string url = "https://api.thingspeak.com/update?api_key="
|
||||
+ wAPIKey
|
||||
+ "&"
|
||||
+ "title"
|
||||
+ "="
|
||||
+ "Visitors";
|
||||
|
||||
http_request_id = llHTTPRequest(llList2String(ToDoURL,0), [], "");
|
||||
llSetTimerEvent(1);
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
if (ToDo == 0 && timeGoneBy )
|
||||
{
|
||||
DEBUG((string) timeGoneBy);
|
||||
timeGoneBy--;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ToDo == 0 && !timeGoneBy )
|
||||
{
|
||||
timeGoneBy = 60;
|
||||
|
||||
ToDoURL = [];
|
||||
|
||||
list keys = llGetAgentList(AGENT_LIST_REGION,[]);
|
||||
|
||||
integer i;
|
||||
for (i=0; i < llGetListLength(keys); ++i)
|
||||
{
|
||||
key UUID = llList2Key(keys,i);
|
||||
if (!osIsNpc(UUID)) {
|
||||
string name = llKey2Name(UUID); // name
|
||||
DEBUG("Checking " + name);
|
||||
|
||||
if (hovertext) llSetText(name, <1,1,1>, 1);
|
||||
if (llListFindList(exclude,[name]) == -1)
|
||||
{
|
||||
list details = llGetObjectDetails(UUID, [OBJECT_POS]) ; // pos
|
||||
vector pos = llList2Vector(details,0);
|
||||
string x = (string) pos.x;
|
||||
string y = (string) pos.y;
|
||||
string z = (string) pos.z;
|
||||
|
||||
// parcel
|
||||
details = llGetParcelDetails(pos,[PARCEL_DETAILS_NAME]);
|
||||
string parcel = llList2String(details,0);
|
||||
|
||||
string url = "https://api.thingspeak.com/update?api_key=" + wAPIKey
|
||||
+ "&field1=" + x;
|
||||
+ "&field2=" + y;
|
||||
|
||||
DEBUG(url);
|
||||
ToDoURL += url;
|
||||
}
|
||||
}
|
||||
}
|
||||
ToDo = 1; // send them
|
||||
}
|
||||
else if (ToDo == 1)
|
||||
{
|
||||
if (llGetListLength(ToDoURL) == 0)
|
||||
{
|
||||
ToDo = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG(llList2String(ToDoURL,0));
|
||||
http_request_id = llHTTPRequest(llList2String(ToDoURL,0), [], "");
|
||||
|
||||
ToDoURL = llDeleteSubList(ToDoURL,0,0);
|
||||
}
|
||||
}
|
||||
|
||||
http_response(key request_id, integer status, list metadata, string body)
|
||||
{
|
||||
if (request_id == http_request_id)
|
||||
{
|
||||
if (hovertext)
|
||||
llSetText("Click for Stats", <0,0,1>, 1);
|
||||
|
||||
DEBUG(body);
|
||||
}
|
||||
}
|
||||
|
||||
touch_start(integer p)
|
||||
{
|
||||
if (llDetectedKey(0) == llGetOwner())
|
||||
{
|
||||
llLoadURL(llGetOwner(), "Click to view vistors", "https://thingspeak.com/channels/"
|
||||
+ ChannelID
|
||||
+ "/"
|
||||
+ fieldID);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,6 @@
|
||||
// :DESCRIPTION:
|
||||
// A list of breed names notecard. Use one line per breed name. The lines that begin with // are ignored.
|
||||
// :CODE:
|
||||
|
||||
// could be anything, such as
|
||||
// Fat Yellow Chicken
|
||||
// Scrawny Red Chicken
|
||||
|
||||
Reference in New Issue
Block a user