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
Tandy Tandy the Nymph  

Tandy the Nymph

Tandy

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

the Zip file

Download all files for Tandy the Nymph
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. LICENSE.txt
Get file # 2. ao-sweetness-stand1.bvh
Get file # 3. ao-sweetness-stand2.bvh
Get file # 4. ao-sweetness-stand3.bvh
Get file # 5. ao-sweetness-stand4.bvh
Get file # 6. ao-sweetness-stand5.bvh
Get file # 7. avatar_run_fast.bvh
Get file # 8. avatar_type.bvh
Get file # 9. avatar_walk_fast.bvh
Get file # 10. HUD AO.lsl
Get file # 11. HUD positioner.lsl
Get file # 12. Japanese-sit1.bvh
Get file # 13. Japanese-sit3.bvh
Get file # 14. [3884 bytes] magic-wand.png
Get file # 15. [3842 bytes] magic-wand2.png
Get file # 16. sweetness-fly-1.bvh
Get file # 17. sweetness-fly-2.bvh
Get file # 18. sweetness-hover1.bvh
Get file # 19. sweetness-hover2.bvh
Get file # 20. sweetness-hover3.bvh
Get file # 21. sweetness-hover4.bvh
Get file # 22. !Fairy control Script.lsl
Get file # 23. !Tantrum script for body.lsl
Get file # 24. Anti no script script.lsl
Get file # 25. AO-II.lsl
Get file # 26. [57338 bytes] Black Glitter_Skirt Base.png
Get file # 27. [64422 bytes] Black Glitter_Top.png
Get file # 28. [444950 bytes] Blue Glitter_Skirt Base.png
Get file # 29. [404392 bytes] Blue Glitter_Top.png
Get file # 30. [15553 bytes] Child_face_skin.jpg
Get file # 31. [9629 bytes] Child_lower_skin.jpg
Get file # 32. [7858 bytes] Child_upper_skin.jpg
Get file # 33. [162147 bytes] Chocolate Glitter_Skirt Base.png
Get file # 34. [201236 bytes] Chocolate Glitter_Top.png
Get file # 35. [358872 bytes] Emerald Glitter_Skirt Base.png
Get file # 36. [310296 bytes] Emerald Glitter_Top.png
Get file # 37. [320390 bytes] Golden Glitter_Skirt Base.png
Get file # 38. [293343 bytes] Golden Glitter_Top.png
Get file # 39. [14413 bytes] Makeup_face_skin.jpg
Get file # 40. [10373 bytes] Makeup_lower_skin.jpg
Get file # 41. [8760 bytes] Makeup_upper_skin.jpg
Get file # 42. [176 bytes] Naked_Skirt Base.png
Get file # 43. [176 bytes] Naked_Top.png
Get file # 44. punch_onetwo.bvh
Get file # 45. [336137 bytes] Purple Glitter_Skirt Base.png
Get file # 46. [286563 bytes] Purple Glitter_Top.png
Get file # 47. [278634 bytes] Red Glitter_Skirt Base.png
Get file # 48. [239105 bytes] Red Glitter_Top.png
Get file # 49. [324194 bytes] Royal Glitter_Skirt Base.png
Get file # 50. [277905 bytes] Royal Glitter_Top.png
Get file # 51. [405592 bytes] Ruby Glitter_Skirt Base.png
Get file # 52. [367231 bytes] Ruby Glitter_Top.png
Get file # 53. [232171 bytes] Silver Glitter_Skirt Base.png
Get file # 54. [243861 bytes] Silver Glitter_Top.png
Get file # 55. [122975 bytes] Starlight_face_skin.jpg
Get file # 56. [87746 bytes] Starlight_lower_skin.jpg
Get file # 57. [106320 bytes] Starlight_upper_skin.jpg
Get file # 58. [17397 bytes] Teen_face_skin.jpg
Get file # 59. [8949 bytes] Teen_lower_skin.jpg
Get file # 60. [8298 bytes] Teen_upper_skin.jpg
Get file # 61. [58583 bytes] White Glitter_Skirt Base.png
Get file # 62. [67972 bytes] White Glitter_Top.png
Get file # 63. Full sized.dae
Get file # 64. Giant Female.dae
Get file # 65. Giant Male.dae
Get file # 66. Half sized.dae
Get file # 67. Quarter sized.dae
Get file # 68. Really tiny sized.dae
Get file # 69. Animator.lsl
Get file # 70. Door Script.lsl
Get file # 71. [5902 bytes] Emerald.jpg
Get file # 72. [8604 bytes] flower petal texture.jpg
Get file # 73. Light Script.lsl
Get file # 74. [94738 bytes] lil tree house texture.jpg
Get file # 75. lil tree house.ac
Get file # 76. lil tree house.dae
Get file # 77. [2585841 bytes] moving in.png
Get file # 78. [16609 bytes] Mushroom texture 2.jpg
Get file # 79. [13706 bytes] Mushroom texture.jpg
Get file # 80. Smokestack.lsl
Get file # 81. Anti no script script.lsl
Get file # 82. [383571 bytes] cool_ice_texture.jpg
Get file # 83. Globe Script.lsl
Get file # 84. [7876 bytes] spark1.png
Get file # 85. [10125 bytes] spark10.png
Get file # 86. [21290 bytes] spark2.png
Get file # 87. [12903 bytes] spark3.png
Get file # 88. [14159 bytes] spark4.png
Get file # 89. [17066 bytes] spark5.png
Get file # 90. [19694 bytes] spark6.png
Get file # 91. [10836 bytes] spark7.png
Get file # 92. [5180 bytes] spark8.png
Get file # 93. [5490 bytes] spark9.png
Get file # 94. rat avatar short.dae
Get file # 95. rat avatar tiny -.57640 offset.dae
Get file # 96. rat avatar.ac
Get file # 97. [2086 bytes] rat tail texture.jpg
Get file # 98. [35943 bytes] rat texture.jpg
Get file # 99. tail script.lsl
Get file # 100. Anti no script script.lsl
Get file # 101. [72380 bytes] Black Glitter_Skirt Fabric.jpg
Get file # 102. [139272 bytes] Blue Glitter_Skirt Fabric.jpg
Get file # 103. [124860 bytes] Chocolate Glitter_Skirt Fabric.jpg
Get file # 104. [124764 bytes] Emerald Glitter_Skirt Fabric.jpg
Get file # 105. [175090 bytes] Golden Glitter_Skirt Fabric.jpg
Get file # 106. [104777 bytes] Purple Glitter_Skirt Fabric.jpg
Get file # 107. [109119 bytes] Red Glitter_Skirt Fabric.jpg
Get file # 108. resizer script .lsl
Get file # 109. [121154 bytes] Royal Glitter_Skirt Fabric.jpg
Get file # 110. [141845 bytes] Ruby Glitter_Skirt Fabric.jpg
Get file # 111. [133474 bytes] Silver Glitter_Skirt Fabric.jpg
Get file # 112. Skirt Script.lsl
Get file # 113. [72347 bytes] White Glitter_Skirt Fabric.jpg
Get file # 114. Anti no script script.lsl
Get file # 115. bling script.lsl
Get file # 116. Bouncing Object Script.lsl
Get file # 117. Jeweled wand.ac
Get file # 118. Jeweled Wand.dae
Get file # 119. Spell script.lsl
Get file # 120. Wand script.lsl
Get file # 121. [398375 bytes] Wand texture.png
Get file # 122. emerald.ac
Get file # 123. emerald.dae
Get file # 124. [5902 bytes] Emerald.jpg
Get file # 125. [7099 bytes] tire texture.jpg
Get file # 126. Tire.ac
Get file # 127. tire.dae
Get file # 128. [2137 bytes] traffic cone texture.jpg
Get file # 129. Traffic cone.ac
Get file # 130. traffic cone.dae
Get file # 131. aquamarine.ac
Get file # 132. aquamarine.dae
Get file # 133. [4095 bytes] green quartz texture.jpg
Get file # 134. quartz crystal.ac
Get file # 135. quartz crystal.dae
Get file # 136. Anti no script script.lsl
Get file # 137. butterfly wings.ac
Get file # 138. Color control script.lsl
Get file # 139. [62164 bytes] fairy wing.png
Get file # 140. [13607 bytes] Fairy_Wing texture.png
Get file # 141. Flex Wing script.lsl
Get file # 142. [17051 bytes] Frost Wing Texture.png
Get file # 143. [140486 bytes] Frost Wing.png
Get file # 144. [14393 bytes] Leaf Wing texture.png
Get file # 145. [233347 bytes] Leaf Wing.png
Get file # 146. [837 bytes] wing sculpt.png
Get file # 147. X-wing script.lsl
Get file # 148. X-Wing.dae

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 // (C) Wizardry and Steamworks 2011, license: GPLv3 //
4 // Please see: http://www.gnu.org/licenses/gpl.html //
5 // for legal details, rights of fair usage and //
6 // the disclaimer and warranty conditions. //
7 //////////////////////////////////////////////////////////
8 // Mods for hovering flight by Ferd Frederix
9 // Link messages and reduction in complexity by eliminating tons of redundant states
10 // Uses notecard XAO from Tandy the Fairy project
11
12 integer _debug = FALSE;// set to TRUE tio see what is going on in owner chat
13 integer enabled = -1;
14 integer ready = FALSE; // set to TRUE when ready to animate
15 integer granted = FALSE; // TRUE is AO permissions granted
16 key _owner = NULL_KEY;
17 key nQuery = NULL_KEY;
18 integer xLine = 0;
19 integer agentInfo = 0;
20 string _lastAnim = "";
21 string _lastAnimName = "";
22
23 string stream = "";
24 list sList = [];
25
26 //pragma inline
27 string xName = "XAO";
28
29 list walk_list = [];
30 list fly_list = [];
31 list sit_list = [];
32 list hover_list = [];
33 list stand_list = [];
34 list run_list = [];
35 list type_list = [];
36 list sitobj_list = [];
37
38 //pragma inline
39 list ANIMATION_NODES = [
40 "walking",
41 "hovering",
42 "flying",
43 "sitting",
44 "standing",
45 "running",
46 "typing",
47 "sitobject"
48 ];
49
50 debug(string msg)
51 {
52 if(_debug)
53 llOwnerSay(msg);
54 }
55
56 on()
57 {
58 llSetTexture( "magic-wand", ALL_SIDES);
59 }
60 off()
61 {
62 llSetTexture( "magic-wand2", ALL_SIDES);
63 }
64
65 //pragma inline
66 string wasStaX_GetNodeValue(string node) {
67 list StaX = [];
68 string value = "";
69 xLine = 0;
70 do {
71 string current = llList2String(sList, xLine);
72 string lookback = llList2String(sList, xLine-1);
73
74 if(current != "/" && lookback == "<") {
75 StaX += current;
76 jump next_tag;
77 }
78 integer len = llGetListLength(StaX)-1;
79 if(lookback == "/") {
80 StaX = llDeleteSubList(StaX, len, len);
81 jump next_tag;
82 }
83 if(current != ">" && current != "/" && current != "<")
84 if(llList2String(StaX,len) == node)
85 value += current + " ";
86 @next_tag;
87 } while(++xLine<agentInfo);
88
89 if(llGetListLength(StaX) != 0) {
90 llSay(DEBUG_CHANNEL, "The following tags may be unmatched: " + llDumpList2String(StaX, ",") + ". Please check your file.");
91 }
92 return value;
93 }
94
95 //pragma inline
96 changeAnimation(string animation) {
97
98 debug("Setting: " + animation);
99 string nAnim;
100 if(animation == "walking") {
101 nAnim = llList2String(walk_list, (integer)llFrand(llGetListLength(walk_list)));
102 jump set_anim;
103 }
104 if(animation == "sitting") {
105 nAnim = llList2String(sit_list, (integer)llFrand(llGetListLength(sit_list)));
106 jump set_anim;
107 }
108 if(animation == "flying") {
109 nAnim = llList2String(fly_list, (integer)llFrand(llGetListLength(fly_list)));
110 jump set_anim;
111 }
112 if(animation == "hovering") {
113 nAnim = llList2String(hover_list, (integer)llFrand(llGetListLength(hover_list)));
114 jump set_anim;
115 }
116 if(animation == "standing") {
117 nAnim = llList2String(stand_list, (integer)llFrand(llGetListLength(stand_list)));
118 }
119 if(animation == "running") {
120 nAnim = llList2String(run_list, (integer)llFrand(llGetListLength(run_list)));
121 }
122 if(animation == "typing") {
123 nAnim = llList2String(type_list, (integer)llFrand(llGetListLength(type_list)));
124 }
125 if(animation == "sitobject") {
126 nAnim = llList2String(sitobj_list, (integer)llFrand(llGetListLength(sitobj_list)));
127 }
128 @set_anim;
129
130 debug("Start: " + nAnim);
131 llStartAnimation(nAnim);
132 llStopAnimation(_lastAnimName);
133 _lastAnimName = nAnim;
134 _lastAnim = animation;
135 }
136
137 //pragma inline
138 integer commute() {
139 string ani = llGetAnimation(_owner);
140 if(ani == "Hovering" || ani == "Hovering Down" || ani == "Hovering Up" ) {
141 debug("hover");
142 return 6;
143 }
144
145 agentInfo = llGetAgentInfo(_owner);
146
147 if(agentInfo & AGENT_WALKING) {
148 debug("walk");
149 return 0;
150 }
151 if(agentInfo & AGENT_FLYING) {
152 debug("fly");
153 return 1;
154 }
155 if(agentInfo & AGENT_ON_OBJECT) {
156 debug("on object");
157 return 2;
158 }
159 if(agentInfo & AGENT_SITTING) {
160 debug("sit");
161 return 3;
162 }
163 if(agentInfo & AGENT_ALWAYS_RUN) {
164 debug("running");
165 return 4;
166 }
167 if(agentInfo & AGENT_TYPING) {
168 debug("type");
169 return 5;
170 }
171 return 7;
172 }
173
174 default {
175 state_entry() {
176 off();
177 _owner = llGetOwner();
178 integer itra;
179 for(itra=0, xLine=0, stream = ""; itra<llGetInventoryNumber(INVENTORY_NOTECARD); ++itra) {
181 jump read;
182 }
183 llInstantMessage(llGetOwner(), "AO failed to find notecard XAO.");
184 return;
185 @read;
186 nQuery = llGetNotecardLine(xName, xLine);
187 }
188 dataserver(key id, string data) {
189 if(id != nQuery) return;
190 if(data == EOF) {
191 llOwnerSay("Readng AO Notecard ...");
192 sList = llParseString2List(stream, [" "], ["<", ">", "/"]);
193 stream = "";
194 agentInfo = llGetListLength(sList);
195 integer itra = llGetListLength(ANIMATION_NODES)-1;
196 do {
197 if(llList2String(ANIMATION_NODES, itra) == "walking") {
198 walk_list = llParseString2List(wasStaX_GetNodeValue("walking"), [" "], []);
199 jump anim_type;
200 }
201 if(llList2String(ANIMATION_NODES, itra) == "flying") {
202 fly_list = llParseString2List(wasStaX_GetNodeValue("flying"), [" "], []);
203 jump anim_type;
204 }
205 if(llList2String(ANIMATION_NODES, itra) == "sitting") {
206 sit_list = llParseString2List(wasStaX_GetNodeValue("sitting"), [" "], []);
207 jump anim_type;
208 }
209 if(llList2String(ANIMATION_NODES, itra) == "standing") {
210 stand_list = llParseString2List(wasStaX_GetNodeValue("standing"), [" "], []);
211 }
212 if(llList2String(ANIMATION_NODES, itra) == "running") {
213 run_list = llParseString2List(wasStaX_GetNodeValue("running"), [" "], []);
214 }
215 if(llList2String(ANIMATION_NODES, itra) == "typing") {
216 type_list = llParseString2List(wasStaX_GetNodeValue("typing"), [" "], []);
217 }
218 if(llList2String(ANIMATION_NODES, itra) == "hovering") {
219 hover_list = llParseString2List(wasStaX_GetNodeValue("hovering"), [" "], []);
220 }
221 if(llList2String(ANIMATION_NODES, itra) == "sitobject") {
222 sitobj_list = llParseString2List(wasStaX_GetNodeValue("sitobject"), [" "], []);
223 }
224 @anim_type;
225 } while(--itra>=0);
226
227 ready = TRUE;
229 return;
230 }
231 if(data == "") jump next_line;
232 stream += data;
233 @next_line;
234 nQuery = llGetNotecardLine(xName, ++xLine);
235 }
236
238
239 //debug(llDumpList2String(hover_list,","));
240
242 granted = TRUE;
243 sList = llParseString2List(llDumpList2String(sList, ""), ["<", ">", "/"], []);
244 integer itra=llGetListLength(sList)-1;
245 do {
246 llStopAnimation(llList2String(sList, itra));
247 } while(--itra>=0);
248 llOwnerSay("AO On");
249 on();
251 }
252 }
253
254 changed(integer change) {
255 if(change & CHANGED_OWNER || change & CHANGED_INVENTORY) {
257 }
258 }
259
260 on_rez(integer param) {
261 if(! ready)
263 else {
264 off();
266 }
267
268 }
269
270 timer() {
271 // Get next state.
272 agentInfo = commute();
273
274 if(agentInfo == 0 && _lastAnim != "walking") { changeAnimation("walking"); }
275 else if(agentInfo == 1 && _lastAnim != "flying") { changeAnimation("flying"); }
276 else if(agentInfo == 2 && _lastAnim != "sitobject") { changeAnimation("sitobject"); }
277 else if(agentInfo == 3 && _lastAnim != "sitting") { changeAnimation("sitting"); }
278 else if(agentInfo == 4 && _lastAnim != "running") { changeAnimation("running"); }
279 else if(agentInfo == 5 && _lastAnim != "typing") { changeAnimation("typing"); }
280 else if(agentInfo == 6 && _lastAnim != "hovering") { changeAnimation("hovering"); }
281 else if(agentInfo == 7 && _lastAnim != "standing") { changeAnimation("standing"); }
282 }
283
285 {
286 enabled = ~ enabled;
287 if(enabled) {
289 } else {
290 llOwnerSay("AO Off");
291 off();
293 if(granted) {
294 llStopAnimation(_lastAnimName);
295 }
296 }
297
298 }
299 }

