sync all NPC scripts

This commit is contained in:
Fred Beckhusen
2016-07-24 17:13:50 -05:00
parent d1f6d2d8f8
commit f0df6f0355
9 changed files with 14 additions and 203 deletions

View File

@@ -1,3 +0,0 @@
<Solution name="Give all inventory items in a folder when close by">
<Project name="Give all inventory items in a folder when close by" path="Give all inventory items in a folder when close by\Give all inventory items in a folder when close by.prj" active="true"/>
</Solution>

View File

@@ -1,10 +0,0 @@
<Project name="Give all inventory items in a folder when close by" guid="47643d58-cfd1-4fb6-aea1-277c935847bb">
<Object name="Object" guid="dfefe270-c8f3-46d3-a706-bcbd19cfd927" active="true">
<Snapshot name="dragon lady5;2;5.jpg" guid="43d895e0-a601-461c-94d4-6a977cef6220">
</Snapshot>
<Snapshot name="dragon;4;4;5.jpg" guid="73685177-2a5b-4500-a85f-d740672ea814">
</Snapshot>
<Script name="Script for Board.lsl" guid="eb71690d-a6f8-4520-9fbb-57abde9fae58">
</Script>
</Object>
</Project>

View File

@@ -1,171 +0,0 @@
// :SHOW:
// :CATEGORY:Presentation
// :NAME:Give all inventory items in a folder when close by
// :AUTHOR:Lum Pfohl
// :KEYWORDS:
// :CREATED:2015-11-24 20:25:32
// :EDITED:2015-11-24 19:25:32
// :ID:1086
// :NUM:1833
// :REV:1
// :WORLD:Second Life
// :DESCRIPTION:
// LumVision-Presentation Script v 0.2
// :CODE:
// Mods by Ferd Frederix to support GIFS
//
// LumVision-Presentation Script v 0.2
//
// Written by Lum Pfohl December 11, 2007
//
// January 02, 2008 - Added code to precache the next texture after a short time delay
// set to TRUE if you want debug messages written to chat screen
integer __debug = FALSE;
string __version_id = "Presentation Script v 0.3";
// global variables
integer interval;
integer currentTexture = 0;
integer totalTextures = 0;
list textureList =[];
integer messageChannel = 999888;
list dynMenu =["Back", "Version", "Forward", "Reset"];
gif()
{
string t = llList2String(textureList, currentTexture);
list gif = llParseString2List(t,[";"],[]);
string aname = llList2String(gif,0);
integer X = (integer) llList2String(gif,1);
integer Y = (integer) llList2String(gif,2);
float FPS = (float) llList2String(gif,3);
float product = X * Y;
// Set the new prim texture
llSetTexture(llList2String(textureList, currentTexture), 0);
if (X) {
llSetTextureAnim( ANIM_ON | LOOP, ALL_SIDES, X, Y, 0.0, product, FPS);
} else {
llSetTextureAnim( LOOP, ALL_SIDES, 1,1, 0.0, 1 , FPS);
}
}
default {
state_entry() {
// read in the textures in the prim and store it
integer typeCount = llGetInventoryNumber(INVENTORY_TEXTURE);
integer j;
for (j = 0; j < typeCount; ++j) {
string invName = llGetInventoryName(INVENTORY_TEXTURE, j);
if (__debug) {
llWhisper(0, "Inventory " + invName);
}
textureList += invName;
++totalTextures;
}
if (__debug) {
llWhisper(0, "Found " + (string) totalTextures + " textures");
}
llSetTexture(llList2String(textureList, 0), 0);
gif();
// initialize the channel on which the vendor will talk to the owner via dialog
messageChannel = (integer) llFrand(2000000000.0);
llListen(messageChannel, "", NULL_KEY, "");
currentTexture = 0;
}
on_rez(integer start_param) {
llResetScript();
}
touch_start(integer total_number) {
if (llDetectedKey(0) == llGetOwner()) {
llDialog(llDetectedKey(0), "What do you want to do?", dynMenu, messageChannel);
}
}
// listen for for dialog box messages and respond to them as appropriate
listen(integer channel, string name, key id, string message) {
if (id != llGetOwner()) {
return;
}
if (message == "Version") {
llWhisper(0, __version_id);
return;
}
if (message == "Reset") {
llResetScript();
}
if (message == "Back" && currentTexture > 0) {
--currentTexture;
} else if (message == "Forward") {
++currentTexture;
} else {
llDialog(llGetOwner(), "What do you want to do?", dynMenu, messageChannel);
return;
}
// If there are textures to apply, do so now. Otherwise - quietly
// do nothing.
if (totalTextures > 0) {
// Ensure that we do not go out of bounds with the index
if (currentTexture >= totalTextures) {
currentTexture = 0;
}
if (currentTexture < 0 ) {
currentTexture = 0;
}
gif();
// set up so that in 3 seconds, we display the next image on a different face (hidden)
llSetTimerEvent(3.00);
llDialog(llGetOwner(), "What do you want to do?", dynMenu, messageChannel);
}
}
timer() {
// Cancel any further timer events
llSetTimerEvent(0.00);
// set the next texture (as a pre-cache) on the reverse face
integer nextTexture = currentTexture + 1;
if (nextTexture >= totalTextures) {
nextTexture = 0;
}
llSetTexture(llList2String(textureList, nextTexture), 1);
}
changed(integer what)
{
if (what & CHANGED_INVENTORY)
llResetScript();
}
}

