Push All Scripts

This commit is contained in:
Fred Beckhusen
2015-08-07 10:38:47 -05:00
parent 2ad9795428
commit ce47ec2f3e
8079 changed files with 2442776 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
// :CATEGORY:OpenSim NPC
// :NAME:OpenSim NPC Fish
// :AUTHOR:Ferd Frederix
// :KEYWORDS:
// :CREATED:2014-02-14 12:33:23
// :EDITED:2014-02-14 12:33:23
// :ID:1024
// :NUM:1589
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// Swimming Fish script for NPC's
// :CODE:
<llsd>
<map>
<key>serial</key>
<integer>0</integer>
<key>height</key>
<real>2.2260611057281494</real>
<key>hashes</key>
<array>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
<uuid>00000000-0000-0000-0000-000000000000</uuid>
</array>
<key>wearables</key>
<array>
<array>
<map>
<key>item</key>
<uuid>fa69b385-f96e-4910-b30c-60ce9f1d1b11</uuid>
<key>asset</key>
<uuid>205e1b00-9cf5-ff34-8007-04231e1ca3af</uuid>
</map>
</array>
<array>
<map>
<key>item</key>
<uuid>b909a99d-a9db-4410-b846-96fd49b84d41</uuid>
<key>asset</key>
<uuid>e793dcfb-42e7-cf96-3073-dd7734adc5a1</uuid>
</map>
</array>
<array>
<map>
<key>item</key>
<uuid>e5a4e6e4-b9b3-42d1-b6f1-94718901a8fd</uuid>
<key>asset</key>
<uuid>b7c68d74-4e2f-4570-baf2-e4eb96bb1e5c</uuid>
</map>
</array>
<array>
<map>
<key>item</key>
<uuid>f28ac7dd-dfff-498a-a080-cea625162861</uuid>
<key>asset</key>
<uuid>035b3910-4405-6850-db5a-c082f7a42ba4</uuid>
</map>
</array>
<array />
<array />
<array />
<array />
<array />
<array />
<array />
<array />
<array />
<array>
<map>
<key>item</key>
<uuid>1ae223ce-79c7-453e-9204-44b10b92bc7f</uuid>
<key>asset</key>
<uuid>72bfc02b-2d62-a581-6a82-3adac5ea0159</uuid>
</map>
</array>
<array />
</array>
<key>textures</key>
<array>
<uuid>46697265-7374-6f72-6d00-000000000000</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>3a367d1c-bef1-6d43-7595-e88c1e3aadb3</uuid>
<uuid>3a367d1c-bef1-6d43-7595-e88c1e3aadb3</uuid>
<uuid>3a367d1c-bef1-6d43-7595-e88c1e3aadb3</uuid>
<uuid>3a367d1c-bef1-6d43-7595-e88c1e3aadb3</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>c228d1cf-4b5d-4ba8-84f4-899a0796aa97</uuid>
<uuid>3a367d1c-bef1-6d43-7595-e88c1e3aadb3</uuid>
</array>
<key>visualparams</key>
<binary encoding="base64">JREWnQByBVstGXCkIySYAH9bM38zf6p/P//jbXJm///LrRRoAACZAAB/AAAAf3J/Yz9/jH9/AAAAvwBWGQAAAAAAAAAAkdiFAC0AjnUAAGubUFV/f39YAGTY1szMzDMZWUzMABkeAJ65dX/qawB/h39/f447pUTY26FCAGb/uj8AAAAAf38AAAAAfwCfAACyf2ZVg1R/RIuZAACyGUx8ANbMxgAAugp14v/G////////////zAD//////////////wD//////wB/xP8ZZP////9UAAAAzkz///8=</binary>
<key>attachments</key>
<array>
<map>
<key>point</key>
<integer>5</integer>
<key>item</key>
<uuid>182bf0fd-8a47-4bd9-8651-aad35ad07eba</uuid>
<key>asset</key>
<uuid>2ab5446d-dabb-45be-8742-ded2bf9e15eb</uuid>
</map>
</array>
</map>
</llsd>

View File