Tandy the Nymph

Tandy

Category: Tandy
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 // author Ferd Frederix
3 //
4
5 integer lasttarget;
6
7 default
8 {
9
10 attach( key id)
11 {
12
13 if(id)
14 {
15 integer target = llGetAttached();
16
17 vector position = llGetLocalPos();
18
19 if(target == lasttarget )
20 return;
21
22 lasttarget = target; // save the position we just set
23
24 float Y = 0.0;
25 float Z = 0.0;
26 float trYoffset = 0.185; // right edge
27 float brYoffset = 0.125; // right edge
28 float otherYoffset = 0.080; // move right from left edge
29 float VerticalOffset = 0.1; // move down for room for hover text
30 float CenterOffset = 0.7; // left and right center offset to left and right edge
31 float BVerticalOffset = 0.140; // Bottom Z.
32
33
34 if(target == ATTACH_HUD_CENTER_2)
35 {
36 Y = CenterOffset; Z = 0.0; // move to left edge
37 }
39 {
40 Y = trYoffset; Z = -VerticalOffset; // down for room for hovertext
41 }
43 {
44 Y = 0; Z = -VerticalOffset;
45 }
46 else if(target == ATTACH_HUD_TOP_LEFT)
47 {
48 Y = -otherYoffset; Z = -VerticalOffset;
49 }
50 else if(target == ATTACH_HUD_CENTER_1)
51 {
52 Y = -CenterOffset; Z = 0.0; // move to right edge
53 }
54 else if(target == ATTACH_HUD_BOTTOM_LEFT)
55 {
56 Y = -otherYoffset; Z = BVerticalOffset;
57 }
58 else if(target == ATTACH_HUD_BOTTOM)
59 {
60 Y = 0.0; Z = BVerticalOffset;
61 }
62 else if(target == ATTACH_HUD_BOTTOM_RIGHT)
63 {
64 Y = brYoffset; Z = BVerticalOffset ; // 2 x to miss buttons
65 }
66 else
67 {
68 llOwnerSay("You must attach this as a HUD");
69 return;
70
71 }
72
73 vector newtarget = <0.0,Y,Z>;
74 llSetPos(newtarget);
75
76 rotation myrot = llEuler2Rot( <0.0,90.0,270.0> * DEG_TO_RAD);
77 llSetLocalRot(myrot);
78
79
80 }
81 }
82
83
84 }

Tandy the Nymph

Tandy

Category: Tandy
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 // tiny fae avatar script
3 // 12-21-2012
4
5 // This script is the main control for the tiny fairy avatars
6 // It colors the avatyar with combined skins and textures from inventory.
7 // The clothing must be named in this format:
8
9 // NAME_face_skin for the face
10 // NAME_upper_skin for above the waist
11 // NAME_lower_skin for below the waist
12
13 // They MUST be in sets of 3
14
15 // Clothing must be named as follows:
16 // "Name_Top" and "Name_Skirt Base", where name is variable between different clothing sets
17
18 // License:
19 // Copyright (c) 2009, Ferd Frederix
20
21 // Permission is hereby granted, free of charge, to any person
22 // obtaining a copy of this software and associated documentation
23 // files (the "Software"), to deal in the Software without
24 // restriction, including without limitation the rights to use,
25 // copy, modify, merge, publish, distribute, sublicense, and/or sell
26 // copies of the Software, and to permit persons to whom the
27 // Software is furnished to do so, subject to the following
28 // conditions:
29
30 // The above copyright notice and this permission notice shall be
31 // included in all copies or substantial portions of the Software.
32
33 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 // OTHER DEALINGS IN THE SOFTWARE.
41
42
43
44 // This work uses some content from the Second Life� Wiki article http://wiki.secondlife.com/wiki/SimpleDialogMenuSystem
45 // Copyright � 2007-2009 Linden Research, Inc. Licensed under the Creative Commons Attribution-Share Alike 3.0 License
46
47
48 // tiny fae avatar script
49
50 // from the menu system http://wiki.secondlife.com/wiki/SimpleDialogMenuSystem
51 integer N_DIALOG_CHOICES;
52 integer MAX_DIALOG_CHOICES_PER_PG = 8; // if not offering back button, increase this to 9
53 string PREV_PG_DIALOG_PREFIX = "< Page ";
54 string NEXT_PG_DIALOG_PREFIX = "> Page ";
55 string DIALOG_DONE_BTN = "Done";
56 string DIALOG_BACK_BTN = "<< Back";
57
58 integer pageNum;
59 list DIALOG_CHOICES;
60
61 integer listen_id; // int of the current listener
62 integer menuChannel;
63 string menuType; // set to cloth or skin depending upon menu choice so we know where to apply yhe chosen texture
64
65 list skinNames; // a list made on reset of all the skins
66 list clothNames;// same for clothes
67 list headNames; // ditto
68 list upperNames;
69 list lowerNames;
70
71
72 list makeMenu()
73 {
74 list menu = ["Skin","Clothes"];//, "Head", "Body", "Legs"
75
76 // If there are any objects in the avatar, make it so she can throw them when she has a tantrum.
78 menu += ["Tantrum"];
79
80 return menu;
81 }
82
83 // Alpha all heads or other body part but the chosen part
84 setSelectedBodyPart(string name, string type)
85 {
86 llOwnerSay("Setting " + type + " to " + name);
87
88 integer i;
90 for (; i <= j; i++)
91 {
92 string aname = llGetLinkName(i); // get the name of the prim
93 list a = llParseString2List(aname,["_"],[]);
94 string typeA = llList2String(a,0); // avatar
95 string typeB = llList2String(a,1); // head || lower || upper
96 string typeC = llList2String(a,2); // name from menu
97 if( (typeA == "avatar"|| typeA == "clothing") && typeB == type) {
98 if(typeC == name)
99 {
100 llSetLinkAlpha(i,1.0,ALL_SIDES); // 100% visible
101 }
102 else
103 {
104 llSetLinkAlpha(i,0.0,ALL_SIDES); // 0% visibile
105
106 }
107 }
108 }
109
110 }
111
112 // make lists of the available body parts
113 getBodyParts()
114 {
115 integer i;
117 for (; i <= j; i++)
118 {
119 string aname = llGetLinkName(i); // get the name of the prim
120 list a = llParseString2List(aname,["_"],[]);
121 string typeA = llList2String(a,0); // avatar
122 string typeB = llList2String(a,1); // head || lower || upper
123 string typeC = llList2String(a,2); // Name
124 if( typeA == "avatar" && typeB == "head") {
125 headNames += typeC; // add just the head for the menu
126 } else if(typeA == "avatar" && typeB == "upper") {
127 upperNames += typeC; // add just the head for the menu
128 } else if(typeA == "avatar" && typeB == "lower") {
129 lowerNames += typeC; // add just the head for the menu
130 }
131 }
132 //llOwnerSay(llDumpList2String(headNames,","));
133 }
134
135
136 // apply the chosen cloth to all prims
137 getSelectedCloth(string name)
138 {
139 llOwnerSay("Setting clothing to " + name);
140
141 integer i;
143 for (; i <= j; i++)
144 {
145 string aname = llToLower(llGetLinkName(i)); // get the name of the prim
146 list a = llParseString2List(aname,["_"],[]);
147 string typeA = llList2String(a,0); // avatar
148 string typeB = llList2String(a,1); // head || lower || upper
149 if( typeA == "clothing" && typeB == "upper") {
150 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, name + "_" + "Top", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
151 } else if(typeA == "clothing" && typeB == "lower") {
152 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, name + "_" + "Skirt Base", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
153 }
154 }
155 }
156
157 getSelectedSkin(string name)
158 {
159 llOwnerSay("Setting skin to " + name);
160
161 integer i;
163 for (; i <= j; i++)
164 {
165 string aname = llToLower(llGetLinkName(i)); // get the name of the prim
166
167 list a = llParseString2List(aname,["_"],[]);
168 string typeA = llList2String(a,0); // avatar
169 string typeB = llList2String(a,1); // head || lower || upper
170 if( typeA == "avatar" && typeB == "head" || aname=="eyebrow") {
171 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, name + "_" + "face_skin", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
172 } else if(typeA == "avatar" && typeB == "upper") {
173 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, name + "_" + "upper_skin", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
174 } else if(typeA == "avatar" && typeB == "lower") {
175 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, name + "_" + "lower_skin", <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
176 }
177 }
178
179 }
180
181
182 // make a menu of the first part of each texture name, and a set of lists of upper and lower 'real' names
183 getclothNames()
184 {
185 integer i;
187 for (; i < j; i++)
188 {
189 string realName = llGetInventoryName(INVENTORY_TEXTURE,i); // get full name
190 list data = llParseString2List(realName,["_"],[]); // make it a two piece list split on _
191 string name = llList2String(data,0); // left of the _ is the name
192 string type = llList2String(data,1); // right of the _ is the type
193
194 if(llToLower(type) == "top")
195 {
196 clothNames += name; // add just the tops for the menu
197 }
198 }
199 }
200
201
202 // make a menu of the first part of each texture name, and a set of lists of upper and lower 'real' names
203 getskinNames()
204 {
205 integer i;
207 for (; i < j; i++)
208 {
209 string realName = llGetInventoryName(INVENTORY_TEXTURE,i); // get full name
210 list data = llParseString2List(realName,["_"],[]); // make it a two piece list split on _
211 string name = llList2String(data,0); // left of the _
212 string type = llList2String(data,1); // right of the _
213 string skin = llList2String(data,2); // far right of the _
214
215 if(llToLower(type) == "upper" && llToLower(skin) == "skin")
216 {
217 skinNames += name;
218 }
219 }
220 }
221
222
223
224 CancelListen() {
225 llListenRemove(listen_id);
227 }
228
229 giveDialog(key ID, integer pageNum) {
230
231 list buttons;
232 integer firstChoice;
233 integer lastChoice;
234 integer prevPage;
235 integer nextPage;
236 string OnePage;
237
238 CancelListen();
239
240 menuChannel =-101;
241 listen_id = llListen(menuChannel,"","","");
242
244
245 N_DIALOG_CHOICES = llGetListLength(DIALOG_CHOICES);
246
247
248 if(N_DIALOG_CHOICES <= 10) {
249 buttons = DIALOG_CHOICES;
250 OnePage = "Yes";
251 }
252 else {
253 integer nPages = (N_DIALOG_CHOICES+MAX_DIALOG_CHOICES_PER_PG-1)/MAX_DIALOG_CHOICES_PER_PG;
254
255
256 if(pageNum < 1 || pageNum > nPages) {
257 pageNum = 1;
258 }
259 firstChoice = (pageNum-1)*MAX_DIALOG_CHOICES_PER_PG;
260
261 lastChoice = firstChoice+MAX_DIALOG_CHOICES_PER_PG-1;
262
263
264 if(lastChoice >= N_DIALOG_CHOICES) {
265 lastChoice = N_DIALOG_CHOICES;
266 }
267 if(pageNum <= 1) {
268 prevPage = nPages;
269 nextPage = 2;
270 }
271 else if(pageNum >= nPages) {
272 prevPage = nPages-1;
273 nextPage = 1;
274 }
275 else {
276 prevPage = pageNum-1;
277 nextPage = pageNum+1;
278 }
279 buttons = llList2List(DIALOG_CHOICES, firstChoice, lastChoice);
280 }
281
282
283 // FYI, this puts the navigation button row first, so it is always at the bottom of the dialog
284 list buttons01 = llList2List(buttons, 0, 2);
285 list buttons02 = llList2List(buttons, 3, 5);
286 list buttons03 = llList2List(buttons, 6, 8);
287 list buttons04;
288 if(OnePage == "Yes") {
289 buttons04 = llList2List(buttons, 9, 11);
290 }
291 buttons = buttons04 + buttons03 + buttons02 + buttons01;
292
293 if(OnePage == "Yes") {
294 buttons = [ DIALOG_DONE_BTN, DIALOG_BACK_BTN ]+ buttons;
295 //omit DIALOG_BACK_BTN in line above if not offering
296
297 }
298 else {
299 buttons = [
300 PREV_PG_DIALOG_PREFIX + (string)prevPage,
301 DIALOG_BACK_BTN, NEXT_PG_DIALOG_PREFIX+(string)nextPage, DIALOG_DONE_BTN
302 ]+buttons;
303 //omit DIALOG_BACK_BTN in line above if not offering
304 }
305 llDialog(ID, "Page "+(string)pageNum+"\nChoose one:", buttons, menuChannel);
306 }
307
308
309 default
310 {
311
313 {
315 }
316
318 {
319 pageNum = 1;
320 getskinNames(); // make a list of all skin names
321 getclothNames(); // make a list of all skin names
322 getBodyParts(); // make 3 lists of all body types
323 DIALOG_CHOICES = makeMenu();
324
325 llListen(100,"","","");
326 pageNum = 1;
327 giveDialog(llGetOwner(), pageNum);
328 llOwnerSay( "You can also type '/100 menu' to change colors on this avatar.");
329 }
330
331
332 listen(integer channel, string name, key id, string message)
333 {
334 integer where ;
335 CancelListen();
336 if(message == "menu")
337 {
338 pageNum = 1;
339 DIALOG_CHOICES = makeMenu();
340 }
341 else if( message == DIALOG_DONE_BTN)
342 {
343 return;
344 }
345 else if(message == DIALOG_BACK_BTN)
346 {
347 pageNum = 1;
348 DIALOG_CHOICES = makeMenu();
349 }
350 else if(llSubStringIndex(message, PREV_PG_DIALOG_PREFIX) == 0)
351 {
352 pageNum = (integer)llGetSubString(message, llStringLength(PREV_PG_DIALOG_PREFIX), -1);
353 }
354 else if(llSubStringIndex(message, NEXT_PG_DIALOG_PREFIX) == 0)
355 {
356 pageNum = (integer)llGetSubString(message, llStringLength(NEXT_PG_DIALOG_PREFIX), -1);
357 } else { //this is the section where we do stuff prior to this is all menu
358
359 // llOwnerSay(message);
360
361 if(message == "Tantrum")
362 {
363 llMessageLinked(LINK_SET,0,"tantrum","");
364 return;
365 }
366 else if(message == "Skin")
367 {
368 DIALOG_CHOICES = skinNames;
369 menuType = "skin";
370 }
371 else if(message == "Clothes")
372 {
373 DIALOG_CHOICES = clothNames;
374 menuType = "cloth";
375
376 } else {
377
378 if(message == "Head")
379 {
380 DIALOG_CHOICES = headNames;
381 giveDialog(llGetOwner(), pageNum);
382 return;
383 } else if(message == "Body")
384 {
385 DIALOG_CHOICES = upperNames;
386 giveDialog(llGetOwner(), pageNum);
387 return;
388 } else if(message == "Legs")
389 {
390 DIALOG_CHOICES = lowerNames;
391 giveDialog(llGetOwner(), pageNum);
392 return;
393 }
394
395
396 where = llListFindList(skinNames,[message]); // see if they picked a skin or a cloth
397 if(where >= 0)
398 {
399 getSelectedSkin(message);
400 llSay(99900,message);
401 }
402 where = llListFindList(clothNames,[message]); // see if they picked a skin or a cloth
403 if(where >= 0)
404 {
405 getSelectedCloth(message);
406 llSay(99900,message);
407 }
408 where = llListFindList(headNames,[message]); // see if they picked a skin or a cloth
409 // llOwnerSay("Where:"+ (string) where);
410 if(where >= 0)
411 {
412 setSelectedBodyPart(message,"head");
413 }
414 where = llListFindList(upperNames,[message]); // see if they picked a skin or a cloth
415 if(where >= 0)
416 {
417 setSelectedBodyPart(message,"upper");
418 }
419 where = llListFindList(lowerNames,[message]); // see if they picked a skin or a cloth
420 if(where >= 0)
421 {
422 setSelectedBodyPart(message,"lower");
423 }
424 }
425 }
426 giveDialog(llGetOwner(), pageNum);
427 }
428
429
430 timer()
431 {
432 llListenRemove(listen_id);
433 llOwnerSay( "Sorry. The menu timed out, type '/100 menu' to change colors.");
435 }
436
437 }

