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
Walls Changing_walls_via_command  

Changing_walls_via_command

Just drop a script into each floor, wall or ceiling prim, and type commands on the /10 channel. You can read the scripts to see what the commands are, note you can handle the floor walls and roof separately or together. It is easy to add your own commands and textures if you want.

Commands: Use "/10 command" to send
black, grid, glass, wood, dirt, grass, white, rock, mountain, hide
to affect just floor add "floor" to the end with no spaces, i.e. blackfloor, gridfloor...
to affect just walls add "walls" to the end
to affect just roof add "roof" to the end

Category: Walls
By : Ariane Brodie
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Changing_walls_via_command
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Changing_walls_via_command_1.lsl
Get file # 2. Changing_walls_via_command_2.lsl
Get file # 3. Changing_walls_via_command_3.lsl
Get file # 4. Changing_walls_via_command_4.lsl
1 (bonus command "phantom" will cause anyone on the roof to fall into the house, "solid" reverses it.)
2
3
4 integer Handle;
5
6 default {
8 Handle = llListen(5, "", NULL_KEY, ""); // start listening
9
10 }
11
12 touch_start(integer total_number) {
13 // when touched...
14 llListenControl(Handle, TRUE); // ...enable listen
15 }
16
17 listen(integer channel, string name, key id, string message) {
18 // when told "off"...
19 if(message == "off") {
20 llListenControl(Handle, FALSE);
21 }
22 else {
23 if(message == "black" || message == "blackroof")
25 PRIM_COLOR, ALL_SIDES, <0, 0, 0>, 1.0,
26 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
27 if(message == "grid" || message == "gridroof")
29 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
30 PRIM_TEXTURE, ALL_SIDES, "aebd4b83-6aea-b0ec-734c-f2c5e16c661a", <1,1,0>, <0.0,0.0,0>, 0.0]);
31 if(message == "glass" || message == "glassroof")
33 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
34 PRIM_TEXTURE, ALL_SIDES, "5b2eb7d3-2e83-7a3e-d944-8baa3f971fec", <1,1,0>, <0.0,0.0,0>, 0.0]);
35 if(message == "wood" || message == "woodroof")
37 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
38 PRIM_TEXTURE, ALL_SIDES, "89556747-24cb-43ed-920b-47caed15465f", <1,1,0>, <0.0,0.0,0>, 0.0]);
39 if(message == "dirt" || message == "dirtroof")
41 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
42 PRIM_TEXTURE, ALL_SIDES, "0bc58228-74a0-7e83-89bc-5c23464bcec5", <1,1,0>, <0.0,0.0,0>, 0.0]);
43 if(message == "grass" || message == "grassroof")
45 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
46 PRIM_TEXTURE, ALL_SIDES, "63338ede-0037-c4fd-855b-015d77112fc8", <1,1,0>, <0.0,0.0,0>, 0.0]);
47 if(message == "white" || message == "whiteroof")
49 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
50 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
51 if(message == "rock" || message == "rockroof")
53 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
54 PRIM_TEXTURE, ALL_SIDES, "53a2f406-4895-1d13-d541-d2e3b86bc19c", <1,1,0>, <0.0,0.0,0>, 0.0]);
55 if(message == "mountain" || message == "mountainroof")
57 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
58 PRIM_TEXTURE, ALL_SIDES, "303cd381-8560-7579-23f1-f0a880799740", <1,1,0>, <0.0,0.0,0>, 0.0]);
59 if(message == "light" || message == "lightroof")
62 if(message == "dark" || message == "darkroof")
65 if(message == "phantom" || message == "phantomroof")
68 if(message == "solid" || message == "solidroof")
71 if(message == "hide" || message == "hideroof")
73 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 0.0]);
74
75 }
76 }
77 }

Changing_walls_via_command

Wall script (bonus command "light" makes all your walls glow, "dark" reverses it.)

Category: Walls
By : Ariane Brodie
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

