Join us in Phaze Demesnes or follow us:

Home   Show All
Category: Contributor: Creator
World Peace The_Little_Box_Of_Calm_by_Gaynor_Gr  

The_Little_Box_Of_Calm_by_Gaynor_Gr

The Little Box Of Calm by Gaynor Gritzi.lsl

Category: World Peace
By : Gaynor Gritzi
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life + OpenSim

the Zip file

Download all files for The_Little_Box_Of_Calm_by_Gaynor_Gr
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. The_Little_Box_Of_Calm_by_Gaynor_Gr_1.lsl
1
2 //********************************************************
3 //This Script was pulled out for you by YadNi Monde from the SL FORUMS at http://forums.secondlife.com/forumdisplay.php?f=15, it is intended to stay FREE by it s author(s) and all the comments here in ORANGE must NOT be deleted. They include notes on how to use it and no help will be provided either by YadNi Monde or it s Author(s). IF YOU DO NOT AGREE WITH THIS JUST DONT USE!!!
4 //********************************************************
5
6
7
8
9
10
11
12
13
14 //*************************************
15 //******* The Little Box Of Calm ******
16 //****** Script by Gaynor Gritzi ******
17 //*************************************
18
19 // The purpose of this script is to bring about World Peace.
20 // Well you've got to try haven't you!
21
22 // Offered free to the world, to use and alter as you will,
23 // though a namecheck would be appreciated.
24
25 //****** INSTRUCTIONS ******
26
27 // Create a standard empty cube.
28 // Put this script inside it.
29 // Take the cube into your inventory.
30 // Drag out and place on the ground as many boxes as you want.
31
32 // The boxes use llWhisper to talk to each other,
33 // So each box should be within 10m of another box,
34 // Or it won't be able to chant for World Peace.
35
36 // Click any box to start the chanting.
37
38 // You can also issue instructions using chat.
39 // The boxes use channel 99 to listen.
40 // This will only work when the boxes are quiet,
41 // Because when the boxes chant, they are deaf to all distractions.
42
43 // Saying "/99 Calm" will start all boxes in listening range chanting.
44 // Saying "/99 Clean" will delete all boxes in listening range - a big timesaver.
45 // The length of the chants can be adjusted by using these phrases.....
46 // "/99 Short", "/99 Medium", "/99 Long", "/99 Longer" or "/99 Longest".
47
48 //****** RECOMMENDATIONS ******
49
50 // Like many of the things that I build,
51 // The boxes have a lighting effect built in,
52 // And are best seen with your world turned to Midnight
53 // And Local Lights switched on.
54
55 // Try setting out the boxes in different configurations....
56 // In a straight line, thrown about at random, build a wall, put them in the air.
57 // Though if you want to create a neverending circle of chants,
58 // You'll have to start a broken circle chanting,
59 // And then fill it in once chanting is underway.
60 // Warning - if the circle is big enough,
61 // The chanting will carry on forever,
62 // Which may just be long enough to bring about World peace.
63
64 //****** ACKNOWLEDGEMENTS ******
65
66 // The chant is a six second clip taken from a 20 minute chant
67 // (and I like to think I picked the very best 6 seconds),
68 // Supplied copyright free from the nice people at....
69 // http://ayurveda-berkeley.com/
70 // Who specialise in Indian Ayurvedic Medicine.
71
72
73 integer length = 10;
74
75 default
76 {
77 // Put a texture on the box, give it a name and set up listening
79 {
80 llSetObjectName("The Little Box Of Calm - Created By Gaynor Gritzi");
81 llSetTexture("93fb4717-449d-8235-d24e-2e0133de2a50", ALL_SIDES);
82 llListen( 99, "", NULL_KEY, "" );
83 }
84
85 // Starting listening and message handling.
86 listen(integer channel, string name, key id, string message)
87 {
88 if (llToLower(message) == "calm") { state chanting; }
89 if (llToLower(message) == "clean") { llDie(); }
90 if (llToLower(message) == "short") { length = 1; }
91 if (llToLower(message) == "medium") { length = 10; }
92 if (llToLower(message) == "long") { length = 30; }
93 if (llToLower(message) == "longer") { length = 90; }
94 if (llToLower(message) == "longest") { length = 270; }
95 }
96
97 // Start chanting if box is clicked
98 touch_start(integer total_number) { state chanting; }
99 }
100
101
102 // This handles the chanting
103 state chanting
104 {
106 // Turn on light and set up hovering text
107 llSetPrimitiveParams ([PRIM_POINT_LIGHT, TRUE, <1, 1, 1>, 1.0, 3.0, 0.75] );
108 llSetText("Chanting For World Peace", <3,3,3>, 1.5);
109
110 // Set volume and start a loop for the chant
112 llLoopSound("8c62cfcc-697c-d4de-a057-b16efd5b0c51", 1.0 );
113
114 // A bit of a delay so everything doesnt happen at once
115 llSleep (6);
116
117 // Tell the next box to be calm too
118 llWhisper(99, "calm");
119
120 // Do nothing while the chant continues for right amount of time
121 llSleep (length);
122
123 // Do a slow fade out.
124 float volume = 100;
125 for (volume = 100; volume >= 0; volume --)
126 {
127 llAdjustSoundVolume( volume / 100);
128 llSleep (0.2);
129 }
130
131 // Stop all sound
133
134 // Reset hover text and turn off light.
135 llSetText("", <3,3,3>, 1.5);
136 llSetPrimitiveParams ([PRIM_POINT_LIGHT, FALSE, <1, 1, 1>, 1.0, 3.0, 0.75] );
137
138 // Go back to default state and wait for something to happen.
139 state default;
140 }
141 } // END //