Tandy the Nymph

Tandy

Category: Tandy
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 // Tantrum script for the avatar
3 // 12-10-2012
4
5 // License:
6 // Copyright (c) 2009, Ferd Frederix
7
8 // Permission is hereby granted, free of charge, to any person
9 // obtaining a copy of this software and associated documentation
10 // files (the "Software"), to deal in the Software without
11 // restriction, including without limitation the rights to use,
12 // copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the
14 // Software is furnished to do so, subject to the following
15 // conditions:
16
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 // OTHER DEALINGS IN THE SOFTWARE.
28
29 vector StartColor;
30 vector EndColor;
31
32
33 // from the menu system http://wiki.secondlife.com/wiki/SimpleDialogMenuSystem
34 integer N_DIALOG_CHOICES;
35 integer MAX_DIALOG_CHOICES_PER_PG = 8; // if not offering back button, increase this to 9
36 string PREV_PG_DIALOG_PREFIX = "< Page ";
37 string NEXT_PG_DIALOG_PREFIX = "> Page ";
38 string DIALOG_DONE_BTN = "Done";
39 string DIALOG_BACK_BTN = "<< Back";
40
41 integer pageNum;
42 list DIALOG_CHOICES;
43
44 integer listen_id; // int of the current listener
45 integer menuChannel;
46
47
48 LaunchSpell(integer color, string name)
49 {
50 rotation rot = llGetRot();
51 vector fwd = llRot2Fwd(rot);
52 vector pos = llGetPos();
53 pos = pos + fwd;
54
55 StartColor = < red/256, green/256, blue/256>; // Starting color of particles <R,G,B>
56 EndColor = StartColor;
57
58
59 llSleep(1);
60
61 llRezObject(name, pos, fwd * 3 , rot, color);
62
63 llSleep(1);
64
65 }
66
67 // colors for tantrum effect
68 float red;
69 float green;
70 float blue;
71 integer color;
72
73
74 CancelListen() {
75 llListenRemove(listen_id);
77 }
78
79 giveDialog(key ID, integer pageNum) {
80
81 list buttons;
82 integer firstChoice;
83 integer lastChoice;
84 integer prevPage;
85 integer nextPage;
86 string OnePage;
87
88 CancelListen();
89
90 menuChannel =-101;
91 listen_id = llListen(menuChannel,"","","");
92
94
95 N_DIALOG_CHOICES = llGetListLength(DIALOG_CHOICES);
96
97
98 if(N_DIALOG_CHOICES <= 10) {
99 buttons = DIALOG_CHOICES;
100 OnePage = "Yes";
101 }
102 else {
103 integer nPages = (N_DIALOG_CHOICES+MAX_DIALOG_CHOICES_PER_PG-1)/MAX_DIALOG_CHOICES_PER_PG;
104
105
106 if(pageNum < 1 || pageNum > nPages) {
107 pageNum = 1;
108 }
109 firstChoice = (pageNum-1)*MAX_DIALOG_CHOICES_PER_PG;
110
111 lastChoice = firstChoice+MAX_DIALOG_CHOICES_PER_PG-1;
112
113
114 if(lastChoice >= N_DIALOG_CHOICES) {
115 lastChoice = N_DIALOG_CHOICES;
116 }
117 if(pageNum <= 1) {
118 prevPage = nPages;
119 nextPage = 2;
120 }
121 else if(pageNum >= nPages) {
122 prevPage = nPages-1;
123 nextPage = 1;
124 }
125 else {
126 prevPage = pageNum-1;
127 nextPage = pageNum+1;
128 }
129 buttons = llList2List(DIALOG_CHOICES, firstChoice, lastChoice);
130 }
131
132
133 // FYI, this puts the navigation button row first, so it is always at the bottom of the dialog
134 list buttons01 = llList2List(buttons, 0, 2);
135 list buttons02 = llList2List(buttons, 3, 5);
136 list buttons03 = llList2List(buttons, 6, 8);
137 list buttons04;
138 if(OnePage == "Yes") {
139 buttons04 = llList2List(buttons, 9, 11);
140 }
141 buttons = buttons04 + buttons03 + buttons02 + buttons01;
142
143 if(OnePage == "Yes") {
144 buttons = [ DIALOG_DONE_BTN, DIALOG_BACK_BTN ]+ buttons;
145 //omit DIALOG_BACK_BTN in line above if not offering
146
147 }
148 else {
149 buttons = [
150 PREV_PG_DIALOG_PREFIX + (string)prevPage,
151 DIALOG_BACK_BTN, NEXT_PG_DIALOG_PREFIX+(string)nextPage, DIALOG_DONE_BTN
152 ]+buttons;
153 //omit DIALOG_BACK_BTN in line above if not offering
154 }
155 llDialog(ID, "Page "+(string)pageNum+"\nChoose one:", buttons, menuChannel);
156 }
157
158 list makeMenu()
159 {
160 list menu ;
161
162 // If there are any objects in the avatar, make it so she can throw them when she has a tantrum.
163 integer i;
165 for (i = 0; i < j ; i++)
166 {
168 menu += [tantrum];
169 }
170 return menu;
171 }
172
173
174 default
175 {
176
178 {
180
181 }
182
183
184
186 {
188 {
189 pageNum = 1;
190 DIALOG_CHOICES = makeMenu();
191 giveDialog(llGetOwner(), pageNum);
192
193 }
194 }
195
196
197 link_message(integer sender,integer nu, string str, key id)
198 {
199 if(str == "tantrum")
201 }
202
203 listen(integer channel, string name, key id, string message)
204 {
205
206 if(message == "-")
207 {
208 giveDialog(llGetOwner(), pageNum);
209 }
210 else if( message == DIALOG_DONE_BTN)
211 {
212 CancelListen();
213 return;
214 }
215 else if(message == DIALOG_BACK_BTN)
216 {
217 pageNum = 1;
218 DIALOG_CHOICES = makeMenu();
219 giveDialog(llGetOwner(), pageNum);
220 }
221 else if(llSubStringIndex(message, PREV_PG_DIALOG_PREFIX) == 0)
222 {
223 pageNum = (integer)llGetSubString(message, llStringLength(PREV_PG_DIALOG_PREFIX), -1);
224 giveDialog(llGetOwner(), pageNum);
225 }
226 else if(llSubStringIndex(message, NEXT_PG_DIALOG_PREFIX) == 0)
227 {
228 pageNum = (integer)llGetSubString(message, llStringLength(NEXT_PG_DIALOG_PREFIX), -1);
229 giveDialog(llGetOwner(), pageNum);
230
231 } else { //this is the section where we do stuff prior to this is all menu
232
233 CancelListen();
234 red = llFrand(256.0);
235 blue = llFrand(256.0);
236 green = llFrand(256.0);
237 color = (integer) (red * 256 * 256 + blue * 256 + green);
238
239
240
241 llStartAnimation("punch_onetwo");
242
243 LaunchSpell(color, message);
244 llStopAnimation("punch_onetwo");
245 giveDialog(llGetOwner(), pageNum);
246 }
247 }
248
249
250 changed(integer what)
251 {
252 if(what & CHANGED_INVENTORY)
253 {
255 }
256 }
257
258 }

Tandy the Nymph

Tandy

Category: Tandy
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 // no script script
4
5 default
6 {
8 {
11 }
12
13
14
15
17 {
18 integer hasPerms = llGetPermissions();
19
21
22 }
23
24
25
26 attach(key id)
27 {
28 if(id)//tests if it is a valid key and not NULL_KEY
29 {
31 }
32 else
33 {
34 llReleaseControls(); // detached
35 }
36 }
37
38
39 }

Tandy the Nymph

Tandy