1 integer Handle;
2
3 default {
5 Handle = llListen(5, "", NULL_KEY, ""); // start listening
6
7 }
8
9 touch_start(integer total_number) {
10 // when touched...
11 llListenControl(Handle, TRUE); // ...enable listen
12 }
13
14 listen(integer channel, string name, key id, string message) {
15 // when told "off"...
16 if(message == "off") {
17 llListenControl(Handle, FALSE);
18 }
19 else {
20 if(message == "black" || message == "blackwalls")
22 PRIM_COLOR, ALL_SIDES, <0, 0, 0>, 1.0,
23 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
24 if(message == "grid" || message == "gridwalls")
26 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
27 PRIM_TEXTURE, ALL_SIDES, "aebd4b83-6aea-b0ec-734c-f2c5e16c661a", <1,1,0>, <0.0,0.0,0>, 0.0]);
28 if(message == "glass" || message == "glasswalls")
30 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
31 PRIM_TEXTURE, ALL_SIDES, "5b2eb7d3-2e83-7a3e-d944-8baa3f971fec", <1,1,0>, <0.0,0.0,0>, 0.0]);
32 if(message == "wood" || message == "woodwalls")
34 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
35 PRIM_TEXTURE, ALL_SIDES, "89556747-24cb-43ed-920b-47caed15465f", <1,1,0>, <0.0,0.0,0>, 0.0]);
36 if(message == "dirt" || message == "dirtwalls")
38 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
39 PRIM_TEXTURE, ALL_SIDES, "0bc58228-74a0-7e83-89bc-5c23464bcec5", <1,1,0>, <0.0,0.0,0>, 0.0]);
40 if(message == "grass" || message == "grasswalls")
42 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
43 PRIM_TEXTURE, ALL_SIDES, "63338ede-0037-c4fd-855b-015d77112fc8", <1,1,0>, <0.0,0.0,0>, 0.0]);
44 if(message == "white" || message == "whitewalls")
46 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
47 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
48 if(message == "rock" || message == "rockwalls")
50 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
51 PRIM_TEXTURE, ALL_SIDES, "53a2f406-4895-1d13-d541-d2e3b86bc19c", <1,1,0>, <0.0,0.0,0>, 0.0]);
52 if(message == "mountain" || message == "mountainwalls")
54 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
55 PRIM_TEXTURE, ALL_SIDES, "303cd381-8560-7579-23f1-f0a880799740", <1,1,0>, <0.0,0.0,0>, 0.0]);
56 if(message == "video" || message == "videowalls")
58 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
59 PRIM_TEXTURE, ALL_SIDES, "6e0f05ad-1809-4edc-df29-fae3d2a6c9b8", <1,1,0>, <0.0,0.0,0>, 0.0]);
60 if(message == "light" || message == "lightwalls")
63 if(message == "dark" || message == "darkwalls")
66 if(message == "phantom" || message == "phantomwalls")
69 if(message == "solid" || message == "solidwalls")
72 if(message == "hide" || message == "hidewalls")
74 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 0.0]);
75
76 }
77 }
78 }

Changing_walls_via_command

Floor Script (bonus command "miston" covers your floor with fog, "mistoff" turns the fog machines off)

Category: Walls
By : Ariane Brodie
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