@@ -0,0 +1,201 @@
// :CATEGORY:OpenSim NPC
// :NAME:OpenSim NPC Fish
// :AUTHOR:Ferd Frederix
// :KEYWORDS:
// :CREATED:2014-02-14 12:33:23
// :EDITED:2014-02-15 13:46:29
// :ID:1024
// :NUM:1590
// :REV:1.1
// :WORLD:OpenSim
// :DESCRIPTION:
// This is a fish NPC follower.
// License: http://creativecommons.org/licenses/by-nc
// :CODE:
// Redv 1.1 Added wait timer, adjustments for great white
integer debug = FALSE;
// tunables
float max_distance = 40; //distance for sensoring a real avatar, 96 is max
string fName = "Great";
string lName = "White";
float XY = 10;
float gTimer;
// stuff
integer nobody = FALSE;
integer iWaitCounter = 10;
integer channel; // dialog channel
integer listener; // holds the listener handle;
key npc; // npc key
integer npc_on = FALSE;
vector Dest;
string lastAnim;
Play(string anima)
{
if (anima == lastAnim)
return;
osNpcPlayAnimation(npc,anima);
osNpcStopAnimation(npc,lastAnim);
lastAnim = anima;
}
walk_to_master(vector myPos)
{
vector myVector = <randBetween(-XY,XY),randBetween(-XY,XY),-randBetween(1,3)> ;
iWaitCounter = 60;
Play("FishSlowSwim");
float water = llWater(<0,0,0>) - 0.5;
float z = myPos.z;
if (z > water) {
return;
}
osNpcMoveToTarget(npc, myPos + myVector, OS_NPC_FLY );
llSetTimerEvent(1.0);
Dest = myPos + myVector;
}
float randBetween(float min, float max)
{
return llFrand(max - min) + min ;
}
dialog(key avi)
{
channel = llCeil(llFrand(5000) + 5000);
listener = llListen(channel,"","","");
llDialog(avi, "Choose:",["Start","Remove","-"],channel);
}
Start()
{
vector npcPos = llGetPos() + <0,0.0,1.0>;
npc = osNpcCreate(fName,lName, npcPos, "Appearance", OS_NPC_NOT_OWNED);
llSetObjectDesc(npc);
npc_on = TRUE;
llSensorRepeat("", NULL_KEY, AGENT, max_distance, PI, 5);
}
default
{
state_entry()
{
llSetText(llGetObjectName(),<1,1,1>,1.0);
llSetAlpha(1.0, ALL_SIDES);
gTimer = llFrand(2) + 1;
osNpcRemove(llGetObjectDesc());
}
changed (integer what)
{
if (what & CHANGED_REGION_START)
{
if (npc_on)
{
Start();
}
}
}
on_rez(integer p)
{
llSetText("",<1,1,1>,1.0);
llResetScript();
}
touch_start(integer x)
{
if (llDetectedKey(0) == llGetOwner()) {
dialog(llDetectedKey(0));
}
}
listen(integer channel, string name, key id, string msg) {
llListenRemove (listener);
if (msg == "Start")
{
if( !npc_on ) {
Start();
} else {
llOwnerSay("Aready running");
}
} else if (msg == "Remove") {
npc_on = FALSE;
osNpcRemove(llGetObjectDesc());
llSetTimerEvent(0);
} else if (msg == "-") {
osAgentSaveAppearance(llGetOwner(), "Appearance");
llOwnerSay("Your appearance has been saved");
}
}
sensor(integer num)
{
llSetText("",<1,1,1>,1.0);
llSetAlpha(0.0, ALL_SIDES);
if (nobody)
{
Start();
nobody = FALSE;
return;
}
Dest = llDetectedPos( 0 );
if (debug) llOwnerSay((string) Dest);
walk_to_master(Dest);
}
no_sensor()
{
if (debug) llOwnerSay("nobody");
llSetTimerEvent(0);
osNpcRemove(llGetObjectDesc());
nobody = TRUE;
}
timer()
{
vector pos;
if (--iWaitCounter) {
list Poses = llGetObjectDetails(npc,[OBJECT_POS]);
pos = llList2Vector(Poses, 0);
if (llVecDist(pos, Dest ) > 4) {
if (debug) llOwnerSay("swimming");
return;
}
}
if (debug) llOwnerSay("arrived");
Play("FishStand");
gTimer = llFrand(2) + 1;
llSleep(gTimer);
llSetTimerEvent(0);
}
}

View File

@@ -0,0 +1,12 @@
<Project name="OpenSim NPC Fish" guid="57ef3b6a-b3a3-41d6-b8a4-410f77ccc966">
<Object name="Fish" guid="699463b9-6763-485a-b93d-79bc2deb5fd1" active="true">
<Notecard name="Appearance" guid="9c664310-e2ad-4a50-8793-ad35b17cde18">
</Notecard>
<Animation name="FishStand" guid="cc2881fa-bd4b-4bb2-896c-120cdf4fd4c6">
</Animation>
<Script name="Script.lsl" guid="16dcc838-6927-4422-ac7a-425c6d63e8ef">
</Script>
<Animation name="Walk" guid="c8af3d46-e0f0-429f-8bd8-a9451f726ee5">
</Animation>
</Object>
</Project>