Category: Tandy
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 // (C) Wizardry and Steamworks 2011, license: GPLv3 //
4 // Please see: http://www.gnu.org/licenses/gpl.html //
5 // for legal details, rights of fair usage and //
6 // the disclaimer and warranty conditions. //
7 //////////////////////////////////////////////////////////
8 // Mods for hovering flight by Ferd Frederix
9 // Link messages and reduction in complexity by eliminating redundant states
10
11 integer _debug = FALSE;// set to TRUE tio see what is going on in owner chat
12 integer ready = FALSE; // set to TRUE when ready to animate
13 integer granted = FALSE; // TRUE is AO permissions granted
14 key _owner = NULL_KEY;
15 key nQuery = NULL_KEY;
16 integer xLine = 0;
17 integer agentInfo = 0;
18 string _lastAnim = "";
19 string _lastAnimName = "";
20
21 string stream = "";
22 list sList = [];
23
24 //pragma inline
25 string xName = "XAO";
26
27 list walk_list = [];
28 list fly_list = [];
29 list sit_list = [];
30 list hover_list = [];
31 list stand_list = [];
32 list run_list = [];
33 list type_list = [];
34 list sitobj_list = [];
35
36 //pragma inline
37 list ANIMATION_NODES = [
38 "walking",
39 "hovering",
40 "flying",
41 "sitting",
42 "standing",
43 "running",
44 "typing",
45 "sitobject"
46 ];
47
48 debug(string msg)
49 {
50 if(_debug)
51 llOwnerSay(msg);
52 }
53
54
55 //pragma inline
56 string wasStaX_GetNodeValue(string node) {
57 list StaX = [];
58 string value = "";
59 xLine = 0;
60 do {
61 string current = llList2String(sList, xLine);
62 string lookback = llList2String(sList, xLine-1);
63
64 if(current != "/" && lookback == "<") {
65 StaX += current;
66 jump next_tag;
67 }
68 integer len = llGetListLength(StaX)-1;
69 if(lookback == "/") {
70 StaX = llDeleteSubList(StaX, len, len);
71 jump next_tag;
72 }
73 if(current != ">" && current != "/" && current != "<")
74 if(llList2String(StaX,len) == node)
75 value += current + " ";
76 @next_tag;
77 } while(++xLine<agentInfo);
78
79 if(llGetListLength(StaX) != 0) {
80 llSay(DEBUG_CHANNEL, "The following tags may be unmatched: " + llDumpList2String(StaX, ",") + ". Please check your file.");
81 }
82 return value;
83 }
84
85 //pragma inline
86 changeAnimation(string animation) {
87
88 debug("Setting: " + animation);
89 string nAnim;
90 if(animation == "walking") {
91 nAnim = llList2String(walk_list, (integer)llFrand(llGetListLength(walk_list)));
92 jump set_anim;
93 }
94 if(animation == "sitting") {
95 nAnim = llList2String(sit_list, (integer)llFrand(llGetListLength(sit_list)));
96 jump set_anim;
97 }
98 if(animation == "flying") {
99 nAnim = llList2String(fly_list, (integer)llFrand(llGetListLength(fly_list)));
100 jump set_anim;
101 }
102 if(animation == "hovering") {
103 nAnim = llList2String(hover_list, (integer)llFrand(llGetListLength(hover_list)));
104 jump set_anim;
105 }
106 if(animation == "standing") {
107 nAnim = llList2String(stand_list, (integer)llFrand(llGetListLength(stand_list)));
108 }
109 if(animation == "running") {
110 nAnim = llList2String(run_list, (integer)llFrand(llGetListLength(run_list)));
111 }
112 if(animation == "typing") {
113 nAnim = llList2String(type_list, (integer)llFrand(llGetListLength(type_list)));
114 }
115 if(animation == "sitobject") {
116 nAnim = llList2String(sitobj_list, (integer)llFrand(llGetListLength(sitobj_list)));
117 }
118 @set_anim;
119
120 debug("Start: " + nAnim);
121 llStartAnimation(nAnim);
122 llStopAnimation(_lastAnimName);
123 _lastAnimName = nAnim;
124 _lastAnim = animation;
125 }
126
127 //pragma inline
128 integer commute() {
129 string ani = llGetAnimation(_owner);
130 if(ani == "Hovering" || ani == "Hovering Down" || ani == "Hovering Up" ) {
131 debug("hover");
132 return 6;
133 }
134
135 agentInfo = llGetAgentInfo(_owner);
136
137 if(agentInfo & AGENT_WALKING) {
138 debug("walk");
139 return 0;
140 }
141 if(agentInfo & AGENT_FLYING) {
142 debug("fly");
143 return 1;
144 }
145 if(agentInfo & AGENT_ON_OBJECT) {
146 debug("on object");
147 return 2;
148 }
149 if(agentInfo & AGENT_SITTING) {
150 debug("sit");
151 return 3;
152 }
153 if(agentInfo & AGENT_ALWAYS_RUN) {
154 debug("running");
155 return 4;
156 }
157 if(agentInfo & AGENT_TYPING) {
158 debug("type");
159 return 5;
160 }
161 return 7;
162 }
163
164 default {
165 state_entry() {
166 _owner = llGetOwner();
167 integer itra;
168 for(itra=0, xLine=0, stream = ""; itra<llGetInventoryNumber(INVENTORY_NOTECARD); ++itra) {
170 jump read;
171 }
172 llInstantMessage(llGetOwner(), "AO failed to find notecard XAO.");
173 return;
174 @read;
175 nQuery = llGetNotecardLine(xName, xLine);
176 }
177 dataserver(key id, string data) {
178 if(id != nQuery) return;
179 if(data == EOF) {
180 llOwnerSay("Readng AO Notecard ...");
181 sList = llParseString2List(stream, [" "], ["<", ">", "/"]);
182 stream = "";
183 agentInfo = llGetListLength(sList);
184 integer itra = llGetListLength(ANIMATION_NODES)-1;
185 do {
186 if(llList2String(ANIMATION_NODES, itra) == "walking") {
187 walk_list = llParseString2List(wasStaX_GetNodeValue("walking"), [" "], []);
188 jump anim_type;
189 }
190 if(llList2String(ANIMATION_NODES, itra) == "flying") {
191 fly_list = llParseString2List(wasStaX_GetNodeValue("flying"), [" "], []);
192 jump anim_type;
193 }
194 if(llList2String(ANIMATION_NODES, itra) == "sitting") {
195 sit_list = llParseString2List(wasStaX_GetNodeValue("sitting"), [" "], []);
196 jump anim_type;
197 }
198 if(llList2String(ANIMATION_NODES, itra) == "standing") {
199 stand_list = llParseString2List(wasStaX_GetNodeValue("standing"), [" "], []);
200 }
201 if(llList2String(ANIMATION_NODES, itra) == "running") {
202 run_list = llParseString2List(wasStaX_GetNodeValue("running"), [" "], []);
203 }
204 if(llList2String(ANIMATION_NODES, itra) == "typing") {
205 type_list = llParseString2List(wasStaX_GetNodeValue("typing"), [" "], []);
206 }
207 if(llList2String(ANIMATION_NODES, itra) == "hovering") {
208 hover_list = llParseString2List(wasStaX_GetNodeValue("hovering"), [" "], []);
209 }
210 if(llList2String(ANIMATION_NODES, itra) == "sitobject") {
211 sitobj_list = llParseString2List(wasStaX_GetNodeValue("sitobject"), [" "], []);
212 }
213 @anim_type;
214 } while(--itra>=0);
215
216 ready = TRUE;
218 return;
219 }
220 if(data == "") jump next_line;
221 stream += data;
222 @next_line;
223 nQuery = llGetNotecardLine(xName, ++xLine);
224 }
225
227
228 //debug(llDumpList2String(hover_list,","));
229
231 granted = TRUE;
232 sList = llParseString2List(llDumpList2String(sList, ""), ["<", ">", "/"], []);
233 integer itra=llGetListLength(sList)-1;
234 do {
235 llStopAnimation(llList2String(sList, itra));
236 } while(--itra>=0);
237 llOwnerSay("Starting AO");
239 }
240 }
241
242 changed(integer change) {
243 if(change & CHANGED_OWNER || change & CHANGED_INVENTORY) {
245 }
246 }
247
248 on_rez(integer param) {
249 if(! ready)
251 else
253
254 }
255
256 timer() {
257 // Get next state.
258 agentInfo = commute();
259
260 if(agentInfo == 0 && _lastAnim != "walking") { changeAnimation("walking"); }
261 else if(agentInfo == 1 && _lastAnim != "flying") { changeAnimation("flying"); }
262 else if(agentInfo == 2 && _lastAnim != "sitobject") { changeAnimation("sitobject"); }
263 else if(agentInfo == 3 && _lastAnim != "sitting") { changeAnimation("sitting"); }
264 else if(agentInfo == 4 && _lastAnim != "running") { changeAnimation("running"); }
265 else if(agentInfo == 5 && _lastAnim != "typing") { changeAnimation("typing"); }
266 else if(agentInfo == 6 && _lastAnim != "hovering") { changeAnimation("hovering"); }
267 else if(agentInfo == 7 && _lastAnim != "standing") { changeAnimation("standing"); }
268 }
269
270 link_message(integer sender_number, integer number, string message, key id)
271 {
272 if(message == "AO On") {
274 }
275 else if(message == "AO Off") {
276 llOwnerSay(message);
278 if(granted) {
279 llStopAnimation(_lastAnimName);
280 }
281 }
282
283 }
284 }

Tandy the Nymph

Tandy