1 // Dynamic floors, change textures with a simple command
2 // By Ariane Brodie
3 // Particle system by
4
5 integer Handle;
6
7 //start of Mist routine data
8 // Mask Flags - set to TRUE to enable
9 integer glow = TRUE; // Make the particles glow
10 integer bounce = TRUE; // Make particles bounce on Z plan of object
11 integer interpColor = TRUE; // Go from start to end color
12 integer interpSize = TRUE; // Go from start to end size
13 integer wind = FALSE; // Particles effected by wind
14 integer followSource = TRUE; // Particles follow the source
15 integer followVel = TRUE; // Particles turn to velocity direction
16
17 // Choose a pattern from the following:
18 // PSYS_SRC_PATTERN_EXPLODE
19 // PSYS_SRC_PATTERN_DROP
20 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
21 // PSYS_SRC_PATTERN_ANGLE_CONE
22 // PSYS_SRC_PATTERN_ANGLE
23 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
24
25 // Select a target for particles to go towards
26 // "" for no target, "owner" will follow object owner
27 // and "self" will target this object
28 // or put the key of an object for particles to go to
29 key target = "self";
30
31 // Particle paramaters
32 float age = 20; // Life of each particle
33 float maxSpeed = 3; // Max speed each particle is spit out at
34 float minSpeed = 2; // Min speed each particle is spit out at
35 string texture; // Texture used for particles, default used if blank
36 float startAlpha = 0.2; // Start alpha (transparency) value
37 float endAlpha = 0.5; // End alpha (transparency) value
38 vector startColor = <1,1,1>; // Start color of particles <R,G,B>
39 vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE)
40 vector startSize = <1.5,1.5,1.5>; // Start size of particles
41 vector endSize = <0.5,0.5,0.5>; // End size of particles (if interpSize == TRUE)
42 vector push = <0,0,-1>; // Force pushed on particles
43
44 // System paramaters
45 float rate = .2; // How fast (rate) to emit particles
46 float radius = 3; // Radius to emit particles for BURST pattern
47 integer count = 999; // How many particles to emit per BURST
48 float outerAngle = 1.54; // Outer angle for all ANGLE patterns
49 float innerAngle = 1.55; // Inner angle for all ANGLE patterns
50 vector omega = <1,2,3>; // Rotation of ANGLE patterns around the source
51 float life = 0; // Life in seconds for the system to make particles
52 // Script variables
53 integer flags;
54
55 default {
56 state_entry() {
57 Handle = llListen(10, "", NULL_KEY, ""); // start listening on channel 10
58
59 //particle initialization
60 if(target == "owner") target = llGetOwner();
61 if(target == "self") target = llGetKey();
62 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
63 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
64 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
65 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
66 if(wind) flags = flags | PSYS_PART_WIND_MASK;
67 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
68 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
69 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
70 }
71
72 touch_start(integer total_number) {
73 // when touched...
74 llListenControl(Handle, TRUE); // ...enable listen
75 }
76
77 listen(integer channel, string name, key id, string message) {
78 // when told "off"...
79 if(message == "off") {
80 llListenControl(Handle, FALSE);
81 }
82 else {
83 if(message == "black" || message == "blackfloor")
85 PRIM_COLOR, ALL_SIDES, <0, 0, 0>, 1.0,
86 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
87 if(message == "grid" || message == "gridfloor")
89 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
90 PRIM_TEXTURE, ALL_SIDES, "45d55eec-4da6-d4a3-83b2-005e029f25b3", <1,1,0>, <0.0,0.0,0>, 0.0]);
91 if(message == "glass" || message == "glassfloor")
93 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
94 PRIM_TEXTURE, ALL_SIDES, "5b2eb7d3-2e83-7a3e-d944-8baa3f971fec", <1,1,0>, <0.0,0.0,0>, 0.0]);
95 if(message == "wood" || message == "woodfloor")
97 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
98 PRIM_TEXTURE, ALL_SIDES, "89556747-24cb-43ed-920b-47caed15465f", <1,1,0>, <0.0,0.0,0>, 0.0]);
99 if(message == "dirt" || message == "dirtfloor")
101 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
102 PRIM_TEXTURE, ALL_SIDES, "0bc58228-74a0-7e83-89bc-5c23464bcec5", <1,1,0>, <0.0,0.0,0>, 0.0]);
103 if(message == "grass" || message == "grassfloor")
105 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
106 PRIM_TEXTURE, ALL_SIDES, "63338ede-0037-c4fd-855b-015d77112fc8", <1,1,0>, <0.0,0.0,0>, 0.0]);
107 if(message == "white" || message == "whitefloor")
109 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
110 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
111 if(message == "rock" || message == "rockfloor")
113 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
114 PRIM_TEXTURE, ALL_SIDES, "53a2f406-4895-1d13-d541-d2e3b86bc19c", <1,1,0>, <0.0,0.0,0>, 0.0]);
115 if(message == "mountain" || message == "mountainfloor")
117 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
118 PRIM_TEXTURE, ALL_SIDES, "303cd381-8560-7579-23f1-f0a880799740", <1,1,0>, <0.0,0.0,0>, 0.0]);
119 if(message == "hide" || message == "hidefloor")
121 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 0.0]);
122 if(message == "miston")
124 PSYS_PART_FLAGS,flags,
125 PSYS_PART_START_COLOR, startColor,
126 PSYS_PART_END_COLOR, endColor,
127 PSYS_PART_START_SCALE,startSize,
128 PSYS_PART_END_SCALE,endSize,
129 PSYS_SRC_PATTERN, pattern,
131 PSYS_SRC_ACCEL, push,
137 PSYS_SRC_INNERANGLE,innerAngle,
138 PSYS_SRC_OUTERANGLE,outerAngle,
139 PSYS_SRC_OMEGA, omega,
140 PSYS_SRC_MAX_AGE, life,
141 PSYS_SRC_TEXTURE, texture,
142 PSYS_PART_START_ALPHA, startAlpha,
143 PSYS_PART_END_ALPHA, endAlpha
144 ]);
145 if(message == "mistoff")
147 }
148 }
149 }

Changing_walls_via_command

Door Script - Behaves like normal wall most of the time, but command "open" moves the wall like a garage door which automatically closes 10 seconds later.

Category: Walls
By : Ariane Brodie
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

