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
Pose Stand Pose_Stand__V3  

Pose_Stand__V3

Multi type, multi sex, multi story car p...

Category: Pose Stand
By : Fred Gandt
Created: 2011-01-02 Edited: 2011-01-02
Worlds: Second Life

the Zip file

Download all files for Pose_Stand__V3
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Pose_Stand__V3__1.lsl
1 // V3 //
2
3 ///////////////////////////////////////////////////////////////////
4 //YOU CAN CHANGE THESE MESSAGES. DON'T MAKE THEM TOO LONG THOUGH.//
5 ///////////////////////////////////////////////////////////////////
6
7 string dialog_msg_type = "What type are you?";
8
9 string dialog_msg_sex = "What sex are you?";
10
11 string dialog_msg_anims = "Select the pose/animation to play";
12
13 /////////////////////////////////////////////////////////////////////////////
14 //////////WRITE INTO EACH LIST CATEGORY THE NAMES OF THE ANIMATIONS//////////
15 //APPROPRIATE FOR THAT CATEGORY. ANIMS MUST BE IN THE POSE STAND INVENTORY.//
16 /////////////////////////////////////////////////////////////////////////////
17
18 // Each of these lists can hold up to 72 names. However, if you filled them all to the max...
19 // ...you may encounter memory problems (not you, the script).
20
21 list tiny_male_anims = ["Tiny Male 1",
22 "Tiny Male 2",
23 "Tiny Male 3",
24 "Tiny Male 4",
25 "Tiny Male 5",
26 "Tiny Male 6",
27 "Tiny Male 7",
28 "Tiny Male 8",
29 "Tiny Male 9",
30 "Tiny Male 10",
31 "Tiny Male 11",
32 "Tiny Male 12",
33 "Tiny Male 13"];
34
35 list tiny_female_anims = ["Tiny Female 1", "Tiny Female 2", "Tiny Female 3"];
36
37 list tiny_thingy_anims = [];
38
39
40 list humanoid_male_anims = [];
41
42 list humanoid_female_anims = [];
43
44 list humanoid_thingy_anims = [];
45
46
47 list quadruped_male_anims = [];
48
49 list quadruped_female_anims = [];
50
51 list quadruped_thingy_anims = ["Quad Wotsit"];
52
53 ///////////////////////////////////////////////////////////////////
54 //DON'T EDIT BELOW HERE UNLESS YOU ARE SURE OF WHAT YOU ARE DOING//
55 ///////////////////////////////////////////////////////////////////
56
57 integer ousted;
58
59 integer last;
60
61 integer next;
62
63 string playing;
64
65 key agent = NULL_KEY;
66
67 string agent_name;
68
69 integer channel = -7463792;
70
71 integer lis;
72
73 list dialog_buttons_type = [];
74
75 list dialog_buttons_sex = [];
76
77 list agent_anim_set = [];
78
79 string type;
80
81 string sex;
82
83 CreatePoseStand()
84 {
85 llSetPrimitiveParams([7, <1.0, 1.0, 0.1>,
86 9, 1, 0, <0.0, 1.0, 0.0>, 0.0, <0.0, 0.0, 0.0>, <0.9, 0.9, 0.0>, <0.0, 0.0, 0.0>,
87 17, 0, "5748decc-f629-461c-9a36-a35a221fe21f", <3.0, 3.0, 0.0>, <0.0, 0.0, 0.0>, 0.0,
88 17, 1, "5748decc-f629-461c-9a36-a35a221fe21f", <0.35, 2.0, 0.0>, <0.0, 0.0, 0.0>, 1.570796,
89 17, 2, "5748decc-f629-461c-9a36-a35a221fe21f", <1.0, 1.0, 0.0>, <0.0, 0.0, 0.0>, 0.0,
90 18, -1, <0.0, 0.0, 0.0>, 1.0,
91 19, 0, 3, 17,
92 19, 1, 3, 13,
93 19, 2, 3, 0]);
94 SetName();
95 llSitTarget(<0.0,0.0,1.5>, ZERO_ROTATION);
97 }
98
99 SetName()
100 {
102 llSetObjectName(((llGetSubString(name, 0, (llSubStringIndex(name, " ") - 1)) + "'s") + " Pose Stand"));
103 }
104
105 TypeCast()
106 {
107 next = 0;
108 dialog_buttons_type = [];
109 if((llGetListLength(tiny_male_anims)) | (llGetListLength(tiny_female_anims)) | (llGetListLength(tiny_thingy_anims)))
110 dialog_buttons_type += ["Tiny"];
111 if((llGetListLength(humanoid_male_anims)) | (llGetListLength(humanoid_female_anims)) | (llGetListLength(humanoid_thingy_anims)))
112 dialog_buttons_type += ["Humanoid"];
113 if((llGetListLength(quadruped_male_anims)) | (llGetListLength(quadruped_female_anims)) | (llGetListLength(quadruped_thingy_anims)))
114 dialog_buttons_type += ["Quadruped"];
115 llListenRemove(lis);
117 {
118 lis = llListen(channel, agent_name, agent, "");
119 if(agent != NULL_KEY)
120 llDialog(agent, ("\n" + dialog_msg_type), dialog_buttons_type, channel);
121 }
122 else
123 {
124 dialog_buttons_type = [];
125 if(agent != NULL_KEY)
126 llInstantMessage(agent, "There are no poses/animations available");
127 if(agent != NULL_KEY)
128 llUnSit(agent);
129 }
130 }
131
132 SexCast()
133 {
134 dialog_buttons_sex = [];
135 if(type == "Tiny")
136 {
137 if(llGetListLength(tiny_male_anims))
138 dialog_buttons_sex += ["Male"];
139 if(llGetListLength(tiny_female_anims))
140 dialog_buttons_sex += ["Female"];
141 if(llGetListLength(tiny_thingy_anims))
142 dialog_buttons_sex += ["Thingy"];
143 }
144 else if(type == "Humanoid")
145 {
146 if(llGetListLength(humanoid_male_anims))
147 dialog_buttons_sex += ["Male"];
148 if(llGetListLength(humanoid_female_anims))
149 dialog_buttons_sex += ["Female"];
150 if(llGetListLength(humanoid_thingy_anims))
151 dialog_buttons_sex += ["Thingy"];
152 }
153 else if(type == "Quadruped")
154 {
155 if(llGetListLength(quadruped_male_anims))
156 dialog_buttons_sex += ["Male"];
157 if(llGetListLength(quadruped_female_anims))
158 dialog_buttons_sex += ["Female"];
159 if(llGetListLength(quadruped_thingy_anims))
160 dialog_buttons_sex += ["Thingy"];
161 }
162 llListenRemove(lis);
163 lis = llListen(channel, agent_name, agent, "");
164 if(agent != NULL_KEY)
165 llDialog(agent, ("\n" + dialog_msg_sex), dialog_buttons_sex, channel);
166 }
167
168 AnimSet()
169 {
170 agent_anim_set = [];
171 if(sex == "Male")
172 {
173 if(type == "Tiny")
174 agent_anim_set = tiny_male_anims;
175 else if(type == "Humanoid")
176 agent_anim_set = humanoid_male_anims;
177 else
178 agent_anim_set = quadruped_male_anims;
179 }
180 else if(sex == "Female")
181 {
182 if(type == "Tiny")
183 agent_anim_set = tiny_female_anims;
184 else if(type == "Humanoid")
185 agent_anim_set = humanoid_female_anims;
186 else
187 agent_anim_set = quadruped_female_anims;
188 }
189 else
190 {
191 if(type == "Tiny")
192 agent_anim_set = tiny_thingy_anims;
193 else if(type == "Humanoid")
194 agent_anim_set = humanoid_thingy_anims;
195 else
196 agent_anim_set = quadruped_thingy_anims;
197 }
198 }
199
200 SortDialog(integer b)
201 {
202 last = b;
203 string fore = "-";
204 string dialog_anims = "";
205 list dialog_buttons = [];
206 integer count = b;
207 integer max = (b + 10);
208 do
209 {
210 string anim_name = llList2String(agent_anim_set, count);
211 if(anim_name != "")
212 {
213 dialog_anims += ("\n" + ((string)(++count)) + " - " + anim_name);
214 dialog_buttons += [((string)count)];
215 }
216 else
217 count = max;
218 }
219 while(count < max);
220 if(llGetListLength(agent_anim_set) > llGetListLength(dialog_buttons))
221 {
222 fore = ">>";
223 if(max < llGetListLength(agent_anim_set))
224 next = max;
225 else
226 next = 0;
227 }
228 dialog_buttons = llListInsertList(dialog_buttons, ["RESET", fore], 0);
229 llListenRemove(lis);
230 lis = llListen(channel, agent_name, agent, "");
231 if(agent != NULL_KEY)
232 llDialog(agent, dialog_anims, dialog_buttons, channel);
233 }
234
235 default
236 {
238 {
239 CreatePoseStand();
240 }
241 changed(integer change)
242 {
243 if(change & CHANGED_LINK)
244 {
246 if(NOP == 1)
247 {
248 ousted = FALSE;
249 agent = NULL_KEY;
250 llListenRemove(lis);
251 if(playing != "")
252 {
253 llStopAnimation(playing);
254 playing = "";
255 }
257 }
258 else if(NOP == 2)
259 {
260 if(!ousted)
261 {
262 agent = llAvatarOnSitTarget();
263 agent_name = llKey2Name(agent);
265 }
266 }
267 else if(NOP == 3)
268 {
270 ousted = TRUE;
271 }
272 }
273 else if(change & CHANGED_OWNER)
274 SetName();
275 }
277 {
279 {
280 if(agent != NULL_KEY)
281 {
282 llStopAnimation("Sit");
283 if(agent != NULL_KEY)
284 llInstantMessage(agent, "Don't forget to turn off your AO.");
285 TypeCast();
286 }
287 }
288 }
290 {
291 integer count;
292 do
293 {
294 if(llDetectedKey(count) == agent)
295 SortDialog(last);
296 }
297 while((++count) < nd);
298 }
299 listen(integer chan, string name, key id, string msg)
300 {
301 llListenRemove(lis);
302 if(msg != "RESET")
303 {
304 if((msg != ">>") && (msg != "-"))
305 {
306 if(llListFindList(dialog_buttons_type, [msg]) != -1)
307 {
308 type = msg;
309 dialog_buttons_type = [];
310 SexCast();
311 }
312 else if(llListFindList(dialog_buttons_sex, [msg]) != -1)
313 {
314 sex = msg;
315 dialog_buttons_sex = [];
316 AnimSet();
317 SortDialog(0);
319 }
320 else
321 {
322 string name = llList2String(agent_anim_set, (((integer)msg) - 1));
324 {
325 if(playing != "")
326 llStopAnimation(playing);
327 playing = name;
328 if(agent != NULL_KEY)
329 llStartAnimation(name);
330 }
331 else
332 {
333 if(agent != NULL_KEY)
334 llInstantMessage(agent, "\"" + name + "\" is missing from the pose stand inventory.");
335 }
336 }
337 }
338 else
339 {
340 if(msg == ">>")
341 SortDialog(next);
342 else if(msg == "-")
343 SortDialog(last);
344 }
345 return;
346 }
347 TypeCast();
348 }
349 }

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