Category: Tandy
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 // One Script Prim Animation
3
4 // Original Script by: Ferd Frederix
5 // No Spam version by: Gino Rascon
6 // 12-11-2012 rev 2 add Commit command
7
8 integer runtime = FALSE; // set to TRUE after making the notecard
9
10 string NOTECARD = "Movement"; // the notecard for this script, you can add more than 1 script and notecard, just change this line to match
11 integer playchannel = 1; // the playback channel, this is the channel you use in LinkMessages
12
13
14 integer debug = FALSE; // if set to TRUE, debug info appears
15
16
17 // notecard reading
18 string priorname; // the prior animation name so we can spot differences as we read them in
19 integer iIndexLines; // lines in a card
20 integer inotecardIndex = 0; // notecard counter;
21 integer move = 0; // N movements rea from the notecard
22
23 key kNoteCardLines; // the key of the notecard
24 key kGetIndexLines; // the key of the current line
25
26 //communications
27 integer dialogchannel ; // dialog boxes
28
29 integer nPrims; // total number of prims
30 integer PrimsCounter = 0; // how many have checked in
31 integer timercounter = 0; // how many seconds have gone by
32 integer wantname; // flag indicating we are waiting for a name to be chatted
33
34
35 // the list of coords
36 list masterlist; // master list of all positions
37 list llastPrimList; // storage of the last prim position we learned
38 string curranimation; // what we are playing
39
40 integer STRIDE = 5; // size of the master list
41 integer lastSTRIDE = 4; // size of the last prim list
42
43 integer listener; // temp listener when we are waiting for them to give us a name
44
45 vector InitSize; // the initial size when the prims were recorded
46 list LoadedAnims; // animations read from the notecard added to the Menu display
47
48 // in case of hand editing, we wupe out extra stuff at end
49 string Getline(list Input, integer line)
50 {
51 return llStringTrim(llList2String(Input, line),STRING_TRIM);
52 }
53
54 Record()
55 {
56 if(llStringLength(curranimation) > 0)
57 {
58 integer foundmovement = 0; // will be set if any child moved
59 integer PrimCounter ; // skip past the root prim
60 for (PrimCounter =2; PrimCounter <= nPrims; PrimCounter++ )
61 {
62 list my_list = llGetLinkPrimitiveParams(PrimCounter,[PRIM_POSITION,PRIM_ROTATION, PRIM_SIZE ]);
63 // position is always in region coordinates, even if the prim is a child or the root prim of an attachment.
64 // rot is always the global rotation, even if the prim is a child or the root prim of an attachment.
65
66 // get current prim pos, rot and size
67 vector vrealPrimPos = llList2Vector(my_list,0) - llGetPos(); // position subtract Global Pos
68 vrealPrimPos /= llGetRot();
69 rotation rrealPrimRot = llList2Rot(my_list,1) / llGetRot(); // rotation subtract Global Rot
70 vector vrealPrimSize = llList2Vector(my_list,2); // size
71
72 // compare it to the last one we had, stride of list is a 4, and it is already sorted
73 integer iindex = (PrimCounter - 2) * lastSTRIDE; // zeroth position is PrimCounter - start, or 2
74
75 // get the last thing we remembered about this prim
76 float fprimNum = llList2Integer(llastPrimList, iindex); // must be 0,1,2, in order
77 vector vlastPrimPos = llList2Vector(llastPrimList, iindex+1);
78 rotation rlastPrimRot = llList2Rot(llastPrimList, iindex+2);
79 vector vlastPrimSize = llList2Vector(llastPrimList, iindex+3);
80
81 // if anything changed on this prim, we must record it.
82 if(vlastPrimPos != vrealPrimPos ||
83 rlastPrimRot != rrealPrimRot ||
84 vlastPrimSize!= vrealPrimSize
85 )
86 {
87 foundmovement++;
88
89 // show owner any changes they mnade
90 if(debug)
91 {
92 llOwnerSay("prim:" + (string) PrimCounter);
93
94 if(vlastPrimPos != vrealPrimPos)
95 llOwnerSay("pos delta :" + (string) (vrealPrimPos - vlastPrimPos));
96
97 if(rlastPrimRot != rrealPrimRot)
98 llOwnerSay("rot delta:" + (string) (llRot2Euler(rrealPrimRot - rlastPrimRot) * RAD_TO_DEG));
99
100 if(vlastPrimSize != vrealPrimSize)
101 llOwnerSay("size delta:" + (string) (vrealPrimSize - vlastPrimSize));
102 }
103
104 //Save them in the master list of all animations
105 masterlist += curranimation;
106 masterlist += PrimCounter;
107 masterlist += vrealPrimPos;
108 masterlist += rrealPrimRot;
109 masterlist += vrealPrimSize;
110
111 // save them in the last movement list
112 integer saved = FALSE;
113 integer i;
114 integer imax = llGetListLength(llastPrimList);
115 // save the changes in the last prim list so we can keep our lists smaller
116 for ( i=0; i < imax; i += lastSTRIDE )
117 {
118 if(llList2Float(llastPrimList,i) == PrimCounter)
119 {
120 llastPrimList = llListReplaceList(llastPrimList,[vrealPrimPos],i+1,i+1);
121 llastPrimList = llListReplaceList(llastPrimList,[rrealPrimRot],i+2,i+2);
122 llastPrimList = llListReplaceList(llastPrimList,[vrealPrimSize],i+3,i+3);
123 if(debug) llOwnerSay("In history at position " + (string) (i/lastSTRIDE));
124 saved++;
125 }
126 }
127
128 // never moved before? add it then
129 if(! saved)
130 {
131 if(debug) llOwnerSay("Someone added a new prim and then clicked Record");
132 llastPrimList += PrimCounter;
133 llastPrimList += vrealPrimPos;
134 llastPrimList += rrealPrimRot;
135 llastPrimList += vrealPrimSize;
136 }
137 } // if
138 } // for
139 if(debug) llOwnerSay("history:" + llDumpList2String(llastPrimList,":"));
140
141 if(!foundmovement)
142 llOwnerSay("You must move at least one child prim.");
143 }
144 else
145 {
146 llOwnerSay("You must name your animation.");
147 llTextBox(llGetOwner(),"Enter a name for your animation",dialogchannel);
148 wantname++;
149 }
150 }
151
152 // on reset, record the base position in history so we can see changes
153 Clear()
154 {
155 LoadedAnims = []; // wipe out Menu
156 masterlist = []; // wipe all recordings
157 llastPrimList = []; // wipe last animations
158 integer PrimCounter ; // skip 1, which is the root prim
159 integer counter = 0;
160 // save all the current settings in memory
161 for (PrimCounter=2; PrimCounter <= nPrims; PrimCounter++ )
162 {
163 list my_list = llGetLinkPrimitiveParams(PrimCounter,[PRIM_POSITION,PRIM_ROTATION, PRIM_SIZE ]);
164
165 // save the local pos and rot, since llGetLinkPrimitiveParams returns global pos and rot
166 vector primpos = llList2Vector(my_list,0) - llGetPos();
167 rotation primrot = llList2Rot(my_list,1) / llGetRot();
168 vector primsize = llList2Vector(my_list,2) ;
169
170 llastPrimList += PrimCounter;
171 llastPrimList += primpos;
172 llastPrimList += primrot;
173 llastPrimList += primsize;
174 counter++;
175 }
176 if(debug) llOwnerSay("Saved " + (string) counter + " prims initial position in history");
177 }
178
179 DumpBack ()
180 {
181 integer i;
182 integer imax = llGetListLength(masterlist);
183 integer howmany = imax / STRIDE ;
184 llOwnerSay((string) howmany + " movements recorded - copy these and paste them into the notecard");
185
186 integer flag = 0;
187 for (i = 0; i < imax; i+= STRIDE)
188 {
189 if( i == 0 )
190 llOwnerSay( "|start|" + (string) llGetScale());
191
192 string saniName = llList2String(masterlist,i);
193 curranimation = saniName;
194
195 float fprimNum = llList2Integer(masterlist, i+1);
196 integer iprimNum = (integer) fprimNum;
197 vector vprimPos = llList2Vector(masterlist, i+2);
198 rotation rprimRot = llList2Rot(masterlist, i+3) ;
199 vector vprimSize = llList2Vector(masterlist, i+4);
200
201 llOwnerSay("|"+ saniName + "|" + (string) iprimNum + "|" + (string) vprimPos + "|" + (string) rprimRot + "|" + (string) vprimSize );
202 flag++;
203 }
204 if(! flag)
205 llOwnerSay("No recording was made, nothing to play back." );
206 }
207
208
209 rotation calcChildRot(rotation rdeltaRot)
210 {
211
213 return rdeltaRot/llGetLocalRot();
214 else
215 return rdeltaRot/llGetRootRotation();
216
217 }
218
219
220 PlayBack (string name)
221 {
222 integer i;
223 integer imax = llGetListLength(masterlist);
224
225 integer linknum = 0;
226
227 for (i = 0; i < imax; i+= STRIDE)
228 {
229 string saniName = llList2String(masterlist,i);
230 if(saniName == name)
231 {
232 float fprimNum = llList2Float(masterlist,i+1);
233 vector vPos = llList2Vector(masterlist,i+2);
234 rotation rRot = llList2Rot(masterlist,i+3) ;
235 vector vprimSize = llList2Vector(masterlist,i+4) ;
236
237 vector scale = llGetScale();
238 float delta = scale.x / InitSize.x ; // see if the root prim has grown or shrunk as a percentage
239
240 vPos *= delta; // add any difference in size to it positions there
241 vprimSize *= delta; // grow the child prim, too
242
243
244 // support negative prim numbers as a delay
245 if(fprimNum < 0)
246 {
247 if(debug) llOwnerSay("Sleeping " + (string) (fprimNum * -1));
248 llSleep((float) fprimNum * -1);
249 }
250 else
251 {
252 if(fprimNum > 1 )
253 {
254 // set the local pos and locat rot to the prims orientation and position
255 rRot = calcChildRot(rRot);
256
257 list actions = [PRIM_POSITION,vPos,PRIM_ROTATION,rRot,PRIM_SIZE,vprimSize];
258 if(debug) llOwnerSay("Moving prim :" + (string) fprimNum + ":" + llDumpList2String(actions,":"));
259
260 llSetLinkPrimitiveParamsFast((integer) fprimNum,actions);
261 }
262 }
263 }
264 }
265 }
266
267 MakeMenu()
268 {
269 list amenu = ["Reset","Record","Commit", "Help","Name","Notecard","Pause"] + LoadedAnims;
270
271 amenu = llDeleteSubList(amenu,12,99);
272
273 llDialog(llGetOwner(), "Pick a command",amenu,dialogchannel);
274 }
275
276
277
278 default
279 {
281 {
282
283 InitSize = llGetScale(); // save the size when we recorded the prims
284 nPrims = llGetNumberOfPrims(); // how many we are recording
285 if(debug) llOwnerSay(" Total Prims = " + (string) nPrims);
286 Clear();
287
289
290 if(llStringLength(notecardname) > 0)
291 {
292 kNoteCardLines = llGetNumberOfNotecardLines(NOTECARD);
293 kGetIndexLines = llGetNotecardLine(NOTECARD,0);
294 }
295 else
296 {
297 llOwnerSay("If you add a notecard, you can save your animations permanently in a notecard named " + NOTECARD);
298 }
299
300 dialogchannel = 600;
301 llListen(dialogchannel,"","","");
302 }
303
304 // read notecard on bootup
305 dataserver(key queryid, string data)
306 {
307 if(queryid == kNoteCardLines)
308 {
309 iIndexLines = (integer) data;
310 }
311
312 if(queryid == kGetIndexLines)
313 {
314 if(data != EOF)
315 {
316 queryid = llGetNotecardLine(NOTECARD, inotecardIndex);
317 list lLine = (llParseString2List(data, ["|"], []));
318
319 string junk = llList2String(lLine,0);
320 string aniname = llList2String(lLine,1);
321 string aNum = (string) Getline(lLine,2);
322
323 // check for the prim size,and save it, the fiorst line will look like this:
324 // [18:06] prim position 1.2: |start|<1.02306, 1.02306, 1.02306>
325
326 if(inotecardIndex == 0 && aniname == "start")
327 {
328 InitSize = (vector) aNum;
329 }
330 else if(inotecardIndex == 0 && aniname != "start")
331 {
332 llOwnerSay("The notecard " + NOTECARD + " is incorrect, it must begin with 'start|<x,y,z>' with the size of the original prim");
333 }
334 else
335 {
336
337 float Num = (float) aNum;
338
339 vector vPos = (vector) Getline(lLine,3); // global for calcChild()
340 rotation rRot = (rotation) Getline(lLine,4); // global for calcChild()
341 vector Size = (vector) Getline(lLine,5);
342
343 vector scale = llGetScale();
344 float delta = scale.x / InitSize.x ; // see if the root prim has grown or shrunk as a percentage
345
346
347 if(aniname != priorname)
348 {
349 llOwnerSay("Loading animation " + aniname);
350 priorname = aniname;
351 LoadedAnims += aniname;
352 }
353
354 if(Num != 1) // skip root prim
355 {
356 masterlist += [aniname];
357 masterlist += [Num];
358 masterlist += [vPos];
359 masterlist += [rRot];
360 masterlist += [Size];
361
362 if(Num > 1) // not the pauses
363 {
364 rRot = calcChildRot(rRot);
365 vPos *= delta; // add any difference in size to it positions there
366 Size *= delta; // grow the child prim, too
367
368 llSetLinkPrimitiveParamsFast((integer) Num,[PRIM_POSITION,vPos,PRIM_ROTATION,rRot,PRIM_SIZE,Size]);
369 move++;
370 }
371
372 }
373 }
374 inotecardIndex++;
375 integer InitPerCent = (integer) llRound(( (inotecardIndex+1) / (float) iIndexLines) * 100);
376 llSetText("Initialising... \n" + (string) InitPerCent + "%" , <1,1,1>, 1.0);
377 if(InitPerCent >= 100)
378 llSetText("" , <1,1,1>, 1.0);
379 kGetIndexLines = llGetNotecardLine(NOTECARD,inotecardIndex);
380
381 }
382 else
383 {
384 llOwnerSay("initialized with " + (string) move + " movements");
385 llSetText("" , <1,1,1>, 1.0);
386 }
387 }
388 }
389
390
391 touch_start(integer total_number)
392 {
393 if(llDetectedKey(0) == llGetOwner() && ! runtime)
394 {
395 MakeMenu();
396 }
397
398 // add any control code here
399 // example:
400 // llMessageLinked(LINK_SET,playchannel,"All",""); // will play Animation named "All"
401
402 }
403
404 listen( integer channel, string name, key id, string message )
405 {
406
407 if(channel == dialogchannel)
408 {
409 if(message == "Reset")
410 {
411 Clear();
412 if(debug) llOwnerSay("Reset = " + llDumpList2String(llastPrimList,":"));
413 MakeMenu();
414 }
415 else if(message == "Commit")
416 {
417 runtime= TRUE;
418 }
419 else if(message =="Pause")
420 {
421 masterlist += curranimation;
422 masterlist += -1;
423 masterlist += <0,0,0>; // pos
424 masterlist += <0,0,0,1>;// rot
425 masterlist += <0,0,0>; // size
426 MakeMenu();
427 }
428 else if(message == "Record")
429 {
430 Record();
431
432 MakeMenu();
433 }
434 else if(message == "Name")
435 {
436 llTextBox(llGetOwner(),"Enter a name for your animation",dialogchannel);
437 wantname++;
438 MakeMenu();
439 }
440 else if(message =="Menu")
441 {
442 MakeMenu();
443 }
444 else if(message == "Notecard")
445 {
446 DumpBack();
447 MakeMenu();
448 }
449 else if(message == "Help")
450 {
451 llLoadURL(llGetOwner(),"View online help", "http://secondlife.mitsi.com/secondlife/Posts/Prim-Animator");
452 }
453 else if(wantname)
454 {
455 curranimation = message;
456
457 LoadedAnims += message;
458
459 MakeMenu();
460 llOwnerSay("Recording is ready for animation '" + curranimation + "'");
461 llOwnerSay("Position all child prims, then select the Menu item 'Record', and repeat as necessary. When finished, click 'PlayBack' to play back the animation, or click the animation name. Click 'Name' to start a new animation sequence");
462 wantname = 0;
463 PrimsCounter = 0;
464 timercounter = 0;
465 llSetTimerEvent(1.0);
466 }
467 else
468 {
469 if(llListFindList(LoadedAnims,[message]) != -1)
470 {
471 PlayBack(message);
472 MakeMenu();
473 }
474 }
475
476
477 }
478 }
479
480
481
482 link_message(integer sender_num, integer num, string message, key id)
483 {
484 if(num == playchannel)
485 {
486 if(debug) llOwnerSay("playback animation " + message);
487 PlayBack(message);
488 }
489 }
490
491
492
493
494 }
495
496

Tandy the Nymph

Tandy

Category: Tandy
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 integer door;
3
4 default
5 {
7 {
8
9 }
10 touch_start(integer total_number)
11 {
12 door = ~ door;
13 if(door)
14 llMessageLinked(LINK_SET,1,"open","");
15 else
16 llMessageLinked(LINK_SET,1,"close","");
17
18 }
19 }

Tandy the Nymph

Tandy

Category: Tandy
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 integer flag;
3
4 default
5 {
7 {
9 <1.0,0.7,1.0>, // light color vector range: 0.0-1.0 *3
10 1.0, // intensity (0.0-1.0)
11 10.0, // radius (.1-20.0)
12 0.6 ]); // falloff (.01-2.0)
13 }
14
15
17 {
18 flag = ~ flag;
19 if(flag)
20 {
22 <1.0,0.7,1.0>, // light color vector range: 0.0-1.0 *3
23 1.0, // intensity (0.0-1.0)
24 10.0, // radius (.1-20.0)
25 0.6 ]); // falloff (.01-2.0)
26 }
27 else
28 {
30 <1.0,0.7,1.0>, // light color vector range: 0.0-1.0 *3
31 1.0, // intensity (0.0-1.0)
32 10.0, // radius (.1-20.0)
33 0.6 ]); // falloff (.01-2.0)
34 }
35 }
36
37 }

Tandy the Nymph

Tandy