1 //garage door script x-axis version
2 //use on a wall 10x0.01x10 facing the y-axis
3 //by Ariane Brodie
4
5 integer Handle;
6 integer DOORCOUNT = 11;
7 integer WAITTIME = 100;
8 integer n = 0;
9
10
11 default {
12 state_entry() {
13 Handle = llListen(10, "", NULL_KEY, ""); // start listening
14
15 }
16
17 touch_start(integer total_number) {
18 // when touched...
19 llListenControl(Handle, TRUE); // ...enable listen
20 }
21
22 timer() {
23 n++;
24 if(n < DOORCOUNT) {
25 rotation x_10 = llEuler2Rot( <0, 9 * DEG_TO_RAD, 0> );//for y-axis door switch x and y values
26 vector currentPos = llGetPos();
27 vector newPos = llGetPos() + <.5, 0, .5>; //for y-axis door switch x and y values
28 rotation new_rot = llGetRot() * x_10;
29 llSetRot(new_rot);
30 llSetPos(newPos);
31 }
32 else {
33 if(n > (DOORCOUNT+WAITTIME) && n < (2*DOORCOUNT+WAITTIME)) {
34 rotation x_r10 = llEuler2Rot( <0, -9 * DEG_TO_RAD, 0> );//for y-axis door switch x and y values
35 vector currentPos = llGetPos();
36 vector newPos = llGetPos() - <.5, 0, .5>; //for y-axis door switch x and y values
37 rotation new_rot = llGetRot() * x_r10;
38 llSetRot(new_rot);
39 llSetPos(newPos);
40 }
41 else {
42 if(n > (2*DOORCOUNT+WAITTIME)) {
44 n = 0;
45 }
46 }
47 }
48
49 }
50
51 listen(integer channel, string name, key id, string message) {
52 // when told "off"...
53 if(message == "off") {
54 llListenControl(Handle, FALSE);
55 }
56 else {
57 if(message == "black" || message == "blackwalls")
59 PRIM_COLOR, ALL_SIDES, <0, 0, 0>, 1.0,
60 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
61 if(message == "grid" || message == "gridwalls")
63 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
64 PRIM_TEXTURE, ALL_SIDES, "aebd4b83-6aea-b0ec-734c-f2c5e16c661a", <1,1,0>, <0.0,0.0,0>, 0.0]);
65 if(message == "glass" || message == "glasswalls")
67 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
68 PRIM_TEXTURE, ALL_SIDES, "5b2eb7d3-2e83-7a3e-d944-8baa3f971fec", <1,1,0>, <0.0,0.0,0>, 0.0]);
69 if(message == "wood" || message == "woodwalls")
71 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
72 PRIM_TEXTURE, ALL_SIDES, "89556747-24cb-43ed-920b-47caed15465f", <1,1,0>, <0.0,0.0,0>, 0.0]);
73 if(message == "dirt" || message == "dirtwalls")
75 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
76 PRIM_TEXTURE, ALL_SIDES, "0bc58228-74a0-7e83-89bc-5c23464bcec5", <1,1,0>, <0.0,0.0,0>, 0.0]);
77 if(message == "grass" || message == "grasswalls")
79 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
80 PRIM_TEXTURE, ALL_SIDES, "63338ede-0037-c4fd-855b-015d77112fc8", <1,1,0>, <0.0,0.0,0>, 0.0]);
81 if(message == "white" || message == "whitewalls")
83 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
84 PRIM_TEXTURE, ALL_SIDES, "5748decc-f629-461c-9a36-a35a221fe21f", <1,1,0>, <0.0,0.0,0>, 0.0]);
85 if(message == "rock" || message == "rockwalls")
87 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
88 PRIM_TEXTURE, ALL_SIDES, "53a2f406-4895-1d13-d541-d2e3b86bc19c", <1,1,0>, <0.0,0.0,0>, 0.0]);
89 if(message == "mountain" || message == "mountainwalls")
91 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
92 PRIM_TEXTURE, ALL_SIDES, "303cd381-8560-7579-23f1-f0a880799740", <1,1,0>, <0.0,0.0,0>, 0.0]);
93 if(message == "video" || message == "videowalls")
95 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 1.0,
96 PRIM_TEXTURE, ALL_SIDES, "6e0f05ad-1809-4edc-df29-fae3d2a6c9b8", <1,1,0>, <0.0,0.0,0>, 0.0]);
97 if(message == "light" || message == "lightwalls")
100 if(message == "dark" || message == "darkwalls")
103 if(message == "hide" || message == "hidewalls")
105 PRIM_COLOR, ALL_SIDES, <255, 255, 255>, 0.0]);
106 if(message == "open" || message == "opendoor"){
107 llWhisper(0,"Open the pod bay doors, Hal!");
108 llSetTimerEvent(0.1);
109 }
110 }
111 }
112 }

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