View File

@@ -1,12 +0,0 @@
default
{
state_entry()
{
llSay(0, "Hello, Avatar!");
}
touch_start(integer total_number)
{
llSay(0, "Touched: "+(string)total_number);
}
}

View File

@@ -1,5 +1,9 @@
<Project name="Multi-pose script" guid="233f6e31-95a1-438e-80d0-4448aa0cac7b">
<Object name="Object" guid="bc7ae54d-932e-4b75-9bb2-f63409d6fccd" active="true">
<Animation name="Animation.ani" guid="584c57c3-bd10-48d4-bea6-19ba8fe8e430">
</Animation>
<Animation name="Animation2.ani" guid="1c465e9c-6a22-4ec3-a5db-85a25a8f9006">
</Animation>
<Script name="Script.lsl" guid="e52a0629-9fda-4d09-b6ef-e8a41a54115b">
</Script>
</Object>

View File

@@ -45,9 +45,9 @@ rotation sitRot=ZERO_ROTATION; // Sit Kit to determine the best position a
// Uncomment one of the following five lines to choose your animation method:
string animMethod="SEQUENCE_TIMED"; // each animation will be played in sequence, cycling back to the first upon reaching the end
// string animMethod="RANDOM_TIMED"; // as above, except the order of animations is randomly shuffled
// string animMethod="SEQUENCE_TOUCH"; // each animation will be played in sequence, but only advances when the seated person touches the object
//string animMethod="SEQUENCE_TOUCH"; // each animation will be played in sequence, but only advances when the seated person touches the object
// string animMethod="RANDOM_TOUCH"; // as above, in random order
// string animMethod="DIALOG_SELECT"; // upon sitting the avatar will be asked to pick the animation they wish to play. Once seated, touching
//string animMethod="DIALOG_SELECT"; // upon sitting the avatar will be asked to pick the animation they wish to play. Once seated, touching
// the object will display the dialog again, allowing you to pick a different animation. Maximum of 12 animations.
float animTimer=45.0; // if using either of the two TIMED methods, how long (in seconds) to wait before advancing to the next animation
// this is ignored if you are using one of the other 3 methods
@@ -108,8 +108,10 @@ nextAnim()
if (llSubStringIndex(animMethod,"RANDOM")>-1) anList=llListRandomize(anList,1);
}
string nextAnim=llList2String(anList,curInd);
if (nextAnim!=currentAnim)
{
llStartAnimation(nextAnim);
llStopAnimation(currentAnim);
}
@@ -179,7 +181,7 @@ default
{
if (mySitter==NULL_KEY) return; // ignore if no sitter
if (llDetectedKey(0)!=mySitter) return; // ignore if not current sitter
if (llSubStringIndex(animMethod,"TIMED")>-1) return; // ignore if using timed method
if (llSubStringIndex(animMethod,"//TIMED")>-1) return; // ignore if using timed method
if (animMethod=="DIALOG_SELECT") getAnim();
else nextAnim();
}

View File

@@ -178,7 +178,7 @@ getCategories()
{
type = 1;
busy = TRUE;
string url = "http://www.free-lsl-scripts.com/cgi/shoutcast.plx?search=1";
string url = "http://www.outworldz.com/cgi/shoutcast.plx?search=1";
http_request_id = llHTTPRequest(url, [], "");
}
@@ -186,7 +186,7 @@ getCategory()
{
type = 2;
busy = TRUE;
string url = "http://www.free-lsl-scripts.com/cgi/shoutcast.plx?genre=" + llEscapeURL(genre);
string url = "http://www.outworldz.com/cgi/shoutcast.plx?genre=" + llEscapeURL(genre);
// llOwnerSay(url);
@@ -197,7 +197,7 @@ getURL()
{
type = 3;
busy = TRUE;
string url = "http://www.free-lsl-scripts.com/cgi/shoutcast.plx?genre=" + llEscapeURL(genre) + "&station=" + llEscapeURL(station);
string url = "http://www.outworldz.com/cgi/shoutcast.plx?genre=" + llEscapeURL(genre) + "&station=" + llEscapeURL(station);
http_request_id = llHTTPRequest(url, [], "");
}
@@ -328,10 +328,11 @@ listen(integer channel, string name, key id, string message)
}
http_response(key request_id, integer status, list metadata, string body)
{
{
if (request_id == http_request_id)
{
busy = FALSE;
if (type == 1)
{
lCategories = llParseString2List(body,["|"],[]);