Category: Tandy
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 integer what;
3 string smoke;
4
5 generalParticleEmitterOn()
6 {
9 //| PSYS_PART_BOUNCE_MASK //Bounce on object's z-axis
10 | PSYS_PART_WIND_MASK //Particles are moved by wind
11 | PSYS_PART_INTERP_COLOR_MASK //Colors fade from start to end
12 | PSYS_PART_INTERP_SCALE_MASK //Scale fades from beginning to end
13 | PSYS_PART_FOLLOW_SRC_MASK //Particles follow the emitter
14 //| PSYS_PART_FOLLOW_VELOCITY_MASK//Particles are created at the velocity of the emitter
15 //| PSYS_PART_TARGET_POS_MASK //Particles follow the target
16 | PSYS_PART_EMISSIVE_MASK //Particles are self-lit (glow)
17 //| PSYS_PART_TARGET_LINEAR_MASK//Undocumented--Sends particles in straight line?
18 ,
19
20 //PSYS_SRC_TARGET_KEY , NULL_KEY,//The particles will head towards the specified key
21 //Select one of the following for a pattern:
22 //PSYS_SRC_PATTERN_DROP Particles start at emitter with no velocity
23 //PSYS_SRC_PATTERN_EXPLODE Particles explode from the emitter
24 //PSYS_SRC_PATTERN_ANGLE Particles are emitted in a 2-D angle
25 //PSYS_SRC_PATTERN_ANGLE_CONE Particles are emitted in a 3-D cone
26 //PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY Particles are emitted everywhere except for a 3-D cone
27
29
30 ,PSYS_SRC_TEXTURE, smoke //UUID of the desired particle texture, or inventory name
31 ,PSYS_SRC_MAX_AGE, 0.0 //Time, in seconds, for particles to be emitted. 0 = forever
32 ,PSYS_PART_MAX_AGE, 5.0 //Lifetime, in seconds, that a particle lasts
33 ,PSYS_SRC_BURST_RATE, 0.5 //How long, in seconds, between each emission
34 ,PSYS_SRC_BURST_PART_COUNT, 15 //Number of particles per emission
35 ,PSYS_SRC_BURST_RADIUS, 10.0 //Radius of emission
36 ,PSYS_SRC_BURST_SPEED_MIN, .4 //Minimum speed of an emitted particle
37 ,PSYS_SRC_BURST_SPEED_MAX, .5 //Maximum speed of an emitted particle
38 ,PSYS_SRC_ACCEL, <0.0,0,.1> //Acceleration of particles each second
39 ,PSYS_PART_START_COLOR, <1.0,1.0,1.0> //Starting RGB color
40 ,PSYS_PART_END_COLOR, <1.0,1.0,1.0> //Ending RGB color, if INTERP_COLOR_MASK is on
41 ,PSYS_PART_START_ALPHA, 1.0 //Starting transparency, 1 is opaque, 0 is transparent.
42 ,PSYS_PART_END_ALPHA, 0.0 //Ending transparency
43 ,PSYS_PART_START_SCALE, <.3,.3,.1> //Starting particle size
44 ,PSYS_PART_END_SCALE, <.6,.6,.2> //Ending particle size, if INTERP_SCALE_MASK is on
45 ,PSYS_SRC_ANGLE_BEGIN, 0 * DEG_TO_RAD //Inner angle for ANGLE patterns
46 ,PSYS_SRC_ANGLE_END, 45 * DEG_TO_RAD//Outer angle for ANGLE patterns
47 ,PSYS_SRC_OMEGA, <1.0,1.0,0.0> //Rotation of ANGLE patterns, similar to llTargetOmega()
48 ]);
49 }
50
51
52 default
53 {
55 {
57 llSetTimerEvent(2.0);
58 }
59
60 timer()
61 {
62 what = ~ what;
63 if(what)
64 {
65 what = 0;
66 generalParticleEmitterOn();
67
68 }
69 else
70 {
71 llParticleSystem( [ ] );
72 }
73 }
74
75 }

Tandy the Nymph

Tandy

Category: Tandy
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 // no script script
4
5 default
6 {
8 {
11 }
12
13
14
15
17 {
18 integer hasPerms = llGetPermissions();
19
21
22 }
23
24
25
26 attach(key id)
27 {
28 if(id)//tests if it is a valid key and not NULL_KEY
29 {
31 }
32 else
33 {
34 llReleaseControls(); // detached
35 }
36 }
37
38
39 }

Tandy the Nymph

Tandy

Category: Tandy
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 // Globe script for Tandy the Nymph
3 // 12-10-2012
4
5 // License:
6 // Copyright (c) 2009, Ferd Frederix
7
8 // Permission is hereby granted, free of charge, to any person
9 // obtaining a copy of this software and associated documentation
10 // files (the "Software"), to deal in the Software without
11 // restriction, including without limitation the rights to use,
12 // copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the
14 // Software is furnished to do so, subject to the following
15 // conditions:
16
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 // OTHER DEALINGS IN THE SOFTWARE.
28
29 vector size = <0.75,0.75,0.75>; // non tinies will need to set this size larger
30
31
32 integer enabled = 0;
33
34
35 particles(string aTexture)
36 {
37 // mask flags - set to TRUE (or 1) to enable
38 integer bounce = 0; // Make particles bounce on Z plane of object
39 integer glow = 1; // Make the particles glow
40 integer interpColor = 0; // Go from start to end color
41 integer interpSize = 1; // Go from start to end size
42 integer followSource = 0; // Particles follow the source
43 integer followVel = 1; // Particles turn to velocity direction
44 integer wind = 0; // Particles affected by wind
45
46 //pattern:
47 //integer pattern = PSYS_SRC_PATTERN_ANGLE;
48 //integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY;
49 //integer pattern = PSYS_SRC_PATTERN_ANGLE_CONE;
50 //integer pattern = PSYS_SRC_PATTERN_DROP;
51 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
52
53 // Select a target for particles to go towards
54 // "" for no target, "owner" will follow object owner
55 // and "self" will target this object
56 // or put the key of an object for particles to go to
57 //key target = "";
58 key target = "";
59 //key target = "owner";
60
61 // particle parameters
62 float age = 2; // Life of each particle
63
64 float maxSpeed = .1; // Max speed each particle is spit out at
65 float minSpeed = .01; // Min speed each particle is spit out at
66
67
68 float startAlpha = 1; // Start alpha (transparency) value
69 float endAlpha = 1; // End alpha (transparency) value (if interpColor = TRUE)
70
71 vector startColor = <1,1,1>; // Start color of particles <R,G,B>
72 vector endColor = <1,0,0>; // End color of particles <R,G,B> (if interpColor = TRUE)
73
74 vector startSize = <.3,.3,0>; // Start size of particles <x,y>
75 vector endSize = <.1,.1,0>; // End size of particles (if interpSize == TRUE)
76
77 vector push = <0,0,-.1>; // Force pushed on particles
78
79 // system parameters
80 float life = 0; // Life in seconds for the system to make particles
81 integer count = 2; // How many particles to emit per BURST
82 float rate = .1; // How fast (rate) to emit particles
83 float radius = .5; // Radius to emit particles for BURST pattern
84 float outerAngle = 1.54; // Outer angle for all ANGLE patterns
85 float innerAngle = 1.55; // Inner angle for all ANGLE patterns
86 vector omega = <0,0,0>; // Rotation of ANGLE patterns around the source
87
88 integer flags = 0;
89
90 if(target == "owner") target = llGetOwner();
91 if(target == "self") target = llGetKey();
92 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
93 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
94 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
95 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
96 if(wind) flags = flags | PSYS_PART_WIND_MASK;
97 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
98 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
99 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
101 PSYS_PART_FLAGS,flags,
102 PSYS_PART_START_COLOR, startColor,
103 PSYS_PART_END_COLOR, endColor,
104 PSYS_PART_START_SCALE,startSize,
105 PSYS_PART_END_SCALE,endSize,
106 PSYS_SRC_PATTERN, pattern,
108 PSYS_SRC_ACCEL, push,
114 PSYS_SRC_INNERANGLE,innerAngle,
115 PSYS_SRC_OUTERANGLE,outerAngle,
116 PSYS_SRC_OMEGA, omega,
117 PSYS_SRC_MAX_AGE, life,
118 PSYS_SRC_TEXTURE, aTexture,
119 PSYS_PART_START_ALPHA, startAlpha,
120 PSYS_PART_END_ALPHA, endAlpha
121 ]);
122 }
123
124
125 default
126 {
128 {
129 llSetScale(size);
130 enabled = ~ enabled;
131 llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 1, 1, 1.0, 1.0, 0.1); // slide the texture in 10 seconds ( last param )
133 }
134
135 timer()
136 {
137
139 enabled = TRUE;
140 else
141 enabled = FALSE;
142
143 if(enabled)
144 {
145
149 llSetScale(size);
150 }
151 else if(!enabled )
152 {
153
157 llSetScale(<.1,.1,.1>);
158
159 }
160
161 }
162
163
164
166 {
168 llSetScale(<1,1,1>);
169 }
170
171
172 }

Tandy the Nymph

Tandy

Category: Tandy
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 float on = 0.0;
3 float off = 1.0;
4 list params_Up ;
5 list params_Left ;
6 list params_Right ;
7 list params_Stiff;
8
9 float ona = 0.0;
10 float offa = 1.0;
11
12 integer softness = 1;
13 float gravity = 0.4;
14 float friction =3.0;
15 float wind = 0.0;
16 float tension = 1.5;
17 vector force =<0,0,0>;
18 vector forceL =<1,0,0>;
19 vector forceR =<-1,0,0>;
20 default
21 {
23 {
24 params_Up = [ PRIM_FLEXIBLE, TRUE, softness, -10, friction, wind, tension, force];
25 params_Left = [ PRIM_FLEXIBLE, TRUE, softness, -gravity, friction, wind, tension, forceL];
26 params_Right = [ PRIM_FLEXIBLE, TRUE, softness, -gravity, friction, wind, tension, forceR];
27
28 params_Stiff = [ PRIM_FLEXIBLE, FALSE, softness,
29 -gravity*4, friction, wind, tension, force];
30
31 llSetPrimitiveParams(params_Up);
32
34
35 }
36
37
38
39
40 touch_start(integer total_number)
41 {
42 llSay(0, "Don't touch that!");
43 }
44
45 timer()
46 {
47 float num = llFrand(4);
48
49 // llSay(0,(string ) num);
50 if(num < .25)
51 {
52 llSetPrimitiveParams(params_Stiff);
53 }
54 else if(num < 2)
55 {
56 llSetPrimitiveParams(params_Up);
57 }
58 else if(num < 3)
59 {
60 llSetPrimitiveParams(params_Right);
61 }
62 else {
63 llSetPrimitiveParams(params_Left);
64 }
65
66 llSetTimerEvent(llFrand(1) + 1);
67 }
68
69 on_rez(integer param)
70 {
72 }
73 }

Tandy the Nymph

Tandy

Category: Tandy
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 // no script script
4
5 default
6 {
8 {
11 }
12
13
14
15
17 {
18 integer hasPerms = llGetPermissions();
19
21
22 }
23
24
25
26 attach(key id)
27 {
28 if(id)//tests if it is a valid key and not NULL_KEY
29 {
31 }
32 else
33 {
34 llReleaseControls(); // detached
35 }
36 }
37
38
39 }

Tandy the Nymph

Tandy

Category: Tandy
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 // FixSmallPrims
4 // by Emma Nowhere
5 //
6 // How to use:
7 // 1. Install this script in the root prim of a linked set of prims (aka "linkset")
8 // 2. Type /1fspsetup to copy copy scripts into all the prims in the linkset
9 // 3. Take the linkset into inventory
10 // 4. Re-rez the linkset from inventory
11 // 5. Select the linkset and choose "Set Scripts to Running in Selection" under the Tools menu
12 // 6. Type /1fsprun to fix all the small prims
13 // 7. Resize the linkset object to the desired size
14 // 8. Type /1fspcleanup to remove the scripts from the linkset
15
16 integer CHANNEL = 1;
17
18 vector backupScale = ZERO_VECTOR;
19 integer backupStored = FALSE;
20
21 integer rescaleX = FALSE;
22 integer rescaleY = FALSE;
23 integer rescaleZ = FALSE;
24
25 backup() {
26 if(!backupStored) {
27 backupScale = llGetScale();
28 backupStored = TRUE;
29 }
30 }
31
32 restore() {
33 if(backupStored) {
34 llSetScale(backupScale);
35 }
36 rescaleX = FALSE;
37 rescaleY = FALSE;
38 rescaleZ = FALSE;
39 }
40
41 cleanup() {
42 vector scale = llGetScale();
43
44 if(rescaleX) {
45 scale.x = backupScale.x;
46 }
47
48 if(rescaleY) {
49 scale.y = backupScale.y;
50 }
51
52 if(rescaleZ) {
53 scale.z = backupScale.z;
54 }
55
56 if(rescaleX || rescaleY || rescaleZ) {
57 llSay(0, "Cleaning scale of linked prim #" + (string)llGetLinkNumber());
58 llSetScale(scale);
59 }
60
62 }
63
64 process() {
65 restore();
66 backup();
67
68 vector scale = llGetScale();
69
70 if(scale.x < .015) {
71 scale.x = .015;
72 rescaleX = TRUE;
73 }
74
75 if(scale.y < .015) {
76 scale.y = .015;
77 rescaleY = TRUE;
78 }
79
80 if(scale.z < .015) {
81 scale.z = .015;
82 rescaleZ = TRUE;
83 }
84
85 if(rescaleX || rescaleY || rescaleZ) {
86 llSay(0, "Fixing size of linked prim #" + (string)llGetLinkNumber());
87 llSetScale(scale);
88 }
89 }
90
91 GiveScriptToLinkedPrims()
92 {
94 integer i = 0;
95 for (i = 2; i <= p; i++)
96 {
97 key prim = llGetLinkKey(i);
99 }
100 }
101
102 default
103 {
105 {
106 integer linkNum = llGetLinkNumber();
107 if(linkNum < 2) llListen(CHANNEL, "", llGetOwner(), "");
108 }
109
110 on_rez(integer start_param) {
111 integer linkNum = llGetLinkNumber();
112 if(linkNum < 2) llSay(0, "FixSmallPrims Installed");
113 }
114
115 listen(integer channel, string name, key id, string message)
116 {
117 if(message == "fspsetup")
118 {
119 GiveScriptToLinkedPrims();
120 }
121 else
122 {
123 llMessageLinked(LINK_SET, 0, message, NULL_KEY);
124 }
125 }
126
127 link_message(integer sender_num, integer num, string str, key id)
128 {
129 integer linkNum = llGetLinkNumber();
130
131 if(str == "fsptest") {
132 llSay(0, "Script is installed and running in linked prim #" + (string)linkNum);
133 }
134 else if(str == "fspbackup") {
135 backup();
136 }
137 else if(str == "fsprestore") {
138 restore();
139 }
140 else if(str == "fspcleanup") {
141 cleanup();
142 }
143 else if(str == "fsprun") {
144 process();
145 }
146
147 }
148 }
149
150
151
152 // END //

Tandy the Nymph

Tandy

