Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Tour Tour Bird  

Tour Bird

Tour

Category: Tour
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life

the Zip file

Download all files for Tour Bird
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. 10.lsl
Get file # 2. Recorder.lsl

This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 // WAYPOINT #10 PRIM SCRIPT
4 // When rezzed, does a llRegionSay on channel 300 of the word "number". Other #10 prims hear this
5 // chats 10||Description on channel 300 when it hears 'number' on 300.
6 // remembers the highest number it hears and sets the name to 1- that number
7
8
9 integer wanted = 0;
10 integer debugger = 1;
11
12 list prims;
13
14
15 debug(string message)
16 {
17 if(debugger)
18 llOwnerSay(message);
19 }
20
21 default
22 {
24 {
25 llListen(300,"","","");
26 wanted++;
27 llRegionSay(300,"number");
28 llSetTimerEvent(5.0); // 5 seconds to hear from all prims
29 llOwnerSay("Setting coordinates");
30 }
31
32 listen(integer channel,string name, key id, string message)
33 {
34 if(message == "die")
35 llDie();
36
37 else if(message =="where")
38 llRegionSay(300,llGetObjectName() + "|" + (string) llGetPos() + "|" + llGetObjectDesc());
39
40 else if(message =="number")
42
43 else if(wanted)
44 {
45 prims += (integer) message; // add to memory list
46 }
47
48
49 }
50
51 timer()
52 {
53 wanted = 0;
54 prims = llListSort(prims,1,0); // sort descending
55 integer num = (integer) llList2Integer(prims,0); // get highest number
56 llSetObjectName((string) (num + 10)); // leave room for more prims to be added
57 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.");
58
60 }
61
63 {
65 }
66 }

Tour Bird

Tour

Category: Tour
By : Ferd Frederix
Created: 2013-09-06 Edited: 2013-09-04
Worlds: Second Life


This script by Ferd Frederix may be used in any manner, modified, and republished.  Unless specified otherwise, my scripts are always free and open source.  Objects made with these scripts may be sold with no restrictions.  All I ask is that you point others to this location should they ask you about it and to not sell this script, unless it is for $0 L. Please help improve my work by reporting bugs and improvements.

1
2
3 integer wanted = 0;
4 integer debugger =1;
5 list prims;
6
7
8 debug(string message)
9 {
10 if(debugger)
11 llOwnerSay(message);
12 }
13
14
15
16 string left(string src, string divider) {
17 integer index = llSubStringIndex( src, divider );
18 if(~index)
19 return llDeleteSubString( src, index , -1);
20 return src;
21 }
22
23 string right(string src, string divider) {
24 integer index = llSubStringIndex( src, divider );
25 if(~index)
26 return llDeleteSubString( src, 0, index + llStringLength(divider) - 1);
27 return src;
28 }
29
30
31
32 default
33 {
35 {
36 llSetText("Click after setting up all tour prims.", <1.0, 1.0, 1.0>, 2.0);
37 llListen(300,"","","");
38 }
39
41 {
42 llOwnerSay("Please wait");
43 prims = [];
44 wanted ++;
45 llRegionSay(300,"where");
46 }
47
48 listen(integer channel,string name, key id, string message)
49 {
50 debug(llGetObjectName() + " heard " + message);
51 if(wanted)
52 {
53 list msg = llParseString2List(message,["|"],[""]);
54 integer aname = llList2Integer(msg,0);
55 vector dest = llList2Vector(msg,1);
56 string text = llList2String(msg,2);
57 integer isthere = llListFindList(prims,[aname]);
58
59
60 if(isthere > -1)
61 {
62 llOwnerSay("Error, there are two prims named " + aname + ". 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.");
63 }
64
65 if(wanted)
66 {
67 prims += (integer) aname;
68 prims += dest;
69 prims += text;
70
71 }
72 llSetTimerEvent(10.0);
73 }
74 }
75
76 timer()
77 {
78 wanted = 0;
80 integer i = 0;
81
82 prims = llListSort(prims,3,1);
83
84
85 for (i = 0; i < llGetListLength(prims); i+=3)
86 {
87 integer primnum = llList2Integer(prims,i);
88 vector loc = llList2Vector(prims,i+1);
89 string text = llList2String(prims,i+2);
90 llOwnerSay("|" + (string) primnum + "|" + (string) loc.x + "|" + (string) loc.y + "|" + (string) loc.z + "|" + text);
91
92 }
93 llOwnerSay("Copy the above lines to the notecard in the tour guide and reset it");
94
95
96 }
97
99 {
101 }
102 }

Back to the Best Free Tools in Second Life and OpenSim.