Category: Tandy
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 // License:
3 // Copyright (c) 2009, Ferd Frederix
4
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
12 // conditions:
13
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the Software.
16
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 // OTHER DEALINGS IN THE SOFTWARE.
25 paint(string texture)
26 {
28 integer i;
29 llSetTexture(texture,ALL_SIDES);
30 for (; i < j; i++)
31 {
32 llSetLinkPrimitiveParamsFast(i,[PRIM_TEXTURE,ALL_SIDES, texture, <1.0,1.0,0.0>, <0.0,0.0,0.0>, 0.0]);
33 }
34 }
35
36 default
37 {
38
40 {
42 }
43
45 {
46 llListen(99900,"","","");
47 }
48
49 listen(integer channel, string name, key id, string msg )
50 {
51
52 integer i;
54 for (; i < j; i++) {
56 list bits = llParseString2List(realName,["_"],[]);
57 if( llList2String(bits,0) == msg)
58 paint(realName);
59 }
60
61 }
62 }

Tandy the Nymph

Tandy

Category: Tandy
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 // no script script
4
5 default
6 {
8 {
11 }
12
13
14
15
17 {
18 integer hasPerms = llGetPermissions();
19
21
22 }
23
24
25
26 attach(key id)
27 {
28 if(id)//tests if it is a valid key and not NULL_KEY
29 {
31 }
32 else
33 {
34 llReleaseControls(); // detached
35 }
36 }
37
38
39 }

Tandy the Nymph

Tandy

Category: Tandy
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 // mods by Ferd Frederix for Tandy the Nymph
3 // 12-10-2012
4
5 // Put a spark texture in the inventory, too , or else you get white sparks.
6
7 // Mask Flags - set to TRUE to enable
8 integer glow = TRUE; // Make the particles glow
9 integer bounce = FALSE; // Make particles bounce on Z plan of object
10 integer interpColor = TRUE; // Go from start to end color
11 integer interpSize = TRUE; // Go from start to end size
12 integer wind = FALSE; // Particles effected by wind
13 integer followSource = FALSE; // Particles follow the source
14 integer followVel = TRUE; // Particles turn to velocity direction
15
16 // Choose a pattern from the following:
17 // PSYS_SRC_PATTERN_EXPLODE
18 // PSYS_SRC_PATTERN_DROP
19 // PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY
20 // PSYS_SRC_PATTERN_ANGLE_CONE
21 // PSYS_SRC_PATTERN_ANGLE
22 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
23
24 // Select a target for particles to go towards
25 // "" for no target, "owner" will follow object owner
26 // and "self" will target this object
27 // or put the key of an object for particles to go to
28 key target = "";
29
30 // Particle paramaters
31 float age = .2; // Life of each particle
32 float maxSpeed = .1; // Max speed each particle is spit out at
33 float minSpeed = .1; // Min speed each particle is spit out at
34 float startAlpha = 10; // Start alpha (transparency) value
35 float endAlpha = 10; // End alpha (transparency) value
36 vector startColor = <1,1,1>; // Start color of particles <R,G,B>
37 vector endColor = <1,1,1>; // End color of particles <R,G,B> (if interpColor == TRUE)
38 vector startSize = <.04,.25,.01>; // Start size of particles
39 vector endSize = <.03,.25,.01>; // End size of particles (if interpSize == TRUE)
40 vector push = <0,0,0>; // Force pushed on particles
41
42 // System paramaters
43 float rate = 2.3; // How fast (rate) to emit particles
44 float radius = .0; // Radius to emit particles for BURST pattern
45 integer count = 5; // How many particles to emit per BURST
46 float outerAngle = 1.54; // Outer angle for all ANGLE patterns
47 float innerAngle = 1.55; // Inner angle for all ANGLE patterns
48 vector omega = <0,0,10>; // Rotation of ANGLE patterns around the source
49 float life = 0; // Life in seconds for the system to make particles
50
51 // Script variables
52 integer flags;
53
54 updateParticles()
55 {
56 flags = 0;
57 if(target == "owner") target = llGetOwner();
58 if(target == "self") target = llGetKey();
59 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
60 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
61 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
62 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
63 if(wind) flags = flags | PSYS_PART_WIND_MASK;
64 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
65 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
66 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
67
69 PSYS_PART_FLAGS,flags,
70 PSYS_PART_START_COLOR, startColor,
71 PSYS_PART_END_COLOR, endColor,
72 PSYS_PART_START_SCALE,startSize,
73 PSYS_PART_END_SCALE,endSize,
74 PSYS_SRC_PATTERN, pattern,
76 PSYS_SRC_ACCEL, push,
82 PSYS_SRC_INNERANGLE,innerAngle,
83 PSYS_SRC_OUTERANGLE,outerAngle,
84 PSYS_SRC_OMEGA, omega,
85 PSYS_SRC_MAX_AGE, life,
87 PSYS_PART_START_ALPHA, startAlpha,
88 PSYS_PART_END_ALPHA, endAlpha
89 ]);
90 }
91
92
93 // must be done by timer as the spell caster will kill off bling. This restarts the bling after a spell
94
95 default
96 {
98 {
100 }
101
102 timer()
103 {
104 updateParticles();
105 llSetTimerEvent(llFrand(5)+1.0);
106 }
107 }

Tandy the Nymph

Tandy

Category: Tandy
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 // general purpose throwable object.
3 // This make the gadget fall and bounce, and then it dies.
4 // It will also die in a no-script zone.
5
6 default
7 {
9 {
13 }
14 timer()
15 {
16 llDie();
17 }
18
19 touch_start(integer total_number)
20 {
21 llDie();
22 }
23
24 on_rez(integer po)
25 {
27 }
28 }

Tandy the Nymph

Tandy

Category: Tandy
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 integer secs = 0;
3
4 integer particles = TRUE;
5
6 integer glow = TRUE; // Make the particles glow from inside
7 // if FALSE they will be effected by the local light.
8
9 integer bounce = FALSE; // Particles won't go lower than the emitter and will //bounce on the "ground" level if negative push is applied.
10
11 integer interpColor = TRUE; // Changes from start to end color
12 // Start and End colors are set below
13
14 integer interpSize = TRUE; // Changes from start to end size
15 // Also Set below
16
17 integer wind = FALSE; // Particles effected by wind
18 // Particles REALLY effected, will fly like crazy
19
20 integer followSource = FALSE; // Particles follow the emitter, so they will move
21 // In direct lines even if emitter is in motion
22 // IF FALSE they will sway like smoke, leaving a trail
23
24 integer followVel = TRUE; // Particles will emit in direction object facing
25 integer pattern = PSYS_SRC_PATTERN_EXPLODE;
26
27 key target = "";
28 float age = 2; // How long each particle will survive
29 float maxSpeed = .1; // Max speed each particle is spit out at
30 float minSpeed = .1; // Min speed each particle is spit out at
31
32 string texture = ""; // Texture used for particles, default used if blank
33 // Type the name of the texture in the " ", Make sure
34 // To drag the Texture into the emitters contents.
35
36 float startAlpha = 1.0; // Start alpha (transparency) value
37 float endAlpha = 0.5; // End alpha (transparency) value
38 // Alpha is between 0.0 and 1.0
39 //remove the // from the two lines below and put // in front of 172 and 173
40 vector StartColor = <1, .7, 0>; // Starting color of particles <R,G,B>
41 vector EndColor = <1, 0.3, 0.3>; // End color of particles <R,G,B>
42 // <0,0,0> = Black <1,1,1> = White
43 // InterpColor (above) must be TRUE for color to change
44
45 vector startSize = <.2, .2, 0>; // Start size of particles
46 vector endSize = <.4, .4, 0>; // End size of particles (if interpSize == TRUE)
47 // Size Range is 0.01 to 7.00
48 // Further the 3rd number doesn't effect anything
49
50 vector push = <0,0,0>; // Force pushed on particles (X,Y,Z)
51 // X = East/West Y = North/South Z= Up/Down
52
53
54 // PARTICLE PARAMETERS
55 float rate = .01; // How many seconds between particle emissions
56 float radius = .01; // Starting radius for Particles to appear within
57 integer count = 10; // How many particles per emission (Per Rate)
58
59
60 float outerAngle = 1.54; // Outer angle for all ANGLE patterns (for a stream 0.1)
61 float innerAngle = 1.54; // Inner angle for all ANGLE patterns (for a stream 0.0)
62 // In Radians, so every 1 is 90 degrees between 0 and 3
63
64 vector omega = <0,0,0>; // Rotation of ANGLE patterns (X,Y,Z axis (E/W,N/S,UP/DOWN)
65 // This rotates the spray in a circle, not the particles
66
67 float life = 0; // Time from Start to Stop to emit Particles
68
69 // Script variables
70 integer flags;
71
72 updateParticles()
73 {
74 flags = 0;
75 if(target == "owner") target = llGetOwner();
76 if(target == "self") target = llGetKey();
77 if(glow) flags = flags | PSYS_PART_EMISSIVE_MASK;
78 if(bounce) flags = flags | PSYS_PART_BOUNCE_MASK;
79 if(interpColor) flags = flags | PSYS_PART_INTERP_COLOR_MASK;
80 if(interpSize) flags = flags | PSYS_PART_INTERP_SCALE_MASK;
81 if(wind) flags = flags | PSYS_PART_WIND_MASK;
82 if(followSource) flags = flags | PSYS_PART_FOLLOW_SRC_MASK;
83 if(followVel) flags = flags | PSYS_PART_FOLLOW_VELOCITY_MASK;
84 if(target != "") flags = flags | PSYS_PART_TARGET_POS_MASK;
85
87 PSYS_PART_FLAGS,flags,
88 PSYS_PART_START_COLOR, StartColor,
89 PSYS_PART_END_COLOR, EndColor,
90 PSYS_PART_START_SCALE,startSize,
91 PSYS_PART_END_SCALE,endSize,
92 PSYS_SRC_PATTERN, pattern,
94 PSYS_SRC_ACCEL, push,
100 PSYS_SRC_INNERANGLE,innerAngle,
101 PSYS_SRC_OUTERANGLE,outerAngle,
102 PSYS_SRC_OMEGA, omega,
103 PSYS_SRC_MAX_AGE, life,
104 PSYS_SRC_TEXTURE, texture,
105 PSYS_PART_START_ALPHA, startAlpha,
106 PSYS_PART_END_ALPHA, endAlpha
107 ]);
108
109 }
110
111 float red;
112 float green;
113 float blue;
114
115
116 default
117 {
119 {
122 llSetDamage(0.25); // 1/4 damage
124 updateParticles();
125 }
126
128 if(secs <1)
129 return;
130
131 llPushObject(llDetectedKey(0),<100,100,100>,<0,0,0>,TRUE);
132 startSize = <1,1,1>;
133 endSize = <1,1,1>;
134 StartColor = <1,1,1>;
135 EndColor = <1,1,1>;
136 age = 3;
137 updateParticles();
138 llSleep(1);
139 llDie();
140 }
141
142 land_collision_start(vector pos) {
143
144 startSize = <1,1,1>;
145 endSize = <1,1,1>;
146 StartColor = <1,1,1>;
147 EndColor = <1,1,1>;
148 age = 3;
149 updateParticles();
150 llSleep(1);
151 llDie();
152 }
153
154 on_rez(integer para){
155
157
158 red = (float) (para & 0xff0000)/256/256;
159 blue = (float) (para & 0xff00)/256;
160 green = (float) (para & 0xff);
161
162
163 StartColor =< red/256, green/256,blue/256>;
164 EndColor = <llFrand(1.0), llFrand(1.0), llFrand(1.0)>;
165 updateParticles();
166 }
167
168
169
170
171 timer()
172 {
173 if(secs++ > 10)
174 llDie();
175 }
176
177 }

Tandy the Nymph

Tandy

Category: Tandy
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 // Tantrum script for the wand
3 // 12-10-2012
4
5 // License:
6 // Copyright (c) 2009, Ferd Frederix
7
8 // Permission is hereby granted, free of charge, to any person
9 // obtaining a copy of this software and associated documentation
10 // files (the "Software"), to deal in the Software without
11 // restriction, including without limitation the rights to use,
12 // copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the
14 // Software is furnished to do so, subject to the following
15 // conditions:
16
17 // The above copyright notice and this permission notice shall be
18 // included in all copies or substantial portions of the Software.
19
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
21 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
22 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
23 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
25 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
27 // OTHER DEALINGS IN THE SOFTWARE.
28
29 vector StartColor;
30 vector EndColor;
31
32
33 // from the menu system http://wiki.secondlife.com/wiki/SimpleDialogMenuSystem
34 integer N_DIALOG_CHOICES;
35 integer MAX_DIALOG_CHOICES_PER_PG = 8; // if not offering back button, increase this to 9
36 string PREV_PG_DIALOG_PREFIX = "< Page ";
37 string NEXT_PG_DIALOG_PREFIX = "> Page ";
38 string DIALOG_DONE_BTN = "Done";
39 string DIALOG_BACK_BTN = "<< Back";
40
41 integer pageNum;
42 list DIALOG_CHOICES;
43
44 integer listen_id; // int of the current listener
45 integer menuChannel;
46
47
48 LaunchSpell(integer color, string name)
49 {
50 rotation rot = llGetRot();
51 vector fwd = llRot2Fwd(rot);
52 vector pos = llGetPos();
53 pos = pos + fwd;
54
55 StartColor = < red/256, green/256, blue/256>; // Starting color of particles <R,G,B>
56 EndColor = StartColor;
57
58
59 llSleep(1);
60
61 llRezObject(name, pos, fwd * 2 , rot, color);
62
63 llSleep(1);
64
65 }
66
67 // colors for tantrum effect
68 float red;
69 float green;
70 float blue;
71 integer color;
72
73
74 CancelListen() {
75 llListenRemove(listen_id);
77 }
78
79 giveDialog(key ID, integer pageNum) {
80
81 list buttons;
82 integer firstChoice;
83 integer lastChoice;
84 integer prevPage;
85 integer nextPage;
86 string OnePage;
87
88 CancelListen();
89
90 menuChannel =-101;
91 listen_id = llListen(menuChannel,"","","");
92
94
95 N_DIALOG_CHOICES = llGetListLength(DIALOG_CHOICES);
96
97
98 if(N_DIALOG_CHOICES <= 10) {
99 buttons = DIALOG_CHOICES;
100 OnePage = "Yes";
101 }
102 else {
103 integer nPages = (N_DIALOG_CHOICES+MAX_DIALOG_CHOICES_PER_PG-1)/MAX_DIALOG_CHOICES_PER_PG;
104
105
106 if(pageNum < 1 || pageNum > nPages) {
107 pageNum = 1;
108 }
109 firstChoice = (pageNum-1)*MAX_DIALOG_CHOICES_PER_PG;
110
111 lastChoice = firstChoice+MAX_DIALOG_CHOICES_PER_PG-1;
112
113
114 if(lastChoice >= N_DIALOG_CHOICES) {
115 lastChoice = N_DIALOG_CHOICES;
116 }
117 if(pageNum <= 1) {
118 prevPage = nPages;
119 nextPage = 2;
120 }
121 else if(pageNum >= nPages) {
122 prevPage = nPages-1;
123 nextPage = 1;
124 }
125 else {
126 prevPage = pageNum-1;
127 nextPage = pageNum+1;
128 }
129 buttons = llList2List(DIALOG_CHOICES, firstChoice, lastChoice);
130 }
131
132
133 // FYI, this puts the navigation button row first, so it is always at the bottom of the dialog
134 list buttons01 = llList2List(buttons, 0, 2);
135 list buttons02 = llList2List(buttons, 3, 5);
136 list buttons03 = llList2List(buttons, 6, 8);
137 list buttons04;
138 if(OnePage == "Yes") {
139 buttons04 = llList2List(buttons, 9, 11);
140 }
141 buttons = buttons04 + buttons03 + buttons02 + buttons01;
142
143 if(OnePage == "Yes") {
144 buttons = [ DIALOG_DONE_BTN, DIALOG_BACK_BTN ]+ buttons;
145 //omit DIALOG_BACK_BTN in line above if not offering
146
147 }
148 else {
149 buttons = [
150 PREV_PG_DIALOG_PREFIX + (string)prevPage,
151 DIALOG_BACK_BTN, NEXT_PG_DIALOG_PREFIX+(string)nextPage, DIALOG_DONE_BTN
152 ]+buttons;
153 //omit DIALOG_BACK_BTN in line above if not offering
154 }
155 llDialog(ID, "Page "+(string)pageNum+"\nChoose one:", buttons, menuChannel);
156 }
157
158 list makeMenu()
159 {
160 list menu ;
161
162 // If there are any objects in the avatar, make it so she can throw them when she has a tantrum.
163 integer i;
165 for (i = 0; i < j ; i++)
166 {
168 menu += [tantrum];
169 }
170 return menu;
171 }
172
173
174 default
175 {
176
178 {
180
181 }
182
183
184
186 {
188 {
189 pageNum = 1;
190 DIALOG_CHOICES = makeMenu();
191 giveDialog(llGetOwner(), pageNum);
192
193 }
194 }
195
196
198 {
200 {
201 red = llFrand(256.0);
202 blue = llFrand(256.0);
203 green = llFrand(256.0);
204 color = (integer) (red * 256 * 256 + blue * 256 + green);
205
207 }
208 }
209
210
211
212
213 listen(integer channel, string name, key id, string message)
214 {
215
216 if(message == "-")
217 {
218 giveDialog(llGetOwner(), pageNum);
219 }
220 else if( message == DIALOG_DONE_BTN)
221 {
222 CancelListen();
223 return;
224 }
225 else if(message == DIALOG_BACK_BTN)
226 {
227 pageNum = 1;
228 DIALOG_CHOICES = makeMenu();
229 giveDialog(llGetOwner(), pageNum);
230 }
231 else if(llSubStringIndex(message, PREV_PG_DIALOG_PREFIX) == 0)
232 {
233 pageNum = (integer)llGetSubString(message, llStringLength(PREV_PG_DIALOG_PREFIX), -1);
234 giveDialog(llGetOwner(), pageNum);
235 }
236 else if(llSubStringIndex(message, NEXT_PG_DIALOG_PREFIX) == 0)
237 {
238 pageNum = (integer)llGetSubString(message, llStringLength(NEXT_PG_DIALOG_PREFIX), -1);
239 giveDialog(llGetOwner(), pageNum);
240
241 } else { //this is the section where we do stuff prior to this is all menu
242
243 CancelListen();
244 red = llFrand(256.0);
245 blue = llFrand(256.0);
246 green = llFrand(256.0);
247 color = (integer) (red * 256 * 256 + blue * 256 + green);
248
249
250
251 llStartAnimation("punch_onetwo");
252
253 LaunchSpell(color, message);
254 llStopAnimation("punch_onetwo");
255 giveDialog(llGetOwner(), pageNum);
256 }
257 }
258
259
260 changed(integer what)
261 {
262 if(what & CHANGED_INVENTORY)
263 {
265 }
266 }
267
268 }

Tandy the Nymph

Tandy

Category: Tandy
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 // License:
3 // Copyright (c) 2009, Ferd Frederix
4
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
12 // conditions:
13
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the Software.
16
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 // OTHER DEALINGS IN THE SOFTWARE.
25
26 integer enabled;
27 integer on;
28
29 list colors = ["Black Glitter", "Blue Glitter", "Chocolate Glitter","Emerald Glitter","Golden Glitter","Purple Glitter","Red Glitter","Royal Glitter","Ruby Glitter","Silver Glitter","White Glitter"];
30 list codes = [<0.502, 0.502, 0.502>,<0.486, 0.745, 1.000>,<0.478, 0.239, 0.000>,<0.000, 0.537, 0.537>,<1.000, 1.000, 0.000>,<0.502, 0.000, 1.000>,<0.820, 0.000, 0.000>,<0.369, 0.369, 1.000>,<0.996, 0.580, 0.639>,<0.749, 0.749, 0.749>,<1.000, 1.000, 1.000>];
31
32
33 default
34 {
35
37 {
39 llListen(99900,"","","");
40 }
41
43 {
44 llSay(100,"menu");
45 }
46 listen (integer channel, string name, key id, string msg)
47 {
48 integer where = llListFindList(colors,[msg]);
49 if(where == -1)
50 return;
51
52 vector colorcode = llList2Vector(codes,where);
53
54 integer i;
56 for (; i <= j; i++)
57 {
58 llSetLinkColor(i,colorcode,ALL_SIDES);
59 }
60
61 }
62
63 timer() {
64
65 integer avatarstuff = llGetAgentInfo(llGetOwner());
66
67 if(avatarstuff & AGENT_IN_AIR)
68 enabled = TRUE;
69 else
70 enabled = FALSE;
71
72 if(enabled && ! on)
73 {
74 on = TRUE;
75 llMessageLinked(LINK_SET,0,"on","");
76 }
77 if(!enabled && on)
78 {
79 on = FALSE;
80 llMessageLinked(LINK_SET,0,"off","");
81 }
82 }
83
85 {
87 }
88 }

Tandy the Nymph

Tandy

Category: Tandy
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 // License:
3 // Copyright (c) 2009, Ferd Frederix
4
5 // Permission is hereby granted, free of charge, to any person
6 // obtaining a copy of this software and associated documentation
7 // files (the "Software"), to deal in the Software without
8 // restriction, including without limitation the rights to use,
9 // copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the
11 // Software is furnished to do so, subject to the following
12 // conditions:
13
14 // The above copyright notice and this permission notice shall be
15 // included in all copies or substantial portions of the Software.
16
17 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24 // OTHER DEALINGS IN THE SOFTWARE.
25 default
26 {
27
29 {
30 //[ PRIM_FLEXIBLE, integer boolean, integer softness, float gravity, float friction, float wind, float tension, vector force ]
31 llSetPrimitiveParams([ PRIM_FLEXIBLE, TRUE, 2, 0.3, 2.0, 0, 1.0, <0,0,0>] );
32
34 }
35
36 link_message(integer s, integer num, string str, key id)
37 {
38
39
40 if(str == "off")
41 {
43 }
44 else if(str == "on")
45 {
47 llSetPrimitiveParams([ PRIM_FLEXIBLE, TRUE, 2, 0.3, 2.0, 0, 1.0, <0,0,0>] );
48 }
49 }
50
52 {
54 }
55 }

Tandy the Nymph

Tandy

Category: Tandy
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 // X-wing script for Tandy the Nymph
3 // 12-10-2012
4
5 // License:
6 // Copyright (c) 2009, Ferd Frederix
7
8 // Permission is hereby granted, free of charge, to any person
9 // obtaining a copy of this software and associated documentation
10 // files (the "Software"), to deal in the Software without
11 // restriction, including without limitation the rights to use,
12 // copy, modify, merge, publish, distribute, sublicense, and/or sell
13 // copies of the Software, and to permit persons to whom the
14 // Software is furnished to do so, subject to the follo// conditions:
15
16 // The above copyright notice and this permission notice shall be
17 // included in all copies or substantial portions of the Software.
18
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
21 // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
23 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
24 // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
26 // OTHER DEALINGS IN THE SOFTWARE.
27
28
29 integer animOn = TRUE; //Set to FALSE and call initAnim() again to stop the animation.
30
31 //Effect parameters: (can be put in list together, to make animation have all of said effects)
32
33 //LOOP - loops the animation
34 //SMOOTH - plays animation smoothly
35 //REVERSE - plays animation in reverse
36 //PING_PONG - plays animation in one direction, then cycles in the opposite direction
37
38 list effects = [LOOP];
39
40 //Movement parameters (choose one):
41 //ROTATE - Rotates the texture
42 //SCALE - Scales the texture
43 //Set movement to 0 to slide animation in the X direction, without any special movement.
44
45 integer movement = 0;
46
47 integer face = ALL_SIDES; //Number representing the side to activate the animation on.
48 integer sideX = 1; //Represents how many horizontal images (frames) are contained in your texture.
49 integer sideY = 2; //Same as sideX, except represents vertical images (frames).
50 float start = 0.0; //Frame to start animation on. (0 to start at the first frame of the texture)
51 float length = 0.0; //Number of frames to animate, set to 0 to animate all frames.
52 float speed = 10.0; //Frames per second to play.
53
54
55 initAnim() //Call this when you want to change something in the texture animation.
56 {
57 if(animOn)
58 {
59 integer effectBits;
60 integer i;
61 for(i = 0; i < llGetListLength(effects); i++)
62 {
63 effectBits = (effectBits | llList2Integer(effects,i));
64 }
65 integer params = (effectBits|movement);
66 llSetTextureAnim(ANIM_ON|params,face,sideX,sideY,
67 start,length,speed);
68 }
69 else
70 {
71 llSetTextureAnim(0,face,sideX,sideY,start,length,speed);
72 }
73 }
74
75
76 default
77 {
79 {
80 initAnim();
81 llSleep(2);
83 }
84
85 link_message(integer sender, integer num, string msg, key id)
86 {
87 if(msg == "on")
88 {
90 } else if(msg == "off")
91 {
93 }
94
95 if(num == 100)
97 }
98
100 {
102 }
103 }

Tandy the Nymph

AO for Tandy

Category: Tandy
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 <ao>
2 <walk>
3 <walking>avatar_walk_fast</walking>
4 </walk>
5 <fly>
6 <flying>sweetness-fly-1</flying>
7 <flying>sweetness-fly-2</flying>
8 </fly>
9 <sit>
10 <sitting>Japanese-sit1</sitting>
11 <sitting>Japanese-sit13</sitting>
12 </sit>
13 <hover>
14 <hovering>sweetness-hover1</sitting>
15 <hovering>sweetness-hover2</sitting>
16 <hovering>sweetness-hover3</sitting>
17 <hovering>sweetness-hover4</sitting>
18 </hover>
19 <run>
20 <running>avatar_run_fast</running>
21 </run>
22 <type>
23 <typing>avatar_type</typing>
24 </type>
25 <stand>
26 <standing>ao-sweetness-stand1</standing>
27 <standing>ao-sweetness-stand2</standing>
28 <standing>ao-sweetness-stand3</standing>
29 <standing>ao-sweetness-stand4</standing>
30 <standing>ao-sweetness-stand5</standing>
31 </stand>
32 </ao>

Tandy the Nymph

Tandy

Category: Tandy
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 [ Standing ]ao-sweetness-stand1|ao-sweetness-stand2|ao-sweetness-stand3|ao-sweetness-stand4ao-sweetness-stand5
2 [ Walking ]avatar_walk_fast
3 [ Sitting ]Japanese-sit1|Japanese-sit3
4 [ Sitting On Ground ]Japanese-sit1|Japanese-sit3
5 [ Crouching ]
6 [ Crouch Walking ]
7 [ Landing ]
8 [ Standing Up ]
9 [ Falling ]
10 [ Flying Down ]
11 [ Flying Up ]
12 [ Flying ]sweetness-fly-1|sweetness-fly-2
13 [ Flying Slow ]sweetness-fly-1|sweetness-fly-2
14 [ Hovering ]sweetness-hover1|sweetness-hover2|sweetness-hover3|sweetness-hover4
15 [ Jumping ]
16 [ Pre Jumping ]
17 [ Running ]avatar_run_fast
18 [ Turning Right ]
19 [ Turning Left ]
20 [ Floating ]
21 [ Swimming Forward ]
22 [ Swimming Up ]
23 [ Swimming Down ]

Tandy the Nymph

XAO script

Category: Tandy
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 <ao>
2 <walk>
3 <walking>avatar_walk_fast</walking>
4 </walk>
5 <fly>
6 <flying>sweetness-fly-1</flying>
7 <flying>sweetness-fly-2</flying>
8 </fly>
9 <sit>
10 <sitting>Japanese-sit1</sitting>
11 <sitting>Japanese-sit13</sitting>
12 </sit>
13 <hover>
14 <hovering>sweetness-hover1</sitting>
15 <hovering>sweetness-hover2</sitting>
16 <hovering>sweetness-hover3</sitting>
17 <hovering>sweetness-hover4</sitting>
18 </hover>
19 <run>
20 <running>avatar_run_fast</running>
21 </run>
22 <type>
23 <typing>avatar_type</typing>
24 </type>
25 <stand>
26 <standing>ao-sweetness-stand1</standing>
27 <standing>ao-sweetness-stand2</standing>
28 <standing>ao-sweetness-stand3</standing>
29 <standing>ao-sweetness-stand4</standing>
30 <standing>ao-sweetness-stand5</standing>
31 </stand>
32 </ao>

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