aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-23 11:41:34 +0000
committerMelanie Thielker2008-09-23 11:41:34 +0000
commit44e566260c9da5ff62c448cfdd67063c7a486126 (patch)
tree64b9c963872c986317132adc5d4fe0978ad25b64 /OpenSim/Region/ScriptEngine/Common
parentSmall fix to eliminate a beauty spot (diff)
downloadopensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.zip
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.gz
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.bz2
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.xz
Mantis #2243
Thank you, tyre, for a patch that refactors LSL to use a unified set of method signatures and type names, reorders methods and removes unused and adds new method stubs.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs1442
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs1600
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs963
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs147
-rw-r--r--OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs18
5 files changed, 2065 insertions, 2105 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 528df40..44011de 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -30,10 +30,14 @@ using System.Runtime.Remoting.Lifetime;
30using System.Threading; 30using System.Threading;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; 32using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
33using integer = System.Int32; 33
34using key = System.String; 34using LSL_Float = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLFloat;
35using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; 35using LSL_Integer = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLInteger;
36using rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion; 36using LSL_Key = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
37using LSL_List = OpenSim.Region.ScriptEngine.Common.LSL_Types.list;
38using LSL_Rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion;
39using LSL_String = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
40using LSL_Vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3;
37 41
38namespace OpenSim.Region.ScriptEngine.Common 42namespace OpenSim.Region.ScriptEngine.Common
39{ 43{
@@ -160,1400 +164,1389 @@ namespace OpenSim.Region.ScriptEngine.Common
160 return m_LSL_Functions.GetCommander(name); 164 return m_LSL_Functions.GetCommander(name);
161 } 165 }
162 166
163 public double llSin(double f) 167 public LSL_Integer llAbs(int i)
164 { 168 {
165 return m_LSL_Functions.llSin(f); 169 return m_LSL_Functions.llAbs(i);
166 } 170 }
167 public void osSetRegionWaterHeight(double height) 171
172 public LSL_Float llAcos(double val)
168 { 173 {
169 m_LSL_Functions.osSetRegionWaterHeight(height); 174 return m_LSL_Functions.llAcos(val);
170 } 175 }
171 public double llCos(double f) 176
177 public void llAddToLandBanList(string avatar, double hours)
172 { 178 {
173 return m_LSL_Functions.llCos(f); 179 m_LSL_Functions.llAddToLandBanList(avatar, hours);
174 } 180 }
175 181
176 public double llTan(double f) 182 public void llAddToLandPassList(string avatar, double hours)
177 { 183 {
178 return m_LSL_Functions.llTan(f); 184 m_LSL_Functions.llAddToLandPassList(avatar, hours);
179 } 185 }
180 186
181 public double llAtan2(double x, double y) 187 public void llAdjustSoundVolume(double volume)
182 { 188 {
183 return m_LSL_Functions.llAtan2(x, y); 189 m_LSL_Functions.llAdjustSoundVolume(volume);
184 } 190 }
185 191
186 public double llSqrt(double f) 192 public void llAllowInventoryDrop(int add)
187 { 193 {
188 return m_LSL_Functions.llSqrt(f); 194 m_LSL_Functions.llAllowInventoryDrop(add);
189 } 195 }
190 196
191 public double llPow(double fbase, double fexponent) 197 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b)
192 { 198 {
193 return m_LSL_Functions.llPow(fbase, fexponent); 199 return m_LSL_Functions.llAngleBetween(a, b);
194 } 200 }
195 201
196 public LSL_Types.LSLInteger llAbs(int i) 202 public void llApplyImpulse(LSL_Vector force, int local)
197 { 203 {
198 return m_LSL_Functions.llAbs(i); 204 m_LSL_Functions.llApplyImpulse(force, local);
199 } 205 }
200 206
201 public double llFabs(double f) 207 public void llApplyRotationalImpulse(LSL_Vector force, int local)
202 { 208 {
203 return m_LSL_Functions.llFabs(f); 209 m_LSL_Functions.llApplyRotationalImpulse(force, local);
204 } 210 }
205 211
206 public double llFrand(double mag) 212 public LSL_Float llAsin(double val)
207 { 213 {
208 return m_LSL_Functions.llFrand(mag); 214 return m_LSL_Functions.llAsin(val);
209 } 215 }
210 216
211 public LSL_Types.LSLInteger llFloor(double f) 217 public LSL_Float llAtan2(double x, double y)
212 { 218 {
213 return m_LSL_Functions.llFloor(f); 219 return m_LSL_Functions.llAtan2(x, y);
214 } 220 }
215 221
216 public LSL_Types.LSLInteger llCeil(double f) 222 public void llAttachToAvatar(int attachment)
217 { 223 {
218 return m_LSL_Functions.llCeil(f); 224 m_LSL_Functions.llAttachToAvatar(attachment);
219 } 225 }
220 226
221 public LSL_Types.LSLInteger llRound(double f) 227 public LSL_Key llAvatarOnSitTarget()
222 { 228 {
223 return m_LSL_Functions.llRound(f); 229 return m_LSL_Functions.llAvatarOnSitTarget();
224 } 230 }
225 231
226 public double llVecMag(vector v) 232 public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up)
227 { 233 {
228 return m_LSL_Functions.llVecMag(v); 234 return m_LSL_Functions.llAxes2Rot(fwd, left, up);
229 } 235 }
230 236
231 public vector llVecNorm(vector v) 237 public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle)
232 { 238 {
233 return m_LSL_Functions.llVecNorm(v); 239 return m_LSL_Functions.llAxisAngle2Rot(axis, angle);
234 } 240 }
235 241
236 public double llVecDist(vector a, vector b) 242 public LSL_Integer llBase64ToInteger(string str)
237 { 243 {
238 return m_LSL_Functions.llVecDist(a, b); 244 return m_LSL_Functions.llBase64ToInteger(str);
239 } 245 }
240 246
241 public vector llRot2Euler(rotation r) 247 public LSL_String llBase64ToString(string str)
242 { 248 {
243 return m_LSL_Functions.llRot2Euler(r); 249 return m_LSL_Functions.llBase64ToString(str);
244 } 250 }
245 251
246 public rotation llEuler2Rot(vector v) 252 public void llBreakAllLinks()
247 { 253 {
248 return m_LSL_Functions.llEuler2Rot(v); 254 m_LSL_Functions.llBreakAllLinks();
249 } 255 }
250 256
251 public rotation llAxes2Rot(vector fwd, vector left, vector up) 257 public void llBreakLink(int linknum)
252 { 258 {
253 return m_LSL_Functions.llAxes2Rot(fwd, left, up); 259 m_LSL_Functions.llBreakLink(linknum);
254 } 260 }
255 261
256 public vector llRot2Fwd(rotation r) 262 public LSL_Integer llCeil(double f)
257 { 263 {
258 return m_LSL_Functions.llRot2Fwd(r); 264 return m_LSL_Functions.llCeil(f);
259 } 265 }
260 266
261 public vector llRot2Left(rotation r) 267 public void llClearCameraParams()
262 { 268 {
263 return m_LSL_Functions.llRot2Left(r); 269 m_LSL_Functions.llClearCameraParams();
264 } 270 }
265 271
266 public vector llRot2Up(rotation r) 272 public void llCloseRemoteDataChannel(string channel)
267 { 273 {
268 return m_LSL_Functions.llRot2Up(r); 274 m_LSL_Functions.llCloseRemoteDataChannel(channel);
269 } 275 }
270 276
271 public rotation llRotBetween(vector start, vector end) 277 public LSL_Float llCloud(LSL_Vector offset)
272 { 278 {
273 return m_LSL_Functions.llRotBetween(start, end); 279 return m_LSL_Functions.llCloud(offset);
274 } 280 }
275 281
276 public void llWhisper(int channelID, string text) 282 public void llCollisionFilter(string name, string id, int accept)
277 { 283 {
278 m_LSL_Functions.llWhisper(channelID, text); 284 m_LSL_Functions.llCollisionFilter(name, id, accept);
279 } 285 }
280 286
281 public void llSay(int channelID, string text) 287 public void llCollisionSound(string impact_sound, double impact_volume)
282 { 288 {
283 m_LSL_Functions.llSay(channelID, text); 289 m_LSL_Functions.llCollisionSound(impact_sound, impact_volume);
284 } 290 }
285 291
286 // 292 public void llCollisionSprite(string impact_sprite)
287 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
288 //
289 public void llShout(int channelID, string text)
290 { 293 {
291 m_LSL_Functions.llShout(channelID, text); 294 m_LSL_Functions.llCollisionSprite(impact_sprite);
292 } 295 }
293 296
294 public void llOwnerSay(string msg) 297 public LSL_Float llCos(double f)
295 { 298 {
296 m_LSL_Functions.llOwnerSay(msg); 299 return m_LSL_Functions.llCos(f);
297 } 300 }
298 301
299 public void llRegionSay(int channelID, string text) 302 public void llCreateLink(string target, int parent)
300 { 303 {
301 m_LSL_Functions.llRegionSay(channelID, text); 304 m_LSL_Functions.llCreateLink(target, parent);
302 } 305 }
303 306
304 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 307 public LSL_List llCSV2List(string src)
305 { 308 {
306 return m_LSL_Functions.llListen(channelID, name, ID, msg); 309 return m_LSL_Functions.llCSV2List(src);
307 } 310 }
308 311
309 public void llListenControl(int number, int active) 312 public LSL_List llDeleteSubList(LSL_List src, int start, int end)
310 { 313 {
311 m_LSL_Functions.llListenControl(number, active); 314 return m_LSL_Functions.llDeleteSubList(src, start, end);
312 } 315 }
313 316
314 public void llListenRemove(int number) 317 public LSL_String llDeleteSubString(string src, int start, int end)
315 { 318 {
316 m_LSL_Functions.llListenRemove(number); 319 return m_LSL_Functions.llDeleteSubString(src, start, end);
317 } 320 }
318 321
319 public void llSensor(string name, string id, int type, double range, double arc) 322 public void llDetachFromAvatar()
320 { 323 {
321 m_LSL_Functions.llSensor(name, id, type, range, arc); 324 m_LSL_Functions.llDetachFromAvatar();
322 } 325 }
323 326
324 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 327 public LSL_Vector llDetectedGrab(int number)
325 { 328 {
326 m_LSL_Functions.llSensorRepeat(name, id, type, range, arc, rate); 329 return m_LSL_Functions.llDetectedGrab(number);
327 } 330 }
328 331
329 public void llSensorRemove() 332 public LSL_Integer llDetectedGroup(int number)
330 { 333 {
331 m_LSL_Functions.llSensorRemove(); 334 return m_LSL_Functions.llDetectedGroup(number);
332 } 335 }
333 336
334 public string llDetectedName(int number) 337 public LSL_Key llDetectedKey(int number)
335 { 338 {
336 return m_LSL_Functions.llDetectedName(number); 339 return m_LSL_Functions.llDetectedKey(number);
337 } 340 }
338 341
339 public string llDetectedKey(int number) 342 public LSL_Integer llDetectedLinkNumber(int number)
340 { 343 {
341 return m_LSL_Functions.llDetectedKey(number); 344 return m_LSL_Functions.llDetectedLinkNumber(number);
345 }
346
347 public LSL_String llDetectedName(int number)
348 {
349 return m_LSL_Functions.llDetectedName(number);
342 } 350 }
343 351
344 public string llDetectedOwner(int number) 352 public LSL_Key llDetectedOwner(int number)
345 { 353 {
346 return m_LSL_Functions.llDetectedOwner(number); 354 return m_LSL_Functions.llDetectedOwner(number);
347 } 355 }
348 356
349 public LSL_Types.LSLInteger llDetectedType(int number) 357 public LSL_Vector llDetectedPos(int number)
358 {
359 return m_LSL_Functions.llDetectedPos(number);
360 }
361
362 public LSL_Rotation llDetectedRot(int number)
363 {
364 return m_LSL_Functions.llDetectedRot(number);
365 }
366
367 public LSL_Integer llDetectedType(int number)
350 { 368 {
351 return m_LSL_Functions.llDetectedType(number); 369 return m_LSL_Functions.llDetectedType(number);
352 } 370 }
353 371
354 public vector llDetectedPos(int number) 372 public LSL_Vector llDetectedTouchBinormal(int index)
355 { 373 {
356 return m_LSL_Functions.llDetectedPos(number); 374 return m_LSL_Functions.llDetectedTouchBinormal(index);
357 } 375 }
358 376
359 public vector llDetectedVel(int number) 377 public LSL_Integer llDetectedTouchFace(int index)
360 { 378 {
361 return m_LSL_Functions.llDetectedVel(number); 379 return m_LSL_Functions.llDetectedTouchFace(index);
362 } 380 }
363 381
364 public vector llDetectedGrab(int number) 382 public LSL_Vector llDetectedTouchNormal(int index)
365 { 383 {
366 return m_LSL_Functions.llDetectedGrab(number); 384 return m_LSL_Functions.llDetectedTouchNormal(index);
367 } 385 }
368 386
369 public rotation llDetectedRot(int number) 387 public LSL_Vector llDetectedTouchPos(int index)
370 { 388 {
371 return m_LSL_Functions.llDetectedRot(number); 389 return m_LSL_Functions.llDetectedTouchPos(index);
372 } 390 }
373 391
374 public LSL_Types.LSLInteger llDetectedGroup(int number) 392 public LSL_Vector llDetectedTouchST(int index)
375 { 393 {
376 return m_LSL_Functions.llDetectedGroup(number); 394 return m_LSL_Functions.llDetectedTouchST(index);
377 } 395 }
378 396
379 public LSL_Types.LSLInteger llDetectedLinkNumber(int number) 397 public LSL_Vector llDetectedTouchUV(int index)
380 { 398 {
381 return m_LSL_Functions.llDetectedLinkNumber(number); 399 return m_LSL_Functions.llDetectedTouchUV(index);
400 }
401
402 public LSL_Vector llDetectedVel(int number)
403 {
404 return m_LSL_Functions.llDetectedVel(number);
405 }
406
407 public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel)
408 {
409 m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel);
382 } 410 }
383 411
384 //
385 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
386 //
387 public void llDie() 412 public void llDie()
388 { 413 {
389 m_LSL_Functions.llDie(); 414 m_LSL_Functions.llDie();
390 } 415 }
391 416
392 public double llGround(vector offset) 417 public LSL_String llDumpList2String(LSL_List src, string seperator)
393 { 418 {
394 return m_LSL_Functions.llGround(offset); 419 return m_LSL_Functions.llDumpList2String(src, seperator);
395 } 420 }
396 421
397 public double llCloud(vector offset) 422 public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir)
398 { 423 {
399 return m_LSL_Functions.llCloud(offset); 424 return m_LSL_Functions.llEdgeOfWorld(pos, dir);
400 } 425 }
401 426
402 public vector llWind(vector offset) 427 public void llEjectFromLand(string pest)
403 { 428 {
404 return m_LSL_Functions.llWind(offset); 429 m_LSL_Functions.llEjectFromLand(pest);
405 } 430 }
406 431
407 public void llSetStatus(int status, int value) 432 public void llEmail(string address, string subject, string message)
408 { 433 {
409 m_LSL_Functions.llSetStatus(status, value); 434 m_LSL_Functions.llEmail(address, subject, message);
410 } 435 }
411 436
412 public LSL_Types.LSLInteger llGetStatus(int status) 437 public LSL_String llEscapeURL(string url)
413 { 438 {
414 return m_LSL_Functions.llGetStatus(status); 439 return m_LSL_Functions.llEscapeURL(url);
415 } 440 }
416 441
417 public void llSetScale(vector scale) 442 public LSL_Rotation llEuler2Rot(LSL_Vector v)
418 { 443 {
419 m_LSL_Functions.llSetScale(scale); 444 return m_LSL_Functions.llEuler2Rot(v);
420 } 445 }
421 446
422 public vector llGetScale() 447 public LSL_Float llFabs(double f)
423 { 448 {
424 return m_LSL_Functions.llGetScale(); 449 return m_LSL_Functions.llFabs(f);
425 } 450 }
426 451
427 public void llSetColor(vector color, int face) 452 public LSL_Integer llFloor(double f)
428 { 453 {
429 m_LSL_Functions.llSetColor(color, face); 454 return m_LSL_Functions.llFloor(f);
430 } 455 }
431 456
432 public double llGetAlpha(int face) 457 public void llForceMouselook(int mouselook)
433 { 458 {
434 return m_LSL_Functions.llGetAlpha(face); 459 m_LSL_Functions.llForceMouselook(mouselook);
435 } 460 }
436 461
437 public void llSetAlpha(double alpha, int face) 462 public LSL_Float llFrand(double mag)
438 { 463 {
439 m_LSL_Functions.llSetAlpha(alpha, face); 464 return m_LSL_Functions.llFrand(mag);
440 } 465 }
441 466
442 public vector llGetColor(int face) 467 public LSL_Vector llGetAccel()
443 { 468 {
444 return m_LSL_Functions.llGetColor(face); 469 return m_LSL_Functions.llGetAccel();
445 } 470 }
446 471
447 public void llSetTexture(string texture, int face) 472 public LSL_Integer llGetAgentInfo(string id)
448 { 473 {
449 m_LSL_Functions.llSetTexture(texture, face); 474 return m_LSL_Functions.llGetAgentInfo(id);
450 } 475 }
451 476
452 public void llScaleTexture(double u, double v, int face) 477 public LSL_Vector llGetAgentSize(string id)
453 { 478 {
454 m_LSL_Functions.llScaleTexture(u, v, face); 479 return m_LSL_Functions.llGetAgentSize(id);
455 } 480 }
456 481
457 public void llOffsetTexture(double u, double v, int face) 482 public LSL_Float llGetAlpha(int face)
458 { 483 {
459 m_LSL_Functions.llOffsetTexture(u, v, face); 484 return m_LSL_Functions.llGetAlpha(face);
460 } 485 }
461 486
462 public void llRotateTexture(double rotation, int face) 487 public LSL_Float llGetAndResetTime()
463 { 488 {
464 m_LSL_Functions.llRotateTexture(rotation, face); 489 return m_LSL_Functions.llGetAndResetTime();
465 } 490 }
466 491
467 public string llGetTexture(int face) 492 public LSL_String llGetAnimation(string id)
468 { 493 {
469 return m_LSL_Functions.llGetTexture(face); 494 return m_LSL_Functions.llGetAnimation(id);
470 } 495 }
471 496
472 // 497 public LSL_List llGetAnimationList(string id)
473 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
474 //
475 public void llSetPos(vector pos)
476 { 498 {
477 m_LSL_Functions.llSetPos(pos); 499 return m_LSL_Functions.llGetAnimationList(id);
478 } 500 }
479 501
480 public vector llGetPos() 502 public LSL_Integer llGetAttached()
481 { 503 {
482 return m_LSL_Functions.llGetPos(); 504 return m_LSL_Functions.llGetAttached();
483 } 505 }
484 506
485 public vector llGetLocalPos() 507 public LSL_List llGetBoundingBox(string obj)
486 { 508 {
487 return m_LSL_Functions.llGetLocalPos(); 509 return m_LSL_Functions.llGetBoundingBox(obj);
488 } 510 }
489 511
490 public void llSetRot(rotation rot) 512 public LSL_Vector llGetCameraPos()
491 { 513 {
492 m_LSL_Functions.llSetRot(rot); 514 return m_LSL_Functions.llGetCameraPos();
493 } 515 }
494 516
495 public rotation llGetRot() 517 public LSL_Rotation llGetCameraRot()
496 { 518 {
497 return m_LSL_Functions.llGetRot(); 519 return m_LSL_Functions.llGetCameraRot();
498 } 520 }
499 521
500 public rotation llGetLocalRot() 522 public LSL_Vector llGetCenterOfMass()
501 { 523 {
502 return m_LSL_Functions.llGetLocalRot(); 524 return m_LSL_Functions.llGetCenterOfMass();
503 } 525 }
504 526
505 public void llSetForce(vector force, int local) 527 public LSL_Vector llGetColor(int face)
506 { 528 {
507 m_LSL_Functions.llSetForce(force, local); 529 return m_LSL_Functions.llGetColor(face);
508 } 530 }
509 531
510 public vector llGetForce() 532 public LSL_String llGetCreator()
511 { 533 {
512 return m_LSL_Functions.llGetForce(); 534 return m_LSL_Functions.llGetCreator();
513 } 535 }
514 536
515 public LSL_Types.LSLInteger llTarget(vector position, double range) 537 public LSL_String llGetDate()
516 { 538 {
517 return m_LSL_Functions.llTarget(position, range); 539 return m_LSL_Functions.llGetDate();
518 } 540 }
519 541
520 public void llTargetRemove(int number) 542 public LSL_Float llGetEnergy()
521 { 543 {
522 m_LSL_Functions.llTargetRemove(number); 544 return m_LSL_Functions.llGetEnergy();
523 } 545 }
524 546
525 public LSL_Types.LSLInteger llRotTarget(rotation rot, double error) 547 public LSL_Vector llGetForce()
526 { 548 {
527 return m_LSL_Functions.llRotTarget(rot, error); 549 return m_LSL_Functions.llGetForce();
528 } 550 }
529 551
530 public void llRotTargetRemove(int number) 552 public LSL_Integer llGetFreeMemory()
531 { 553 {
532 m_LSL_Functions.llRotTargetRemove(number); 554 return m_LSL_Functions.llGetFreeMemory();
533 } 555 }
534 556
535 public void llMoveToTarget(vector target, double tau) 557 public LSL_Vector llGetGeometricCenter()
536 { 558 {
537 m_LSL_Functions.llMoveToTarget(target, tau); 559 return m_LSL_Functions.llGetGeometricCenter();
538 } 560 }
539 561
540 public void llStopMoveToTarget() 562 public LSL_Float llGetGMTclock()
541 { 563 {
542 m_LSL_Functions.llStopMoveToTarget(); 564 return m_LSL_Functions.llGetGMTclock();
543 } 565 }
544 566
545 public void llApplyImpulse(vector force, int local) 567 public LSL_Key llGetInventoryCreator(string item)
546 { 568 {
547 m_LSL_Functions.llApplyImpulse(force, local); 569 return m_LSL_Functions.llGetInventoryCreator(item);
548 } 570 }
549 571
550 // 572 public LSL_Key llGetInventoryKey(string name)
551 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
552 //
553 public void llApplyRotationalImpulse(vector force, int local)
554 { 573 {
555 m_LSL_Functions.llApplyRotationalImpulse(force, local); 574 return m_LSL_Functions.llGetInventoryKey(name);
556 } 575 }
557 576
558 public void llSetTorque(vector torque, int local) 577 public LSL_String llGetInventoryName(int type, int number)
559 { 578 {
560 m_LSL_Functions.llSetTorque(torque, local); 579 return m_LSL_Functions.llGetInventoryName(type, number);
561 } 580 }
562 581
563 public vector llGetTorque() 582 public LSL_Integer llGetInventoryNumber(int type)
564 { 583 {
565 return m_LSL_Functions.llGetTorque(); 584 return m_LSL_Functions.llGetInventoryNumber(type);
566 } 585 }
567 586
568 public void llSetForceAndTorque(vector force, vector torque, int local) 587 public LSL_Integer llGetInventoryPermMask(string item, int mask)
569 { 588 {
570 m_LSL_Functions.llSetForceAndTorque(force, torque, local); 589 return m_LSL_Functions.llGetInventoryPermMask(item, mask);
571 } 590 }
572 591
573 public vector llGetVel() 592 public LSL_Integer llGetInventoryType(string name)
574 { 593 {
575 return m_LSL_Functions.llGetVel(); 594 return m_LSL_Functions.llGetInventoryType(name);
576 } 595 }
577 596
578 public vector llGetAccel() 597 public LSL_Key llGetKey()
579 { 598 {
580 return m_LSL_Functions.llGetAccel(); 599 return m_LSL_Functions.llGetKey();
581 } 600 }
582 601
583 public vector llGetOmega() 602 public LSL_Key llGetLandOwnerAt(LSL_Vector pos)
584 { 603 {
585 return m_LSL_Functions.llGetOmega(); 604 return m_LSL_Functions.llGetLandOwnerAt(pos);
586 } 605 }
587 606
588 public double llGetTimeOfDay() 607 public LSL_Key llGetLinkKey(int linknum)
589 { 608 {
590 return m_LSL_Functions.llGetTimeOfDay(); 609 return m_LSL_Functions.llGetLinkKey(linknum);
591 } 610 }
592 611
593 public double llGetWallclock() 612 public LSL_String llGetLinkName(int linknum)
594 { 613 {
595 return m_LSL_Functions.llGetWallclock(); 614 return m_LSL_Functions.llGetLinkName(linknum);
596 } 615 }
597 616
598 public double llGetTime() 617 public LSL_Integer llGetLinkNumber()
599 { 618 {
600 return m_LSL_Functions.llGetTime(); 619 return m_LSL_Functions.llGetLinkNumber();
601 } 620 }
602 621
603 public void llResetTime() 622 public LSL_Integer llGetListEntryType(LSL_List src, int index)
604 { 623 {
605 m_LSL_Functions.llResetTime(); 624 return m_LSL_Functions.llGetListEntryType(src, index);
606 } 625 }
607 626
608 public double llGetAndResetTime() 627 public LSL_Integer llGetListLength(LSL_List src)
609 { 628 {
610 return m_LSL_Functions.llGetAndResetTime(); 629 return m_LSL_Functions.llGetListLength(src);
611 } 630 }
612 631
613 public void llSound() 632 public LSL_Vector llGetLocalPos()
614 { 633 {
615 m_LSL_Functions.llSound(); 634 return m_LSL_Functions.llGetLocalPos();
616 } 635 }
617 636
618 public void llPlaySound(string sound, double volume) 637 public LSL_Rotation llGetLocalRot()
619 { 638 {
620 m_LSL_Functions.llPlaySound(sound, volume); 639 return m_LSL_Functions.llGetLocalRot();
621 } 640 }
622 641
623 public void llLoopSound(string sound, double volume) 642 public LSL_Float llGetMass()
624 { 643 {
625 m_LSL_Functions.llLoopSound(sound, volume); 644 return m_LSL_Functions.llGetMass();
626 } 645 }
627 646
628 public void llLoopSoundMaster(string sound, double volume) 647 public void llGetNextEmail(string address, string subject)
629 { 648 {
630 m_LSL_Functions.llLoopSoundMaster(sound, volume); 649 m_LSL_Functions.llGetNextEmail(address, subject);
631 } 650 }
632 651
633 public void llLoopSoundSlave(string sound, double volume) 652 public LSL_String llGetNotecardLine(string name, int line)
634 { 653 {
635 m_LSL_Functions.llLoopSoundSlave(sound, volume); 654 return m_LSL_Functions.llGetNotecardLine(name, line);
636 } 655 }
637 656
638 public void llPlaySoundSlave(string sound, double volume) 657 public LSL_Key llGetNumberOfNotecardLines(string name)
639 { 658 {
640 m_LSL_Functions.llPlaySoundSlave(sound, volume); 659 return m_LSL_Functions.llGetNumberOfNotecardLines(name);
641 } 660 }
642 661
643 // 662 public LSL_Integer llGetNumberOfPrims()
644 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
645 //
646 public void llTriggerSound(string sound, double volume)
647 { 663 {
648 m_LSL_Functions.llTriggerSound(sound, volume); 664 return m_LSL_Functions.llGetNumberOfPrims();
649 } 665 }
650 666
651 public void llStopSound() 667 public LSL_Integer llGetNumberOfSides()
652 { 668 {
653 m_LSL_Functions.llStopSound(); 669 return m_LSL_Functions.llGetNumberOfSides();
654 } 670 }
655 671
656 public void llPreloadSound(string sound) 672 public LSL_String llGetObjectDesc()
657 { 673 {
658 m_LSL_Functions.llPreloadSound(sound); 674 return m_LSL_Functions.llGetObjectDesc();
659 } 675 }
660 676
661 public string llGetSubString(string src, int start, int end) 677 public LSL_List llGetObjectDetails(string id, LSL_List args)
662 { 678 {
663 return m_LSL_Functions.llGetSubString(src, start, end); 679 return m_LSL_Functions.llGetObjectDetails(id, args);
664 } 680 }
665 681
666 public string llDeleteSubString(string src, int start, int end) 682 public LSL_Float llGetObjectMass(string id)
667 { 683 {
668 return m_LSL_Functions.llDeleteSubString(src, start, end); 684 return m_LSL_Functions.llGetObjectMass(id);
669 } 685 }
670 686
671 public string llInsertString(string dst, int position, string src) 687 public LSL_String llGetObjectName()
672 { 688 {
673 return m_LSL_Functions.llInsertString(dst, position, src); 689 return m_LSL_Functions.llGetObjectName();
674 } 690 }
675 691
676 public string llToUpper(string source) 692 public LSL_Integer llGetObjectPermMask(int mask)
677 { 693 {
678 return m_LSL_Functions.llToUpper(source); 694 return m_LSL_Functions.llGetObjectPermMask(mask);
679 } 695 }
680 696
681 public string llToLower(string source) 697 public LSL_Integer llGetObjectPrimCount(string object_id)
682 { 698 {
683 return m_LSL_Functions.llToLower(source); 699 return m_LSL_Functions.llGetObjectPrimCount(object_id);
684 } 700 }
685 701
686 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 702 public LSL_Vector llGetOmega()
687 { 703 {
688 return m_LSL_Functions.llGiveMoney(destination, amount); 704 return m_LSL_Functions.llGetOmega();
689 } 705 }
690 706
691 public void llMakeExplosion() 707 public LSL_Key llGetOwner()
692 { 708 {
693 m_LSL_Functions.llMakeExplosion(); 709 return m_LSL_Functions.llGetOwner();
694 } 710 }
695 711
696 public void llMakeFountain() 712 public LSL_Key llGetOwnerKey(string id)
697 { 713 {
698 m_LSL_Functions.llMakeFountain(); 714 return m_LSL_Functions.llGetOwnerKey(id);
699 } 715 }
700 716
701 public void llMakeSmoke() 717 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
702 { 718 {
703 m_LSL_Functions.llMakeSmoke(); 719 return m_LSL_Functions.llGetParcelDetails(pos, param);
704 } 720 }
705 721
706 public void llMakeFire() 722 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
707 { 723 {
708 m_LSL_Functions.llMakeFire(); 724 return m_LSL_Functions.llGetParcelFlags(pos);
709 } 725 }
710 726
711 public void llRezObject(string inventory, vector pos, vector vel, rotation rot, int param) 727 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
712 { 728 {
713 m_LSL_Functions.llRezObject(inventory, pos, vel, rot, param); 729 return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide);
714 } 730 }
715 731
716 public void llLookAt(vector target, double strength, double damping) 732 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
717 { 733 {
718 m_LSL_Functions.llLookAt(target, strength, damping); 734 return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide);
719 } 735 }
720 736
721 public void llStopLookAt() 737 public LSL_List llGetParcelPrimOwners(LSL_Vector pos)
722 { 738 {
723 m_LSL_Functions.llStopLookAt(); 739 return m_LSL_Functions.llGetParcelPrimOwners(pos);
724 } 740 }
725 741
726 public void llSetTimerEvent(double sec) 742 public LSL_Integer llGetPermissions()
727 { 743 {
728 m_LSL_Functions.llSetTimerEvent(sec); 744 return m_LSL_Functions.llGetPermissions();
729 } 745 }
730 746
731 public void llSleep(double sec) 747 public LSL_Key llGetPermissionsKey()
732 { 748 {
733 m_LSL_Functions.llSleep(sec); 749 return m_LSL_Functions.llGetPermissionsKey();
734 } 750 }
735 751
736 // 752 public LSL_Vector llGetPos()
737 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
738 //
739 public double llGetMass()
740 { 753 {
741 return m_LSL_Functions.llGetMass(); 754 return m_LSL_Functions.llGetPos();
742 } 755 }
743 756
744 public void llCollisionFilter(string name, string id, int accept) 757 public LSL_List llGetPrimitiveParams(LSL_List rules)
745 { 758 {
746 m_LSL_Functions.llCollisionFilter(name, id, accept); 759 return m_LSL_Functions.llGetPrimitiveParams(rules);
747 } 760 }
748 761
749 public void llTakeControls(int controls, int accept, int pass_on) 762 public LSL_Integer llGetRegionAgentCount()
750 { 763 {
751 m_LSL_Functions.llTakeControls(controls, accept, pass_on); 764 return m_LSL_Functions.llGetRegionAgentCount();
752 } 765 }
753 766
754 public void llReleaseControls() 767 public LSL_Vector llGetRegionCorner()
755 { 768 {
756 m_LSL_Functions.llReleaseControls(); 769 return m_LSL_Functions.llGetRegionCorner();
757 } 770 }
758 771
759 public void llAttachToAvatar(int attachment) 772 public LSL_Integer llGetRegionFlags()
760 { 773 {
761 m_LSL_Functions.llAttachToAvatar(attachment); 774 return m_LSL_Functions.llGetRegionFlags();
762 } 775 }
763 776
764 public void llDetachFromAvatar() 777 public LSL_Float llGetRegionFPS()
765 { 778 {
766 m_LSL_Functions.llDetachFromAvatar(); 779 return m_LSL_Functions.llGetRegionFPS();
767 } 780 }
768 781
769 public void llTakeCamera(string avatar) 782 public LSL_String llGetRegionName()
770 { 783 {
771 m_LSL_Functions.llTakeCamera(avatar); 784 return m_LSL_Functions.llGetRegionName();
772 } 785 }
773 786
774 public void llReleaseCamera(string avatar) 787 public LSL_Float llGetRegionTimeDilation()
775 { 788 {
776 m_LSL_Functions.llReleaseCamera(avatar); 789 return m_LSL_Functions.llGetRegionTimeDilation();
777 } 790 }
778 791
779 public string llGetOwner() 792 public LSL_Vector llGetRootPosition()
780 { 793 {
781 return m_LSL_Functions.llGetOwner(); 794 return m_LSL_Functions.llGetRootPosition();
782 } 795 }
783 796
784 public void llInstantMessage(string user, string message) 797 public LSL_Rotation llGetRootRotation()
785 { 798 {
786 m_LSL_Functions.llInstantMessage(user, message); 799 return m_LSL_Functions.llGetRootRotation();
787 } 800 }
788 801
789 public void llEmail(string address, string subject, string message) 802 public LSL_Rotation llGetRot()
790 { 803 {
791 m_LSL_Functions.llEmail(address, subject, message); 804 return m_LSL_Functions.llGetRot();
792 } 805 }
793 806
794 public void llGetNextEmail(string address, string subject) 807 public LSL_Vector llGetScale()
795 { 808 {
796 m_LSL_Functions.llGetNextEmail(address, subject); 809 return m_LSL_Functions.llGetScale();
797 } 810 }
798 811
799 public string llGetKey() 812 public LSL_String llGetScriptName()
800 { 813 {
801 return m_LSL_Functions.llGetKey(); 814 return m_LSL_Functions.llGetScriptName();
802 } 815 }
803 816
804 public void llSetBuoyancy(double buoyancy) 817 public LSL_Integer llGetScriptState(string name)
805 { 818 {
806 m_LSL_Functions.llSetBuoyancy(buoyancy); 819 return m_LSL_Functions.llGetScriptState(name);
807 } 820 }
808 821
809 public void llSetHoverHeight(double height, int water, double tau) 822 public LSL_String llGetSimulatorHostname()
810 { 823 {
811 m_LSL_Functions.llSetHoverHeight(height, water, tau); 824 return m_LSL_Functions.llGetSimulatorHostname();
812 } 825 }
813 826
814 public void llStopHover() 827 public LSL_Integer llGetStartParameter()
815 { 828 {
816 m_LSL_Functions.llStopHover(); 829 return m_LSL_Functions.llGetStartParameter();
817 } 830 }
818 831
819 public void llMinEventDelay(double delay) 832 public LSL_Integer llGetStatus(int status)
820 { 833 {
821 m_LSL_Functions.llMinEventDelay(delay); 834 return m_LSL_Functions.llGetStatus(status);
822 } 835 }
823 836
824 public void llSoundPreload() 837 public LSL_String llGetSubString(string src, int start, int end)
825 { 838 {
826 m_LSL_Functions.llSoundPreload(); 839 return m_LSL_Functions.llGetSubString(src, start, end);
827 } 840 }
828 841
829 public void llRotLookAt(rotation target, double strength, double damping) 842 public LSL_Vector llGetSunDirection()
830 { 843 {
831 m_LSL_Functions.llRotLookAt(target, strength, damping); 844 return m_LSL_Functions.llGetSunDirection();
832 } 845 }
833 846
834 // 847 public LSL_String llGetTexture(int face)
835 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
836 //
837 public LSL_Types.LSLInteger llStringLength(string str)
838 { 848 {
839 return m_LSL_Functions.llStringLength(str); 849 return m_LSL_Functions.llGetTexture(face);
840 } 850 }
841 851
842 public void llStartAnimation(string anim) 852 public LSL_Vector llGetTextureOffset(int face)
843 { 853 {
844 m_LSL_Functions.llStartAnimation(anim); 854 return m_LSL_Functions.llGetTextureOffset(face);
845 } 855 }
846 856
847 public void llStopAnimation(string anim) 857 public LSL_Float llGetTextureRot(int side)
848 { 858 {
849 m_LSL_Functions.llStopAnimation(anim); 859 return m_LSL_Functions.llGetTextureRot(side);
850 } 860 }
851 861
852 public void llPointAt() 862 public LSL_Vector llGetTextureScale(int side)
853 { 863 {
854 m_LSL_Functions.llPointAt(); 864 return m_LSL_Functions.llGetTextureScale(side);
855 } 865 }
856 866
857 public void llStopPointAt() 867 public LSL_Float llGetTime()
858 { 868 {
859 m_LSL_Functions.llStopPointAt(); 869 return m_LSL_Functions.llGetTime();
860 } 870 }
861 871
862 public void llTargetOmega(vector axis, double spinrate, double gain) 872 public LSL_Float llGetTimeOfDay()
863 { 873 {
864 m_LSL_Functions.llTargetOmega(axis, spinrate, gain); 874 return m_LSL_Functions.llGetTimeOfDay();
865 } 875 }
866 876
867 public LSL_Types.LSLInteger llGetStartParameter() 877 public LSL_String llGetTimestamp()
868 { 878 {
869 return m_StartParam; 879 return m_LSL_Functions.llGetTimestamp();
870 } 880 }
871 881
872 public void llGodLikeRezObject(string inventory, vector pos) 882 public LSL_Vector llGetTorque()
873 { 883 {
874 m_LSL_Functions.llGodLikeRezObject(inventory, pos); 884 return m_LSL_Functions.llGetTorque();
875 } 885 }
876 886
877 public void llRequestPermissions(string agent, int perm) 887 public LSL_Integer llGetUnixTime()
878 { 888 {
879 m_LSL_Functions.llRequestPermissions(agent, perm); 889 return m_LSL_Functions.llGetUnixTime();
880 } 890 }
881 891
882 public string llGetPermissionsKey() 892 public LSL_Vector llGetVel()
883 { 893 {
884 return m_LSL_Functions.llGetPermissionsKey(); 894 return m_LSL_Functions.llGetVel();
885 } 895 }
886 896
887 public LSL_Types.LSLInteger llGetPermissions() 897 public LSL_Float llGetWallclock()
888 { 898 {
889 return m_LSL_Functions.llGetPermissions(); 899 return m_LSL_Functions.llGetWallclock();
890 } 900 }
891 901
892 public LSL_Types.LSLInteger llGetLinkNumber() 902 public void llGiveInventory(string destination, string inventory)
893 { 903 {
894 return m_LSL_Functions.llGetLinkNumber(); 904 m_LSL_Functions.llGiveInventory(destination, inventory);
895 } 905 }
896 906
897 public void llSetLinkColor(int linknumber, vector color, int face) 907 public void llGiveInventoryList(string destination, string category, LSL_List inventory)
898 { 908 {
899 m_LSL_Functions.llSetLinkColor(linknumber, color, face); 909 m_LSL_Functions.llGiveInventoryList(destination, category, inventory);
900 } 910 }
901 911
902 public void llCreateLink(string target, int parent) 912 public LSL_Integer llGiveMoney(string destination, int amount)
903 { 913 {
904 m_LSL_Functions.llCreateLink(target, parent); 914 return m_LSL_Functions.llGiveMoney(destination, amount);
905 } 915 }
906 916
907 public void llBreakLink(int linknum) 917 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
908 { 918 {
909 m_LSL_Functions.llBreakLink(linknum); 919 m_LSL_Functions.llGodLikeRezObject(inventory, pos);
910 } 920 }
911 921
912 public void llBreakAllLinks() 922 public LSL_Float llGround(LSL_Vector offset)
913 { 923 {
914 m_LSL_Functions.llBreakAllLinks(); 924 return m_LSL_Functions.llGround(offset);
915 } 925 }
916 926
917 public string llGetLinkKey(int linknum) 927 public LSL_Vector llGroundContour(LSL_Vector offset)
918 { 928 {
919 return m_LSL_Functions.llGetLinkKey(linknum); 929 return m_LSL_Functions.llGroundContour(offset);
920 } 930 }
921 931
922 public string llGetLinkName(int linknum) 932 public LSL_Vector llGroundNormal(LSL_Vector offset)
923 { 933 {
924 return m_LSL_Functions.llGetLinkName(linknum); 934 return m_LSL_Functions.llGroundNormal(offset);
925 } 935 }
926 936
927 public LSL_Types.LSLInteger llGetInventoryNumber(int type) 937 public void llGroundRepel(double height, int water, double tau)
928 { 938 {
929 return m_LSL_Functions.llGetInventoryNumber(type); 939 m_LSL_Functions.llGroundRepel(height, water, tau);
930 } 940 }
931 941
932 public string llGetInventoryName(int type, int number) 942 public LSL_Vector llGroundSlope(LSL_Vector offset)
933 { 943 {
934 return m_LSL_Functions.llGetInventoryName(type, number); 944 return m_LSL_Functions.llGroundSlope(offset);
935 } 945 }
936 946
937 // 947 public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
938 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
939 //
940 public void llSetScriptState(string name, int run)
941 { 948 {
942 m_LSL_Functions.llSetScriptState(name, run); 949 return m_LSL_Functions.llHTTPRequest(url, parameters, body);
943 } 950 }
944 951
945 public double llGetEnergy() 952 public LSL_String llInsertString(string dst, int position, string src)
946 { 953 {
947 return m_LSL_Functions.llGetEnergy(); 954 return m_LSL_Functions.llInsertString(dst, position, src);
948 } 955 }
949 956
950 public void llGiveInventory(string destination, string inventory) 957 public void llInstantMessage(string user, string message)
951 { 958 {
952 m_LSL_Functions.llGiveInventory(destination, inventory); 959 m_LSL_Functions.llInstantMessage(user, message);
953 } 960 }
954 961
955 public void llRemoveInventory(string item) 962 public LSL_String llIntegerToBase64(int number)
956 { 963 {
957 m_LSL_Functions.llRemoveInventory(item); 964 return m_LSL_Functions.llIntegerToBase64(number);
958 } 965 }
959 966
960 public void llSetText(string text, vector color, double alpha) 967 public LSL_String llKey2Name(string id)
961 { 968 {
962 m_LSL_Functions.llSetText(text, color, alpha); 969 return m_LSL_Functions.llKey2Name(id);
963 } 970 }
964 971
965 public double llWater(vector offset) 972 public LSL_String llList2CSV(LSL_List src)
966 { 973 {
967 return m_LSL_Functions.llWater(offset); 974 return m_LSL_Functions.llList2CSV(src);
968 } 975 }
969 976
970 public void llPassTouches(int pass) 977 public LSL_Float llList2Float(LSL_List src, int index)
971 { 978 {
972 m_LSL_Functions.llPassTouches(pass); 979 return m_LSL_Functions.llList2Float(src, index);
973 } 980 }
974 981
975 public string llRequestAgentData(string id, int data) 982 public LSL_Integer llList2Integer(LSL_List src, int index)
976 { 983 {
977 return m_LSL_Functions.llRequestAgentData(id, data); 984 return m_LSL_Functions.llList2Integer(src, index);
978 } 985 }
979 986
980 public string llRequestInventoryData(string name) 987 public LSL_Key llList2Key(LSL_List src, int index)
981 { 988 {
982 return m_LSL_Functions.llRequestInventoryData(name); 989 return m_LSL_Functions.llList2Key(src, index);
983 } 990 }
984 991
985 public void llSetDamage(double damage) 992 public LSL_List llList2List(LSL_List src, int start, int end)
986 { 993 {
987 m_LSL_Functions.llSetDamage(damage); 994 return m_LSL_Functions.llList2List(src, start, end);
988 } 995 }
989 996
990 public void llTeleportAgentHome(string agent) 997 public LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride)
991 { 998 {
992 m_LSL_Functions.llTeleportAgentHome(agent); 999 return m_LSL_Functions.llList2ListStrided(src, start, end, stride);
993 } 1000 }
994 1001
995 public void llModifyLand(int action, int brush) 1002 public LSL_Rotation llList2Rot(LSL_List src, int index)
996 { 1003 {
997 m_LSL_Functions.llModifyLand(action, brush); 1004 return m_LSL_Functions.llList2Rot(src, index);
998 } 1005 }
999 1006
1000 public void llCollisionSound(string impact_sound, double impact_volume) 1007 public LSL_String llList2String(LSL_List src, int index)
1001 { 1008 {
1002 m_LSL_Functions.llCollisionSound(impact_sound, impact_volume); 1009 return m_LSL_Functions.llList2String(src, index);
1003 } 1010 }
1004 1011
1005 public void llCollisionSprite(string impact_sprite) 1012 public LSL_Vector llList2Vector(LSL_List src, int index)
1006 { 1013 {
1007 m_LSL_Functions.llCollisionSprite(impact_sprite); 1014 return m_LSL_Functions.llList2Vector(src, index);
1008 } 1015 }
1009 1016
1010 public string llGetAnimation(string id) 1017 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
1011 { 1018 {
1012 return m_LSL_Functions.llGetAnimation(id); 1019 return m_LSL_Functions.llListen(channelID, name, ID, msg);
1013 } 1020 }
1014 1021
1015 public void llResetScript() 1022 public void llListenControl(int number, int active)
1016 { 1023 {
1017 m_LSL_Functions.llResetScript(); 1024 m_LSL_Functions.llListenControl(number, active);
1018 } 1025 }
1019 1026
1020 public void llMessageLinked(int linknum, int num, string str, string id) 1027 public void llListenRemove(int number)
1021 { 1028 {
1022 m_LSL_Functions.llMessageLinked(linknum, num, str, id); 1029 m_LSL_Functions.llListenRemove(number);
1023 } 1030 }
1024 1031
1025 public void llPushObject(string target, vector impulse, vector ang_impulse, int local) 1032 public LSL_Integer llListFindList(LSL_List src, LSL_List test)
1026 { 1033 {
1027 m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local); 1034 return m_LSL_Functions.llListFindList(src, test);
1028 } 1035 }
1029 1036
1030 public void llPassCollisions(int pass) 1037 public LSL_List llListInsertList(LSL_List dest, LSL_List src, int start)
1031 { 1038 {
1032 m_LSL_Functions.llPassCollisions(pass); 1039 return m_LSL_Functions.llListInsertList(dest, src, start);
1033 } 1040 }
1034 1041
1035 public string llGetScriptName() 1042 public LSL_List llListRandomize(LSL_List src, int stride)
1036 { 1043 {
1037 return m_LSL_Functions.llGetScriptName(); 1044 return m_LSL_Functions.llListRandomize(src, stride);
1038 } 1045 }
1039 1046
1040 public LSL_Types.LSLInteger llGetNumberOfSides() 1047 public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end)
1041 { 1048 {
1042 return m_LSL_Functions.llGetNumberOfSides(); 1049 return m_LSL_Functions.llListReplaceList(dest, src, start, end);
1043 } 1050 }
1044 1051
1045 // 1052 public LSL_List llListSort(LSL_List src, int stride, int ascending)
1046 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1047 //
1048 public rotation llAxisAngle2Rot(vector axis, double angle)
1049 { 1053 {
1050 return m_LSL_Functions.llAxisAngle2Rot(axis, angle); 1054 return m_LSL_Functions.llListSort(src, stride, ascending);
1051 } 1055 }
1052 1056
1053 public vector llRot2Axis(rotation rot) 1057 public LSL_Float llListStatistics(int operation, LSL_List src)
1054 { 1058 {
1055 return m_LSL_Functions.llRot2Axis(rot); 1059 return m_LSL_Functions.llListStatistics(operation, src);
1056 } 1060 }
1057 1061
1058 public double llRot2Angle(rotation rot) 1062 public void llLoadURL(string avatar_id, string message, string url)
1059 { 1063 {
1060 return m_LSL_Functions.llRot2Angle(rot); 1064 m_LSL_Functions.llLoadURL(avatar_id, message, url);
1061 } 1065 }
1062 1066
1063 public double llAcos(double val) 1067 public LSL_Float llLog(double val)
1064 { 1068 {
1065 return m_LSL_Functions.llAcos(val); 1069 return m_LSL_Functions.llLog(val);
1066 } 1070 }
1067 1071
1068 public double llAsin(double val) 1072 public LSL_Float llLog10(double val)
1069 { 1073 {
1070 return m_LSL_Functions.llAsin(val); 1074 return m_LSL_Functions.llLog10(val);
1071 } 1075 }
1072 1076
1073 public double llAngleBetween(rotation a, rotation b) 1077 public void llLookAt(LSL_Vector target, double strength, double damping)
1074 { 1078 {
1075 return m_LSL_Functions.llAngleBetween(a, b); 1079 m_LSL_Functions.llLookAt(target, strength, damping);
1076 } 1080 }
1077 1081
1078 public string llGetInventoryKey(string name) 1082 public void llLoopSound(string sound, double volume)
1079 { 1083 {
1080 return m_LSL_Functions.llGetInventoryKey(name); 1084 m_LSL_Functions.llLoopSound(sound, volume);
1081 } 1085 }
1082 1086
1083 public void llAllowInventoryDrop(int add) 1087 public void llLoopSoundMaster(string sound, double volume)
1084 { 1088 {
1085 m_LSL_Functions.llAllowInventoryDrop(add); 1089 m_LSL_Functions.llLoopSoundMaster(sound, volume);
1086 } 1090 }
1087 1091
1088 public vector llGetSunDirection() 1092 public void llLoopSoundSlave(string sound, double volume)
1089 { 1093 {
1090 return m_LSL_Functions.llGetSunDirection(); 1094 m_LSL_Functions.llLoopSoundSlave(sound, volume);
1091 } 1095 }
1092 1096
1093 public vector llGetTextureOffset(int face) 1097 public void llMakeExplosion()
1094 { 1098 {
1095 return m_LSL_Functions.llGetTextureOffset(face); 1099 m_LSL_Functions.llMakeExplosion();
1096 } 1100 }
1097 1101
1098 public vector llGetTextureScale(int side) 1102 public void llMakeFire()
1099 { 1103 {
1100 return m_LSL_Functions.llGetTextureScale(side); 1104 m_LSL_Functions.llMakeFire();
1101 } 1105 }
1102 1106
1103 public double llGetTextureRot(int side) 1107 public void llMakeFountain()
1104 { 1108 {
1105 return m_LSL_Functions.llGetTextureRot(side); 1109 m_LSL_Functions.llMakeFountain();
1106 } 1110 }
1107 1111
1108 public LSL_Types.LSLInteger llSubStringIndex(string source, string pattern) 1112 public void llMakeSmoke()
1109 { 1113 {
1110 return m_LSL_Functions.llSubStringIndex(source, pattern); 1114 m_LSL_Functions.llMakeSmoke();
1111 } 1115 }
1112 1116
1113 public string llGetOwnerKey(string id) 1117 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at)
1114 { 1118 {
1115 return m_LSL_Functions.llGetOwnerKey(id); 1119 m_LSL_Functions.llMapDestination(simname, pos, look_at);
1116 } 1120 }
1117 1121
1118 public vector llGetCenterOfMass() 1122 public LSL_String llMD5String(string src, int nonce)
1119 { 1123 {
1120 return m_LSL_Functions.llGetCenterOfMass(); 1124 return m_LSL_Functions.llMD5String(src, nonce);
1121 } 1125 }
1122 1126
1123 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) 1127 public void llMessageLinked(int linknum, int num, string str, string id)
1124 { 1128 {
1125 return m_LSL_Functions.llListSort(src, stride, ascending); 1129 m_LSL_Functions.llMessageLinked(linknum, num, str, id);
1126 } 1130 }
1127 1131
1128 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) 1132 public void llMinEventDelay(double delay)
1129 { 1133 {
1130 return m_LSL_Functions.llGetListLength(src); 1134 m_LSL_Functions.llMinEventDelay(delay);
1131 } 1135 }
1132 1136
1133 // 1137 public void llModifyLand(int action, int brush)
1134 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1135 //
1136 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index)
1137 { 1138 {
1138 return m_LSL_Functions.llList2Integer(src, index); 1139 m_LSL_Functions.llModifyLand(action, brush);
1139 } 1140 }
1140 1141
1141 public double osList2Double(LSL_Types.list src, int index) 1142 public LSL_Integer llModPow(int a, int b, int c)
1142 { 1143 {
1143 return m_LSL_Functions.osList2Double(src, index); 1144 return m_LSL_Functions.llModPow(a, b, c);
1144 } 1145 }
1145 1146
1146 public string llList2String(LSL_Types.list src, int index) 1147 public void llMoveToTarget(LSL_Vector target, double tau)
1147 { 1148 {
1148 return m_LSL_Functions.llList2String(src, index); 1149 m_LSL_Functions.llMoveToTarget(target, tau);
1149 } 1150 }
1150 1151
1151 public string llList2Key(LSL_Types.list src, int index) 1152 public void llOffsetTexture(double u, double v, int face)
1152 { 1153 {
1153 return m_LSL_Functions.llList2Key(src, index); 1154 m_LSL_Functions.llOffsetTexture(u, v, face);
1154 } 1155 }
1155 1156
1156 public vector llList2Vector(LSL_Types.list src, int index) 1157 public void llOpenRemoteDataChannel()
1157 { 1158 {
1158 return m_LSL_Functions.llList2Vector(src, index); 1159 m_LSL_Functions.llOpenRemoteDataChannel();
1159 } 1160 }
1160 1161
1161 public rotation llList2Rot(LSL_Types.list src, int index) 1162 public LSL_Integer llOverMyLand(string id)
1162 { 1163 {
1163 return m_LSL_Functions.llList2Rot(src, index); 1164 return m_LSL_Functions.llOverMyLand(id);
1164 } 1165 }
1165 1166
1166 public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) 1167 public void llOwnerSay(string msg)
1167 { 1168 {
1168 return m_LSL_Functions.llList2List(src, start, end); 1169 m_LSL_Functions.llOwnerSay(msg);
1169 } 1170 }
1170 1171
1171 public LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end) 1172 public void llParcelMediaCommandList(LSL_List commandList)
1172 { 1173 {
1173 return m_LSL_Functions.llDeleteSubList(src, start, end); 1174 m_LSL_Functions.llParcelMediaCommandList(commandList);
1174 } 1175 }
1175 1176
1176 public LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index) 1177 public LSL_List llParcelMediaQuery(LSL_List aList)
1177 { 1178 {
1178 return m_LSL_Functions.llGetListEntryType(src, index); 1179 return m_LSL_Functions.llParcelMediaQuery(aList);
1179 } 1180 }
1180 1181
1181 public string llList2CSV(LSL_Types.list src) 1182 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers)
1182 { 1183 {
1183 return m_LSL_Functions.llList2CSV(src); 1184 return m_LSL_Functions.llParseString2List(str, separators, spacers);
1184 } 1185 }
1185 1186
1186 public LSL_Types.list llCSV2List(string src) 1187 public LSL_List llParseStringKeepNulls(string src, LSL_List seperators, LSL_List spacers)
1187 { 1188 {
1188 return m_LSL_Functions.llCSV2List(src); 1189 return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers);
1189 } 1190 }
1190 1191
1191 public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) 1192 public void llParticleSystem(LSL_List rules)
1192 { 1193 {
1193 return m_LSL_Functions.llListRandomize(src, stride); 1194 m_LSL_Functions.llParticleSystem(rules);
1194 } 1195 }
1195 1196
1196 public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) 1197 public void llPassCollisions(int pass)
1197 { 1198 {
1198 return m_LSL_Functions.llList2ListStrided(src, start, end, stride); 1199 m_LSL_Functions.llPassCollisions(pass);
1199 } 1200 }
1200 1201
1201 public vector llGetRegionCorner() 1202 public void llPassTouches(int pass)
1202 { 1203 {
1203 return m_LSL_Functions.llGetRegionCorner(); 1204 m_LSL_Functions.llPassTouches(pass);
1204 } 1205 }
1205 1206
1206 public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start) 1207 public void llPlaySound(string sound, double volume)
1207 { 1208 {
1208 return m_LSL_Functions.llListInsertList(dest, src, start); 1209 m_LSL_Functions.llPlaySound(sound, volume);
1209 } 1210 }
1210 1211
1211 public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) 1212 public void llPlaySoundSlave(string sound, double volume)
1212 { 1213 {
1213 return m_LSL_Functions.llListFindList(src, test); 1214 m_LSL_Functions.llPlaySoundSlave(sound, volume);
1214 } 1215 }
1215 1216
1216 public string llGetObjectName() 1217 public void llPointAt()
1217 { 1218 {
1218 return m_LSL_Functions.llGetObjectName(); 1219 m_LSL_Functions.llPointAt();
1219 } 1220 }
1220 1221
1221 public void llSetObjectName(string name) 1222 public LSL_Float llPow(double fbase, double fexponent)
1222 { 1223 {
1223 m_LSL_Functions.llSetObjectName(name); 1224 return m_LSL_Functions.llPow(fbase, fexponent);
1224 } 1225 }
1225 1226
1226 public string llGetDate() 1227 public void llPreloadSound(string sound)
1227 { 1228 {
1228 return m_LSL_Functions.llGetDate(); 1229 m_LSL_Functions.llPreloadSound(sound);
1229 } 1230 }
1230 1231
1231 public LSL_Types.LSLInteger llEdgeOfWorld(vector pos, vector dir) 1232 public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local)
1232 { 1233 {
1233 return m_LSL_Functions.llEdgeOfWorld(pos, dir); 1234 m_LSL_Functions.llPushObject(target, impulse, ang_impulse, local);
1234 } 1235 }
1235 1236
1236 public LSL_Types.LSLInteger llGetAgentInfo(string id) 1237 public void llRefreshPrimURL()
1237 { 1238 {
1238 return m_LSL_Functions.llGetAgentInfo(id); 1239 m_LSL_Functions.llRefreshPrimURL();
1239 } 1240 }
1240 1241
1241 // 1242 public void llRegionSay(int channelID, string text)
1242 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1243 //
1244 public void llAdjustSoundVolume(double volume)
1245 { 1243 {
1246 m_LSL_Functions.llAdjustSoundVolume(volume); 1244 m_LSL_Functions.llRegionSay(channelID, text);
1247 } 1245 }
1248 1246
1249 public void llSetSoundQueueing(int queue) 1247 public void llReleaseCamera(string avatar)
1250 { 1248 {
1251 m_LSL_Functions.llSetSoundQueueing(queue); 1249 m_LSL_Functions.llReleaseCamera(avatar);
1252 } 1250 }
1253 1251
1254 public void llSetSoundRadius(double radius) 1252 public void llReleaseControls()
1255 { 1253 {
1256 m_LSL_Functions.llSetSoundRadius(radius); 1254 m_LSL_Functions.llReleaseControls();
1257 } 1255 }
1258 1256
1259 public string llKey2Name(string id) 1257 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata)
1260 { 1258 {
1261 return m_LSL_Functions.llKey2Name(id); 1259 m_LSL_Functions.llRemoteDataReply(channel, message_id, sdata, idata);
1262 } 1260 }
1263 1261
1264 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) 1262 public void llRemoteDataSetRegion()
1265 { 1263 {
1266 m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate); 1264 m_LSL_Functions.llRemoteDataSetRegion();
1267 } 1265 }
1268 1266
1269 public void llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west) 1267 public void llRemoteLoadScript()
1270 { 1268 {
1271 m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west); 1269 m_LSL_Functions.llRemoteLoadScript();
1272 } 1270 }
1273 1271
1274 public void llEjectFromLand(string pest) 1272 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param)
1275 { 1273 {
1276 m_LSL_Functions.llEjectFromLand(pest); 1274 m_LSL_Functions.llRemoteLoadScriptPin(target, name, pin, running, start_param);
1277 } 1275 }
1278 1276
1279 public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) 1277 public void llRemoveFromLandBanList(string avatar)
1280 { 1278 {
1281 return m_LSL_Functions.llParseString2List(str,separators,spacers); 1279 m_LSL_Functions.llRemoveFromLandBanList(avatar);
1282 } 1280 }
1283 1281
1284 public LSL_Types.LSLInteger llOverMyLand(string id) 1282 public void llRemoveFromLandPassList(string avatar)
1285 { 1283 {
1286 return m_LSL_Functions.llOverMyLand(id); 1284 m_LSL_Functions.llRemoveFromLandPassList(avatar);
1287 } 1285 }
1288 1286
1289 public string llGetLandOwnerAt(vector pos) 1287 public void llRemoveInventory(string item)
1290 { 1288 {
1291 return m_LSL_Functions.llGetLandOwnerAt(pos); 1289 m_LSL_Functions.llRemoveInventory(item);
1292 } 1290 }
1293 1291
1294 public string llGetNotecardLine(string name, int line) 1292 public void llRemoveVehicleFlags(int flags)
1295 { 1293 {
1296 return m_LSL_Functions.llGetNotecardLine(name, line); 1294 m_LSL_Functions.llRemoveVehicleFlags(flags);
1297 } 1295 }
1298 1296
1299 public vector llGetAgentSize(string id) 1297 public LSL_Key llRequestAgentData(string id, int data)
1300 { 1298 {
1301 return m_LSL_Functions.llGetAgentSize(id); 1299 return m_LSL_Functions.llRequestAgentData(id, data);
1302 } 1300 }
1303 1301
1304 public LSL_Types.LSLInteger llSameGroup(string agent) 1302 public LSL_Key llRequestInventoryData(string name)
1305 { 1303 {
1306 return m_LSL_Functions.llSameGroup(agent); 1304 return m_LSL_Functions.llRequestInventoryData(name);
1307 } 1305 }
1308 1306
1309 public void llUnSit(string id) 1307 public void llRequestPermissions(string agent, int perm)
1310 { 1308 {
1311 m_LSL_Functions.llUnSit(id); 1309 m_LSL_Functions.llRequestPermissions(agent, perm);
1312 } 1310 }
1313 1311
1314 public vector llGroundSlope(vector offset) 1312 public LSL_Key llRequestSimulatorData(string simulator, int data)
1315 { 1313 {
1316 return m_LSL_Functions.llGroundSlope(offset); 1314 return m_LSL_Functions.llRequestSimulatorData(simulator, data);
1317 } 1315 }
1318 1316
1319 public vector llGroundNormal(vector offset) 1317 public void llResetLandBanList()
1320 { 1318 {
1321 return m_LSL_Functions.llGroundNormal(offset); 1319 m_LSL_Functions.llResetLandBanList();
1322 } 1320 }
1323 1321
1324 public vector llGroundContour(vector offset) 1322 public void llResetLandPassList()
1325 { 1323 {
1326 return m_LSL_Functions.llGroundContour(offset); 1324 m_LSL_Functions.llResetLandPassList();
1327 } 1325 }
1328 1326
1329 public LSL_Types.LSLInteger llGetAttached() 1327 public void llResetOtherScript(string name)
1330 { 1328 {
1331 return m_LSL_Functions.llGetAttached(); 1329 m_LSL_Functions.llResetOtherScript(name);
1332 } 1330 }
1333 1331
1334 public LSL_Types.LSLInteger llGetFreeMemory() 1332 public void llResetScript()
1335 { 1333 {
1336 return m_LSL_Functions.llGetFreeMemory(); 1334 m_LSL_Functions.llResetScript();
1337 } 1335 }
1338 1336
1339 public string llGetRegionName() 1337 public void llResetTime()
1340 { 1338 {
1341 return m_LSL_Functions.llGetRegionName(); 1339 m_LSL_Functions.llResetTime();
1342 } 1340 }
1343 1341
1344 public double llGetRegionTimeDilation() 1342 public void llRezAtRoot(string inventory, LSL_Vector position, LSL_Vector velocity, LSL_Rotation rot, int param)
1345 { 1343 {
1346 return m_LSL_Functions.llGetRegionTimeDilation(); 1344 m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param);
1347 } 1345 }
1348 1346
1349 public double llGetRegionFPS() 1347 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
1350 { 1348 {
1351 return m_LSL_Functions.llGetRegionFPS(); 1349 m_LSL_Functions.llRezObject(inventory, pos, vel, rot, param);
1352 } 1350 }
1353 1351
1354 // 1352 public LSL_Float llRot2Angle(LSL_Rotation rot)
1355 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1356 //
1357 public void llParticleSystem(LSL_Types.list rules)
1358 { 1353 {
1359 m_LSL_Functions.llParticleSystem(rules); 1354 return m_LSL_Functions.llRot2Angle(rot);
1360 } 1355 }
1361 1356
1362 public void llGroundRepel(double height, int water, double tau) 1357 public LSL_Vector llRot2Axis(LSL_Rotation rot)
1363 { 1358 {
1364 m_LSL_Functions.llGroundRepel(height, water, tau); 1359 return m_LSL_Functions.llRot2Axis(rot);
1365 } 1360 }
1366 1361
1367 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 1362 public LSL_Vector llRot2Euler(LSL_Rotation r)
1368 { 1363 {
1369 m_LSL_Functions.llGiveInventoryList(destination, category, inventory); 1364 return m_LSL_Functions.llRot2Euler(r);
1370 } 1365 }
1371 1366
1372 public void llSetVehicleType(int type) 1367 public LSL_Vector llRot2Fwd(LSL_Rotation r)
1373 { 1368 {
1374 m_LSL_Functions.llSetVehicleType(type); 1369 return m_LSL_Functions.llRot2Fwd(r);
1375 } 1370 }
1376 1371
1377 public void llSetVehicledoubleParam(int param, double value) 1372 public LSL_Vector llRot2Left(LSL_Rotation r)
1378 { 1373 {
1379 m_LSL_Functions.llSetVehicledoubleParam(param, value); 1374 return m_LSL_Functions.llRot2Left(r);
1380 } 1375 }
1381 1376
1382 public void llSetVehicleFloatParam(int param, float value) 1377 public LSL_Vector llRot2Up(LSL_Rotation r)
1383 { 1378 {
1384 m_LSL_Functions.llSetVehicleFloatParam(param, value); 1379 return m_LSL_Functions.llRot2Up(r);
1385 } 1380 }
1386 1381
1387 public void llSetVehicleVectorParam(int param, vector vec) 1382 public void llRotateTexture(double rotation, int face)
1388 { 1383 {
1389 m_LSL_Functions.llSetVehicleVectorParam(param, vec); 1384 m_LSL_Functions.llRotateTexture(rotation, face);
1390 } 1385 }
1391 1386
1392 public void llSetVehicleRotationParam(int param, rotation rot) 1387 public LSL_Rotation llRotBetween(LSL_Vector start, LSL_Vector end)
1393 { 1388 {
1394 m_LSL_Functions.llSetVehicleRotationParam(param, rot); 1389 return m_LSL_Functions.llRotBetween(start, end);
1395 } 1390 }
1396 1391
1397 public void llSetVehicleFlags(int flags) 1392 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
1398 { 1393 {
1399 m_LSL_Functions.llSetVehicleFlags(flags); 1394 m_LSL_Functions.llRotLookAt(target, strength, damping);
1400 } 1395 }
1401 1396
1402 public void llRemoveVehicleFlags(int flags) 1397 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
1403 { 1398 {
1404 m_LSL_Functions.llRemoveVehicleFlags(flags); 1399 return m_LSL_Functions.llRotTarget(rot, error);
1405 } 1400 }
1406 1401
1407 public void llSitTarget(vector offset, rotation rot) 1402 public void llRotTargetRemove(int number)
1408 { 1403 {
1409 m_LSL_Functions.llSitTarget(offset, rot); 1404 m_LSL_Functions.llRotTargetRemove(number);
1410 } 1405 }
1411 1406
1412 public string llAvatarOnSitTarget() 1407 public LSL_Integer llRound(double f)
1413 { 1408 {
1414 return m_LSL_Functions.llAvatarOnSitTarget(); 1409 return m_LSL_Functions.llRound(f);
1415 } 1410 }
1416 1411
1417 public void llAddToLandPassList(string avatar, double hours) 1412 public LSL_Integer llSameGroup(string agent)
1418 { 1413 {
1419 m_LSL_Functions.llAddToLandPassList(avatar, hours); 1414 return m_LSL_Functions.llSameGroup(agent);
1420 } 1415 }
1421 1416
1422 public void llSetTouchText(string text) 1417 public void llSay(int channelID, string text)
1423 { 1418 {
1424 m_LSL_Functions.llSetTouchText(text); 1419 m_LSL_Functions.llSay(channelID, text);
1425 } 1420 }
1426 1421
1427 public void llSetSitText(string text) 1422 public void llScaleTexture(double u, double v, int face)
1428 { 1423 {
1429 m_LSL_Functions.llSetSitText(text); 1424 m_LSL_Functions.llScaleTexture(u, v, face);
1430 } 1425 }
1431 1426
1432 public void llSetCameraEyeOffset(vector offset) 1427 public LSL_Integer llScriptDanger(LSL_Vector pos)
1433 { 1428 {
1434 m_LSL_Functions.llSetCameraEyeOffset(offset); 1429 return m_LSL_Functions.llScriptDanger(pos);
1435 } 1430 }
1436 1431
1437 public void llSetCameraAtOffset(vector offset) 1432 public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata)
1438 { 1433 {
1439 m_LSL_Functions.llSetCameraAtOffset(offset); 1434 return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata);
1440 } 1435 }
1441 1436
1442 public string llDumpList2String(LSL_Types.list src, string seperator) 1437 public void llSensor(string name, string id, int type, double range, double arc)
1443 { 1438 {
1444 return m_LSL_Functions.llDumpList2String(src, seperator); 1439 m_LSL_Functions.llSensor(name, id, type, range, arc);
1445 } 1440 }
1446 1441
1447 public LSL_Types.LSLInteger llScriptDanger(vector pos) 1442 public void llSensorRemove()
1448 { 1443 {
1449 return m_LSL_Functions.llScriptDanger(pos); 1444 m_LSL_Functions.llSensorRemove();
1450 } 1445 }
1451 1446
1452 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 1447 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
1453 { 1448 {
1454 m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); 1449 m_LSL_Functions.llSensorRepeat(name, id, type, range, arc, rate);
1455 } 1450 }
1456 1451
1457 public void llVolumeDetect(int detect) 1452 public void llSetAlpha(double alpha, int face)
1458 { 1453 {
1459 m_LSL_Functions.llVolumeDetect(detect); 1454 m_LSL_Functions.llSetAlpha(alpha, face);
1460 } 1455 }
1461 1456
1462 public void llResetOtherScript(string name) 1457 public void llSetBuoyancy(double buoyancy)
1463 { 1458 {
1464 m_LSL_Functions.llResetOtherScript(name); 1459 m_LSL_Functions.llSetBuoyancy(buoyancy);
1465 } 1460 }
1466 1461
1467 public LSL_Types.LSLInteger llGetScriptState(string name) 1462 public void llSetCameraAtOffset(LSL_Vector offset)
1468 { 1463 {
1469 return m_LSL_Functions.llGetScriptState(name); 1464 m_LSL_Functions.llSetCameraAtOffset(offset);
1470 } 1465 }
1471 1466
1472 public void llRemoteLoadScript() 1467 public void llSetCameraEyeOffset(LSL_Vector offset)
1473 { 1468 {
1474 m_LSL_Functions.llRemoteLoadScript(); 1469 m_LSL_Functions.llSetCameraEyeOffset(offset);
1475 } 1470 }
1476 1471
1477 public void llSetRemoteScriptAccessPin(int pin) 1472 public void llSetCameraParams(LSL_List rules)
1478 { 1473 {
1479 m_LSL_Functions.llSetRemoteScriptAccessPin(pin); 1474 m_LSL_Functions.llSetCameraParams(rules);
1480 } 1475 }
1481 1476
1482 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) 1477 public void llSetClickAction(int action)
1483 { 1478 {
1484 m_LSL_Functions.llRemoteLoadScriptPin(target, name, pin, running, start_param); 1479 m_LSL_Functions.llSetClickAction(action);
1485 } 1480 }
1486 1481
1487 // 1482 public void llSetColor(LSL_Vector color, int face)
1488 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1489 //
1490 public void llOpenRemoteDataChannel()
1491 { 1483 {
1492 m_LSL_Functions.llOpenRemoteDataChannel(); 1484 m_LSL_Functions.llSetColor(color, face);
1493 } 1485 }
1494 1486
1495 public string llSendRemoteData(string channel, string dest, int idata, string sdata) 1487 public void llSetDamage(double damage)
1496 { 1488 {
1497 return m_LSL_Functions.llSendRemoteData(channel, dest, idata, sdata); 1489 m_LSL_Functions.llSetDamage(damage);
1498 } 1490 }
1499 1491
1500 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) 1492 public void llSetForce(LSL_Vector force, int local)
1501 { 1493 {
1502 m_LSL_Functions.llRemoteDataReply(channel, message_id, sdata, idata); 1494 m_LSL_Functions.llSetForce(force, local);
1503 } 1495 }
1504 1496
1505 public void llCloseRemoteDataChannel(string channel) 1497 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local)
1506 { 1498 {
1507 m_LSL_Functions.llCloseRemoteDataChannel(channel); 1499 m_LSL_Functions.llSetForceAndTorque(force, torque, local);
1508 } 1500 }
1509 1501
1510 public string llMD5String(string src, int nonce) 1502 public void llSetHoverHeight(double height, int water, double tau)
1511 { 1503 {
1512 return m_LSL_Functions.llMD5String(src, nonce); 1504 m_LSL_Functions.llSetHoverHeight(height, water, tau);
1513 } 1505 }
1514 1506
1515 public void llSetPrimitiveParams(LSL_Types.list rules) 1507 public void llSetInventoryPermMask(string item, int mask, int value)
1516 { 1508 {
1517 m_LSL_Functions.llSetPrimitiveParams(rules); 1509 m_LSL_Functions.llSetInventoryPermMask(item, mask, value);
1518 } 1510 }
1519 1511
1520 public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) 1512 public void llSetLinkAlpha(int linknumber, double alpha, int face)
1521 { 1513 {
1522 m_LSL_Functions.llSetLinkPrimitiveParams(linknumber, rules); 1514 m_LSL_Functions.llSetLinkAlpha(linknumber, alpha, face);
1523 } 1515 }
1524 public string llStringToBase64(string str) 1516
1517 public void llSetLinkColor(int linknumber, LSL_Vector color, int face)
1525 { 1518 {
1526 return m_LSL_Functions.llStringToBase64(str); 1519 m_LSL_Functions.llSetLinkColor(linknumber, color, face);
1527 } 1520 }
1528 1521
1529 public string llBase64ToString(string str) 1522 public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
1530 { 1523 {
1531 return m_LSL_Functions.llBase64ToString(str); 1524 m_LSL_Functions.llSetLinkPrimitiveParams(linknumber, rules);
1532 } 1525 }
1533 1526
1534 public void llXorBase64Strings() 1527 public void llSetLinkTexture(int linknumber, string texture, int face)
1535 { 1528 {
1536 m_LSL_Functions.llXorBase64Strings(); 1529 m_LSL_Functions.llSetLinkTexture(linknumber, texture, face);
1537 } 1530 }
1538 1531
1539 public void llRemoteDataSetRegion() 1532 public void llSetLocalRot(LSL_Rotation rot)
1540 { 1533 {
1541 m_LSL_Functions.llRemoteDataSetRegion(); 1534 m_LSL_Functions.llSetLocalRot(rot);
1542 } 1535 }
1543 1536
1544 public double llLog10(double val) 1537 public void llSetObjectDesc(string desc)
1545 { 1538 {
1546 return m_LSL_Functions.llLog10(val); 1539 m_LSL_Functions.llSetObjectDesc(desc);
1547 } 1540 }
1548 1541
1549 public double llLog(double val) 1542 public void llSetObjectName(string name)
1550 { 1543 {
1551 return m_LSL_Functions.llLog(val); 1544 m_LSL_Functions.llSetObjectName(name);
1552 } 1545 }
1553 1546
1554 public LSL_Types.list llGetAnimationList(string id) 1547 public void llSetObjectPermMask(int mask, int value)
1555 { 1548 {
1556 return m_LSL_Functions.llGetAnimationList(id); 1549 m_LSL_Functions.llSetObjectPermMask(mask, value);
1557 } 1550 }
1558 1551
1559 public void llSetParcelMusicURL(string url) 1552 public void llSetParcelMusicURL(string url)
@@ -1561,323 +1554,324 @@ namespace OpenSim.Region.ScriptEngine.Common
1561 m_LSL_Functions.llSetParcelMusicURL(url); 1554 m_LSL_Functions.llSetParcelMusicURL(url);
1562 } 1555 }
1563 1556
1564 public vector llGetRootPosition() 1557 public void llSetPayPrice(int price, LSL_List quick_pay_buttons)
1565 { 1558 {
1566 return m_LSL_Functions.llGetRootPosition(); 1559 m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons);
1567 } 1560 }
1568 1561
1569 public rotation llGetRootRotation() 1562 public void llSetPos(LSL_Vector pos)
1570 { 1563 {
1571 return m_LSL_Functions.llGetRootRotation(); 1564 m_LSL_Functions.llSetPos(pos);
1572 } 1565 }
1573 1566
1574 public string llGetObjectDesc() 1567 public void llSetPrimitiveParams(LSL_List rules)
1575 { 1568 {
1576 return m_LSL_Functions.llGetObjectDesc(); 1569 m_LSL_Functions.llSetPrimitiveParams(rules);
1577 } 1570 }
1578 1571
1579 public void llSetObjectDesc(string desc) 1572 public void llSetPrimURL()
1580 { 1573 {
1581 m_LSL_Functions.llSetObjectDesc(desc); 1574 m_LSL_Functions.llSetPrimURL();
1582 } 1575 }
1583 1576
1584 public string llGetCreator() 1577 public void llSetRemoteScriptAccessPin(int pin)
1585 { 1578 {
1586 return m_LSL_Functions.llGetCreator(); 1579 m_LSL_Functions.llSetRemoteScriptAccessPin(pin);
1587 } 1580 }
1588 1581
1589 public string llGetTimestamp() 1582 public void llSetRot(LSL_Rotation rot)
1590 { 1583 {
1591 return m_LSL_Functions.llGetTimestamp(); 1584 m_LSL_Functions.llSetRot(rot);
1592 } 1585 }
1593 1586
1594 public void llSetLinkAlpha(int linknumber, double alpha, int face) 1587 public void llSetScale(LSL_Vector scale)
1595 { 1588 {
1596 m_LSL_Functions.llSetLinkAlpha(linknumber, alpha, face); 1589 m_LSL_Functions.llSetScale(scale);
1597 } 1590 }
1598 1591
1599 public LSL_Types.LSLInteger llGetNumberOfPrims() 1592 public void llSetScriptState(string name, int run)
1600 { 1593 {
1601 return m_LSL_Functions.llGetNumberOfPrims(); 1594 m_LSL_Functions.llSetScriptState(name, run);
1602 } 1595 }
1603 1596
1604 public string llGetNumberOfNotecardLines(string name) 1597 public void llSetSitText(string text)
1605 { 1598 {
1606 return m_LSL_Functions.llGetNumberOfNotecardLines(name); 1599 m_LSL_Functions.llSetSitText(text);
1607 } 1600 }
1608 1601
1609 public LSL_Types.list llGetBoundingBox(string obj) 1602 public void llSetSoundQueueing(int queue)
1610 { 1603 {
1611 return m_LSL_Functions.llGetBoundingBox(obj); 1604 m_LSL_Functions.llSetSoundQueueing(queue);
1612 } 1605 }
1613 1606
1614 public vector llGetGeometricCenter() 1607 public void llSetSoundRadius(double radius)
1615 { 1608 {
1616 return m_LSL_Functions.llGetGeometricCenter(); 1609 m_LSL_Functions.llSetSoundRadius(radius);
1617 } 1610 }
1618 1611
1619 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) 1612 public void llSetStatus(int status, int value)
1620 { 1613 {
1621 return m_LSL_Functions.llGetPrimitiveParams(rules); 1614 m_LSL_Functions.llSetStatus(status, value);
1622 } 1615 }
1623 1616
1624 // 1617 public void llSetText(string text, LSL_Vector color, double alpha)
1625 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1626 //
1627 public string llIntegerToBase64(int number)
1628 { 1618 {
1629 return m_LSL_Functions.llIntegerToBase64(number); 1619 m_LSL_Functions.llSetText(text, color, alpha);
1630 } 1620 }
1631 1621
1632 public LSL_Types.LSLInteger llBase64ToInteger(string str) 1622 public void llSetTexture(string texture, int face)
1633 { 1623 {
1634 return m_LSL_Functions.llBase64ToInteger(str); 1624 m_LSL_Functions.llSetTexture(texture, face);
1635 } 1625 }
1636 1626
1637 public double llGetGMTclock() 1627 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
1638 { 1628 {
1639 return m_LSL_Functions.llGetGMTclock(); 1629 m_LSL_Functions.llSetTextureAnim(mode, face, sizex, sizey, start, length, rate);
1640 } 1630 }
1641 1631
1642 public string llGetSimulatorHostname() 1632 public void llSetTimerEvent(double sec)
1643 { 1633 {
1644 return m_LSL_Functions.llGetSimulatorHostname(); 1634 m_LSL_Functions.llSetTimerEvent(sec);
1645 } 1635 }
1646 1636
1647 public void llSetLocalRot(rotation rot) 1637 public void llSetTorque(LSL_Vector torque, int local)
1648 { 1638 {
1649 m_LSL_Functions.llSetLocalRot(rot); 1639 m_LSL_Functions.llSetTorque(torque, local);
1650 } 1640 }
1651 1641
1652 public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers) 1642 public void llSetTouchText(string text)
1653 { 1643 {
1654 return m_LSL_Functions.llParseStringKeepNulls(src, seperators, spacers); 1644 m_LSL_Functions.llSetTouchText(text);
1655 } 1645 }
1656 1646
1657 public void llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, int param) 1647 public void llSetVehicleFlags(int flags)
1658 { 1648 {
1659 m_LSL_Functions.llRezAtRoot(inventory, position, velocity, rot, param); 1649 m_LSL_Functions.llSetVehicleFlags(flags);
1660 } 1650 }
1661 1651
1662 public LSL_Types.LSLInteger llGetObjectPermMask(int mask) 1652 public void llSetVehicleFloatParam(int param, float value)
1663 { 1653 {
1664 return m_LSL_Functions.llGetObjectPermMask(mask); 1654 m_LSL_Functions.llSetVehicleFloatParam(param, value);
1665 } 1655 }
1666 1656
1667 public void llSetObjectPermMask(int mask, int value) 1657 public void llSetVehicleRotationParam(int param, LSL_Rotation rot)
1668 { 1658 {
1669 m_LSL_Functions.llSetObjectPermMask(mask, value); 1659 m_LSL_Functions.llSetVehicleRotationParam(param, rot);
1670 } 1660 }
1671 1661
1672 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 1662 public void llSetVehicleType(int type)
1673 { 1663 {
1674 return m_LSL_Functions.llGetInventoryPermMask(item, mask); 1664 m_LSL_Functions.llSetVehicleType(type);
1675 } 1665 }
1676 1666
1677 public void llSetInventoryPermMask(string item, int mask, int value) 1667 public void llSetVehicleVectorParam(int param, LSL_Vector vec)
1678 { 1668 {
1679 m_LSL_Functions.llSetInventoryPermMask(item, mask, value); 1669 m_LSL_Functions.llSetVehicleVectorParam(param, vec);
1680 } 1670 }
1681 1671
1682 public string llGetInventoryCreator(string item) 1672 public void llShout(int channelID, string text)
1683 { 1673 {
1684 return m_LSL_Functions.llGetInventoryCreator(item); 1674 m_LSL_Functions.llShout(channelID, text);
1685 } 1675 }
1686 1676
1687 public string llRequestSimulatorData(string simulator, int data) 1677 public LSL_Float llSin(double f)
1688 { 1678 {
1689 return m_LSL_Functions.llRequestSimulatorData(simulator, data); 1679 return m_LSL_Functions.llSin(f);
1690 } 1680 }
1691 1681
1692 public void llForceMouselook(int mouselook) 1682 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
1693 { 1683 {
1694 m_LSL_Functions.llForceMouselook(mouselook); 1684 m_LSL_Functions.llSitTarget(offset, rot);
1695 } 1685 }
1696 1686
1697 public double llGetObjectMass(string id) 1687 public void llSleep(double sec)
1698 { 1688 {
1699 return m_LSL_Functions.llGetObjectMass(id); 1689 m_LSL_Functions.llSleep(sec);
1700 } 1690 }
1701 1691
1702 public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) 1692 public void llSound()
1703 { 1693 {
1704 return m_LSL_Functions.llListReplaceList(dest, src, start, end); 1694 m_LSL_Functions.llSound();
1705 } 1695 }
1706 1696
1707 public void llLoadURL(string avatar_id, string message, string url) 1697 public void llSoundPreload()
1708 { 1698 {
1709 m_LSL_Functions.llLoadURL(avatar_id, message, url); 1699 m_LSL_Functions.llSoundPreload();
1710 } 1700 }
1711 1701
1712 public void llParcelMediaCommandList(LSL_Types.list commandList) 1702 public LSL_Float llSqrt(double f)
1713 { 1703 {
1714 m_LSL_Functions.llParcelMediaCommandList(commandList); 1704 return m_LSL_Functions.llSqrt(f);
1715 } 1705 }
1716 1706
1717 public LSL_Types.list llParcelMediaQuery(LSL_Types.list aList) 1707 public void llStartAnimation(string anim)
1718 { 1708 {
1719 return m_LSL_Functions.llParcelMediaQuery(aList); 1709 m_LSL_Functions.llStartAnimation(anim);
1720 } 1710 }
1721 1711
1722 public LSL_Types.LSLInteger llModPow(int a, int b, int c) 1712 public void llStopAnimation(string anim)
1723 { 1713 {
1724 return m_LSL_Functions.llModPow(a, b, c); 1714 m_LSL_Functions.llStopAnimation(anim);
1725 } 1715 }
1726 1716
1727 // 1717 public void llStopHover()
1728 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1729 //
1730 public LSL_Types.LSLInteger llGetInventoryType(string name)
1731 { 1718 {
1732 return m_LSL_Functions.llGetInventoryType(name); 1719 m_LSL_Functions.llStopHover();
1733 } 1720 }
1734 1721
1735 public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) 1722 public void llStopLookAt()
1736 { 1723 {
1737 m_LSL_Functions.llSetPayPrice(price, quick_pay_buttons); 1724 m_LSL_Functions.llStopLookAt();
1738 } 1725 }
1739 1726
1740 public vector llGetCameraPos() 1727 public void llStopMoveToTarget()
1741 { 1728 {
1742 return m_LSL_Functions.llGetCameraPos(); 1729 m_LSL_Functions.llStopMoveToTarget();
1743 } 1730 }
1744 1731
1745 public rotation llGetCameraRot() 1732 public void llStopPointAt()
1746 { 1733 {
1747 return m_LSL_Functions.llGetCameraRot(); 1734 m_LSL_Functions.llStopPointAt();
1748 } 1735 }
1749 1736
1750 public void llSetPrimURL() 1737 public void llStopSound()
1751 { 1738 {
1752 m_LSL_Functions.llSetPrimURL(); 1739 m_LSL_Functions.llStopSound();
1753 } 1740 }
1754 1741
1755 public void llRefreshPrimURL() 1742 public LSL_Integer llStringLength(string str)
1756 { 1743 {
1757 m_LSL_Functions.llRefreshPrimURL(); 1744 return m_LSL_Functions.llStringLength(str);
1758 } 1745 }
1759 1746
1760 public string llEscapeURL(string url) 1747 public LSL_String llStringToBase64(string str)
1761 { 1748 {
1762 return m_LSL_Functions.llEscapeURL(url); 1749 return m_LSL_Functions.llStringToBase64(str);
1763 } 1750 }
1764 1751
1765 public string llUnescapeURL(string url) 1752 public LSL_String llStringTrim(string src, int type)
1766 { 1753 {
1767 return m_LSL_Functions.llUnescapeURL(url); 1754 return m_LSL_Functions.llStringTrim(src, type);
1768 } 1755 }
1769 1756
1770 public void llMapDestination(string simname, vector pos, vector look_at) 1757 public LSL_Integer llSubStringIndex(string source, string pattern)
1771 { 1758 {
1772 m_LSL_Functions.llMapDestination(simname, pos, look_at); 1759 return m_LSL_Functions.llSubStringIndex(source, pattern);
1773 } 1760 }
1774 1761
1775 public void llAddToLandBanList(string avatar, double hours) 1762 public void llTakeCamera(string avatar)
1776 { 1763 {
1777 m_LSL_Functions.llAddToLandBanList(avatar, hours); 1764 m_LSL_Functions.llTakeCamera(avatar);
1778 } 1765 }
1779 1766
1780 public void llRemoveFromLandPassList(string avatar) 1767 public void llTakeControls(int controls, int accept, int pass_on)
1781 { 1768 {
1782 m_LSL_Functions.llRemoveFromLandPassList(avatar); 1769 m_LSL_Functions.llTakeControls(controls, accept, pass_on);
1783 } 1770 }
1784 1771
1785 public void llRemoveFromLandBanList(string avatar) 1772 public LSL_Float llTan(double f)
1786 { 1773 {
1787 m_LSL_Functions.llRemoveFromLandBanList(avatar); 1774 return m_LSL_Functions.llTan(f);
1788 } 1775 }
1789 1776
1790 public void llSetCameraParams(LSL_Types.list rules) 1777 public LSL_Integer llTarget(LSL_Vector position, double range)
1791 { 1778 {
1792 m_LSL_Functions.llSetCameraParams(rules); 1779 return m_LSL_Functions.llTarget(position, range);
1793 } 1780 }
1794 1781
1795 public void llClearCameraParams() 1782 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
1796 { 1783 {
1797 m_LSL_Functions.llClearCameraParams(); 1784 m_LSL_Functions.llTargetOmega(axis, spinrate, gain);
1798 } 1785 }
1799 1786
1800 public double llListStatistics(int operation, LSL_Types.list src) 1787 public void llTargetRemove(int number)
1801 { 1788 {
1802 return m_LSL_Functions.llListStatistics(operation, src); 1789 m_LSL_Functions.llTargetRemove(number);
1803 } 1790 }
1804 1791
1805 public LSL_Types.LSLInteger llGetUnixTime() 1792 public void llTeleportAgentHome(string agent)
1806 { 1793 {
1807 return m_LSL_Functions.llGetUnixTime(); 1794 m_LSL_Functions.llTeleportAgentHome(agent);
1808 } 1795 }
1809 1796
1810 public LSL_Types.LSLInteger llGetParcelFlags(vector pos) 1797 public void llTextBox(string avatar, string message, int chat_channel)
1811 { 1798 {
1812 return m_LSL_Functions.llGetParcelFlags(pos); 1799 m_LSL_Functions.llTextBox(avatar, message, chat_channel);
1813 } 1800 }
1814 1801
1815 public LSL_Types.LSLInteger llGetRegionFlags() 1802 public LSL_String llToLower(string source)
1816 { 1803 {
1817 return m_LSL_Functions.llGetRegionFlags(); 1804 return m_LSL_Functions.llToLower(source);
1818 } 1805 }
1819 1806
1820 public string llXorBase64StringsCorrect(string str1, string str2) 1807 public LSL_String llToUpper(string source)
1821 { 1808 {
1822 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2); 1809 return m_LSL_Functions.llToUpper(source);
1823 } 1810 }
1824 1811
1825 public string llHTTPRequest(string url, LSL_Types.list parameters, string body) 1812 public void llTriggerSound(string sound, double volume)
1826 { 1813 {
1827 return m_LSL_Functions.llHTTPRequest(url, parameters, body); 1814 m_LSL_Functions.llTriggerSound(sound, volume);
1828 } 1815 }
1829 1816
1830 public void llResetLandBanList() 1817 public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west)
1831 { 1818 {
1832 m_LSL_Functions.llResetLandBanList(); 1819 m_LSL_Functions.llTriggerSoundLimited(sound, volume, top_north_east, bottom_south_west);
1833 } 1820 }
1834 1821
1835 public void llResetLandPassList() 1822 public LSL_String llUnescapeURL(string url)
1836 { 1823 {
1837 m_LSL_Functions.llResetLandPassList(); 1824 return m_LSL_Functions.llUnescapeURL(url);
1838 } 1825 }
1839 1826
1840 public LSL_Types.LSLInteger llGetParcelPrimCount(vector pos, int category, int sim_wide) 1827 public void llUnSit(string id)
1841 { 1828 {
1842 return m_LSL_Functions.llGetParcelPrimCount(pos, category, sim_wide); 1829 m_LSL_Functions.llUnSit(id);
1843 } 1830 }
1844 1831
1845 public LSL_Types.list llGetParcelPrimOwners(vector pos) 1832 public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)
1846 { 1833 {
1847 return m_LSL_Functions.llGetParcelPrimOwners(pos); 1834 return m_LSL_Functions.llVecDist(a, b);
1848 } 1835 }
1849 1836
1850 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 1837 public LSL_Float llVecMag(LSL_Vector v)
1851 { 1838 {
1852 return m_LSL_Functions.llGetObjectPrimCount(object_id); 1839 return m_LSL_Functions.llVecMag(v);
1853 } 1840 }
1854 1841
1855 // 1842 public LSL_Vector llVecNorm(LSL_Vector v)
1856 // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
1857 //
1858 public LSL_Types.LSLInteger llGetParcelMaxPrims(vector pos, int sim_wide)
1859 { 1843 {
1860 return m_LSL_Functions.llGetParcelMaxPrims(pos, sim_wide); 1844 return m_LSL_Functions.llVecNorm(v);
1861 } 1845 }
1862 1846
1863 public LSL_Types.list llGetParcelDetails(vector pos, LSL_Types.list param) 1847 public void llVolumeDetect(int detect)
1864 { 1848 {
1865 return m_LSL_Functions.llGetParcelDetails(pos, param); 1849 m_LSL_Functions.llVolumeDetect(detect);
1866 } 1850 }
1867 1851
1868 public void llSetLinkTexture(int linknumber, string texture, int face) 1852 public LSL_Float llWater(LSL_Vector offset)
1869 { 1853 {
1870 m_LSL_Functions.llSetLinkTexture(linknumber, texture, face); 1854 return m_LSL_Functions.llWater(offset);
1871 } 1855 }
1872 1856
1873 public string llStringTrim(string src, int type) 1857 public void llWhisper(int channelID, string text)
1874 { 1858 {
1875 return m_LSL_Functions.llStringTrim(src, type); 1859 m_LSL_Functions.llWhisper(channelID, text);
1876 } 1860 }
1877 1861
1878 public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) 1862 public LSL_Vector llWind(LSL_Vector offset)
1879 { 1863 {
1880 return m_LSL_Functions.llGetObjectDetails(id, args); 1864 return m_LSL_Functions.llWind(offset);
1865 }
1866
1867 public void llXorBase64Strings()
1868 {
1869 m_LSL_Functions.llXorBase64Strings();
1870 }
1871
1872 public LSL_String llXorBase64StringsCorrect(string str1, string str2)
1873 {
1874 return m_LSL_Functions.llXorBase64StringsCorrect(str1, str2);
1881 } 1875 }
1882 1876
1883 // 1877 //
@@ -1944,12 +1938,12 @@ namespace OpenSim.Region.ScriptEngine.Common
1944 1938
1945 // Teleport Functions 1939 // Teleport Functions
1946 1940
1947 public void osTeleportAgent(string agent, string regionName, vector position, vector lookat) 1941 public void osTeleportAgent(string agent, string regionName, LSL_Vector position, LSL_Vector lookat)
1948 { 1942 {
1949 m_LSL_Functions.osTeleportAgent(agent, regionName, position, lookat); 1943 m_LSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
1950 } 1944 }
1951 1945
1952 public void osTeleportAgent(string agent, vector position, vector lookat) 1946 public void osTeleportAgent(string agent, LSL_Vector position, LSL_Vector lookat)
1953 { 1947 {
1954 m_LSL_Functions.osTeleportAgent(agent, position, lookat); 1948 m_LSL_Functions.osTeleportAgent(agent, position, lookat);
1955 } 1949 }
@@ -2039,14 +2033,6 @@ namespace OpenSim.Region.ScriptEngine.Common
2039 return m_LSL_Functions.osGetScriptEngineName(); 2033 return m_LSL_Functions.osGetScriptEngineName();
2040 } 2034 }
2041 2035
2042 //
2043
2044 public double llList2Float(LSL_Types.list src, int index)
2045 {
2046 return m_LSL_Functions.llList2Float(src, index);
2047 }
2048
2049
2050 public System.Collections.Hashtable osParseJSON(string JSON) 2036 public System.Collections.Hashtable osParseJSON(string JSON)
2051 { 2037 {
2052 return m_LSL_Functions.osParseJSON(JSON); 2038 return m_LSL_Functions.osParseJSON(JSON);
@@ -2471,8 +2457,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2471 public const int OBJECT_CREATOR = 8; 2457 public const int OBJECT_CREATOR = 8;
2472 2458
2473 // Can not be public const? 2459 // Can not be public const?
2474 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); 2460 public static readonly LSL_Vector ZERO_VECTOR = new LSL_Vector(0f, 0f, 0f);
2475 public static readonly rotation ZERO_ROTATION = new rotation(0.0, 0, 0.0, 1.0); 2461 public static readonly LSL_Rotation ZERO_ROTATION = new LSL_Rotation(0f, 0f, 0f, 1f);
2476 2462
2477 // constants for llSetCameraParams 2463 // constants for llSetCameraParams
2478 public const int CAMERA_PITCH = 0; 2464 public const int CAMERA_PITCH = 0;
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 90cd3b1..1017fd8 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -45,7 +45,13 @@ using OpenSim.Region.Environment.Scenes;
45using OpenSim.Region.Physics.Manager; 45using OpenSim.Region.Physics.Manager;
46using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; 46using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
47 47
48//using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; 48using LSL_Float = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLFloat;
49using LSL_Integer = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLInteger;
50using LSL_Key = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
51using LSL_List = OpenSim.Region.ScriptEngine.Common.LSL_Types.list;
52using LSL_Rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion;
53using LSL_String = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
54using LSL_Vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3;
49 55
50namespace OpenSim.Region.ScriptEngine.Common 56namespace OpenSim.Region.ScriptEngine.Common
51{ 57{
@@ -61,6 +67,9 @@ namespace OpenSim.Region.ScriptEngine.Common
61 internal uint m_localID; 67 internal uint m_localID;
62 internal UUID m_itemID; 68 internal UUID m_itemID;
63 internal bool throwErrorOnNotImplemented = true; 69 internal bool throwErrorOnNotImplemented = true;
70 internal float m_delayFactor = 1.0f;
71 internal float m_distanceFactor = 1.0f;
72
64 73
65 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID) 74 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
66 { 75 {
@@ -81,12 +90,9 @@ namespace OpenSim.Region.ScriptEngine.Common
81 90
82 } 91 }
83 92
84 private DateTime m_timer = DateTime.Now;
85 private string m_state = "default"; 93 private string m_state = "default";
94 private DateTime m_timer = DateTime.Now;
86 private bool m_waitingForScriptAnswer=false; 95 private bool m_waitingForScriptAnswer=false;
87 private float m_delayFactor = 1.0f;
88 private float m_distanceFactor = 1.0f;
89
90 96
91 protected void ScriptSleep(int delay) 97 protected void ScriptSleep(int delay)
92 { 98 {
@@ -96,6 +102,23 @@ namespace OpenSim.Region.ScriptEngine.Common
96 System.Threading.Thread.Sleep(delay); 102 System.Threading.Thread.Sleep(delay);
97 } 103 }
98 104
105 // Object never expires
106 public override Object InitializeLifetimeService()
107 {
108 ILease lease = (ILease)base.InitializeLifetimeService();
109
110 if (lease.CurrentState == LeaseState.Initial)
111 {
112 lease.InitialLeaseTime = TimeSpan.Zero;
113 }
114 return lease;
115 }
116
117 public Scene World
118 {
119 get { return m_ScriptEngine.World; }
120 }
121
99 public string State 122 public string State
100 { 123 {
101 get { return m_state; } 124 get { return m_state; }
@@ -127,23 +150,6 @@ namespace OpenSim.Region.ScriptEngine.Common
127 } 150 }
128 } 151 }
129 152
130 // Object never expires
131 public override Object InitializeLifetimeService()
132 {
133 ILease lease = (ILease)base.InitializeLifetimeService();
134
135 if (lease.CurrentState == LeaseState.Initial)
136 {
137 lease.InitialLeaseTime = TimeSpan.Zero;
138 }
139 return lease;
140 }
141
142 public Scene World
143 {
144 get { return m_ScriptEngine.World; }
145 }
146
147 // Extension commands use this: 153 // Extension commands use this:
148 public ICommander GetCommander(string name) 154 public ICommander GetCommander(string name)
149 { 155 {
@@ -220,68 +226,57 @@ namespace OpenSim.Region.ScriptEngine.Common
220 } 226 }
221 } 227 }
222 228
223 public void osSetRegionWaterHeight(double height)
224 {
225 m_host.AddScriptLPS(1);
226 //Check to make sure that the script's owner is the estate manager/master
227 //World.Permissions.GenericEstatePermission(
228 if (World.ExternalChecks.ExternalChecksCanBeGodLike(m_host.OwnerID))
229 {
230 World.EventManager.TriggerRequestChangeWaterHeight((float)height);
231 }
232 }
233
234 //These are the implementations of the various ll-functions used by the LSL scripts. 229 //These are the implementations of the various ll-functions used by the LSL scripts.
235 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 230 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07
236 public double llSin(double f) 231 public LSL_Float llSin(double f)
237 { 232 {
238 m_host.AddScriptLPS(1); 233 m_host.AddScriptLPS(1);
239 return (double)Math.Sin(f); 234 return (double)Math.Sin(f);
240 } 235 }
241 236
242 public double llCos(double f) 237 public LSL_Float llCos(double f)
243 { 238 {
244 m_host.AddScriptLPS(1); 239 m_host.AddScriptLPS(1);
245 return (double)Math.Cos(f); 240 return (double)Math.Cos(f);
246 } 241 }
247 242
248 public double llTan(double f) 243 public LSL_Float llTan(double f)
249 { 244 {
250 m_host.AddScriptLPS(1); 245 m_host.AddScriptLPS(1);
251 return (double)Math.Tan(f); 246 return (double)Math.Tan(f);
252 } 247 }
253 248
254 public double llAtan2(double x, double y) 249 public LSL_Float llAtan2(double x, double y)
255 { 250 {
256 m_host.AddScriptLPS(1); 251 m_host.AddScriptLPS(1);
257 return (double)Math.Atan2(y, x); 252 return (double)Math.Atan2(y, x);
258 } 253 }
259 254
260 public double llSqrt(double f) 255 public LSL_Float llSqrt(double f)
261 { 256 {
262 m_host.AddScriptLPS(1); 257 m_host.AddScriptLPS(1);
263 return (double)Math.Sqrt(f); 258 return (double)Math.Sqrt(f);
264 } 259 }
265 260
266 public double llPow(double fbase, double fexponent) 261 public LSL_Float llPow(double fbase, double fexponent)
267 { 262 {
268 m_host.AddScriptLPS(1); 263 m_host.AddScriptLPS(1);
269 return (double)Math.Pow(fbase, fexponent); 264 return (double)Math.Pow(fbase, fexponent);
270 } 265 }
271 266
272 public LSL_Types.LSLInteger llAbs(int i) 267 public LSL_Integer llAbs(int i)
273 { 268 {
274 m_host.AddScriptLPS(1); 269 m_host.AddScriptLPS(1);
275 return (int)Math.Abs(i); 270 return (int)Math.Abs(i);
276 } 271 }
277 272
278 public double llFabs(double f) 273 public LSL_Float llFabs(double f)
279 { 274 {
280 m_host.AddScriptLPS(1); 275 m_host.AddScriptLPS(1);
281 return (double)Math.Abs(f); 276 return (double)Math.Abs(f);
282 } 277 }
283 278
284 public double llFrand(double mag) 279 public LSL_Float llFrand(double mag)
285 { 280 {
286 m_host.AddScriptLPS(1); 281 m_host.AddScriptLPS(1);
287 lock (Util.RandomClass) 282 lock (Util.RandomClass)
@@ -290,44 +285,44 @@ namespace OpenSim.Region.ScriptEngine.Common
290 } 285 }
291 } 286 }
292 287
293 public LSL_Types.LSLInteger llFloor(double f) 288 public LSL_Integer llFloor(double f)
294 { 289 {
295 m_host.AddScriptLPS(1); 290 m_host.AddScriptLPS(1);
296 return (int)Math.Floor(f); 291 return (int)Math.Floor(f);
297 } 292 }
298 293
299 public LSL_Types.LSLInteger llCeil(double f) 294 public LSL_Integer llCeil(double f)
300 { 295 {
301 m_host.AddScriptLPS(1); 296 m_host.AddScriptLPS(1);
302 return (int)Math.Ceiling(f); 297 return (int)Math.Ceiling(f);
303 } 298 }
304 299
305 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) 300 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven)
306 public LSL_Types.LSLInteger llRound(double f) 301 public LSL_Integer llRound(double f)
307 { 302 {
308 m_host.AddScriptLPS(1); 303 m_host.AddScriptLPS(1);
309 return (int)Math.Round(f, MidpointRounding.AwayFromZero); 304 return (int)Math.Round(f, MidpointRounding.AwayFromZero);
310 } 305 }
311 306
312 //This next group are vector operations involving squaring and square root. ckrinke 307 //This next group are vector operations involving squaring and square root. ckrinke
313 public double llVecMag(LSL_Types.Vector3 v) 308 public LSL_Float llVecMag(LSL_Vector v)
314 { 309 {
315 m_host.AddScriptLPS(1); 310 m_host.AddScriptLPS(1);
316 return LSL_Types.Vector3.Mag(v); 311 return LSL_Vector.Mag(v);
317 } 312 }
318 313
319 public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) 314 public LSL_Vector llVecNorm(LSL_Vector v)
320 { 315 {
321 m_host.AddScriptLPS(1); 316 m_host.AddScriptLPS(1);
322 double mag = LSL_Types.Vector3.Mag(v); 317 double mag = LSL_Vector.Mag(v);
323 LSL_Types.Vector3 nor = new LSL_Types.Vector3(); 318 LSL_Vector nor = new LSL_Vector();
324 nor.x = v.x / mag; 319 nor.x = v.x / mag;
325 nor.y = v.y / mag; 320 nor.y = v.y / mag;
326 nor.z = v.z / mag; 321 nor.z = v.z / mag;
327 return nor; 322 return nor;
328 } 323 }
329 324
330 public double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 325 public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)
331 { 326 {
332 m_host.AddScriptLPS(1); 327 m_host.AddScriptLPS(1);
333 double dx = a.x - b.x; 328 double dx = a.x - b.x;
@@ -350,23 +345,23 @@ namespace OpenSim.Region.ScriptEngine.Common
350 345
351 // Old implementation of llRot2Euler, now normalized 346 // Old implementation of llRot2Euler, now normalized
352 347
353 public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) 348 public LSL_Vector llRot2Euler(LSL_Rotation r)
354 { 349 {
355 m_host.AddScriptLPS(1); 350 m_host.AddScriptLPS(1);
356 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke 351 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke
357 LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s); 352 LSL_Rotation t = new LSL_Rotation(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s);
358 double m = (t.x + t.y + t.z + t.s); 353 double m = (t.x + t.y + t.z + t.s);
359 if (m == 0) return new LSL_Types.Vector3(); 354 if (m == 0) return new LSL_Vector();
360 double n = 2 * (r.y * r.s + r.x * r.z); 355 double n = 2 * (r.y * r.s + r.x * r.z);
361 double p = m * m - n * n; 356 double p = m * m - n * n;
362 if (p > 0) 357 if (p > 0)
363 return new LSL_Types.Vector3(NormalizeAngle(Math.Atan2(2.0 * (r.x * r.s - r.y * r.z), (-t.x - t.y + t.z + t.s))), 358 return new LSL_Vector(NormalizeAngle(Math.Atan2(2.0 * (r.x * r.s - r.y * r.z), (-t.x - t.y + t.z + t.s))),
364 NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), 359 NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))),
365 NormalizeAngle(Math.Atan2(2.0 * (r.z * r.s - r.x * r.y), (t.x - t.y - t.z + t.s)))); 360 NormalizeAngle(Math.Atan2(2.0 * (r.z * r.s - r.x * r.y), (t.x - t.y - t.z + t.s))));
366 else if (n > 0) 361 else if (n > 0)
367 return new LSL_Types.Vector3(0.0, Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z))); 362 return new LSL_Vector(0.0, Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z)));
368 else 363 else
369 return new LSL_Types.Vector3(0.0, -Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z))); 364 return new LSL_Vector(0.0, -Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z)));
370 } 365 }
371 366
372 /* From wiki: 367 /* From wiki:
@@ -414,7 +409,7 @@ namespace OpenSim.Region.ScriptEngine.Common
414 * Apparently in some cases this is better from a numerical precision perspective? 409 * Apparently in some cases this is better from a numerical precision perspective?
415 */ 410 */
416 411
417 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) 412 public LSL_Rotation llEuler2Rot(LSL_Vector v)
418 { 413 {
419 m_host.AddScriptLPS(1); 414 m_host.AddScriptLPS(1);
420 415
@@ -432,10 +427,10 @@ namespace OpenSim.Region.ScriptEngine.Common
432 z = s1*s2*c3+c1*c2*s3; 427 z = s1*s2*c3+c1*c2*s3;
433 s = c1*c2*c3-s1*s2*s3; 428 s = c1*c2*c3-s1*s2*s3;
434 429
435 return new LSL_Types.Quaternion(x, y, z, s); 430 return new LSL_Rotation(x, y, z, s);
436 } 431 }
437 432
438 public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) 433 public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up)
439 { 434 {
440 m_host.AddScriptLPS(1); 435 m_host.AddScriptLPS(1);
441 double x, y, z, s; 436 double x, y, z, s;
@@ -468,7 +463,7 @@ namespace OpenSim.Region.ScriptEngine.Common
468 if (f == 5) { z = -z; } 463 if (f == 5) { z = -z; }
469 if (f == 6) { y = -y; } 464 if (f == 6) { y = -y; }
470 465
471 LSL_Types.Quaternion result = new LSL_Types.Quaternion(x, y, z, s); 466 LSL_Rotation result = new LSL_Rotation(x, y, z, s);
472 467
473 // a hack to correct a few questionable angles :( 468 // a hack to correct a few questionable angles :(
474 if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001) 469 if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001)
@@ -477,7 +472,7 @@ namespace OpenSim.Region.ScriptEngine.Common
477 return result; 472 return result;
478 } 473 }
479 474
480 public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) 475 public LSL_Vector llRot2Fwd(LSL_Rotation r)
481 { 476 {
482 m_host.AddScriptLPS(1); 477 m_host.AddScriptLPS(1);
483 478
@@ -499,10 +494,10 @@ namespace OpenSim.Region.ScriptEngine.Common
499 x = r.x * r.x - r.y * r.y - r.z * r.z + r.s * r.s; 494 x = r.x * r.x - r.y * r.y - r.z * r.z + r.s * r.s;
500 y = 2 * (r.x * r.y + r.z * r.s); 495 y = 2 * (r.x * r.y + r.z * r.s);
501 z = 2 * (r.x * r.z - r.y * r.s); 496 z = 2 * (r.x * r.z - r.y * r.s);
502 return (new LSL_Types.Vector3(x, y, z)); 497 return (new LSL_Vector(x, y, z));
503 } 498 }
504 499
505 public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) 500 public LSL_Vector llRot2Left(LSL_Rotation r)
506 { 501 {
507 m_host.AddScriptLPS(1); 502 m_host.AddScriptLPS(1);
508 503
@@ -524,10 +519,10 @@ namespace OpenSim.Region.ScriptEngine.Common
524 x = 2 * (r.x * r.y - r.z * r.s); 519 x = 2 * (r.x * r.y - r.z * r.s);
525 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s; 520 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s;
526 z = 2 * (r.x * r.s + r.y * r.z); 521 z = 2 * (r.x * r.s + r.y * r.z);
527 return (new LSL_Types.Vector3(x, y, z)); 522 return (new LSL_Vector(x, y, z));
528 } 523 }
529 524
530 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) 525 public LSL_Vector llRot2Up(LSL_Rotation r)
531 { 526 {
532 m_host.AddScriptLPS(1); 527 m_host.AddScriptLPS(1);
533 double x, y, z, m; 528 double x, y, z, m;
@@ -548,18 +543,18 @@ namespace OpenSim.Region.ScriptEngine.Common
548 x = 2 * (r.x * r.z + r.y * r.s); 543 x = 2 * (r.x * r.z + r.y * r.s);
549 y = 2 * (-r.x * r.s + r.y * r.z); 544 y = 2 * (-r.x * r.s + r.y * r.z);
550 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s; 545 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s;
551 return (new LSL_Types.Vector3(x, y, z)); 546 return (new LSL_Vector(x, y, z));
552 } 547 }
553 548
554 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 549 public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b)
555 { 550 {
556 //A and B should both be normalized 551 //A and B should both be normalized
557 m_host.AddScriptLPS(1); 552 m_host.AddScriptLPS(1);
558 double dotProduct = LSL_Types.Vector3.Dot(a, b); 553 double dotProduct = LSL_Vector.Dot(a, b);
559 LSL_Types.Vector3 crossProduct = LSL_Types.Vector3.Cross(a, b); 554 LSL_Vector crossProduct = LSL_Vector.Cross(a, b);
560 double magProduct = LSL_Types.Vector3.Mag(a) * LSL_Types.Vector3.Mag(b); 555 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b);
561 double angle = Math.Acos(dotProduct / magProduct); 556 double angle = Math.Acos(dotProduct / magProduct);
562 LSL_Types.Vector3 axis = LSL_Types.Vector3.Norm(crossProduct); 557 LSL_Vector axis = LSL_Vector.Norm(crossProduct);
563 double s = Math.Sin(angle / 2); 558 double s = Math.Sin(angle / 2);
564 559
565 double x = axis.x * s; 560 double x = axis.x * s;
@@ -568,9 +563,9 @@ namespace OpenSim.Region.ScriptEngine.Common
568 double w = Math.Cos(angle / 2); 563 double w = Math.Cos(angle / 2);
569 564
570 if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w)) 565 if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w))
571 return new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f); 566 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
572 567
573 return new LSL_Types.Quaternion((float)x, (float)y, (float)z, (float)w); 568 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w);
574 } 569 }
575 570
576 public void llWhisper(int channelID, string text) 571 public void llWhisper(int channelID, string text)
@@ -632,7 +627,7 @@ namespace OpenSim.Region.ScriptEngine.Common
632 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); 627 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
633 } 628 }
634 629
635 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 630 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
636 { 631 {
637 m_host.AddScriptLPS(1); 632 m_host.AddScriptLPS(1);
638 UUID keyID; 633 UUID keyID;
@@ -707,10 +702,10 @@ namespace OpenSim.Region.ScriptEngine.Common
707 return SensedObject.Name; 702 return SensedObject.Name;
708 } 703 }
709 704
710 public string llDetectedName(int number) 705 public LSL_String llDetectedName(int number)
711 { 706 {
712 m_host.AddScriptLPS(1); 707 m_host.AddScriptLPS(1);
713 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); 708 LSL_List SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
714 if (SenseList != null) 709 if (SenseList != null)
715 { 710 {
716 if ((number >= 0) && (number < SenseList.Length)) 711 if ((number >= 0) && (number < SenseList.Length))
@@ -750,7 +745,7 @@ namespace OpenSim.Region.ScriptEngine.Common
750 745
751 public UUID uuidDetectedKey(int number) 746 public UUID uuidDetectedKey(int number)
752 { 747 {
753 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); 748 LSL_List SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
754 if (SenseList != null) 749 if (SenseList != null)
755 { 750 {
756 if ((number >= 0) && (number < SenseList.Length)) 751 if ((number >= 0) && (number < SenseList.Length))
@@ -787,7 +782,7 @@ namespace OpenSim.Region.ScriptEngine.Common
787 782
788 public EntityBase entityDetectedKey(int number) 783 public EntityBase entityDetectedKey(int number)
789 { 784 {
790 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); 785 LSL_List SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
791 if (SenseList != null) 786 if (SenseList != null)
792 { 787 {
793 if ((number >= 0) && (number < SenseList.Length)) 788 if ((number >= 0) && (number < SenseList.Length))
@@ -834,7 +829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
834 return null; 829 return null;
835 } 830 }
836 831
837 public string llDetectedKey(int number) 832 public LSL_String llDetectedKey(int number)
838 { 833 {
839 m_host.AddScriptLPS(1); 834 m_host.AddScriptLPS(1);
840 UUID SensedUUID = uuidDetectedKey(number); 835 UUID SensedUUID = uuidDetectedKey(number);
@@ -843,7 +838,7 @@ namespace OpenSim.Region.ScriptEngine.Common
843 return SensedUUID.ToString(); 838 return SensedUUID.ToString();
844 } 839 }
845 840
846 public string llDetectedOwner(int number) 841 public LSL_String llDetectedOwner(int number)
847 { 842 {
848 // returns UUID of owner of object detected 843 // returns UUID of owner of object detected
849 m_host.AddScriptLPS(1); 844 m_host.AddScriptLPS(1);
@@ -869,7 +864,7 @@ namespace OpenSim.Region.ScriptEngine.Common
869 864
870 } 865 }
871 866
872 public LSL_Types.LSLInteger llDetectedType(int number) 867 public LSL_Integer llDetectedType(int number)
873 { 868 {
874 m_host.AddScriptLPS(1); 869 m_host.AddScriptLPS(1);
875 EntityBase SensedObject = entityDetectedKey(number); 870 EntityBase SensedObject = entityDetectedKey(number);
@@ -878,7 +873,7 @@ namespace OpenSim.Region.ScriptEngine.Common
878 int mask = 0; 873 int mask = 0;
879 874
880 UUID SensedUUID = uuidDetectedKey(number); 875 UUID SensedUUID = uuidDetectedKey(number);
881 LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0); 876 LSL_Vector ZeroVector = new LSL_Vector(0, 0, 0);
882 877
883 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor 878 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor
884 if (SensedObject.Velocity.Equals(ZeroVector)) 879 if (SensedObject.Velocity.Equals(ZeroVector))
@@ -889,71 +884,71 @@ namespace OpenSim.Region.ScriptEngine.Common
889 return mask; 884 return mask;
890 } 885 }
891 886
892 public LSL_Types.Vector3 llDetectedPos(int number) 887 public LSL_Vector llDetectedPos(int number)
893 { 888 {
894 m_host.AddScriptLPS(1); 889 m_host.AddScriptLPS(1);
895 EntityBase SensedObject = entityDetectedKey(number); 890 EntityBase SensedObject = entityDetectedKey(number);
896 if (SensedObject == null) 891 if (SensedObject == null)
897 return new LSL_Types.Vector3(0, 0, 0); 892 return new LSL_Vector(0, 0, 0);
898 return new LSL_Types.Vector3( 893 return new LSL_Vector(
899 SensedObject.AbsolutePosition.X, 894 SensedObject.AbsolutePosition.X,
900 SensedObject.AbsolutePosition.Y, 895 SensedObject.AbsolutePosition.Y,
901 SensedObject.AbsolutePosition.Z); 896 SensedObject.AbsolutePosition.Z);
902 } 897 }
903 898
904 public LSL_Types.Vector3 llDetectedVel(int number) 899 public LSL_Vector llDetectedVel(int number)
905 { 900 {
906 m_host.AddScriptLPS(1); 901 m_host.AddScriptLPS(1);
907 EntityBase SensedObject = entityDetectedKey(number); 902 EntityBase SensedObject = entityDetectedKey(number);
908 if (SensedObject == null) 903 if (SensedObject == null)
909 return new LSL_Types.Vector3(0, 0, 0); 904 return new LSL_Vector(0, 0, 0);
910 return new LSL_Types.Vector3( 905 return new LSL_Vector(
911 SensedObject.Velocity.X, 906 SensedObject.Velocity.X,
912 SensedObject.Velocity.Y, 907 SensedObject.Velocity.Y,
913 SensedObject.Velocity.Z); 908 SensedObject.Velocity.Z);
914 } 909 }
915 910
916 public LSL_Types.Vector3 llDetectedGrab(int number) 911 public LSL_Vector llDetectedGrab(int number)
917 { 912 {
918 m_host.AddScriptLPS(1); 913 m_host.AddScriptLPS(1);
919 EntityBase SensedObject = entityDetectedKey(number); 914 EntityBase SensedObject = entityDetectedKey(number);
920 if (SensedObject == null) 915 if (SensedObject == null)
921 return new LSL_Types.Vector3(0, 0, 0); 916 return new LSL_Vector(0, 0, 0);
922 917
923 return new LSL_Types.Vector3( 918 return new LSL_Vector(
924 SensedObject.AbsolutePosition.X, 919 SensedObject.AbsolutePosition.X,
925 SensedObject.AbsolutePosition.Y, 920 SensedObject.AbsolutePosition.Y,
926 SensedObject.AbsolutePosition.Z); 921 SensedObject.AbsolutePosition.Z);
927 } 922 }
928 923
929 public LSL_Types.Quaternion llDetectedRot(int number) 924 public LSL_Rotation llDetectedRot(int number)
930 { 925 {
931 m_host.AddScriptLPS(1); 926 m_host.AddScriptLPS(1);
932 EntityBase SensedObject = entityDetectedKey(number); 927 EntityBase SensedObject = entityDetectedKey(number);
933 if (SensedObject == null) 928 if (SensedObject == null)
934 return new LSL_Types.Quaternion(); 929 return new LSL_Rotation();
935 return new LSL_Types.Quaternion( 930 return new LSL_Rotation(
936 SensedObject.Rotation.X, 931 SensedObject.Rotation.X,
937 SensedObject.Rotation.Y, 932 SensedObject.Rotation.Y,
938 SensedObject.Rotation.Z, 933 SensedObject.Rotation.Z,
939 SensedObject.Rotation.W); 934 SensedObject.Rotation.W);
940 } 935 }
941 936
942 public LSL_Types.LSLInteger llDetectedGroup(int number) 937 public LSL_Integer llDetectedGroup(int number)
943 { 938 {
944 m_host.AddScriptLPS(1); 939 m_host.AddScriptLPS(1);
945 UUID SensedUUID = uuidDetectedKey(number); 940 UUID SensedUUID = uuidDetectedKey(number);
946 if (SensedUUID == UUID.Zero) 941 if (SensedUUID == UUID.Zero)
947 return new LSL_Types.LSLInteger(0); 942 return new LSL_Integer(0);
948 ScenePresence presence = World.GetScenePresence(SensedUUID); 943 ScenePresence presence = World.GetScenePresence(SensedUUID);
949 IClientAPI client = presence.ControllingClient; 944 IClientAPI client = presence.ControllingClient;
950 if (m_host.GroupID == client.ActiveGroupId) 945 if (m_host.GroupID == client.ActiveGroupId)
951 return new LSL_Types.LSLInteger(1); 946 return new LSL_Integer(1);
952 else 947 else
953 return new LSL_Types.LSLInteger(0); 948 return new LSL_Integer(0);
954 } 949 }
955 950
956 public LSL_Types.LSLInteger llDetectedLinkNumber(int number) 951 public LSL_Integer llDetectedLinkNumber(int number)
957 { 952 {
958 m_host.AddScriptLPS(1); 953 m_host.AddScriptLPS(1);
959 EntityBase SensedObject = entityDetectedKey(number); 954 EntityBase SensedObject = entityDetectedKey(number);
@@ -962,13 +957,55 @@ namespace OpenSim.Region.ScriptEngine.Common
962 return m_host.LinkNum; 957 return m_host.LinkNum;
963 } 958 }
964 959
960 public LSL_Vector llDetectedTouchBinormal(int index)
961 {
962 m_host.AddScriptLPS(1);
963 NotImplemented("llDetectedTouchBinormal");
964 return new LSL_Vector();
965 }
966
967 public LSL_Integer llDetectedTouchFace(int index)
968 {
969 m_host.AddScriptLPS(1);
970 NotImplemented("llDetectedTouchFace");
971 return new LSL_Integer(0);
972 }
973
974 public LSL_Vector llDetectedTouchNormal(int index)
975 {
976 m_host.AddScriptLPS(1);
977 NotImplemented("llDetectedTouchNormal");
978 return new LSL_Vector();
979 }
980
981 public LSL_Vector llDetectedTouchPos(int index)
982 {
983 m_host.AddScriptLPS(1);
984 NotImplemented("llDetectedTouchPos");
985 return new LSL_Vector();
986 }
987
988 public LSL_Vector llDetectedTouchST(int index)
989 {
990 m_host.AddScriptLPS(1);
991 NotImplemented("llDetectedTouchST");
992 return new LSL_Vector();
993 }
994
995 public LSL_Vector llDetectedTouchUV(int index)
996 {
997 m_host.AddScriptLPS(1);
998 NotImplemented("llDetectedTouchUV");
999 return new LSL_Vector();
1000 }
1001
965 public void llDie() 1002 public void llDie()
966 { 1003 {
967 m_host.AddScriptLPS(1); 1004 m_host.AddScriptLPS(1);
968 World.DeleteSceneObject(m_host.ParentGroup); 1005 World.DeleteSceneObject(m_host.ParentGroup);
969 } 1006 }
970 1007
971 public double llGround(LSL_Types.Vector3 offset) 1008 public LSL_Float llGround(LSL_Vector offset)
972 { 1009 {
973 m_host.AddScriptLPS(1); 1010 m_host.AddScriptLPS(1);
974 int x = (int)(m_host.OffsetPosition.X + offset.x); 1011 int x = (int)(m_host.OffsetPosition.X + offset.x);
@@ -976,16 +1013,16 @@ namespace OpenSim.Region.ScriptEngine.Common
976 return World.GetLandHeight(x, y); 1013 return World.GetLandHeight(x, y);
977 } 1014 }
978 1015
979 public double llCloud(LSL_Types.Vector3 offset) 1016 public LSL_Float llCloud(LSL_Vector offset)
980 { 1017 {
981 m_host.AddScriptLPS(1); 1018 m_host.AddScriptLPS(1);
982 return 0; 1019 return 0;
983 } 1020 }
984 1021
985 public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) 1022 public LSL_Vector llWind(LSL_Vector offset)
986 { 1023 {
987 m_host.AddScriptLPS(1); 1024 m_host.AddScriptLPS(1);
988 return new LSL_Types.Vector3(); 1025 return new LSL_Vector();
989 } 1026 }
990 1027
991 public void llSetStatus(int status, int value) 1028 public void llSetStatus(int status, int value)
@@ -1076,7 +1113,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1076 } 1113 }
1077 } 1114 }
1078 1115
1079 public LSL_Types.LSLInteger llGetStatus(int status) 1116 public LSL_Integer llGetStatus(int status)
1080 { 1117 {
1081 m_host.AddScriptLPS(1); 1118 m_host.AddScriptLPS(1);
1082 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 1119 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
@@ -1136,13 +1173,13 @@ namespace OpenSim.Region.ScriptEngine.Common
1136 return 0; 1173 return 0;
1137 } 1174 }
1138 1175
1139 public void llSetScale(LSL_Types.Vector3 scale) 1176 public void llSetScale(LSL_Vector scale)
1140 { 1177 {
1141 m_host.AddScriptLPS(1); 1178 m_host.AddScriptLPS(1);
1142 SetScale(m_host, scale); 1179 SetScale(m_host, scale);
1143 } 1180 }
1144 1181
1145 private void SetScale(SceneObjectPart part, LSL_Types.Vector3 scale) 1182 private void SetScale(SceneObjectPart part, LSL_Vector scale)
1146 { 1183 {
1147 // TODO: this needs to trigger a persistance save as well 1184 // TODO: this needs to trigger a persistance save as well
1148 1185
@@ -1172,24 +1209,31 @@ namespace OpenSim.Region.ScriptEngine.Common
1172 part.SendFullUpdateToAllClients(); 1209 part.SendFullUpdateToAllClients();
1173 } 1210 }
1174 1211
1175 public LSL_Types.Vector3 llGetScale() 1212 public LSL_Vector llGetScale()
1213 {
1214 m_host.AddScriptLPS(1);
1215 return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z);
1216 }
1217
1218 public void llSetClickAction(int action)
1176 { 1219 {
1177 m_host.AddScriptLPS(1); 1220 m_host.AddScriptLPS(1);
1178 return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); 1221 NotImplemented("llSetClickAction");
1222 return;
1179 } 1223 }
1180 1224
1181 public void llSetColor(LSL_Types.Vector3 color, int face) 1225 public void llSetColor(LSL_Vector color, int face)
1182 { 1226 {
1183 m_host.AddScriptLPS(1); 1227 m_host.AddScriptLPS(1);
1184 1228
1185 SetColor(m_host, color, face); 1229 SetColor(m_host, color, face);
1186 } 1230 }
1187 1231
1188 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 1232 private void SetColor(SceneObjectPart part, LSL_Vector color, int face)
1189 { 1233 {
1190 Primitive.TextureEntry tex = part.Shape.Textures; 1234 Primitive.TextureEntry tex = part.Shape.Textures;
1191 Color4 texcolor; 1235 Color4 texcolor;
1192 if (face > -1) 1236 if (face >= 0 && face < GetNumberOfSides(part))
1193 { 1237 {
1194 texcolor = tex.CreateFace((uint)face).RGBA; 1238 texcolor = tex.CreateFace((uint)face).RGBA;
1195 texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f); 1239 texcolor.R = Util.Clip((float)color.x, 0.0f, 1.0f);
@@ -1199,9 +1243,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1199 part.UpdateTexture(tex); 1243 part.UpdateTexture(tex);
1200 return; 1244 return;
1201 } 1245 }
1202 else if (face == -1) 1246 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1203 { 1247 {
1204 for (uint i = 0; i < 32; i++) 1248 for (uint i = 0; i < GetNumberOfSides(part); i++)
1205 { 1249 {
1206 if (tex.FaceTextures[i] != null) 1250 if (tex.FaceTextures[i] != null)
1207 { 1251 {
@@ -1225,16 +1269,16 @@ namespace OpenSim.Region.ScriptEngine.Common
1225 public void SetGlow(SceneObjectPart part, int face, float glow) 1269 public void SetGlow(SceneObjectPart part, int face, float glow)
1226 { 1270 {
1227 Primitive.TextureEntry tex = part.Shape.Textures; 1271 Primitive.TextureEntry tex = part.Shape.Textures;
1228 if (face > -1) 1272 if (face >= 0 && face < GetNumberOfSides(part))
1229 { 1273 {
1230 tex.CreateFace((uint) face); 1274 tex.CreateFace((uint) face);
1231 tex.FaceTextures[face].Glow = glow; 1275 tex.FaceTextures[face].Glow = glow;
1232 part.UpdateTexture(tex); 1276 part.UpdateTexture(tex);
1233 return; 1277 return;
1234 } 1278 }
1235 else if (face == -1) 1279 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1236 { 1280 {
1237 for (uint i = 0; i < 32; i++) 1281 for (uint i = 0; i < GetNumberOfSides(part); i++)
1238 { 1282 {
1239 if (tex.FaceTextures[i] != null) 1283 if (tex.FaceTextures[i] != null)
1240 { 1284 {
@@ -1272,7 +1316,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1272 } 1316 }
1273 1317
1274 Primitive.TextureEntry tex = part.Shape.Textures; 1318 Primitive.TextureEntry tex = part.Shape.Textures;
1275 if (face > -1) 1319 if (face >= 0 && face < GetNumberOfSides(part))
1276 { 1320 {
1277 tex.CreateFace((uint) face); 1321 tex.CreateFace((uint) face);
1278 tex.FaceTextures[face].Shiny = sval; 1322 tex.FaceTextures[face].Shiny = sval;
@@ -1280,9 +1324,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1280 part.UpdateTexture(tex); 1324 part.UpdateTexture(tex);
1281 return; 1325 return;
1282 } 1326 }
1283 else if (face == -1) 1327 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1284 { 1328 {
1285 for (uint i = 0; i < 32; i++) 1329 for (uint i = 0; i < GetNumberOfSides(part); i++)
1286 { 1330 {
1287 if (tex.FaceTextures[i] != null) 1331 if (tex.FaceTextures[i] != null)
1288 { 1332 {
@@ -1300,16 +1344,16 @@ namespace OpenSim.Region.ScriptEngine.Common
1300 public void SetFullBright(SceneObjectPart part, int face, bool bright) 1344 public void SetFullBright(SceneObjectPart part, int face, bool bright)
1301 { 1345 {
1302 Primitive.TextureEntry tex = part.Shape.Textures; 1346 Primitive.TextureEntry tex = part.Shape.Textures;
1303 if (face > -1) 1347 if (face >= 0 && face < GetNumberOfSides(part))
1304 { 1348 {
1305 tex.CreateFace((uint) face); 1349 tex.CreateFace((uint) face);
1306 tex.FaceTextures[face].Fullbright = bright; 1350 tex.FaceTextures[face].Fullbright = bright;
1307 part.UpdateTexture(tex); 1351 part.UpdateTexture(tex);
1308 return; 1352 return;
1309 } 1353 }
1310 else if (face == -1) 1354 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1311 { 1355 {
1312 for (uint i = 0; i < 32; i++) 1356 for (uint i = 0; i < GetNumberOfSides(part); i++)
1313 { 1357 {
1314 if (tex.FaceTextures[i] != null) 1358 if (tex.FaceTextures[i] != null)
1315 { 1359 {
@@ -1322,19 +1366,28 @@ namespace OpenSim.Region.ScriptEngine.Common
1322 } 1366 }
1323 } 1367 }
1324 1368
1325 public double llGetAlpha(int face) 1369 public LSL_Float llGetAlpha(int face)
1326 { 1370 {
1327 m_host.AddScriptLPS(1); 1371 m_host.AddScriptLPS(1);
1328 Primitive.TextureEntry tex = m_host.Shape.Textures; 1372 return GetAlpha(m_host, face);
1329 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1373 }
1374
1375 private LSL_Float GetAlpha(SceneObjectPart part, int face)
1376 {
1377 Primitive.TextureEntry tex = part.Shape.Textures;
1378 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1330 { 1379 {
1331 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 1380 int i;
1381 double sum = 0.0;
1382 for (i = 0 ; i < GetNumberOfSides(part) ; i++)
1383 sum += (double)tex.GetFace((uint)i).RGBA.A;
1384 return sum;
1332 } 1385 }
1333 if (face > -1) 1386 if (face >= 0 && face < GetNumberOfSides(part))
1334 { 1387 {
1335 return (double)((tex.GetFace((uint)face).RGBA.A * 255) / 255); 1388 return (double)tex.GetFace((uint)face).RGBA.A;
1336 } 1389 }
1337 return 0; 1390 return 0.0;
1338 } 1391 }
1339 1392
1340 public void llSetAlpha(double alpha, int face) 1393 public void llSetAlpha(double alpha, int face)
@@ -1348,7 +1401,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1348 { 1401 {
1349 Primitive.TextureEntry tex = part.Shape.Textures; 1402 Primitive.TextureEntry tex = part.Shape.Textures;
1350 Color4 texcolor; 1403 Color4 texcolor;
1351 if (face > -1) 1404 if (face >= 0 && face < GetNumberOfSides(part))
1352 { 1405 {
1353 texcolor = tex.CreateFace((uint)face).RGBA; 1406 texcolor = tex.CreateFace((uint)face).RGBA;
1354 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); 1407 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
@@ -1356,9 +1409,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1356 part.UpdateTexture(tex); 1409 part.UpdateTexture(tex);
1357 return; 1410 return;
1358 } 1411 }
1359 else if (face == -1) 1412 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1360 { 1413 {
1361 for (int i = 0; i < 32; i++) 1414 for (int i = 0; i < GetNumberOfSides(part); i++)
1362 { 1415 {
1363 if (tex.FaceTextures[i] != null) 1416 if (tex.FaceTextures[i] != null)
1364 { 1417 {
@@ -1389,7 +1442,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1389 /// <param name="tension"></param> 1442 /// <param name="tension"></param>
1390 /// <param name="Force"></param> 1443 /// <param name="Force"></param>
1391 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, 1444 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction,
1392 float wind, float tension, LSL_Types.Vector3 Force) 1445 float wind, float tension, LSL_Vector Force)
1393 { 1446 {
1394 if (part == null) 1447 if (part == null)
1395 return; 1448 return;
@@ -1447,7 +1500,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1447 /// <param name="intensity"></param> 1500 /// <param name="intensity"></param>
1448 /// <param name="radius"></param> 1501 /// <param name="radius"></param>
1449 /// <param name="falloff"></param> 1502 /// <param name="falloff"></param>
1450 private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) 1503 private void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff)
1451 { 1504 {
1452 if (part == null) 1505 if (part == null)
1453 return; 1506 return;
@@ -1471,31 +1524,46 @@ namespace OpenSim.Region.ScriptEngine.Common
1471 part.ScheduleFullUpdate(); 1524 part.ScheduleFullUpdate();
1472 } 1525 }
1473 1526
1474 public LSL_Types.Vector3 llGetColor(int face) 1527 public LSL_Vector llGetColor(int face)
1475 { 1528 {
1476 m_host.AddScriptLPS(1); 1529 m_host.AddScriptLPS(1);
1477 Primitive.TextureEntry tex = m_host.Shape.Textures; 1530 return GetColor(m_host, face);
1531 }
1532
1533 private LSL_Vector GetColor(SceneObjectPart part, int face)
1534 {
1535 Primitive.TextureEntry tex = part.Shape.Textures;
1478 Color4 texcolor; 1536 Color4 texcolor;
1479 LSL_Types.Vector3 rgb; 1537 LSL_Vector rgb = new LSL_Vector();
1480 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1538 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1481 { 1539 {
1482 texcolor = tex.DefaultTexture.RGBA; 1540 int i;
1483 rgb.x = (255 - (texcolor.R * 255)) / 255; 1541
1484 rgb.y = (255 - (texcolor.G * 255)) / 255; 1542 for (i = 0 ; i < GetNumberOfSides(part) ; i++)
1485 rgb.z = (255 - (texcolor.B * 255)) / 255; 1543 {
1544 texcolor = tex.GetFace((uint)i).RGBA;
1545 rgb.x += texcolor.R;
1546 rgb.y += texcolor.G;
1547 rgb.z += texcolor.B;
1548 }
1549
1550 rgb.x /= (float)GetNumberOfSides(part);
1551 rgb.y /= (float)GetNumberOfSides(part);
1552 rgb.z /= (float)GetNumberOfSides(part);
1553
1486 return rgb; 1554 return rgb;
1487 } 1555 }
1488 if (face > -1) 1556 if (face >= 0 && face < GetNumberOfSides(part))
1489 { 1557 {
1490 texcolor = tex.GetFace((uint)face).RGBA; 1558 texcolor = tex.GetFace((uint)face).RGBA;
1491 rgb.x = (255 - (texcolor.R * 255)) / 255; 1559 rgb.x = texcolor.R;
1492 rgb.y = (255 - (texcolor.G * 255)) / 255; 1560 rgb.y = texcolor.G;
1493 rgb.z = (255 - (texcolor.B * 255)) / 255; 1561 rgb.z = texcolor.B;
1494 return rgb; 1562 return rgb;
1495 } 1563 }
1496 else 1564 else
1497 { 1565 {
1498 return new LSL_Types.Vector3(); 1566 return new LSL_Vector();
1499 } 1567 }
1500 } 1568 }
1501 1569
@@ -1520,7 +1588,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1520 1588
1521 Primitive.TextureEntry tex = part.Shape.Textures; 1589 Primitive.TextureEntry tex = part.Shape.Textures;
1522 1590
1523 if (face > -1) 1591 if (face >= 0 && face < GetNumberOfSides(part))
1524 { 1592 {
1525 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); 1593 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1526 texface.TextureID = textureID; 1594 texface.TextureID = textureID;
@@ -1528,9 +1596,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1528 part.UpdateTexture(tex); 1596 part.UpdateTexture(tex);
1529 return; 1597 return;
1530 } 1598 }
1531 else if (face == -1) 1599 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1532 { 1600 {
1533 for (uint i = 0; i < 32; i++) 1601 for (uint i = 0; i < GetNumberOfSides(part); i++)
1534 { 1602 {
1535 if (tex.FaceTextures[i] != null) 1603 if (tex.FaceTextures[i] != null)
1536 { 1604 {
@@ -1554,7 +1622,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1554 private void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1622 private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
1555 { 1623 {
1556 Primitive.TextureEntry tex = part.Shape.Textures; 1624 Primitive.TextureEntry tex = part.Shape.Textures;
1557 if (face > -1) 1625 if (face >= 0 && face < GetNumberOfSides(part))
1558 { 1626 {
1559 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); 1627 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1560 texface.RepeatU = (float)u; 1628 texface.RepeatU = (float)u;
@@ -1563,9 +1631,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1563 part.UpdateTexture(tex); 1631 part.UpdateTexture(tex);
1564 return; 1632 return;
1565 } 1633 }
1566 if (face == -1) 1634 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1567 { 1635 {
1568 for (int i = 0; i < 32; i++) 1636 for (int i = 0; i < GetNumberOfSides(part); i++)
1569 { 1637 {
1570 if (tex.FaceTextures[i] != null) 1638 if (tex.FaceTextures[i] != null)
1571 { 1639 {
@@ -1590,7 +1658,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1590 private void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1658 private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
1591 { 1659 {
1592 Primitive.TextureEntry tex = part.Shape.Textures; 1660 Primitive.TextureEntry tex = part.Shape.Textures;
1593 if (face > -1) 1661 if (face >= 0 && face < GetNumberOfSides(part))
1594 { 1662 {
1595 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); 1663 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1596 texface.OffsetU = (float)u; 1664 texface.OffsetU = (float)u;
@@ -1599,9 +1667,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1599 part.UpdateTexture(tex); 1667 part.UpdateTexture(tex);
1600 return; 1668 return;
1601 } 1669 }
1602 if (face == -1) 1670 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1603 { 1671 {
1604 for (int i = 0; i < 32; i++) 1672 for (int i = 0; i < GetNumberOfSides(part); i++)
1605 { 1673 {
1606 if (tex.FaceTextures[i] != null) 1674 if (tex.FaceTextures[i] != null)
1607 { 1675 {
@@ -1626,7 +1694,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1626 private void RotateTexture(SceneObjectPart part, double rotation, int face) 1694 private void RotateTexture(SceneObjectPart part, double rotation, int face)
1627 { 1695 {
1628 Primitive.TextureEntry tex = part.Shape.Textures; 1696 Primitive.TextureEntry tex = part.Shape.Textures;
1629 if (face > -1) 1697 if (face >= 0 && face < GetNumberOfSides(part))
1630 { 1698 {
1631 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face); 1699 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1632 texface.Rotation = (float)rotation; 1700 texface.Rotation = (float)rotation;
@@ -1634,9 +1702,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1634 part.UpdateTexture(tex); 1702 part.UpdateTexture(tex);
1635 return; 1703 return;
1636 } 1704 }
1637 if (face == -1) 1705 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1638 { 1706 {
1639 for (int i = 0; i < 32; i++) 1707 for (int i = 0; i < GetNumberOfSides(part); i++)
1640 { 1708 {
1641 if (tex.FaceTextures[i] != null) 1709 if (tex.FaceTextures[i] != null)
1642 { 1710 {
@@ -1649,15 +1717,20 @@ namespace OpenSim.Region.ScriptEngine.Common
1649 } 1717 }
1650 } 1718 }
1651 1719
1652 public string llGetTexture(int face) 1720 public LSL_String llGetTexture(int face)
1653 { 1721 {
1654 m_host.AddScriptLPS(1); 1722 m_host.AddScriptLPS(1);
1655 Primitive.TextureEntry tex = m_host.Shape.Textures; 1723 return GetTexture(m_host, face);
1656 if (face == -1) 1724 }
1725
1726 private LSL_String GetTexture(SceneObjectPart part, int face)
1727 {
1728 Primitive.TextureEntry tex = part.Shape.Textures;
1729 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
1657 { 1730 {
1658 face = 0; 1731 face = 0;
1659 } 1732 }
1660 if (face > -1) 1733 if (face >= 0 && face < GetNumberOfSides(part))
1661 { 1734 {
1662 Primitive.TextureEntryFace texface; 1735 Primitive.TextureEntryFace texface;
1663 texface = tex.GetFace((uint)face); 1736 texface = tex.GetFace((uint)face);
@@ -1669,7 +1742,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1669 } 1742 }
1670 } 1743 }
1671 1744
1672 public void llSetPos(LSL_Types.Vector3 pos) 1745 public void llSetPos(LSL_Vector pos)
1673 { 1746 {
1674 m_host.AddScriptLPS(1); 1747 m_host.AddScriptLPS(1);
1675 1748
@@ -1678,10 +1751,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1678 ScriptSleep(200); 1751 ScriptSleep(200);
1679 } 1752 }
1680 1753
1681 private void SetPos(SceneObjectPart part, LSL_Types.Vector3 targetPos) 1754 private void SetPos(SceneObjectPart part, LSL_Vector targetPos)
1682 { 1755 {
1683 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) 1756 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
1684 LSL_Types.Vector3 currentPos = llGetLocalPos(); 1757 LSL_Vector currentPos = llGetLocalPos();
1685 if (llVecDist(currentPos, targetPos) > 10.0f * m_distanceFactor) 1758 if (llVecDist(currentPos, targetPos) > 10.0f * m_distanceFactor)
1686 { 1759 {
1687 targetPos = currentPos + m_distanceFactor * 10.0f * llVecNorm(targetPos - currentPos); 1760 targetPos = currentPos + m_distanceFactor * 10.0f * llVecNorm(targetPos - currentPos);
@@ -1697,32 +1770,32 @@ namespace OpenSim.Region.ScriptEngine.Common
1697 } 1770 }
1698 } 1771 }
1699 1772
1700 public LSL_Types.Vector3 llGetPos() 1773 public LSL_Vector llGetPos()
1701 { 1774 {
1702 m_host.AddScriptLPS(1); 1775 m_host.AddScriptLPS(1);
1703 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 1776 return new LSL_Vector(m_host.AbsolutePosition.X,
1704 m_host.AbsolutePosition.Y, 1777 m_host.AbsolutePosition.Y,
1705 m_host.AbsolutePosition.Z); 1778 m_host.AbsolutePosition.Z);
1706 } 1779 }
1707 1780
1708 public LSL_Types.Vector3 llGetLocalPos() 1781 public LSL_Vector llGetLocalPos()
1709 { 1782 {
1710 m_host.AddScriptLPS(1); 1783 m_host.AddScriptLPS(1);
1711 if (m_host.ParentID != 0) 1784 if (m_host.ParentID != 0)
1712 { 1785 {
1713 return new LSL_Types.Vector3(m_host.OffsetPosition.X, 1786 return new LSL_Vector(m_host.OffsetPosition.X,
1714 m_host.OffsetPosition.Y, 1787 m_host.OffsetPosition.Y,
1715 m_host.OffsetPosition.Z); 1788 m_host.OffsetPosition.Z);
1716 } 1789 }
1717 else 1790 else
1718 { 1791 {
1719 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 1792 return new LSL_Vector(m_host.AbsolutePosition.X,
1720 m_host.AbsolutePosition.Y, 1793 m_host.AbsolutePosition.Y,
1721 m_host.AbsolutePosition.Z); 1794 m_host.AbsolutePosition.Z);
1722 } 1795 }
1723 } 1796 }
1724 1797
1725 public void llSetRot(LSL_Types.Quaternion rot) 1798 public void llSetRot(LSL_Rotation rot)
1726 { 1799 {
1727 m_host.AddScriptLPS(1); 1800 m_host.AddScriptLPS(1);
1728 1801
@@ -1731,31 +1804,27 @@ namespace OpenSim.Region.ScriptEngine.Common
1731 ScriptSleep(200); 1804 ScriptSleep(200);
1732 } 1805 }
1733 1806
1734 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1807 private void SetRot(SceneObjectPart part, LSL_Rotation rot)
1735 { 1808 {
1736 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1809 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1737 // Update rotation does not move the object in the physics scene if it's a linkset. 1810 // Update rotation does not move the object in the physics scene if it's a linkset.
1738 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1811 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1739 } 1812 }
1740 1813
1741 public LSL_Types.Quaternion llGetRot() 1814 public LSL_Rotation llGetRot()
1742 { 1815 {
1743 m_host.AddScriptLPS(1); 1816 m_host.AddScriptLPS(1);
1744 Quaternion q = m_host.RotationOffset; 1817 Quaternion q = m_host.RotationOffset;
1745 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1818 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
1746 } 1819 }
1747 1820
1748 public LSL_Types.Quaternion llGetLocalRot() 1821 public LSL_Rotation llGetLocalRot()
1749 { 1822 {
1750 m_host.AddScriptLPS(1); 1823 m_host.AddScriptLPS(1);
1751 return new LSL_Types.Quaternion( 1824 return new LSL_Rotation(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W);
1752 m_host.RotationOffset.X,
1753 m_host.RotationOffset.Y,
1754 m_host.RotationOffset.Z,
1755 m_host.RotationOffset.W);
1756 } 1825 }
1757 1826
1758 public void llSetForce(LSL_Types.Vector3 force, int local) 1827 public void llSetForce(LSL_Vector force, int local)
1759 { 1828 {
1760 m_host.AddScriptLPS(1); 1829 m_host.AddScriptLPS(1);
1761 1830
@@ -1771,9 +1840,9 @@ namespace OpenSim.Region.ScriptEngine.Common
1771 } 1840 }
1772 } 1841 }
1773 1842
1774 public LSL_Types.Vector3 llGetForce() 1843 public LSL_Vector llGetForce()
1775 { 1844 {
1776 LSL_Types.Vector3 force = new LSL_Types.Vector3(0.0, 0.0, 0.0); 1845 LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0);
1777 1846
1778 m_host.AddScriptLPS(1); 1847 m_host.AddScriptLPS(1);
1779 1848
@@ -1791,11 +1860,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1791 return force; 1860 return force;
1792 } 1861 }
1793 1862
1794 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1863 public LSL_Integer llTarget(LSL_Vector position, double range)
1795 { 1864 {
1796 m_host.AddScriptLPS(1); 1865 m_host.AddScriptLPS(1);
1797 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1866 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
1798
1799 } 1867 }
1800 1868
1801 public void llTargetRemove(int number) 1869 public void llTargetRemove(int number)
@@ -1804,7 +1872,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1804 m_host.unregisterTargetWaypoint(number); 1872 m_host.unregisterTargetWaypoint(number);
1805 } 1873 }
1806 1874
1807 public LSL_Types.LSLInteger llRotTarget(LSL_Types.Quaternion rot, double error) 1875 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
1808 { 1876 {
1809 m_host.AddScriptLPS(1); 1877 m_host.AddScriptLPS(1);
1810 NotImplemented("llRotTarget"); 1878 NotImplemented("llRotTarget");
@@ -1817,7 +1885,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1817 NotImplemented("llRotTargetRemove"); 1885 NotImplemented("llRotTargetRemove");
1818 } 1886 }
1819 1887
1820 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1888 public void llMoveToTarget(LSL_Vector target, double tau)
1821 { 1889 {
1822 m_host.AddScriptLPS(1); 1890 m_host.AddScriptLPS(1);
1823 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1891 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
@@ -1829,7 +1897,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1829 m_host.StopMoveToTarget(); 1897 m_host.StopMoveToTarget();
1830 } 1898 }
1831 1899
1832 public void llApplyImpulse(LSL_Types.Vector3 force, int local) 1900 public void llApplyImpulse(LSL_Vector force, int local)
1833 { 1901 {
1834 m_host.AddScriptLPS(1); 1902 m_host.AddScriptLPS(1);
1835 //No energy force yet 1903 //No energy force yet
@@ -1844,62 +1912,62 @@ namespace OpenSim.Region.ScriptEngine.Common
1844 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1912 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1845 } 1913 }
1846 1914
1847 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1915 public void llApplyRotationalImpulse(LSL_Vector force, int local)
1848 { 1916 {
1849 m_host.AddScriptLPS(1); 1917 m_host.AddScriptLPS(1);
1850 NotImplemented("llApplyRotationalImpulse"); 1918 NotImplemented("llApplyRotationalImpulse");
1851 } 1919 }
1852 1920
1853 public void llSetTorque(LSL_Types.Vector3 torque, int local) 1921 public void llSetTorque(LSL_Vector torque, int local)
1854 { 1922 {
1855 m_host.AddScriptLPS(1); 1923 m_host.AddScriptLPS(1);
1856 NotImplemented("llSetTorque"); 1924 NotImplemented("llSetTorque");
1857 } 1925 }
1858 1926
1859 public LSL_Types.Vector3 llGetTorque() 1927 public LSL_Vector llGetTorque()
1860 { 1928 {
1861 m_host.AddScriptLPS(1); 1929 m_host.AddScriptLPS(1);
1862 NotImplemented("llGetTorque"); 1930 NotImplemented("llGetTorque");
1863 return new LSL_Types.Vector3(); 1931 return new LSL_Vector();
1864 } 1932 }
1865 1933
1866 public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) 1934 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local)
1867 { 1935 {
1868 m_host.AddScriptLPS(1); 1936 m_host.AddScriptLPS(1);
1869 NotImplemented("llSetForceAndTorque"); 1937 NotImplemented("llSetForceAndTorque");
1870 } 1938 }
1871 1939
1872 public LSL_Types.Vector3 llGetVel() 1940 public LSL_Vector llGetVel()
1873 { 1941 {
1874 m_host.AddScriptLPS(1); 1942 m_host.AddScriptLPS(1);
1875 return new LSL_Types.Vector3(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z); 1943 return new LSL_Vector(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z);
1876 } 1944 }
1877 1945
1878 public LSL_Types.Vector3 llGetAccel() 1946 public LSL_Vector llGetAccel()
1879 { 1947 {
1880 m_host.AddScriptLPS(1); 1948 m_host.AddScriptLPS(1);
1881 return new LSL_Types.Vector3(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z); 1949 return new LSL_Vector(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z);
1882 } 1950 }
1883 1951
1884 public LSL_Types.Vector3 llGetOmega() 1952 public LSL_Vector llGetOmega()
1885 { 1953 {
1886 m_host.AddScriptLPS(1); 1954 m_host.AddScriptLPS(1);
1887 return new LSL_Types.Vector3(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z); 1955 return new LSL_Vector(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z);
1888 } 1956 }
1889 1957
1890 public double llGetTimeOfDay() 1958 public LSL_Float llGetTimeOfDay()
1891 { 1959 {
1892 m_host.AddScriptLPS(1); 1960 m_host.AddScriptLPS(1);
1893 return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation); 1961 return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation);
1894 } 1962 }
1895 1963
1896 public double llGetWallclock() 1964 public LSL_Float llGetWallclock()
1897 { 1965 {
1898 m_host.AddScriptLPS(1); 1966 m_host.AddScriptLPS(1);
1899 return DateTime.Now.TimeOfDay.TotalSeconds; 1967 return DateTime.Now.TimeOfDay.TotalSeconds;
1900 } 1968 }
1901 1969
1902 public double llGetTime() 1970 public LSL_Float llGetTime()
1903 { 1971 {
1904 m_host.AddScriptLPS(1); 1972 m_host.AddScriptLPS(1);
1905 TimeSpan ScriptTime = DateTime.Now - m_timer; 1973 TimeSpan ScriptTime = DateTime.Now - m_timer;
@@ -1912,7 +1980,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1912 m_timer = DateTime.Now; 1980 m_timer = DateTime.Now;
1913 } 1981 }
1914 1982
1915 public double llGetAndResetTime() 1983 public LSL_Float llGetAndResetTime()
1916 { 1984 {
1917 m_host.AddScriptLPS(1); 1985 m_host.AddScriptLPS(1);
1918 TimeSpan ScriptTime = DateTime.Now - m_timer; 1986 TimeSpan ScriptTime = DateTime.Now - m_timer;
@@ -2017,7 +2085,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2017 /// this more complicated than it might otherwise seem. 2085 /// this more complicated than it might otherwise seem.
2018 /// </summary> 2086 /// </summary>
2019 2087
2020 public string llGetSubString(string src, int start, int end) 2088 public LSL_String llGetSubString(string src, int start, int end)
2021 { 2089 {
2022 2090
2023 m_host.AddScriptLPS(1); 2091 m_host.AddScriptLPS(1);
@@ -2113,7 +2181,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2113 /// i.e. end < start. 2181 /// i.e. end < start.
2114 /// </summary> 2182 /// </summary>
2115 2183
2116 public string llDeleteSubString(string src, int start, int end) 2184 public LSL_String llDeleteSubString(string src, int start, int end)
2117 { 2185 {
2118 2186
2119 m_host.AddScriptLPS(1); 2187 m_host.AddScriptLPS(1);
@@ -2196,7 +2264,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2196 /// string bound, with the result being a concatenation. 2264 /// string bound, with the result being a concatenation.
2197 /// </summary> 2265 /// </summary>
2198 2266
2199 public string llInsertString(string dest, int index, string src) 2267 public LSL_String llInsertString(string dest, int index, string src)
2200 { 2268 {
2201 2269
2202 m_host.AddScriptLPS(1); 2270 m_host.AddScriptLPS(1);
@@ -2234,19 +2302,19 @@ namespace OpenSim.Region.ScriptEngine.Common
2234 2302
2235 } 2303 }
2236 2304
2237 public string llToUpper(string src) 2305 public LSL_String llToUpper(string src)
2238 { 2306 {
2239 m_host.AddScriptLPS(1); 2307 m_host.AddScriptLPS(1);
2240 return src.ToUpper(); 2308 return src.ToUpper();
2241 } 2309 }
2242 2310
2243 public string llToLower(string src) 2311 public LSL_String llToLower(string src)
2244 { 2312 {
2245 m_host.AddScriptLPS(1); 2313 m_host.AddScriptLPS(1);
2246 return src.ToLower(); 2314 return src.ToLower();
2247 } 2315 }
2248 2316
2249 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2317 public LSL_Integer llGiveMoney(string destination, int amount)
2250 { 2318 {
2251 UUID invItemID=InventorySelf(); 2319 UUID invItemID=InventorySelf();
2252 if (invItemID == UUID.Zero) 2320 if (invItemID == UUID.Zero)
@@ -2315,7 +2383,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2315 // ScriptSleep(100); 2383 // ScriptSleep(100);
2316 } 2384 }
2317 2385
2318 public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2386 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
2319 { 2387 {
2320 m_host.AddScriptLPS(1); 2388 m_host.AddScriptLPS(1);
2321 if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) 2389 if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
@@ -2363,11 +2431,11 @@ namespace OpenSim.Region.ScriptEngine.Common
2363 // objects rezzed with this method are die_at_edge by default. 2431 // objects rezzed with this method are die_at_edge by default.
2364 new_group.RootPart.SetDieAtEdge(true); 2432 new_group.RootPart.SetDieAtEdge(true);
2365 2433
2366 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.ToString()) }); 2434 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_String(new_group.RootPart.ToString()) });
2367 float groupmass = new_group.GetMass(); 2435 float groupmass = new_group.GetMass();
2368 2436
2369 //Recoil. 2437 //Recoil.
2370 llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); 2438 llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
2371 found = true; 2439 found = true;
2372 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 2440 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
2373 ScriptSleep((int)((groupmass * velmag) / 10)); 2441 ScriptSleep((int)((groupmass * velmag) / 10));
@@ -2379,12 +2447,12 @@ namespace OpenSim.Region.ScriptEngine.Common
2379 llSay(0, "Could not find object " + inventory); 2447 llSay(0, "Could not find object " + inventory);
2380 } 2448 }
2381 2449
2382 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2450 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
2383 { 2451 {
2384 llRezAtRoot(inventory, pos, vel, rot, param); 2452 llRezAtRoot(inventory, pos, vel, rot, param);
2385 } 2453 }
2386 2454
2387 public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) 2455 public void llLookAt(LSL_Vector target, double strength, double damping)
2388 { 2456 {
2389 m_host.AddScriptLPS(1); 2457 m_host.AddScriptLPS(1);
2390 NotImplemented("llLookAt"); 2458 NotImplemented("llLookAt");
@@ -2409,7 +2477,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2409 Thread.Sleep((int)(sec * 1000)); 2477 Thread.Sleep((int)(sec * 1000));
2410 } 2478 }
2411 2479
2412 public double llGetMass() 2480 public LSL_Float llGetMass()
2413 { 2481 {
2414 m_host.AddScriptLPS(1); 2482 m_host.AddScriptLPS(1);
2415 return m_host.GetMass(); 2483 return m_host.GetMass();
@@ -2495,7 +2563,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2495 Deprecated("llReleaseCamera"); 2563 Deprecated("llReleaseCamera");
2496 } 2564 }
2497 2565
2498 public string llGetOwner() 2566 public LSL_String llGetOwner()
2499 { 2567 {
2500 m_host.AddScriptLPS(1); 2568 m_host.AddScriptLPS(1);
2501 2569
@@ -2544,6 +2612,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2544 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid; 2612 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
2545 msg.binaryBucket = new byte[0];// binaryBucket; 2613 msg.binaryBucket = new byte[0];// binaryBucket;
2546 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2614 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2615 // ScriptSleep(2000);
2547 } 2616 }
2548 2617
2549 public void llEmail(string address, string subject, string message) 2618 public void llEmail(string address, string subject, string message)
@@ -2563,7 +2632,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2563 NotImplemented("llGetNextEmail"); 2632 NotImplemented("llGetNextEmail");
2564 } 2633 }
2565 2634
2566 public string llGetKey() 2635 public LSL_String llGetKey()
2567 { 2636 {
2568 m_host.AddScriptLPS(1); 2637 m_host.AddScriptLPS(1);
2569 return m_host.UUID.ToString(); 2638 return m_host.UUID.ToString();
@@ -2607,13 +2676,13 @@ namespace OpenSim.Region.ScriptEngine.Common
2607 Deprecated("llSoundPreload"); 2676 Deprecated("llSoundPreload");
2608 } 2677 }
2609 2678
2610 public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) 2679 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
2611 { 2680 {
2612 m_host.AddScriptLPS(1); 2681 m_host.AddScriptLPS(1);
2613 NotImplemented("llRotLookAt"); 2682 NotImplemented("llRotLookAt");
2614 } 2683 }
2615 2684
2616 public LSL_Types.LSLInteger llStringLength(string str) 2685 public LSL_Integer llStringLength(string str)
2617 { 2686 {
2618 m_host.AddScriptLPS(1); 2687 m_host.AddScriptLPS(1);
2619 if (str.Length > 0) 2688 if (str.Length > 0)
@@ -2697,22 +2766,23 @@ namespace OpenSim.Region.ScriptEngine.Common
2697 NotImplemented("llStopPointAt"); 2766 NotImplemented("llStopPointAt");
2698 } 2767 }
2699 2768
2700 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2769 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
2701 { 2770 {
2702 m_host.AddScriptLPS(1); 2771 m_host.AddScriptLPS(1);
2703 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2772 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2704 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2773 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2705 m_host.ScheduleTerseUpdate(); 2774 m_host.ScheduleTerseUpdate();
2706 m_host.SendTerseUpdateToAllClients(); 2775 m_host.SendTerseUpdateToAllClients();
2776 m_host.ParentGroup.HasGroupChanged = true;
2707 } 2777 }
2708 2778
2709 public LSL_Types.LSLInteger llGetStartParameter() 2779 public LSL_Integer llGetStartParameter()
2710 { 2780 {
2711 // This is not handled here 2781 // This is not handled here
2712 return 0; 2782 return 0;
2713 } 2783 }
2714 2784
2715 public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) 2785 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
2716 { 2786 {
2717 m_host.AddScriptLPS(1); 2787 m_host.AddScriptLPS(1);
2718 NotImplemented("llGodLikeRezObject"); 2788 NotImplemented("llGodLikeRezObject");
@@ -2732,15 +2802,20 @@ namespace OpenSim.Region.ScriptEngine.Common
2732 2802
2733 if (agentID == UUID.Zero || perm == 0) // Releasing permissions 2803 if (agentID == UUID.Zero || perm == 0) // Releasing permissions
2734 { 2804 {
2805 llReleaseControls();
2806
2735 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero; 2807 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero;
2736 m_host.TaskInventory[invItemID].PermsMask=0; 2808 m_host.TaskInventory[invItemID].PermsMask=0;
2737 2809
2738 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2810 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
2739 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); 2811 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Integer(0)});
2740 2812
2741 return; 2813 return;
2742 } 2814 }
2743 2815
2816 if ( m_host.TaskInventory[invItemID].PermsGranter != agentID || (perm & BuiltIn_Commands_BaseClass.PERMISSION_TAKE_CONTROLS) == 0)
2817 llReleaseControls();
2818
2744 m_host.AddScriptLPS(1); 2819 m_host.AddScriptLPS(1);
2745 2820
2746 if (m_host.ParentGroup.RootPart.IsAttachment && agent == m_host.ParentGroup.RootPart.AttachedAvatar) 2821 if (m_host.ParentGroup.RootPart.IsAttachment && agent == m_host.ParentGroup.RootPart.AttachedAvatar)
@@ -2757,7 +2832,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2757 m_host.TaskInventory[invItemID].PermsMask=perm; 2832 m_host.TaskInventory[invItemID].PermsMask=perm;
2758 2833
2759 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2834 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
2760 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(perm)}); 2835 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Integer(perm)});
2761 2836
2762 return; 2837 return;
2763 } 2838 }
@@ -2775,7 +2850,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2775 m_host.TaskInventory[invItemID].PermsMask=perm; 2850 m_host.TaskInventory[invItemID].PermsMask=perm;
2776 2851
2777 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2852 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
2778 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(perm)}); 2853 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Integer(perm)});
2779 2854
2780 return; 2855 return;
2781 } 2856 }
@@ -2803,7 +2878,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2803 2878
2804 // Requested agent is not in range, refuse perms 2879 // Requested agent is not in range, refuse perms
2805 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2880 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
2806 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); 2881 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Integer(0)});
2807 } 2882 }
2808 2883
2809 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer) 2884 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer)
@@ -2821,10 +2896,10 @@ namespace OpenSim.Region.ScriptEngine.Common
2821 2896
2822 m_host.TaskInventory[invItemID].PermsMask=answer; 2897 m_host.TaskInventory[invItemID].PermsMask=answer;
2823 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2898 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
2824 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(answer)}); 2899 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Integer(answer)});
2825 } 2900 }
2826 2901
2827 public string llGetPermissionsKey() 2902 public LSL_String llGetPermissionsKey()
2828 { 2903 {
2829 m_host.AddScriptLPS(1); 2904 m_host.AddScriptLPS(1);
2830 2905
@@ -2839,7 +2914,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2839 return UUID.Zero.ToString(); 2914 return UUID.Zero.ToString();
2840 } 2915 }
2841 2916
2842 public LSL_Types.LSLInteger llGetPermissions() 2917 public LSL_Integer llGetPermissions()
2843 { 2918 {
2844 m_host.AddScriptLPS(1); 2919 m_host.AddScriptLPS(1);
2845 2920
@@ -2854,7 +2929,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2854 return 0; 2929 return 0;
2855 } 2930 }
2856 2931
2857 public LSL_Types.LSLInteger llGetLinkNumber() 2932 public LSL_Integer llGetLinkNumber()
2858 { 2933 {
2859 m_host.AddScriptLPS(1); 2934 m_host.AddScriptLPS(1);
2860 2935
@@ -2868,7 +2943,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2868 } 2943 }
2869 } 2944 }
2870 2945
2871 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) 2946 public void llSetLinkColor(int linknumber, LSL_Vector color, int face)
2872 { 2947 {
2873 m_host.AddScriptLPS(1); 2948 m_host.AddScriptLPS(1);
2874 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2949 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
@@ -2991,6 +3066,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2991 } 3066 }
2992 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 3067 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2993 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected); 3068 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
3069 parentPrim.HasGroupChanged = true;
3070 parentPrim.ScheduleGroupForFullUpdate();
2994 parentPrim.GetProperties(client); 3071 parentPrim.GetProperties(client);
2995 3072
2996 ScriptSleep(1000); 3073 ScriptSleep(1000);
@@ -3067,13 +3144,14 @@ namespace OpenSim.Region.ScriptEngine.Common
3067 SceneObjectGroup parentPrim = m_host.ParentGroup; 3144 SceneObjectGroup parentPrim = m_host.ParentGroup;
3068 List<SceneObjectPart> parts = new List<SceneObjectPart>(parentPrim.Children.Values); 3145 List<SceneObjectPart> parts = new List<SceneObjectPart>(parentPrim.Children.Values);
3069 parts.Remove(parentPrim.RootPart); 3146 parts.Remove(parentPrim.RootPart);
3070 foreach (SceneObjectPart part in parts) { 3147 foreach (SceneObjectPart part in parts)
3148 {
3071 parentPrim.DelinkFromGroup(part.LocalId, true); 3149 parentPrim.DelinkFromGroup(part.LocalId, true);
3072 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 3150 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
3073 } 3151 }
3074 } 3152 }
3075 3153
3076 public string llGetLinkKey(int linknum) 3154 public LSL_String llGetLinkKey(int linknum)
3077 { 3155 {
3078 m_host.AddScriptLPS(1); 3156 m_host.AddScriptLPS(1);
3079 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 3157 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
@@ -3087,7 +3165,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3087 } 3165 }
3088 } 3166 }
3089 3167
3090 public string llGetLinkName(int linknum) 3168 public LSL_String llGetLinkName(int linknum)
3091 { 3169 {
3092 m_host.AddScriptLPS(1); 3170 m_host.AddScriptLPS(1);
3093 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 3171 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
@@ -3101,7 +3179,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3101 } 3179 }
3102 } 3180 }
3103 3181
3104 public LSL_Types.LSLInteger llGetInventoryNumber(int type) 3182 public LSL_Integer llGetInventoryNumber(int type)
3105 { 3183 {
3106 m_host.AddScriptLPS(1); 3184 m_host.AddScriptLPS(1);
3107 int count = 0; 3185 int count = 0;
@@ -3115,7 +3193,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3115 return count; 3193 return count;
3116 } 3194 }
3117 3195
3118 public string llGetInventoryName(int type, int number) 3196 public LSL_String llGetInventoryName(int type, int number)
3119 { 3197 {
3120 m_host.AddScriptLPS(1); 3198 m_host.AddScriptLPS(1);
3121 ArrayList keys = new ArrayList(); 3199 ArrayList keys = new ArrayList();
@@ -3172,7 +3250,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3172 // assume it is not running. 3250 // assume it is not running.
3173 } 3251 }
3174 3252
3175 public double llGetEnergy() 3253 public LSL_Float llGetEnergy()
3176 { 3254 {
3177 m_host.AddScriptLPS(1); 3255 m_host.AddScriptLPS(1);
3178 // TODO: figure out real energy value 3256 // TODO: figure out real energy value
@@ -3236,16 +3314,17 @@ namespace OpenSim.Region.ScriptEngine.Common
3236 } 3314 }
3237 } 3315 }
3238 3316
3239 public void llSetText(string text, LSL_Types.Vector3 color, double alpha) 3317 public void llSetText(string text, LSL_Vector color, double alpha)
3240 { 3318 {
3241 m_host.AddScriptLPS(1); 3319 m_host.AddScriptLPS(1);
3242 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), 3320 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f),
3243 Util.Clip((float)color.y, 0.0f, 1.0f), 3321 Util.Clip((float)color.y, 0.0f, 1.0f),
3244 Util.Clip((float)color.z, 0.0f, 1.0f)); 3322 Util.Clip((float)color.z, 0.0f, 1.0f));
3245 m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f)); 3323 m_host.SetText(text, av3, Util.Clip((float)alpha, 0.0f, 1.0f));
3324 m_host.ParentGroup.HasGroupChanged = true;
3246 } 3325 }
3247 3326
3248 public double llWater(LSL_Types.Vector3 offset) 3327 public LSL_Float llWater(LSL_Vector offset)
3249 { 3328 {
3250 m_host.AddScriptLPS(1); 3329 m_host.AddScriptLPS(1);
3251 return World.RegionInfo.RegionSettings.WaterHeight; 3330 return World.RegionInfo.RegionSettings.WaterHeight;
@@ -3257,7 +3336,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3257 NotImplemented("llPassTouches"); 3336 NotImplemented("llPassTouches");
3258 } 3337 }
3259 3338
3260 public string llRequestAgentData(string id, int data) 3339 public LSL_String llRequestAgentData(string id, int data)
3261 { 3340 {
3262 m_host.AddScriptLPS(1); 3341 m_host.AddScriptLPS(1);
3263 3342
@@ -3310,7 +3389,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3310 return tid.ToString(); 3389 return tid.ToString();
3311 } 3390 }
3312 3391
3313 public string llRequestInventoryData(string name) 3392 public LSL_String llRequestInventoryData(string name)
3314 { 3393 {
3315 m_host.AddScriptLPS(1); 3394 m_host.AddScriptLPS(1);
3316 3395
@@ -3372,6 +3451,12 @@ namespace OpenSim.Region.ScriptEngine.Common
3372 // ScriptSleep(5000); 3451 // ScriptSleep(5000);
3373 } 3452 }
3374 3453
3454 public void llTextBox(string avatar, string message, int chat_channel)
3455 {
3456 m_host.AddScriptLPS(1);
3457 NotImplemented("llTextBox");
3458 }
3459
3375 public void llModifyLand(int action, int brush) 3460 public void llModifyLand(int action, int brush)
3376 { 3461 {
3377 m_host.AddScriptLPS(1); 3462 m_host.AddScriptLPS(1);
@@ -3390,7 +3475,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3390 NotImplemented("llCollisionSprite"); 3475 NotImplemented("llCollisionSprite");
3391 } 3476 }
3392 3477
3393 public string llGetAnimation(string id) 3478 public LSL_String llGetAnimation(string id)
3394 { 3479 {
3395 m_host.AddScriptLPS(1); 3480 m_host.AddScriptLPS(1);
3396 NotImplemented("llGetAnimation"); 3481 NotImplemented("llGetAnimation");
@@ -3427,7 +3512,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3427 3512
3428 object[] resobj = new object[] 3513 object[] resobj = new object[]
3429 { 3514 {
3430 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3515 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3431 }; 3516 };
3432 3517
3433 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3518 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3451,7 +3536,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3451 partItemID = item.ItemID; 3536 partItemID = item.ItemID;
3452 Object[] resobj = new object[] 3537 Object[] resobj = new object[]
3453 { 3538 {
3454 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3539 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3455 }; 3540 };
3456 3541
3457 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3542 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3479,7 +3564,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3479 partItemID = item.ItemID; 3564 partItemID = item.ItemID;
3480 Object[] resobj = new object[] 3565 Object[] resobj = new object[]
3481 { 3566 {
3482 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3567 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3483 }; 3568 };
3484 3569
3485 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3570 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3509,7 +3594,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3509 partItemID = item.ItemID; 3594 partItemID = item.ItemID;
3510 Object[] resobj = new object[] 3595 Object[] resobj = new object[]
3511 { 3596 {
3512 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3597 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3513 }; 3598 };
3514 3599
3515 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3600 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3533,7 +3618,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3533 3618
3534 object[] resobj = new object[] 3619 object[] resobj = new object[]
3535 { 3620 {
3536 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3621 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3537 }; 3622 };
3538 3623
3539 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3624 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3560,7 +3645,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3560 partItemID = item.ItemID; 3645 partItemID = item.ItemID;
3561 Object[] resObjDef = new object[] 3646 Object[] resObjDef = new object[]
3562 { 3647 {
3563 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3648 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3564 }; 3649 };
3565 3650
3566 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 3651 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -3578,7 +3663,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3578 3663
3579 } 3664 }
3580 3665
3581 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) 3666 public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local)
3582 { 3667 {
3583 m_host.AddScriptLPS(1); 3668 m_host.AddScriptLPS(1);
3584 SceneObjectPart targ = World.GetSceneObjectPart(target); 3669 SceneObjectPart targ = World.GetSceneObjectPart(target);
@@ -3593,7 +3678,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3593 NotImplemented("llPassCollisions"); 3678 NotImplemented("llPassCollisions");
3594 } 3679 }
3595 3680
3596 public string llGetScriptName() 3681 public LSL_String llGetScriptName()
3597 { 3682 {
3598 3683
3599 string result = String.Empty; 3684 string result = String.Empty;
@@ -3670,17 +3755,22 @@ namespace OpenSim.Region.ScriptEngine.Common
3670 3755
3671 } 3756 }
3672 3757
3673 public LSL_Types.LSLInteger llGetNumberOfSides() 3758 public LSL_Integer llGetNumberOfSides()
3674 { 3759 {
3675 m_host.AddScriptLPS(1); 3760 m_host.AddScriptLPS(1);
3761 return GetNumberOfSides(m_host);
3762 }
3763
3764 private int GetNumberOfSides(SceneObjectPart part)
3765 {
3676 int ret = 0; 3766 int ret = 0;
3677 bool hasCut; 3767 bool hasCut;
3678 bool hasHollow; 3768 bool hasHollow;
3679 bool hasDimple; 3769 bool hasDimple;
3680 bool hasProfileCut; 3770 bool hasProfileCut;
3681 3771
3682 int primType = getScriptPrimType(m_host.Shape); 3772 int primType = getScriptPrimType(part.Shape);
3683 hasCutHollowDimpleProfileCut(primType, m_host.Shape, out hasCut, out hasHollow, out hasDimple, out hasProfileCut); 3773 hasCutHollowDimpleProfileCut(primType, part.Shape, out hasCut, out hasHollow, out hasDimple, out hasProfileCut);
3684 3774
3685 switch (primType) 3775 switch (primType)
3686 { 3776 {
@@ -3759,7 +3849,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3759 // Xantor 29/apr/2008 3849 // Xantor 29/apr/2008
3760 // Returns rotation described by rotating angle radians about axis. 3850 // Returns rotation described by rotating angle radians about axis.
3761 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) 3851 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2))
3762 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) 3852 public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle)
3763 { 3853 {
3764 m_host.AddScriptLPS(1); 3854 m_host.AddScriptLPS(1);
3765 3855
@@ -3771,13 +3861,13 @@ namespace OpenSim.Region.ScriptEngine.Common
3771 y = axis.y * t; 3861 y = axis.y * t;
3772 z = axis.z * t; 3862 z = axis.z * t;
3773 3863
3774 return new LSL_Types.Quaternion(x,y,z,s); 3864 return new LSL_Rotation(x,y,z,s);
3775 } 3865 }
3776 3866
3777 3867
3778 // Xantor 29/apr/2008 3868 // Xantor 29/apr/2008
3779 // converts a Quaternion to X,Y,Z axis rotations 3869 // converts a Quaternion to X,Y,Z axis rotations
3780 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) 3870 public LSL_Vector llRot2Axis(LSL_Rotation rot)
3781 { 3871 {
3782 m_host.AddScriptLPS(1); 3872 m_host.AddScriptLPS(1);
3783 double x,y,z; 3873 double x,y,z;
@@ -3809,13 +3899,13 @@ namespace OpenSim.Region.ScriptEngine.Common
3809 } 3899 }
3810 3900
3811 3901
3812 return new LSL_Types.Vector3(x,y,z); 3902 return new LSL_Vector(x,y,z);
3813 3903
3814 } 3904 }
3815 3905
3816 3906
3817 // Returns the angle of a quaternion (see llRot2Axis for the axis) 3907 // Returns the angle of a quaternion (see llRot2Axis for the axis)
3818 public double llRot2Angle(LSL_Types.Quaternion rot) 3908 public LSL_Float llRot2Angle(LSL_Rotation rot)
3819 { 3909 {
3820 m_host.AddScriptLPS(1); 3910 m_host.AddScriptLPS(1);
3821 3911
@@ -3837,27 +3927,27 @@ namespace OpenSim.Region.ScriptEngine.Common
3837 3927
3838 } 3928 }
3839 3929
3840 public double llAcos(double val) 3930 public LSL_Float llAcos(double val)
3841 { 3931 {
3842 m_host.AddScriptLPS(1); 3932 m_host.AddScriptLPS(1);
3843 return (double)Math.Acos(val); 3933 return (double)Math.Acos(val);
3844 } 3934 }
3845 3935
3846 public double llAsin(double val) 3936 public LSL_Float llAsin(double val)
3847 { 3937 {
3848 m_host.AddScriptLPS(1); 3938 m_host.AddScriptLPS(1);
3849 return (double)Math.Asin(val); 3939 return (double)Math.Asin(val);
3850 } 3940 }
3851 3941
3852 // Xantor 30/apr/2008 3942 // Xantor 30/apr/2008
3853 public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) 3943 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b)
3854 { 3944 {
3855 m_host.AddScriptLPS(1); 3945 m_host.AddScriptLPS(1);
3856 3946
3857 return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2; 3947 return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2;
3858 } 3948 }
3859 3949
3860 public string llGetInventoryKey(string name) 3950 public LSL_String llGetInventoryKey(string name)
3861 { 3951 {
3862 m_host.AddScriptLPS(1); 3952 m_host.AddScriptLPS(1);
3863 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 3953 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -3887,15 +3977,15 @@ namespace OpenSim.Region.ScriptEngine.Common
3887 m_host.ParentGroup.RootPart.AllowedDrop = false; 3977 m_host.ParentGroup.RootPart.AllowedDrop = false;
3888 } 3978 }
3889 3979
3890 public LSL_Types.Vector3 llGetSunDirection() 3980 public LSL_Vector llGetSunDirection()
3891 { 3981 {
3892 m_host.AddScriptLPS(1); 3982 m_host.AddScriptLPS(1);
3893 3983
3894 LSL_Types.Vector3 SunDoubleVector3; 3984 LSL_Vector SunDoubleVector3;
3895 Vector3 SunFloatVector3; 3985 Vector3 SunFloatVector3;
3896 3986
3897 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3987 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3898 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double) 3988 // have to convert from Vector3 (float) to LSL_Vector (double)
3899 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3989 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3900 SunDoubleVector3.x = (double)SunFloatVector3.X; 3990 SunDoubleVector3.x = (double)SunFloatVector3.X;
3901 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3991 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3904,26 +3994,38 @@ namespace OpenSim.Region.ScriptEngine.Common
3904 return SunDoubleVector3; 3994 return SunDoubleVector3;
3905 } 3995 }
3906 3996
3907 public LSL_Types.Vector3 llGetTextureOffset(int face) 3997 public LSL_Vector llGetTextureOffset(int face)
3908 { 3998 {
3909 m_host.AddScriptLPS(1); 3999 m_host.AddScriptLPS(1);
3910 Primitive.TextureEntry tex = m_host.Shape.Textures; 4000 return GetTextureOffset(m_host, face);
3911 LSL_Types.Vector3 offset; 4001 }
3912 if (face == -1) 4002
4003 private LSL_Vector GetTextureOffset(SceneObjectPart part, int face)
4004 {
4005 Primitive.TextureEntry tex = part.Shape.Textures;
4006 LSL_Vector offset = new LSL_Vector();
4007 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
3913 { 4008 {
3914 face = 0; 4009 face = 0;
3915 } 4010 }
3916 offset.x = tex.GetFace((uint)face).OffsetU; 4011 if (face >= 0 && face < GetNumberOfSides(part))
3917 offset.y = tex.GetFace((uint)face).OffsetV; 4012 {
3918 offset.z = 0.0; 4013 offset.x = tex.GetFace((uint)face).OffsetU;
3919 return offset; 4014 offset.y = tex.GetFace((uint)face).OffsetV;
4015 offset.z = 0.0;
4016 return offset;
4017 }
4018 else
4019 {
4020 return offset;
4021 }
3920 } 4022 }
3921 4023
3922 public LSL_Types.Vector3 llGetTextureScale(int side) 4024 public LSL_Vector llGetTextureScale(int side)
3923 { 4025 {
3924 m_host.AddScriptLPS(1); 4026 m_host.AddScriptLPS(1);
3925 Primitive.TextureEntry tex = m_host.Shape.Textures; 4027 Primitive.TextureEntry tex = m_host.Shape.Textures;
3926 LSL_Types.Vector3 scale; 4028 LSL_Vector scale;
3927 if (side == -1) 4029 if (side == -1)
3928 { 4030 {
3929 side = 0; 4031 side = 0;
@@ -3934,24 +4036,36 @@ namespace OpenSim.Region.ScriptEngine.Common
3934 return scale; 4036 return scale;
3935 } 4037 }
3936 4038
3937 public double llGetTextureRot(int face) 4039 public LSL_Float llGetTextureRot(int face)
3938 { 4040 {
3939 m_host.AddScriptLPS(1); 4041 m_host.AddScriptLPS(1);
3940 Primitive.TextureEntry tex = m_host.Shape.Textures; 4042 return GetTextureRot(m_host, face);
4043 }
4044
4045 private LSL_Float GetTextureRot(SceneObjectPart part, int face)
4046 {
4047 Primitive.TextureEntry tex = part.Shape.Textures;
3941 if (face == -1) 4048 if (face == -1)
3942 { 4049 {
3943 face = 0; 4050 face = 0;
3944 } 4051 }
3945 return tex.GetFace((uint)face).Rotation; 4052 if (face >= 0 && face < GetNumberOfSides(part))
4053 {
4054 return tex.GetFace((uint)face).Rotation;
4055 }
4056 else
4057 {
4058 return 0.0;
4059 }
3946 } 4060 }
3947 4061
3948 public LSL_Types.LSLInteger llSubStringIndex(string source, string pattern) 4062 public LSL_Integer llSubStringIndex(string source, string pattern)
3949 { 4063 {
3950 m_host.AddScriptLPS(1); 4064 m_host.AddScriptLPS(1);
3951 return source.IndexOf(pattern); 4065 return source.IndexOf(pattern);
3952 } 4066 }
3953 4067
3954 public string llGetOwnerKey(string id) 4068 public LSL_String llGetOwnerKey(string id)
3955 { 4069 {
3956 m_host.AddScriptLPS(1); 4070 m_host.AddScriptLPS(1);
3957 UUID key = new UUID(); 4071 UUID key = new UUID();
@@ -3976,14 +4090,14 @@ namespace OpenSim.Region.ScriptEngine.Common
3976 } 4090 }
3977 } 4091 }
3978 4092
3979 public LSL_Types.Vector3 llGetCenterOfMass() 4093 public LSL_Vector llGetCenterOfMass()
3980 { 4094 {
3981 m_host.AddScriptLPS(1); 4095 m_host.AddScriptLPS(1);
3982 NotImplemented("llGetCenterOfMass"); 4096 NotImplemented("llGetCenterOfMass");
3983 return new LSL_Types.Vector3(); 4097 return new LSL_Vector();
3984 } 4098 }
3985 4099
3986 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) 4100 public LSL_List llListSort(LSL_List src, int stride, int ascending)
3987 { 4101 {
3988 m_host.AddScriptLPS(1); 4102 m_host.AddScriptLPS(1);
3989 4103
@@ -3994,7 +4108,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3994 return src.Sort(stride, ascending); 4108 return src.Sort(stride, ascending);
3995 } 4109 }
3996 4110
3997 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) 4111 public LSL_Integer llGetListLength(LSL_List src)
3998 { 4112 {
3999 m_host.AddScriptLPS(1); 4113 m_host.AddScriptLPS(1);
4000 4114
@@ -4008,7 +4122,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4008 } 4122 }
4009 } 4123 }
4010 4124
4011 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) 4125 public LSL_Integer llList2Integer(LSL_List src, int index)
4012 { 4126 {
4013 m_host.AddScriptLPS(1); 4127 m_host.AddScriptLPS(1);
4014 if (index < 0) 4128 if (index < 0)
@@ -4021,12 +4135,12 @@ namespace OpenSim.Region.ScriptEngine.Common
4021 } 4135 }
4022 try 4136 try
4023 { 4137 {
4024 if (src.Data[index] is LSL_Types.LSLInteger) 4138 if (src.Data[index] is LSL_Integer)
4025 return Convert.ToInt32(((LSL_Types.LSLInteger) src.Data[index]).value); 4139 return Convert.ToInt32(((LSL_Integer) src.Data[index]).value);
4026 else if (src.Data[index] is LSL_Types.LSLFloat) 4140 else if (src.Data[index] is LSL_Float)
4027 return Convert.ToInt32(((LSL_Types.LSLFloat) src.Data[index]).value); 4141 return Convert.ToInt32(((LSL_Float) src.Data[index]).value);
4028 else if (src.Data[index] is LSL_Types.LSLString) 4142 else if (src.Data[index] is LSL_String)
4029 return Convert.ToInt32(((LSL_Types.LSLString) src.Data[index]).m_string); 4143 return Convert.ToInt32(((LSL_String) src.Data[index]).m_string);
4030 return Convert.ToInt32(src.Data[index]); 4144 return Convert.ToInt32(src.Data[index]);
4031 } 4145 }
4032 catch (FormatException) 4146 catch (FormatException)
@@ -4035,7 +4149,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4035 } 4149 }
4036 } 4150 }
4037 4151
4038 public double osList2Double(LSL_Types.list src, int index) 4152 public double osList2Double(LSL_List src, int index)
4039 { 4153 {
4040 m_host.AddScriptLPS(1); 4154 m_host.AddScriptLPS(1);
4041 if (index < 0) 4155 if (index < 0)
@@ -4046,16 +4160,16 @@ namespace OpenSim.Region.ScriptEngine.Common
4046 { 4160 {
4047 return 0.0; 4161 return 0.0;
4048 } 4162 }
4049 if (src.Data[index] is LSL_Types.LSLInteger) 4163 if (src.Data[index] is LSL_Integer)
4050 return Convert.ToDouble(((LSL_Types.LSLInteger) src.Data[index]).value); 4164 return Convert.ToDouble(((LSL_Integer) src.Data[index]).value);
4051 else if (src.Data[index] is LSL_Types.LSLFloat) 4165 else if (src.Data[index] is LSL_Float)
4052 return Convert.ToDouble(((LSL_Types.LSLFloat) src.Data[index]).value); 4166 return Convert.ToDouble(((LSL_Float) src.Data[index]).value);
4053 else if (src.Data[index] is LSL_Types.LSLString) 4167 else if (src.Data[index] is LSL_String)
4054 return Convert.ToDouble(((LSL_Types.LSLString) src.Data[index]).m_string); 4168 return Convert.ToDouble(((LSL_String) src.Data[index]).m_string);
4055 return Convert.ToDouble(src.Data[index]); 4169 return Convert.ToDouble(src.Data[index]);
4056 } 4170 }
4057 4171
4058 public double llList2Float(LSL_Types.list src, int index) 4172 public LSL_Float llList2Float(LSL_List src, int index)
4059 { 4173 {
4060 m_host.AddScriptLPS(1); 4174 m_host.AddScriptLPS(1);
4061 if (index < 0) 4175 if (index < 0)
@@ -4068,12 +4182,12 @@ namespace OpenSim.Region.ScriptEngine.Common
4068 } 4182 }
4069 try 4183 try
4070 { 4184 {
4071 if (src.Data[index] is LSL_Types.LSLInteger) 4185 if (src.Data[index] is LSL_Integer)
4072 return Convert.ToDouble(((LSL_Types.LSLInteger) src.Data[index]).value); 4186 return Convert.ToDouble(((LSL_Integer) src.Data[index]).value);
4073 else if (src.Data[index] is LSL_Types.LSLFloat) 4187 else if (src.Data[index] is LSL_Float)
4074 return Convert.ToDouble(((LSL_Types.LSLFloat) src.Data[index]).value); 4188 return Convert.ToDouble(((LSL_Float) src.Data[index]).value);
4075 else if (src.Data[index] is LSL_Types.LSLString) 4189 else if (src.Data[index] is LSL_String)
4076 return Convert.ToDouble(((LSL_Types.LSLString) src.Data[index]).m_string); 4190 return Convert.ToDouble(((LSL_String) src.Data[index]).m_string);
4077 return Convert.ToDouble(src.Data[index]); 4191 return Convert.ToDouble(src.Data[index]);
4078 } 4192 }
4079 catch (FormatException) 4193 catch (FormatException)
@@ -4082,7 +4196,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4082 } 4196 }
4083 } 4197 }
4084 4198
4085 public string llList2String(LSL_Types.list src, int index) 4199 public LSL_String llList2String(LSL_List src, int index)
4086 { 4200 {
4087 m_host.AddScriptLPS(1); 4201 m_host.AddScriptLPS(1);
4088 if (index < 0) 4202 if (index < 0)
@@ -4096,7 +4210,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4096 return src.Data[index].ToString(); 4210 return src.Data[index].ToString();
4097 } 4211 }
4098 4212
4099 public string llList2Key(LSL_Types.list src, int index) 4213 public LSL_String llList2Key(LSL_List src, int index)
4100 { 4214 {
4101 m_host.AddScriptLPS(1); 4215 m_host.AddScriptLPS(1);
4102 if (index < 0) 4216 if (index < 0)
@@ -4110,7 +4224,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4110 return src.Data[index].ToString(); 4224 return src.Data[index].ToString();
4111 } 4225 }
4112 4226
4113 public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) 4227 public LSL_Vector llList2Vector(LSL_List src, int index)
4114 { 4228 {
4115 m_host.AddScriptLPS(1); 4229 m_host.AddScriptLPS(1);
4116 if (index < 0) 4230 if (index < 0)
@@ -4119,19 +4233,19 @@ namespace OpenSim.Region.ScriptEngine.Common
4119 } 4233 }
4120 if (index >= src.Length) 4234 if (index >= src.Length)
4121 { 4235 {
4122 return new LSL_Types.Vector3(0, 0, 0); 4236 return new LSL_Vector(0, 0, 0);
4123 } 4237 }
4124 if (src.Data[index].GetType() == typeof(LSL_Types.Vector3)) 4238 if (src.Data[index].GetType() == typeof(LSL_Vector))
4125 { 4239 {
4126 return (LSL_Types.Vector3)src.Data[index]; 4240 return (LSL_Vector)src.Data[index];
4127 } 4241 }
4128 else 4242 else
4129 { 4243 {
4130 return new LSL_Types.Vector3(src.Data[index].ToString()); 4244 return new LSL_Vector(src.Data[index].ToString());
4131 } 4245 }
4132 } 4246 }
4133 4247
4134 public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) 4248 public LSL_Rotation llList2Rot(LSL_List src, int index)
4135 { 4249 {
4136 m_host.AddScriptLPS(1); 4250 m_host.AddScriptLPS(1);
4137 if (index < 0) 4251 if (index < 0)
@@ -4140,30 +4254,30 @@ namespace OpenSim.Region.ScriptEngine.Common
4140 } 4254 }
4141 if (index >= src.Length) 4255 if (index >= src.Length)
4142 { 4256 {
4143 return new LSL_Types.Quaternion(0, 0, 0, 1); 4257 return new LSL_Rotation(0, 0, 0, 1);
4144 } 4258 }
4145 if (src.Data[index].GetType() == typeof(LSL_Types.Quaternion)) 4259 if (src.Data[index].GetType() == typeof(LSL_Rotation))
4146 { 4260 {
4147 return (LSL_Types.Quaternion)src.Data[index]; 4261 return (LSL_Rotation)src.Data[index];
4148 } 4262 }
4149 else 4263 else
4150 { 4264 {
4151 return new LSL_Types.Quaternion(src.Data[index].ToString()); 4265 return new LSL_Rotation(src.Data[index].ToString());
4152 } 4266 }
4153 } 4267 }
4154 4268
4155 public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) 4269 public LSL_List llList2List(LSL_List src, int start, int end)
4156 { 4270 {
4157 m_host.AddScriptLPS(1); 4271 m_host.AddScriptLPS(1);
4158 return src.GetSublist(start, end); 4272 return src.GetSublist(start, end);
4159 } 4273 }
4160 4274
4161 public LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end) 4275 public LSL_List llDeleteSubList(LSL_List src, int start, int end)
4162 { 4276 {
4163 return src.DeleteSublist(end, start); 4277 return src.DeleteSublist(end, start);
4164 } 4278 }
4165 4279
4166 public LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index) 4280 public LSL_Integer llGetListEntryType(LSL_List src, int index)
4167 { 4281 {
4168 m_host.AddScriptLPS(1); 4282 m_host.AddScriptLPS(1);
4169 if (index < 0) 4283 if (index < 0)
@@ -4175,27 +4289,27 @@ namespace OpenSim.Region.ScriptEngine.Common
4175 return 0; 4289 return 0;
4176 } 4290 }
4177 4291
4178 if (src.Data[index] is Int32) 4292 if (src.Data[index] is LSL_Integer || src.Data[index] is Int32)
4179 return 1; 4293 return 1;
4180 if (src.Data[index] is Double) 4294 if (src.Data[index] is LSL_Float || src.Data[index] is Single || src.Data[index] is Double)
4181 return 2; 4295 return 2;
4182 if (src.Data[index] is String) 4296 if (src.Data[index] is LSL_String || src.Data[index] is String)
4183 { 4297 {
4184 UUID tuuid; 4298 UUID tuuid;
4185 if (UUID.TryParse(src.Data[index].ToString(), out tuuid)) 4299 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
4186 { 4300 {
4187 return 3; 4301 return 4;
4188 } 4302 }
4189 else 4303 else
4190 { 4304 {
4191 return 4; 4305 return 3;
4192 } 4306 }
4193 } 4307 }
4194 if (src.Data[index] is LSL_Types.Vector3) 4308 if (src.Data[index] is LSL_Vector)
4195 return 5; 4309 return 5;
4196 if (src.Data[index] is LSL_Types.Quaternion) 4310 if (src.Data[index] is LSL_Rotation)
4197 return 6; 4311 return 6;
4198 if (src.Data[index] is LSL_Types.list) 4312 if (src.Data[index] is LSL_List)
4199 return 7; 4313 return 7;
4200 return 0; 4314 return 0;
4201 4315
@@ -4208,7 +4322,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4208 /// each comma. 4322 /// each comma.
4209 /// </summary> 4323 /// </summary>
4210 4324
4211 public string llList2CSV(LSL_Types.list src) 4325 public LSL_String llList2CSV(LSL_List src)
4212 { 4326 {
4213 4327
4214 string ret = String.Empty; 4328 string ret = String.Empty;
@@ -4236,10 +4350,10 @@ namespace OpenSim.Region.ScriptEngine.Common
4236 /// before or after an element is trimmed. 4350 /// before or after an element is trimmed.
4237 /// </summary> 4351 /// </summary>
4238 4352
4239 public LSL_Types.list llCSV2List(string src) 4353 public LSL_List llCSV2List(string src)
4240 { 4354 {
4241 4355
4242 LSL_Types.list result = new LSL_Types.list(); 4356 LSL_List result = new LSL_List();
4243 int parens = 0; 4357 int parens = 0;
4244 int start = 0; 4358 int start = 0;
4245 int length = 0; 4359 int length = 0;
@@ -4293,9 +4407,9 @@ namespace OpenSim.Region.ScriptEngine.Common
4293 /// sizes. 4407 /// sizes.
4294 /// </remarks> 4408 /// </remarks>
4295 4409
4296 public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) 4410 public LSL_List llListRandomize(LSL_List src, int stride)
4297 { 4411 {
4298 LSL_Types.list result; 4412 LSL_List result;
4299 Random rand = new Random(); 4413 Random rand = new Random();
4300 4414
4301 int chunkk; 4415 int chunkk;
@@ -4336,7 +4450,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4336 4450
4337 // Construct the randomized list 4451 // Construct the randomized list
4338 4452
4339 result = new LSL_Types.list(); 4453 result = new LSL_List();
4340 4454
4341 for (int i = 0; i < chunkk; i++) 4455 for (int i = 0; i < chunkk; i++)
4342 { 4456 {
@@ -4349,7 +4463,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4349 else { 4463 else {
4350 object[] array = new object[src.Length]; 4464 object[] array = new object[src.Length];
4351 Array.Copy(src.Data, 0, array, 0, src.Length); 4465 Array.Copy(src.Data, 0, array, 0, src.Length);
4352 result = new LSL_Types.list(array); 4466 result = new LSL_List(array);
4353 } 4467 }
4354 4468
4355 return result; 4469 return result;
@@ -4363,10 +4477,10 @@ namespace OpenSim.Region.ScriptEngine.Common
4363 /// range are included in the result. 4477 /// range are included in the result.
4364 /// </summary> 4478 /// </summary>
4365 4479
4366 public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) 4480 public LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride)
4367 { 4481 {
4368 4482
4369 LSL_Types.list result = new LSL_Types.list(); 4483 LSL_List result = new LSL_List();
4370 int[] si = new int[2]; 4484 int[] si = new int[2];
4371 int[] ei = new int[2]; 4485 int[] ei = new int[2];
4372 bool twopass = false; 4486 bool twopass = false;
@@ -4443,10 +4557,17 @@ namespace OpenSim.Region.ScriptEngine.Common
4443 return result; 4557 return result;
4444 } 4558 }
4445 4559
4446 public LSL_Types.Vector3 llGetRegionCorner() 4560 public LSL_Integer llGetRegionAgentCount()
4447 { 4561 {
4448 m_host.AddScriptLPS(1); 4562 m_host.AddScriptLPS(1);
4449 return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 4563 NotImplemented("llGetRegionAgentCount");
4564 return new LSL_Integer(0);
4565 }
4566
4567 public LSL_Vector llGetRegionCorner()
4568 {
4569 m_host.AddScriptLPS(1);
4570 return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
4450 } 4571 }
4451 4572
4452 /// <summary> 4573 /// <summary>
@@ -4455,11 +4576,11 @@ namespace OpenSim.Region.ScriptEngine.Common
4455 /// new element has the index specified by <index> 4576 /// new element has the index specified by <index>
4456 /// </summary> 4577 /// </summary>
4457 4578
4458 public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int index) 4579 public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index)
4459 { 4580 {
4460 4581
4461 LSL_Types.list pref = null; 4582 LSL_List pref = null;
4462 LSL_Types.list suff = null; 4583 LSL_List suff = null;
4463 4584
4464 m_host.AddScriptLPS(1); 4585 m_host.AddScriptLPS(1);
4465 4586
@@ -4505,7 +4626,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4505 /// in src. 4626 /// in src.
4506 /// </summary> 4627 /// </summary>
4507 4628
4508 public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) 4629 public LSL_Integer llListFindList(LSL_List src, LSL_List test)
4509 { 4630 {
4510 4631
4511 int index = -1; 4632 int index = -1;
@@ -4519,11 +4640,11 @@ namespace OpenSim.Region.ScriptEngine.Common
4519 { 4640 {
4520 for (int i = 0; i < length; i++) 4641 for (int i = 0; i < length; i++)
4521 { 4642 {
4522 if (AreEqual(src.Data[i], test.Data[0])) 4643 if (src.Data[i].Equals(test.Data[0]))
4523 { 4644 {
4524 int j; 4645 int j;
4525 for (j = 1; j < test.Length; j++) 4646 for (j = 1; j < test.Length; j++)
4526 if (!AreEqual(src.Data[i+j], test.Data[j])) 4647 if (!src.Data[i+j].Equals(test.Data[j]))
4527 break; 4648 break;
4528 if (j == test.Length) 4649 if (j == test.Length)
4529 { 4650 {
@@ -4538,19 +4659,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4538 4659
4539 } 4660 }
4540 4661
4541 private bool AreEqual(object src, object test) 4662 public LSL_String llGetObjectName()
4542 {
4543 if (src.GetType().FullName == "System.String")
4544 {
4545 return src.ToString() == test.ToString();
4546 }
4547 else
4548 {
4549 return src.Equals(test);
4550 }
4551 }
4552
4553 public string llGetObjectName()
4554 { 4663 {
4555 m_host.AddScriptLPS(1); 4664 m_host.AddScriptLPS(1);
4556 return m_host.Name!=null?m_host.Name:String.Empty; 4665 return m_host.Name!=null?m_host.Name:String.Empty;
@@ -4562,7 +4671,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4562 m_host.Name = name!=null?name:String.Empty; 4671 m_host.Name = name!=null?name:String.Empty;
4563 } 4672 }
4564 4673
4565 public string llGetDate() 4674 public LSL_String llGetDate()
4566 { 4675 {
4567 m_host.AddScriptLPS(1); 4676 m_host.AddScriptLPS(1);
4568 DateTime date = DateTime.Now.ToUniversalTime(); 4677 DateTime date = DateTime.Now.ToUniversalTime();
@@ -4570,14 +4679,14 @@ namespace OpenSim.Region.ScriptEngine.Common
4570 return result; 4679 return result;
4571 } 4680 }
4572 4681
4573 public LSL_Types.LSLInteger llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) 4682 public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir)
4574 { 4683 {
4575 m_host.AddScriptLPS(1); 4684 m_host.AddScriptLPS(1);
4576 NotImplemented("llEdgeOfWorld"); 4685 NotImplemented("llEdgeOfWorld");
4577 return 0; 4686 return 0;
4578 } 4687 }
4579 4688
4580 public LSL_Types.LSLInteger llGetAgentInfo(string id) 4689 public LSL_Integer llGetAgentInfo(string id)
4581 { 4690 {
4582 m_host.AddScriptLPS(1); 4691 m_host.AddScriptLPS(1);
4583 NotImplemented("llGetAgentInfo"); 4692 NotImplemented("llGetAgentInfo");
@@ -4603,7 +4712,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4603 m_host.SoundRadius = radius; 4712 m_host.SoundRadius = radius;
4604 } 4713 }
4605 4714
4606 public string llKey2Name(string id) 4715 public LSL_String llKey2Name(string id)
4607 { 4716 {
4608 m_host.AddScriptLPS(1); 4717 m_host.AddScriptLPS(1);
4609 UUID key = new UUID(); 4718 UUID key = new UUID();
@@ -4646,10 +4755,11 @@ namespace OpenSim.Region.ScriptEngine.Common
4646 4755
4647 m_host.AddTextureAnimation(pTexAnim); 4756 m_host.AddTextureAnimation(pTexAnim);
4648 m_host.SendFullUpdateToAllClients(); 4757 m_host.SendFullUpdateToAllClients();
4758 m_host.ParentGroup.HasGroupChanged = true;
4649 } 4759 }
4650 4760
4651 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, 4761 public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east,
4652 LSL_Types.Vector3 bottom_south_west) 4762 LSL_Vector bottom_south_west)
4653 { 4763 {
4654 m_host.AddScriptLPS(1); 4764 m_host.AddScriptLPS(1);
4655 NotImplemented("llTriggerSoundLimited"); 4765 NotImplemented("llTriggerSoundLimited");
@@ -4672,10 +4782,10 @@ namespace OpenSim.Region.ScriptEngine.Common
4672 // ScriptSleep(5000); 4782 // ScriptSleep(5000);
4673 } 4783 }
4674 4784
4675 public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) 4785 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers)
4676 { 4786 {
4677 m_host.AddScriptLPS(1); 4787 m_host.AddScriptLPS(1);
4678 LSL_Types.list ret = new LSL_Types.list(); 4788 LSL_List ret = new LSL_List();
4679 object[] delimiters = new object[separators.Length + spacers.Length]; 4789 object[] delimiters = new object[separators.Length + spacers.Length];
4680 separators.Data.CopyTo(delimiters, 0); 4790 separators.Data.CopyTo(delimiters, 0);
4681 spacers.Data.CopyTo(delimiters, separators.Length); 4791 spacers.Data.CopyTo(delimiters, separators.Length);
@@ -4728,7 +4838,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4728 return ret; 4838 return ret;
4729 } 4839 }
4730 4840
4731 public LSL_Types.LSLInteger llOverMyLand(string id) 4841 public LSL_Integer llOverMyLand(string id)
4732 { 4842 {
4733 m_host.AddScriptLPS(1); 4843 m_host.AddScriptLPS(1);
4734 UUID key = new UUID(); 4844 UUID key = new UUID();
@@ -4751,17 +4861,17 @@ namespace OpenSim.Region.ScriptEngine.Common
4751 return 0; 4861 return 0;
4752 } 4862 }
4753 4863
4754 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) 4864 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
4755 { 4865 {
4756 m_host.AddScriptLPS(1); 4866 m_host.AddScriptLPS(1);
4757 return World.GetLandOwner((float)pos.x, (float)pos.y).ToString(); 4867 return World.GetLandOwner((float)pos.x, (float)pos.y).ToString();
4758 } 4868 }
4759 4869
4760 public LSL_Types.Vector3 llGetAgentSize(string id) 4870 public LSL_Vector llGetAgentSize(string id)
4761 { 4871 {
4762 m_host.AddScriptLPS(1); 4872 m_host.AddScriptLPS(1);
4763 ScenePresence avatar = World.GetScenePresence(id); 4873 ScenePresence avatar = World.GetScenePresence(id);
4764 LSL_Types.Vector3 agentSize; 4874 LSL_Vector agentSize;
4765 if (avatar == null) 4875 if (avatar == null)
4766 { 4876 {
4767 agentSize = BuiltIn_Commands_BaseClass.ZERO_VECTOR; 4877 agentSize = BuiltIn_Commands_BaseClass.ZERO_VECTOR;
@@ -4769,25 +4879,25 @@ namespace OpenSim.Region.ScriptEngine.Common
4769 else 4879 else
4770 { 4880 {
4771 PhysicsVector size = avatar.PhysicsActor.Size; 4881 PhysicsVector size = avatar.PhysicsActor.Size;
4772 agentSize = new LSL_Types.Vector3(size.X, size.Y, size.Z); 4882 agentSize = new LSL_Vector(size.X, size.Y, size.Z);
4773 } 4883 }
4774 return agentSize; 4884 return agentSize;
4775 } 4885 }
4776 4886
4777 public LSL_Types.LSLInteger llSameGroup(string agent) 4887 public LSL_Integer llSameGroup(string agent)
4778 { 4888 {
4779 m_host.AddScriptLPS(1); 4889 m_host.AddScriptLPS(1);
4780 UUID agentId = new UUID(); 4890 UUID agentId = new UUID();
4781 if (!UUID.TryParse(agent, out agentId)) 4891 if (!UUID.TryParse(agent, out agentId))
4782 return new LSL_Types.LSLInteger(0); 4892 return new LSL_Integer(0);
4783 ScenePresence presence = World.GetScenePresence(agentId); 4893 ScenePresence presence = World.GetScenePresence(agentId);
4784 if (presence == null) 4894 if (presence == null)
4785 return new LSL_Types.LSLInteger(0); 4895 return new LSL_Integer(0);
4786 IClientAPI client = presence.ControllingClient; 4896 IClientAPI client = presence.ControllingClient;
4787 if (m_host.GroupID == client.ActiveGroupId) 4897 if (m_host.GroupID == client.ActiveGroupId)
4788 return new LSL_Types.LSLInteger(1); 4898 return new LSL_Integer(1);
4789 else 4899 else
4790 return new LSL_Types.LSLInteger(0); 4900 return new LSL_Integer(0);
4791 } 4901 }
4792 4902
4793 public void llUnSit(string id) 4903 public void llUnSit(string id)
@@ -4833,7 +4943,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4833 4943
4834 } 4944 }
4835 4945
4836 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) 4946 public LSL_Vector llGroundSlope(LSL_Vector offset)
4837 { 4947 {
4838 m_host.AddScriptLPS(1); 4948 m_host.AddScriptLPS(1);
4839 4949
@@ -4843,15 +4953,15 @@ namespace OpenSim.Region.ScriptEngine.Common
4843 4953
4844 Vector3 p0 = new Vector3(pos.X, pos.Y, 4954 Vector3 p0 = new Vector3(pos.X, pos.Y,
4845 (float)llGround( 4955 (float)llGround(
4846 new LSL_Types.Vector3(pos.X, pos.Y, pos.Z) 4956 new LSL_Vector(pos.X, pos.Y, pos.Z)
4847 )); 4957 ));
4848 Vector3 p1 = new Vector3(pos.X + 1, pos.Y, 4958 Vector3 p1 = new Vector3(pos.X + 1, pos.Y,
4849 (float)llGround( 4959 (float)llGround(
4850 new LSL_Types.Vector3(pos.X + 1, pos.Y, pos.Z) 4960 new LSL_Vector(pos.X + 1, pos.Y, pos.Z)
4851 )); 4961 ));
4852 Vector3 p2 = new Vector3(pos.X, pos.Y + 1, 4962 Vector3 p2 = new Vector3(pos.X, pos.Y + 1,
4853 (float)llGround( 4963 (float)llGround(
4854 new LSL_Types.Vector3(pos.X, pos.Y + 1, pos.Z) 4964 new LSL_Vector(pos.X, pos.Y + 1, pos.Z)
4855 )); 4965 ));
4856 4966
4857 Vector3 v0 = new Vector3( 4967 Vector3 v0 = new Vector3(
@@ -4867,50 +4977,50 @@ namespace OpenSim.Region.ScriptEngine.Common
4867 tv.Y = (v0.Z * v1.X) - (v0.X * v1.Z); 4977 tv.Y = (v0.Z * v1.X) - (v0.X * v1.Z);
4868 tv.Z = (v0.X * v1.Y) - (v0.Y * v1.X); 4978 tv.Z = (v0.X * v1.Y) - (v0.Y * v1.X);
4869 4979
4870 return new LSL_Types.Vector3(tv.X, tv.Y, tv.Z); 4980 return new LSL_Vector(tv.X, tv.Y, tv.Z);
4871 } 4981 }
4872 4982
4873 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) 4983 public LSL_Vector llGroundNormal(LSL_Vector offset)
4874 { 4984 {
4875 m_host.AddScriptLPS(1); 4985 m_host.AddScriptLPS(1);
4876 LSL_Types.Vector3 x = llGroundSlope(offset); 4986 LSL_Vector x = llGroundSlope(offset);
4877 return new LSL_Types.Vector3(x.x, x.y, 1.0); 4987 return new LSL_Vector(x.x, x.y, 1.0);
4878 } 4988 }
4879 4989
4880 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) 4990 public LSL_Vector llGroundContour(LSL_Vector offset)
4881 { 4991 {
4882 m_host.AddScriptLPS(1); 4992 m_host.AddScriptLPS(1);
4883 LSL_Types.Vector3 x = llGroundSlope(offset); 4993 LSL_Vector x = llGroundSlope(offset);
4884 return new LSL_Types.Vector3(-x.y, x.x, 0.0); 4994 return new LSL_Vector(-x.y, x.x, 0.0);
4885 } 4995 }
4886 4996
4887 public LSL_Types.LSLInteger llGetAttached() 4997 public LSL_Integer llGetAttached()
4888 { 4998 {
4889 m_host.AddScriptLPS(1); 4999 m_host.AddScriptLPS(1);
4890 NotImplemented("llGetAttached"); 5000 NotImplemented("llGetAttached");
4891 return 0; 5001 return 0;
4892 } 5002 }
4893 5003
4894 public LSL_Types.LSLInteger llGetFreeMemory() 5004 public LSL_Integer llGetFreeMemory()
4895 { 5005 {
4896 m_host.AddScriptLPS(1); 5006 m_host.AddScriptLPS(1);
4897 NotImplemented("llGetFreeMemory"); 5007 // Make scripts designed for LSO happy
4898 return 0; 5008 return 16384;
4899 } 5009 }
4900 5010
4901 public string llGetRegionName() 5011 public LSL_String llGetRegionName()
4902 { 5012 {
4903 m_host.AddScriptLPS(1); 5013 m_host.AddScriptLPS(1);
4904 return World.RegionInfo.RegionName; 5014 return World.RegionInfo.RegionName;
4905 } 5015 }
4906 5016
4907 public double llGetRegionTimeDilation() 5017 public LSL_Float llGetRegionTimeDilation()
4908 { 5018 {
4909 m_host.AddScriptLPS(1); 5019 m_host.AddScriptLPS(1);
4910 return (double)World.TimeDilation; 5020 return (double)World.TimeDilation;
4911 } 5021 }
4912 5022
4913 public double llGetRegionFPS() 5023 public LSL_Float llGetRegionFPS()
4914 { 5024 {
4915 m_host.AddScriptLPS(1); 5025 m_host.AddScriptLPS(1);
4916 //TODO: return actual FPS 5026 //TODO: return actual FPS
@@ -4976,17 +5086,18 @@ namespace OpenSim.Region.ScriptEngine.Common
4976 return ps; 5086 return ps;
4977 } 5087 }
4978 5088
4979 public void llParticleSystem(LSL_Types.list rules) 5089 public void llParticleSystem(LSL_List rules)
4980 { 5090 {
4981 m_host.AddScriptLPS(1); 5091 m_host.AddScriptLPS(1);
4982 if (rules.Length == 0) 5092 if (rules.Length == 0)
4983 { 5093 {
4984 m_host.RemoveParticleSystem(); 5094 m_host.RemoveParticleSystem();
5095 m_host.ParentGroup.HasGroupChanged = true;
4985 } 5096 }
4986 else 5097 else
4987 { 5098 {
4988 Primitive.ParticleSystem prules = getNewParticleSystemWithSLDefaultValues(); 5099 Primitive.ParticleSystem prules = getNewParticleSystemWithSLDefaultValues();
4989 LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); 5100 LSL_Vector tempv = new LSL_Vector();
4990 5101
4991 float tempf = 0; 5102 float tempf = 0;
4992 5103
@@ -4999,7 +5110,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4999 break; 5110 break;
5000 5111
5001 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_START_COLOR: 5112 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_START_COLOR:
5002 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5113 tempv = (LSL_Vector)rules.Data[i + 1];
5003 prules.PartStartColor.R = (float)tempv.x; 5114 prules.PartStartColor.R = (float)tempv.x;
5004 prules.PartStartColor.G = (float)tempv.y; 5115 prules.PartStartColor.G = (float)tempv.y;
5005 prules.PartStartColor.B = (float)tempv.z; 5116 prules.PartStartColor.B = (float)tempv.z;
@@ -5011,7 +5122,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5011 break; 5122 break;
5012 5123
5013 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: 5124 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR:
5014 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5125 tempv = (LSL_Vector)rules.Data[i + 1];
5015 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1); 5126 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1);
5016 5127
5017 prules.PartEndColor.R = (float)tempv.x; 5128 prules.PartEndColor.R = (float)tempv.x;
@@ -5025,13 +5136,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5025 break; 5136 break;
5026 5137
5027 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_START_SCALE: 5138 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_START_SCALE:
5028 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5139 tempv = (LSL_Vector)rules.Data[i + 1];
5029 prules.PartStartScaleX = (float)tempv.x; 5140 prules.PartStartScaleX = (float)tempv.x;
5030 prules.PartStartScaleY = (float)tempv.y; 5141 prules.PartStartScaleY = (float)tempv.y;
5031 break; 5142 break;
5032 5143
5033 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_SCALE: 5144 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_SCALE:
5034 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5145 tempv = (LSL_Vector)rules.Data[i + 1];
5035 prules.PartEndScaleX = (float)tempv.x; 5146 prules.PartEndScaleX = (float)tempv.x;
5036 prules.PartEndScaleY = (float)tempv.y; 5147 prules.PartEndScaleY = (float)tempv.y;
5037 break; 5148 break;
@@ -5042,7 +5153,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5042 break; 5153 break;
5043 5154
5044 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ACCEL: 5155 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ACCEL:
5045 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5156 tempv = (LSL_Vector)rules.Data[i + 1];
5046 prules.PartAcceleration.X = (float)tempv.x; 5157 prules.PartAcceleration.X = (float)tempv.x;
5047 prules.PartAcceleration.Y = (float)tempv.y; 5158 prules.PartAcceleration.Y = (float)tempv.y;
5048 prules.PartAcceleration.Z = (float)tempv.z; 5159 prules.PartAcceleration.Z = (float)tempv.z;
@@ -5104,20 +5215,19 @@ namespace OpenSim.Region.ScriptEngine.Common
5104 5215
5105 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_OMEGA: 5216 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_OMEGA:
5106 // AL: This is an assumption, since it is the only thing that would match. 5217 // AL: This is an assumption, since it is the only thing that would match.
5107 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 5218 tempv = rules.GetVector3Item(i + 1);
5108 prules.AngularVelocity.X = (float)tempv.x; 5219 prules.AngularVelocity.X = (float)tempv.x;
5109 prules.AngularVelocity.Y = (float)tempv.y; 5220 prules.AngularVelocity.Y = (float)tempv.y;
5110 prules.AngularVelocity.Z = (float)tempv.z; 5221 prules.AngularVelocity.Z = (float)tempv.z;
5111 //cast?? prules.MaxAge = (float)rules[i + 1];
5112 break; 5222 break;
5113 5223
5114 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ANGLE_BEGIN: 5224 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ANGLE_BEGIN:
5115 tempf = Convert.ToSingle(rules.Data[i + 1].ToString()); 5225 tempf = (float)rules.GetLSLFloatItem(i + 1);
5116 prules.InnerAngle = (float)tempf; 5226 prules.InnerAngle = (float)tempf;
5117 break; 5227 break;
5118 5228
5119 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ANGLE_END: 5229 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_ANGLE_END:
5120 tempf = Convert.ToSingle(rules.Data[i + 1].ToString()); 5230 tempf = (float)rules.GetLSLFloatItem(i + 1);
5121 prules.OuterAngle = (float)tempf; 5231 prules.OuterAngle = (float)tempf;
5122 break; 5232 break;
5123 } 5233 }
@@ -5126,6 +5236,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5126 prules.CRC = 1; 5236 prules.CRC = 1;
5127 5237
5128 m_host.AddNewParticleSystem(prules); 5238 m_host.AddNewParticleSystem(prules);
5239 m_host.ParentGroup.HasGroupChanged = true;
5129 } 5240 }
5130 m_host.SendFullUpdateToAllClients(); 5241 m_host.SendFullUpdateToAllClients();
5131 } 5242 }
@@ -5146,7 +5257,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5146 return UUID.Zero; 5257 return UUID.Zero;
5147 } 5258 }
5148 5259
5149 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 5260 public void llGiveInventoryList(string destination, string category, LSL_List inventory)
5150 { 5261 {
5151 m_host.AddScriptLPS(1); 5262 m_host.AddScriptLPS(1);
5152 5263
@@ -5195,13 +5306,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5195 NotImplemented("llSetVehicleFloatParam"); 5306 NotImplemented("llSetVehicleFloatParam");
5196 } 5307 }
5197 5308
5198 public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) 5309 public void llSetVehicleVectorParam(int param, LSL_Vector vec)
5199 { 5310 {
5200 m_host.AddScriptLPS(1); 5311 m_host.AddScriptLPS(1);
5201 NotImplemented("llSetVehicleVectorParam"); 5312 NotImplemented("llSetVehicleVectorParam");
5202 } 5313 }
5203 5314
5204 public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) 5315 public void llSetVehicleRotationParam(int param, LSL_Rotation rot)
5205 { 5316 {
5206 m_host.AddScriptLPS(1); 5317 m_host.AddScriptLPS(1);
5207 NotImplemented("llSetVehicleRotationParam"); 5318 NotImplemented("llSetVehicleRotationParam");
@@ -5219,7 +5330,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5219 NotImplemented("llRemoveVehicleFlags"); 5330 NotImplemented("llRemoveVehicleFlags");
5220 } 5331 }
5221 5332
5222 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) 5333 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
5223 { 5334 {
5224 m_host.AddScriptLPS(1); 5335 m_host.AddScriptLPS(1);
5225 // LSL quaternions can normalize to 0, normal Quaternions can't. 5336 // LSL quaternions can normalize to 0, normal Quaternions can't.
@@ -5230,7 +5341,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5230 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 5341 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
5231 } 5342 }
5232 5343
5233 public string llAvatarOnSitTarget() 5344 public LSL_String llAvatarOnSitTarget()
5234 { 5345 {
5235 m_host.AddScriptLPS(1); 5346 m_host.AddScriptLPS(1);
5236 return m_host.GetAvatarOnSitTarget().ToString(); 5347 return m_host.GetAvatarOnSitTarget().ToString();
@@ -5267,19 +5378,19 @@ namespace OpenSim.Region.ScriptEngine.Common
5267 m_host.SitName = text; 5378 m_host.SitName = text;
5268 } 5379 }
5269 5380
5270 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 5381 public void llSetCameraEyeOffset(LSL_Vector offset)
5271 { 5382 {
5272 m_host.AddScriptLPS(1); 5383 m_host.AddScriptLPS(1);
5273 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); 5384 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5274 } 5385 }
5275 5386
5276 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 5387 public void llSetCameraAtOffset(LSL_Vector offset)
5277 { 5388 {
5278 m_host.AddScriptLPS(1); 5389 m_host.AddScriptLPS(1);
5279 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); 5390 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5280 } 5391 }
5281 5392
5282 public string llDumpList2String(LSL_Types.list src, string seperator) 5393 public LSL_String llDumpList2String(LSL_List src, string seperator)
5283 { 5394 {
5284 m_host.AddScriptLPS(1); 5395 m_host.AddScriptLPS(1);
5285 if (src.Length == 0) 5396 if (src.Length == 0)
@@ -5295,7 +5406,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5295 return ret; 5406 return ret;
5296 } 5407 }
5297 5408
5298 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 5409 public LSL_Integer llScriptDanger(LSL_Vector pos)
5299 { 5410 {
5300 m_host.AddScriptLPS(1); 5411 m_host.AddScriptLPS(1);
5301 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z)); 5412 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
@@ -5310,7 +5421,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5310 5421
5311 } 5422 }
5312 5423
5313 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5424 public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel)
5314 { 5425 {
5315 m_host.AddScriptLPS(1); 5426 m_host.AddScriptLPS(1);
5316 UUID av = new UUID(); 5427 UUID av = new UUID();
@@ -5378,7 +5489,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5378 // assume it is not running. 5489 // assume it is not running.
5379 } 5490 }
5380 5491
5381 public LSL_Types.LSLInteger llGetScriptState(string name) 5492 public LSL_Integer llGetScriptState(string name)
5382 { 5493 {
5383 UUID item; 5494 UUID item;
5384 ScriptManager sm; 5495 ScriptManager sm;
@@ -5477,13 +5588,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5477 if (xmlrpcMod.IsEnabled()) 5588 if (xmlrpcMod.IsEnabled())
5478 { 5589 {
5479 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero); 5590 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5480 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5591 object[] resobj = new object[] { new LSL_Integer(1), new LSL_String(channelID.ToString()), new LSL_String(UUID.Zero.ToString()), new LSL_String(String.Empty), new LSL_Integer(0), new LSL_String(String.Empty) };
5481 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); 5592 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
5482 } 5593 }
5483 // ScriptSleep(1000); 5594 // ScriptSleep(1000);
5484 } 5595 }
5485 5596
5486 public string llSendRemoteData(string channel, string dest, int idata, string sdata) 5597 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata)
5487 { 5598 {
5488 m_host.AddScriptLPS(1); 5599 m_host.AddScriptLPS(1);
5489 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5600 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
@@ -5507,13 +5618,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5507 // ScriptSleep(1000); 5618 // ScriptSleep(1000);
5508 } 5619 }
5509 5620
5510 public string llMD5String(string src, int nonce) 5621 public LSL_String llMD5String(string src, int nonce)
5511 { 5622 {
5512 m_host.AddScriptLPS(1); 5623 m_host.AddScriptLPS(1);
5513 return Util.Md5Hash(src + ":" + nonce.ToString()); 5624 return Util.Md5Hash(src + ":" + nonce.ToString());
5514 } 5625 }
5515 5626
5516 private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist) 5627 private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist)
5517 { 5628 {
5518 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5629 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5519 5630
@@ -5583,7 +5694,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5583 return shapeBlock; 5694 return shapeBlock;
5584 } 5695 }
5585 5696
5586 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 taper_b, LSL_Types.Vector3 topshear, byte fudge) 5697 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge)
5587 { 5698 {
5588 ObjectShapePacket.ObjectDataBlock shapeBlock; 5699 ObjectShapePacket.ObjectDataBlock shapeBlock;
5589 5700
@@ -5631,7 +5742,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5631 part.UpdateShape(shapeBlock); 5742 part.UpdateShape(shapeBlock);
5632 } 5743 }
5633 5744
5634 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 dimple, byte fudge) 5745 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge)
5635 { 5746 {
5636 ObjectShapePacket.ObjectDataBlock shapeBlock; 5747 ObjectShapePacket.ObjectDataBlock shapeBlock;
5637 5748
@@ -5672,7 +5783,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5672 part.UpdateShape(shapeBlock); 5783 part.UpdateShape(shapeBlock);
5673 } 5784 }
5674 5785
5675 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 holesize, LSL_Types.Vector3 topshear, LSL_Types.Vector3 profilecut, LSL_Types.Vector3 taper_a, float revolutions, float radiusoffset, float skew, byte fudge) 5786 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge)
5676 { 5787 {
5677 ObjectShapePacket.ObjectDataBlock shapeBlock; 5788 ObjectShapePacket.ObjectDataBlock shapeBlock;
5678 5789
@@ -5824,12 +5935,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5824 part.UpdateShape(shapeBlock); 5935 part.UpdateShape(shapeBlock);
5825 } 5936 }
5826 5937
5827 public void llSetPrimitiveParams(LSL_Types.list rules) 5938 public void llSetPrimitiveParams(LSL_List rules)
5828 { 5939 {
5829 llSetLinkPrimitiveParams(m_host.LinkNum, rules); 5940 llSetLinkPrimitiveParams(m_host.LinkNum, rules);
5830 } 5941 }
5831 5942
5832 public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) 5943 public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
5833 { 5944 {
5834 m_host.AddScriptLPS(1); 5945 m_host.AddScriptLPS(1);
5835 5946
@@ -5850,7 +5961,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5850 int remain = rules.Length - idx; 5961 int remain = rules.Length - idx;
5851 5962
5852 int face; 5963 int face;
5853 LSL_Types.Vector3 v; 5964 LSL_Vector v;
5854 5965
5855 switch (code) 5966 switch (code)
5856 { 5967 {
@@ -5858,7 +5969,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5858 if (remain < 1) 5969 if (remain < 1)
5859 return; 5970 return;
5860 5971
5861 v=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5972 v=new LSL_Vector(rules.Data[idx++].ToString());
5862 SetPos(part, v); 5973 SetPos(part, v);
5863 5974
5864 break; 5975 break;
@@ -5866,7 +5977,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5866 if (remain < 1) 5977 if (remain < 1)
5867 return; 5978 return;
5868 5979
5869 v=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 5980 v=new LSL_Vector(rules.Data[idx++].ToString());
5870 SetScale(part, v); 5981 SetScale(part, v);
5871 5982
5872 break; 5983 break;
@@ -5874,7 +5985,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5874 if (remain < 1) 5985 if (remain < 1)
5875 return; 5986 return;
5876 5987
5877 LSL_Types.Quaternion q = new LSL_Types.Quaternion(rules.Data[idx++].ToString()); 5988 LSL_Rotation q = new LSL_Rotation(rules.Data[idx++].ToString());
5878 SetRot(part, q); 5989 SetRot(part, q);
5879 5990
5880 break; 5991 break;
@@ -5887,14 +5998,14 @@ namespace OpenSim.Region.ScriptEngine.Common
5887 5998
5888 remain = rules.Length - idx; 5999 remain = rules.Length - idx;
5889 float hollow; 6000 float hollow;
5890 LSL_Types.Vector3 twist; 6001 LSL_Vector twist;
5891 LSL_Types.Vector3 taper_b; 6002 LSL_Vector taper_b;
5892 LSL_Types.Vector3 topshear; 6003 LSL_Vector topshear;
5893 float revolutions; 6004 float revolutions;
5894 float radiusoffset; 6005 float radiusoffset;
5895 float skew; 6006 float skew;
5896 LSL_Types.Vector3 holesize; 6007 LSL_Vector holesize;
5897 LSL_Types.Vector3 profilecut; 6008 LSL_Vector profilecut;
5898 6009
5899 switch (code) 6010 switch (code)
5900 { 6011 {
@@ -5902,12 +6013,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5902 if (remain < 6) 6013 if (remain < 6)
5903 return; 6014 return;
5904 6015
5905 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6016 face = (int)rules.GetLSLIntegerItem(idx++);
5906 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut 6017 v = rules.GetVector3Item(idx++); // cut
5907 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6018 hollow = (float)rules.GetLSLFloatItem(idx++);
5908 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6019 twist = rules.GetVector3Item(idx++);
5909 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6020 taper_b = rules.GetVector3Item(idx++);
5910 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6021 topshear = rules.GetVector3Item(idx++);
5911 part.Shape.PathCurve = (byte)Extrusion.Straight; 6022 part.Shape.PathCurve = (byte)Extrusion.Straight;
5912 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 1); 6023 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 1);
5913 break; 6024 break;
@@ -5916,12 +6027,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5916 if (remain < 6) 6027 if (remain < 6)
5917 return; 6028 return;
5918 6029
5919 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6030 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
5920 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut 6031 v = rules.GetVector3Item(idx++); // cut
5921 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6032 hollow = (float)rules.GetLSLFloatItem(idx++);
5922 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6033 twist = rules.GetVector3Item(idx++);
5923 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6034 taper_b = rules.GetVector3Item(idx++);
5924 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6035 topshear = rules.GetVector3Item(idx++);
5925 part.Shape.ProfileShape = ProfileShape.Circle; 6036 part.Shape.ProfileShape = ProfileShape.Circle;
5926 part.Shape.PathCurve = (byte)Extrusion.Straight; 6037 part.Shape.PathCurve = (byte)Extrusion.Straight;
5927 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 0); 6038 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 0);
@@ -5931,12 +6042,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5931 if (remain < 6) 6042 if (remain < 6)
5932 return; 6043 return;
5933 6044
5934 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6045 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
5935 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 6046 v = rules.GetVector3Item(idx++); //cut
5936 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6047 hollow = (float)rules.GetLSLFloatItem(idx++);
5937 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6048 twist = rules.GetVector3Item(idx++);
5938 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6049 taper_b = rules.GetVector3Item(idx++);
5939 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6050 topshear = rules.GetVector3Item(idx++);
5940 part.Shape.PathCurve = (byte)Extrusion.Straight; 6051 part.Shape.PathCurve = (byte)Extrusion.Straight;
5941 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 3); 6052 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, topshear, 3);
5942 break; 6053 break;
@@ -5945,11 +6056,11 @@ namespace OpenSim.Region.ScriptEngine.Common
5945 if (remain < 5) 6056 if (remain < 5)
5946 return; 6057 return;
5947 6058
5948 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6059 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
5949 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // cut 6060 v = rules.GetVector3Item(idx++); // cut
5950 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6061 hollow = (float)rules.GetLSLFloatItem(idx++);
5951 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6062 twist = rules.GetVector3Item(idx++);
5952 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // dimple 6063 taper_b = rules.GetVector3Item(idx++); // dimple
5953 part.Shape.PathCurve = (byte)Extrusion.Curve1; 6064 part.Shape.PathCurve = (byte)Extrusion.Curve1;
5954 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, 5); 6065 SetPrimitiveShapeParams(part, face, v, hollow, twist, taper_b, 5);
5955 break; 6066 break;
@@ -5958,17 +6069,17 @@ namespace OpenSim.Region.ScriptEngine.Common
5958 if (remain < 11) 6069 if (remain < 11)
5959 return; 6070 return;
5960 6071
5961 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6072 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
5962 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 6073 v = rules.GetVector3Item(idx++); //cut
5963 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6074 hollow = (float)rules.GetLSLFloatItem(idx++);
5964 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6075 twist = rules.GetVector3Item(idx++);
5965 holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6076 holesize = rules.GetVector3Item(idx++);
5966 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6077 topshear = rules.GetVector3Item(idx++);
5967 profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6078 profilecut = rules.GetVector3Item(idx++);
5968 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a 6079 taper_b = rules.GetVector3Item(idx++); // taper_a
5969 revolutions = (float)Convert.ToDouble(rules.Data[idx++]); 6080 revolutions = (float)rules.GetLSLFloatItem(idx++);
5970 radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); 6081 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
5971 skew = (float)Convert.ToDouble(rules.Data[idx++]); 6082 skew = (float)rules.GetLSLFloatItem(idx++);
5972 part.Shape.PathCurve = (byte)Extrusion.Curve1; 6083 part.Shape.PathCurve = (byte)Extrusion.Curve1;
5973 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0); 6084 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 0);
5974 break; 6085 break;
@@ -5977,17 +6088,17 @@ namespace OpenSim.Region.ScriptEngine.Common
5977 if (remain < 11) 6088 if (remain < 11)
5978 return; 6089 return;
5979 6090
5980 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6091 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
5981 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 6092 v = rules.GetVector3Item(idx++); //cut
5982 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6093 hollow = (float)rules.GetLSLFloatItem(idx++);
5983 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6094 twist = rules.GetVector3Item(idx++);
5984 holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6095 holesize = rules.GetVector3Item(idx++);
5985 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6096 topshear = rules.GetVector3Item(idx++);
5986 profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6097 profilecut = rules.GetVector3Item(idx++);
5987 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a 6098 taper_b = rules.GetVector3Item(idx++); // taper_a
5988 revolutions = (float)Convert.ToDouble(rules.Data[idx++]); 6099 revolutions = (float)rules.GetLSLFloatItem(idx++);
5989 radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); 6100 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
5990 skew = (float)Convert.ToDouble(rules.Data[idx++]); 6101 skew = (float)rules.GetLSLFloatItem(idx++);
5991 part.Shape.PathCurve = (byte)Extrusion.Curve1; 6102 part.Shape.PathCurve = (byte)Extrusion.Curve1;
5992 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1); 6103 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 1);
5993 break; 6104 break;
@@ -5996,17 +6107,17 @@ namespace OpenSim.Region.ScriptEngine.Common
5996 if (remain < 11) 6107 if (remain < 11)
5997 return; 6108 return;
5998 6109
5999 face = Convert.ToInt32(rules.Data[idx++]); // holeshape 6110 face = (int)rules.GetLSLIntegerItem(idx++); // holeshape
6000 v = new LSL_Types.Vector3(rules.Data[idx++].ToString()); //cut 6111 v = rules.GetVector3Item(idx++); //cut
6001 hollow = (float)Convert.ToDouble(rules.Data[idx++]); 6112 hollow = (float)rules.GetLSLFloatItem(idx++);
6002 twist = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6113 twist = rules.GetVector3Item(idx++);
6003 holesize = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6114 holesize = rules.GetVector3Item(idx++);
6004 topshear = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6115 topshear = rules.GetVector3Item(idx++);
6005 profilecut = new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6116 profilecut = rules.GetVector3Item(idx++);
6006 taper_b = new LSL_Types.Vector3(rules.Data[idx++].ToString()); // taper_a 6117 taper_b = rules.GetVector3Item(idx++); // taper_a
6007 revolutions = (float)Convert.ToDouble(rules.Data[idx++]); 6118 revolutions = (float)rules.GetLSLFloatItem(idx++);
6008 radiusoffset = (float)Convert.ToDouble(rules.Data[idx++]); 6119 radiusoffset = (float)rules.GetLSLFloatItem(idx++);
6009 skew = (float)Convert.ToDouble(rules.Data[idx++]); 6120 skew = (float)rules.GetLSLFloatItem(idx++);
6010 part.Shape.PathCurve = (byte)Extrusion.Curve1; 6121 part.Shape.PathCurve = (byte)Extrusion.Curve1;
6011 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3); 6122 SetPrimitiveShapeParams(part, face, v, hollow, twist, holesize, topshear, profilecut, taper_b, revolutions, radiusoffset, skew, 3);
6012 break; 6123 break;
@@ -6016,7 +6127,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6016 return; 6127 return;
6017 6128
6018 string map = rules.Data[idx++].ToString(); 6129 string map = rules.Data[idx++].ToString();
6019 face = Convert.ToInt32(rules.Data[idx++]); // type 6130 face = (int)rules.GetLSLIntegerItem(idx++); // type
6020 part.Shape.PathCurve = (byte)Extrusion.Curve1; 6131 part.Shape.PathCurve = (byte)Extrusion.Curve1;
6021 SetPrimitiveShapeParams(part, map, face); 6132 SetPrimitiveShapeParams(part, map, face);
6022 break; 6133 break;
@@ -6028,11 +6139,11 @@ namespace OpenSim.Region.ScriptEngine.Common
6028 if (remain < 5) 6139 if (remain < 5)
6029 return; 6140 return;
6030 6141
6031 face=Convert.ToInt32(rules.Data[idx++]); 6142 face=(int)rules.GetLSLIntegerItem(idx++);
6032 string tex=rules.Data[idx++].ToString(); 6143 string tex=rules.Data[idx++].ToString();
6033 LSL_Types.Vector3 repeats=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6144 LSL_Vector repeats=rules.GetVector3Item(idx++);
6034 LSL_Types.Vector3 offsets=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6145 LSL_Vector offsets=rules.GetVector3Item(idx++);
6035 double rotation=Convert.ToDouble(rules.Data[idx++]); 6146 double rotation=(double)rules.GetLSLFloatItem(idx++);
6036 6147
6037 SetTexture(part, tex, face); 6148 SetTexture(part, tex, face);
6038 ScaleTexture(part, repeats.x, repeats.y, face); 6149 ScaleTexture(part, repeats.x, repeats.y, face);
@@ -6045,9 +6156,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6045 if (remain < 3) 6156 if (remain < 3)
6046 return; 6157 return;
6047 6158
6048 face=Convert.ToInt32(rules.Data[idx++]); 6159 face=(int)rules.GetLSLIntegerItem(idx++);
6049 LSL_Types.Vector3 color=new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6160 LSL_Vector color=rules.GetVector3Item(idx++);
6050 double alpha=Convert.ToDouble(rules.Data[idx++]); 6161 double alpha=(double)rules.GetLSLFloatItem(idx++);
6051 6162
6052 SetColor(part, color, face); 6163 SetColor(part, color, face);
6053 SetAlpha(part, alpha, face); 6164 SetAlpha(part, alpha, face);
@@ -6057,34 +6168,34 @@ namespace OpenSim.Region.ScriptEngine.Common
6057 if (remain < 7) 6168 if (remain < 7)
6058 return; 6169 return;
6059 6170
6060 int flexi = Convert.ToInt32(rules.Data[idx++]); 6171 bool flexi = rules.GetLSLIntegerItem(idx++);
6061 int softness = Convert.ToInt32(rules.Data[idx++]); 6172 int softness = rules.GetLSLIntegerItem(idx++);
6062 float gravity = (float)Convert.ToDouble(rules.Data[idx++]); 6173 float gravity = (float)rules.GetLSLFloatItem(idx++);
6063 float friction = (float)Convert.ToDouble(rules.Data[idx++]); 6174 float friction = (float)rules.GetLSLFloatItem(idx++);
6064 float wind = (float)Convert.ToDouble(rules.Data[idx++]); 6175 float wind = (float)rules.GetLSLFloatItem(idx++);
6065 float tension = (float)Convert.ToDouble(rules.Data[idx++]); 6176 float tension = (float)rules.GetLSLFloatItem(idx++);
6066 LSL_Types.Vector3 force =new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6177 LSL_Vector force = rules.GetVector3Item(idx++);
6067 6178
6068 SetFlexi(part, (flexi == 1), softness, gravity, friction, wind, tension, force); 6179 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);
6069 6180
6070 break; 6181 break;
6071 case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT: 6182 case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT:
6072 if (remain < 5) 6183 if (remain < 5)
6073 return; 6184 return;
6074 int light = Convert.ToInt32(rules.Data[idx++]); 6185 bool light = rules.GetLSLIntegerItem(idx++);
6075 LSL_Types.Vector3 lightcolor =new LSL_Types.Vector3(rules.Data[idx++].ToString()); 6186 LSL_Vector lightcolor = rules.GetVector3Item(idx++);
6076 float intensity = (float)Convert.ToDouble(rules.Data[idx++]); 6187 float intensity = (float)rules.GetLSLFloatItem(idx++);
6077 float radius = (float)Convert.ToDouble(rules.Data[idx++]); 6188 float radius = (float)rules.GetLSLFloatItem(idx++);
6078 float falloff = (float)Convert.ToDouble(rules.Data[idx++]); 6189 float falloff = (float)rules.GetLSLFloatItem(idx++);
6079 6190
6080 SetPointLight(part, (light == 1), lightcolor, intensity, radius, falloff); 6191 SetPointLight(part, light, lightcolor, intensity, radius, falloff);
6081 6192
6082 break; 6193 break;
6083 case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW: 6194 case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW:
6084 if (remain < 2) 6195 if (remain < 2)
6085 return; 6196 return;
6086 face = Convert.ToInt32(rules.Data[idx++]); 6197 face = rules.GetLSLIntegerItem(idx++);
6087 float glow = (float)Convert.ToDouble(rules.Data[idx++]); 6198 float glow = (float)rules.GetLSLFloatItem(idx++);
6088 6199
6089 SetGlow(part, face, glow); 6200 SetGlow(part, face, glow);
6090 6201
@@ -6092,9 +6203,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6092 case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY: 6203 case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY:
6093 if (remain < 3) 6204 if (remain < 3)
6094 return; 6205 return;
6095 face = Convert.ToInt32(rules.Data[idx++]); 6206 face = (int)rules.GetLSLIntegerItem(idx++);
6096 int shiny = Convert.ToInt32(rules.Data[idx++]); 6207 int shiny = (int)rules.GetLSLIntegerItem(idx++);
6097 Bumpiness bump = (Bumpiness)Convert.ToByte(rules.Data[idx++]); 6208 Bumpiness bump = (Bumpiness)Convert.ToByte((int)rules.GetLSLIntegerItem(idx++));
6098 6209
6099 SetShiny(part, face, shiny, bump); 6210 SetShiny(part, face, shiny, bump);
6100 6211
@@ -6102,14 +6213,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6102 case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT: 6213 case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT:
6103 if (remain < 2) 6214 if (remain < 2)
6104 return; 6215 return;
6105 face = Convert.ToInt32(rules.Data[idx++]); 6216 face = rules.GetLSLIntegerItem(idx++);
6106 string bv = rules.Data[idx++].ToString(); 6217 bool st = rules.GetLSLIntegerItem(idx++);
6107 bool st;
6108 if (bv.Equals("1"))
6109 st = true;
6110 else
6111 st = false;
6112
6113 SetFullBright(part, face , st); 6218 SetFullBright(part, face , st);
6114 break; 6219 break;
6115 case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL: 6220 case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL:
@@ -6119,7 +6224,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6119 { 6224 {
6120 /* Unhandled at this time - sends "Unhandled" message 6225 /* Unhandled at this time - sends "Unhandled" message
6121 will enable when available 6226 will enable when available
6122 byte material = (byte)Convert.ToByte( rules.Data[idx++]); 6227 byte material = Convert.ToByte((int)rules.GetLSLIntegerItem(idx++));
6123 part.Material = material; 6228 part.Material = material;
6124 */ 6229 */
6125 return; 6230 return;
@@ -6158,7 +6263,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6158 } 6263 }
6159 } 6264 }
6160 6265
6161 public string llStringToBase64(string str) 6266 public LSL_String llStringToBase64(string str)
6162 { 6267 {
6163 m_host.AddScriptLPS(1); 6268 m_host.AddScriptLPS(1);
6164 try 6269 try
@@ -6174,7 +6279,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6174 } 6279 }
6175 } 6280 }
6176 6281
6177 public string llBase64ToString(string str) 6282 public LSL_String llBase64ToString(string str)
6178 { 6283 {
6179 m_host.AddScriptLPS(1); 6284 m_host.AddScriptLPS(1);
6180 UTF8Encoding encoder = new UTF8Encoding(); 6285 UTF8Encoding encoder = new UTF8Encoding();
@@ -6207,23 +6312,23 @@ namespace OpenSim.Region.ScriptEngine.Common
6207 NotImplemented("llRemoteDataSetRegion"); 6312 NotImplemented("llRemoteDataSetRegion");
6208 } 6313 }
6209 6314
6210 public double llLog10(double val) 6315 public LSL_Float llLog10(double val)
6211 { 6316 {
6212 m_host.AddScriptLPS(1); 6317 m_host.AddScriptLPS(1);
6213 return (double)Math.Log10(val); 6318 return (double)Math.Log10(val);
6214 } 6319 }
6215 6320
6216 public double llLog(double val) 6321 public LSL_Float llLog(double val)
6217 { 6322 {
6218 m_host.AddScriptLPS(1); 6323 m_host.AddScriptLPS(1);
6219 return (double)Math.Log(val); 6324 return (double)Math.Log(val);
6220 } 6325 }
6221 6326
6222 public LSL_Types.list llGetAnimationList( string id ) 6327 public LSL_List llGetAnimationList( string id )
6223 { 6328 {
6224 m_host.AddScriptLPS(1); 6329 m_host.AddScriptLPS(1);
6225 6330
6226 LSL_Types.list l = new LSL_Types.list(); 6331 LSL_List l = new LSL_List();
6227 ScenePresence av = World.GetScenePresence(id); 6332 ScenePresence av = World.GetScenePresence(id);
6228 if (av == null) 6333 if (av == null)
6229 return l; 6334 return l;
@@ -6250,44 +6355,19 @@ namespace OpenSim.Region.ScriptEngine.Common
6250 // ScriptSleep(2000); 6355 // ScriptSleep(2000);
6251 } 6356 }
6252 6357
6253 public void osSetParcelMediaURL(string url) 6358 public LSL_Vector llGetRootPosition()
6254 { 6359 {
6255 m_host.AddScriptLPS(1); 6360 m_host.AddScriptLPS(1);
6256 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6361 return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z);
6257
6258 if (landowner == UUID.Zero)
6259 {
6260 return;
6261 }
6262
6263 if (landowner != m_host.ObjectOwner)
6264 {
6265 return;
6266 }
6267
6268 World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
6269 }
6270
6271 public LSL_Types.Vector3 llGetRootPosition()
6272 {
6273 m_host.AddScriptLPS(1);
6274 return new LSL_Types.Vector3(
6275 m_host.ParentGroup.AbsolutePosition.X,
6276 m_host.ParentGroup.AbsolutePosition.Y,
6277 m_host.ParentGroup.AbsolutePosition.Z);
6278 } 6362 }
6279 6363
6280 public LSL_Types.Quaternion llGetRootRotation() 6364 public LSL_Rotation llGetRootRotation()
6281 { 6365 {
6282 m_host.AddScriptLPS(1); 6366 m_host.AddScriptLPS(1);
6283 return new LSL_Types.Quaternion( 6367 return new LSL_Rotation(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W);
6284 m_host.ParentGroup.GroupRotation.X,
6285 m_host.ParentGroup.GroupRotation.Y,
6286 m_host.ParentGroup.GroupRotation.Z,
6287 m_host.ParentGroup.GroupRotation.W);
6288 } 6368 }
6289 6369
6290 public string llGetObjectDesc() 6370 public LSL_String llGetObjectDesc()
6291 { 6371 {
6292 return m_host.Description!=null?m_host.Description:String.Empty; 6372 return m_host.Description!=null?m_host.Description:String.Empty;
6293 } 6373 }
@@ -6298,13 +6378,13 @@ namespace OpenSim.Region.ScriptEngine.Common
6298 m_host.Description = desc!=null?desc:String.Empty; 6378 m_host.Description = desc!=null?desc:String.Empty;
6299 } 6379 }
6300 6380
6301 public string llGetCreator() 6381 public LSL_String llGetCreator()
6302 { 6382 {
6303 m_host.AddScriptLPS(1); 6383 m_host.AddScriptLPS(1);
6304 return m_host.ObjectCreator.ToString(); 6384 return m_host.ObjectCreator.ToString();
6305 } 6385 }
6306 6386
6307 public string llGetTimestamp() 6387 public LSL_String llGetTimestamp()
6308 { 6388 {
6309 m_host.AddScriptLPS(1); 6389 m_host.AddScriptLPS(1);
6310 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); 6390 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
@@ -6318,7 +6398,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6318 { 6398 {
6319 Primitive.TextureEntry tex = part.Shape.Textures; 6399 Primitive.TextureEntry tex = part.Shape.Textures;
6320 Color4 texcolor; 6400 Color4 texcolor;
6321 if (face > -1) 6401 if (face >= 0 && face < GetNumberOfSides(m_host))
6322 { 6402 {
6323 texcolor = tex.CreateFace((uint)face).RGBA; 6403 texcolor = tex.CreateFace((uint)face).RGBA;
6324 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); 6404 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
@@ -6326,12 +6406,12 @@ namespace OpenSim.Region.ScriptEngine.Common
6326 part.UpdateTexture(tex); 6406 part.UpdateTexture(tex);
6327 return; 6407 return;
6328 } 6408 }
6329 else if (face == -1) 6409 else if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
6330 { 6410 {
6331 texcolor = tex.DefaultTexture.RGBA; 6411 texcolor = tex.DefaultTexture.RGBA;
6332 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f); 6412 texcolor.A = Util.Clip((float)alpha, 0.0f, 1.0f);
6333 tex.DefaultTexture.RGBA = texcolor; 6413 tex.DefaultTexture.RGBA = texcolor;
6334 for (uint i = 0; i < 32; i++) 6414 for (uint i = 0; i < GetNumberOfSides(m_host); i++)
6335 { 6415 {
6336 if (tex.FaceTextures[i] != null) 6416 if (tex.FaceTextures[i] != null)
6337 { 6417 {
@@ -6388,77 +6468,76 @@ namespace OpenSim.Region.ScriptEngine.Common
6388 } 6468 }
6389 } 6469 }
6390 6470
6391 public LSL_Types.LSLInteger llGetNumberOfPrims() 6471 public LSL_Integer llGetNumberOfPrims()
6392 { 6472 {
6393 m_host.AddScriptLPS(1); 6473 m_host.AddScriptLPS(1);
6394 return m_host.ParentGroup.PrimCount; 6474 return m_host.ParentGroup.PrimCount;
6395 } 6475 }
6396 6476
6397 public LSL_Types.list llGetBoundingBox(string obj) 6477 public LSL_List llGetBoundingBox(string obj)
6398 { 6478 {
6399 m_host.AddScriptLPS(1); 6479 m_host.AddScriptLPS(1);
6400 NotImplemented("llGetBoundingBox"); 6480 NotImplemented("llGetBoundingBox");
6401 return new LSL_Types.list(); 6481 return new LSL_List();
6402 } 6482 }
6403 6483
6404 public LSL_Types.Vector3 llGetGeometricCenter() 6484 public LSL_Vector llGetGeometricCenter()
6405 { 6485 {
6406 return new LSL_Types.Vector3( 6486 return new LSL_Vector(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z);
6407 m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z);
6408 } 6487 }
6409 6488
6410 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) 6489 public LSL_List llGetPrimitiveParams(LSL_List rules)
6411 { 6490 {
6412 m_host.AddScriptLPS(1); 6491 m_host.AddScriptLPS(1);
6413 6492
6414 LSL_Types.list res = new LSL_Types.list(); 6493 LSL_List res = new LSL_List();
6415 int idx=0; 6494 int idx=0;
6416 while (idx < rules.Length) 6495 while (idx < rules.Length)
6417 { 6496 {
6418 int code=Convert.ToInt32(rules.Data[idx++]); 6497 int code=(int)rules.GetLSLIntegerItem(idx++);
6419 int remain=rules.Length-idx; 6498 int remain=rules.Length-idx;
6420 6499
6421 switch (code) 6500 switch (code)
6422 { 6501 {
6423 case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL: 6502 case (int)BuiltIn_Commands_BaseClass.PRIM_MATERIAL:
6424 res.Add(new LSL_Types.LSLInteger(m_host.Material)); 6503 res.Add(new LSL_Integer(m_host.Material));
6425 break; 6504 break;
6426 6505
6427 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: 6506 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS:
6428 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0) 6507 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6429 res.Add(new LSL_Types.LSLInteger(1)); 6508 res.Add(new LSL_Integer(1));
6430 else 6509 else
6431 res.Add(new LSL_Types.LSLInteger(0)); 6510 res.Add(new LSL_Integer(0));
6432 break; 6511 break;
6433 6512
6434 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: 6513 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ:
6435 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0) 6514 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6436 res.Add(new LSL_Types.LSLInteger(1)); 6515 res.Add(new LSL_Integer(1));
6437 else 6516 else
6438 res.Add(new LSL_Types.LSLInteger(0)); 6517 res.Add(new LSL_Integer(0));
6439 break; 6518 break;
6440 6519
6441 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: 6520 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM:
6442 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0) 6521 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6443 res.Add(new LSL_Types.LSLInteger(1)); 6522 res.Add(new LSL_Integer(1));
6444 else 6523 else
6445 res.Add(new LSL_Types.LSLInteger(0)); 6524 res.Add(new LSL_Integer(0));
6446 break; 6525 break;
6447 6526
6448 case (int)BuiltIn_Commands_BaseClass.PRIM_POSITION: 6527 case (int)BuiltIn_Commands_BaseClass.PRIM_POSITION:
6449 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, 6528 res.Add(new LSL_Vector(m_host.AbsolutePosition.X,
6450 m_host.AbsolutePosition.Y, 6529 m_host.AbsolutePosition.Y,
6451 m_host.AbsolutePosition.Z)); 6530 m_host.AbsolutePosition.Z));
6452 break; 6531 break;
6453 6532
6454 case (int)BuiltIn_Commands_BaseClass.PRIM_SIZE: 6533 case (int)BuiltIn_Commands_BaseClass.PRIM_SIZE:
6455 res.Add(new LSL_Types.Vector3(m_host.Scale.X, 6534 res.Add(new LSL_Vector(m_host.Scale.X,
6456 m_host.Scale.Y, 6535 m_host.Scale.Y,
6457 m_host.Scale.Z)); 6536 m_host.Scale.Z));
6458 break; 6537 break;
6459 6538
6460 case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION: 6539 case (int)BuiltIn_Commands_BaseClass.PRIM_ROTATION:
6461 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, 6540 res.Add(new LSL_Rotation(m_host.RotationOffset.X,
6462 m_host.RotationOffset.Y, 6541 m_host.RotationOffset.Y,
6463 m_host.RotationOffset.Z, 6542 m_host.RotationOffset.Z,
6464 m_host.RotationOffset.W)); 6543 m_host.RotationOffset.W));
@@ -6468,69 +6547,69 @@ namespace OpenSim.Region.ScriptEngine.Common
6468 // implementing box 6547 // implementing box
6469 PrimitiveBaseShape Shape = m_host.Shape; 6548 PrimitiveBaseShape Shape = m_host.Shape;
6470 int primType = getScriptPrimType(m_host.Shape); 6549 int primType = getScriptPrimType(m_host.Shape);
6471 res.Add(new LSL_Types.LSLInteger(primType)); 6550 res.Add(new LSL_Integer(primType));
6472 switch (primType) 6551 switch (primType)
6473 { 6552 {
6474 case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX: 6553 case BuiltIn_Commands_BaseClass.PRIM_TYPE_BOX:
6475 case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER: 6554 case BuiltIn_Commands_BaseClass.PRIM_TYPE_CYLINDER:
6476 case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM: 6555 case BuiltIn_Commands_BaseClass.PRIM_TYPE_PRISM:
6477 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6556 res.Add(new LSL_Integer(Shape.ProfileCurve));
6478 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6557 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6479 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6558 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6480 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6559 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6481 res.Add(new LSL_Types.Vector3(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); 6560 res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
6482 res.Add(new LSL_Types.Vector3(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); 6561 res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0));
6483 break; 6562 break;
6484 6563
6485 case BuiltIn_Commands_BaseClass.PRIM_TYPE_SPHERE: 6564 case BuiltIn_Commands_BaseClass.PRIM_TYPE_SPHERE:
6486 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6565 res.Add(new LSL_Integer(Shape.ProfileCurve));
6487 res.Add(new LSL_Types.Vector3(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0)); 6566 res.Add(new LSL_Vector(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0));
6488 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6567 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6489 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6568 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6490 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6569 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6491 break; 6570 break;
6492 6571
6493 case BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT: 6572 case BuiltIn_Commands_BaseClass.PRIM_TYPE_SCULPT:
6494 res.Add(Shape.SculptTexture.ToString()); 6573 res.Add(Shape.SculptTexture.ToString());
6495 res.Add(new LSL_Types.LSLInteger(Shape.SculptType)); 6574 res.Add(new LSL_Integer(Shape.SculptType));
6496 break; 6575 break;
6497 6576
6498 case BuiltIn_Commands_BaseClass.PRIM_TYPE_RING: 6577 case BuiltIn_Commands_BaseClass.PRIM_TYPE_RING:
6499 case BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE: 6578 case BuiltIn_Commands_BaseClass.PRIM_TYPE_TUBE:
6500 case BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS: 6579 case BuiltIn_Commands_BaseClass.PRIM_TYPE_TORUS:
6501 // holeshape 6580 // holeshape
6502 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6581 res.Add(new LSL_Integer(Shape.ProfileCurve));
6503 6582
6504 // cut 6583 // cut
6505 res.Add(new LSL_Types.Vector3(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0)); 6584 res.Add(new LSL_Vector(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0));
6506 6585
6507 // hollow 6586 // hollow
6508 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6587 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6509 6588
6510 // twist 6589 // twist
6511 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6590 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6512 6591
6513 // vector holesize 6592 // vector holesize
6514 res.Add(new LSL_Types.Vector3(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); 6593 res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
6515 6594
6516 // vector topshear 6595 // vector topshear
6517 res.Add(new LSL_Types.Vector3(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); 6596 res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0));
6518 6597
6519 // vector profilecut 6598 // vector profilecut
6520 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6599 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6521 6600
6522 6601
6523 // vector tapera 6602 // vector tapera
6524 res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); 6603 res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0));
6525 6604
6526 // float revolutions, 6605 // float revolutions,
6527 res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( 6606 res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :(
6528 6607
6529 // float radiusoffset, 6608 // float radiusoffset,
6530 res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); 6609 res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));
6531 6610
6532 // float skew 6611 // float skew
6533 res.Add(new LSL_Types.LSLFloat(Shape.PathSkew / 100.0)); 6612 res.Add(new LSL_Float(Shape.PathSkew / 100.0));
6534 break; 6613 break;
6535 6614
6536 } 6615 }
@@ -6540,39 +6619,69 @@ namespace OpenSim.Region.ScriptEngine.Common
6540 if (remain < 1) 6619 if (remain < 1)
6541 return res; 6620 return res;
6542 6621
6543 int face = Convert.ToInt32("" + rules.Data[idx++]); 6622 int face = (int)rules.GetLSLIntegerItem(idx++);
6544 if (face == -1)
6545 face = 0;
6546
6547 Primitive.TextureEntry tex = m_host.Shape.Textures; 6623 Primitive.TextureEntry tex = m_host.Shape.Textures;
6548 Primitive.TextureEntryFace texface = tex.GetFace((uint)face); 6624 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
6549 6625 {
6550 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6626 for (face = 0 ; face < GetNumberOfSides(m_host) ; face++)
6551 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6627 {
6552 texface.RepeatV, 6628 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6553 0)); 6629
6554 res.Add(new LSL_Types.Vector3(texface.OffsetU, 6630 res.Add(new LSL_String(texface.TextureID.ToString()));
6555 texface.OffsetV, 6631 res.Add(new LSL_Vector(texface.RepeatU,
6556 0)); 6632 texface.RepeatV,
6557 res.Add(new LSL_Types.LSLFloat(texface.Rotation)); 6633 0));
6634 res.Add(new LSL_Vector(texface.OffsetU,
6635 texface.OffsetV,
6636 0));
6637 res.Add(new LSL_Float(texface.Rotation));
6638 }
6639 }
6640 else
6641 {
6642 if (face >= 0 && face < GetNumberOfSides(m_host))
6643 {
6644 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6645
6646 res.Add(new LSL_String(texface.TextureID.ToString()));
6647 res.Add(new LSL_Vector(texface.RepeatU,
6648 texface.RepeatV,
6649 0));
6650 res.Add(new LSL_Vector(texface.OffsetU,
6651 texface.OffsetV,
6652 0));
6653 res.Add(new LSL_Float(texface.Rotation));
6654 }
6655 }
6558 break; 6656 break;
6559 6657
6560 case (int)BuiltIn_Commands_BaseClass.PRIM_COLOR: 6658 case (int)BuiltIn_Commands_BaseClass.PRIM_COLOR:
6561 if (remain < 1) 6659 if (remain < 1)
6562 return res; 6660 return res;
6563 6661
6564 face=Convert.ToInt32("" + rules.Data[idx++]); 6662 face=(int)rules.GetLSLIntegerItem(idx++);
6565 6663
6566 tex = m_host.Shape.Textures; 6664 tex = m_host.Shape.Textures;
6567 Color4 texcolor; 6665 Color4 texcolor;
6568 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 6666 if (face == BuiltIn_Commands_BaseClass.ALL_SIDES)
6569 texcolor = tex.DefaultTexture.RGBA; 6667 {
6668 for (face = 0 ; face < GetNumberOfSides(m_host) ; face++)
6669 {
6670 texcolor = tex.GetFace((uint)face).RGBA;
6671 res.Add(new LSL_Vector(texcolor.R,
6672 texcolor.G,
6673 texcolor.B));
6674 res.Add(new LSL_Float(texcolor.A));
6675 }
6676 }
6570 else 6677 else
6678 {
6571 texcolor = tex.GetFace((uint)face).RGBA; 6679 texcolor = tex.GetFace((uint)face).RGBA;
6572 res.Add(new LSL_Types.Vector3((255 - (texcolor.R * 255)) / 255, 6680 res.Add(new LSL_Vector(texcolor.R,
6573 (255 - (texcolor.G * 255)) / 255, 6681 texcolor.G,
6574 (255 - (texcolor.B * 255)) / 255)); 6682 texcolor.B));
6575 res.Add(new LSL_Types.LSLFloat((texcolor.A * 255) / 255)); 6683 res.Add(new LSL_Float(texcolor.A));
6684 }
6576 break; 6685 break;
6577 6686
6578 case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY: 6687 case (int)BuiltIn_Commands_BaseClass.PRIM_BUMP_SHINY:
@@ -6580,10 +6689,10 @@ namespace OpenSim.Region.ScriptEngine.Common
6580 if (remain < 1) 6689 if (remain < 1)
6581 return res; 6690 return res;
6582 6691
6583 face=Convert.ToInt32(rules.Data[idx++]); 6692 face=(int)rules.GetLSLIntegerItem(idx++);
6584 6693
6585 res.Add(new LSL_Types.LSLInteger(0)); 6694 res.Add(new LSL_Integer(0));
6586 res.Add(new LSL_Types.LSLInteger(0)); 6695 res.Add(new LSL_Integer(0));
6587 break; 6696 break;
6588 6697
6589 case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT: 6698 case (int)BuiltIn_Commands_BaseClass.PRIM_FULLBRIGHT:
@@ -6591,24 +6700,24 @@ namespace OpenSim.Region.ScriptEngine.Common
6591 if (remain < 1) 6700 if (remain < 1)
6592 return res; 6701 return res;
6593 6702
6594 face=Convert.ToInt32(rules.Data[idx++]); 6703 face=(int)rules.GetLSLIntegerItem(idx++);
6595 6704
6596 res.Add(new LSL_Types.LSLInteger(0)); 6705 res.Add(new LSL_Integer(0));
6597 break; 6706 break;
6598 6707
6599 case (int)BuiltIn_Commands_BaseClass.PRIM_FLEXIBLE: 6708 case (int)BuiltIn_Commands_BaseClass.PRIM_FLEXIBLE:
6600 PrimitiveBaseShape shape = m_host.Shape; 6709 PrimitiveBaseShape shape = m_host.Shape;
6601 6710
6602 if (shape.FlexiEntry) 6711 if (shape.FlexiEntry)
6603 res.Add(new LSL_Types.LSLInteger(1)); // active 6712 res.Add(new LSL_Integer(1)); // active
6604 else 6713 else
6605 res.Add(new LSL_Types.LSLInteger(0)); 6714 res.Add(new LSL_Integer(0));
6606 res.Add(new LSL_Types.LSLInteger(shape.FlexiSoftness));// softness 6715 res.Add(new LSL_Integer(shape.FlexiSoftness));// softness
6607 res.Add(new LSL_Types.LSLFloat(shape.FlexiGravity)); // gravity 6716 res.Add(new LSL_Float(shape.FlexiGravity)); // gravity
6608 res.Add(new LSL_Types.LSLFloat(shape.FlexiDrag)); // friction 6717 res.Add(new LSL_Float(shape.FlexiDrag)); // friction
6609 res.Add(new LSL_Types.LSLFloat(shape.FlexiWind)); // wind 6718 res.Add(new LSL_Float(shape.FlexiWind)); // wind
6610 res.Add(new LSL_Types.LSLFloat(shape.FlexiTension)); // tension 6719 res.Add(new LSL_Float(shape.FlexiTension)); // tension
6611 res.Add(new LSL_Types.Vector3(shape.FlexiForceX, // force 6720 res.Add(new LSL_Vector(shape.FlexiForceX, // force
6612 shape.FlexiForceY, 6721 shape.FlexiForceY,
6613 shape.FlexiForceZ)); 6722 shape.FlexiForceZ));
6614 break; 6723 break;
@@ -6619,24 +6728,24 @@ namespace OpenSim.Region.ScriptEngine.Common
6619 if (remain < 1) 6728 if (remain < 1)
6620 return res; 6729 return res;
6621 6730
6622 face=Convert.ToInt32(rules.Data[idx++]); 6731 face=(int)rules.GetLSLIntegerItem(idx++);
6623 6732
6624 res.Add(new LSL_Types.LSLInteger(0)); 6733 res.Add(new LSL_Integer(0));
6625 break; 6734 break;
6626 6735
6627 case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT: 6736 case (int)BuiltIn_Commands_BaseClass.PRIM_POINT_LIGHT:
6628 shape = m_host.Shape; 6737 shape = m_host.Shape;
6629 6738
6630 if (shape.LightEntry) 6739 if (shape.LightEntry)
6631 res.Add(new LSL_Types.LSLInteger(1)); // active 6740 res.Add(new LSL_Integer(1)); // active
6632 else 6741 else
6633 res.Add(new LSL_Types.LSLInteger(0)); 6742 res.Add(new LSL_Integer(0));
6634 res.Add(new LSL_Types.Vector3(shape.LightColorR, // color 6743 res.Add(new LSL_Vector(shape.LightColorR, // color
6635 shape.LightColorG, 6744 shape.LightColorG,
6636 shape.LightColorB)); 6745 shape.LightColorB));
6637 res.Add(new LSL_Types.LSLFloat(shape.LightIntensity)); // intensity 6746 res.Add(new LSL_Float(shape.LightIntensity)); // intensity
6638 res.Add(new LSL_Types.LSLFloat(shape.LightRadius)); // radius 6747 res.Add(new LSL_Float(shape.LightRadius)); // radius
6639 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff 6748 res.Add(new LSL_Float(shape.LightFalloff)); // falloff
6640 break; 6749 break;
6641 6750
6642 case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW: 6751 case (int)BuiltIn_Commands_BaseClass.PRIM_GLOW:
@@ -6644,9 +6753,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6644 if (remain < 1) 6753 if (remain < 1)
6645 return res; 6754 return res;
6646 6755
6647 face=Convert.ToInt32(rules.Data[idx++]); 6756 face=(int)rules.GetLSLIntegerItem(idx++);
6648 6757
6649 res.Add(new LSL_Types.LSLFloat(0)); 6758 res.Add(new LSL_Float(0));
6650 break; 6759 break;
6651 } 6760 }
6652 } 6761 }
@@ -6780,7 +6889,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6780 // characters are padded with "=". 6889 // characters are padded with "=".
6781 // </returns> 6890 // </returns>
6782 6891
6783 public string llIntegerToBase64(int number) 6892 public LSL_String llIntegerToBase64(int number)
6784 { 6893 {
6785 // uninitialized string 6894 // uninitialized string
6786 6895
@@ -6843,7 +6952,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6843 // </para> 6952 // </para>
6844 // </remarks> 6953 // </remarks>
6845 6954
6846 public LSL_Types.LSLInteger llBase64ToInteger(string str) 6955 public LSL_Integer llBase64ToInteger(string str)
6847 { 6956 {
6848 int number = 0; 6957 int number = 0;
6849 int digit; 6958 int digit;
@@ -6903,19 +7012,19 @@ namespace OpenSim.Region.ScriptEngine.Common
6903 return number; 7012 return number;
6904 } 7013 }
6905 7014
6906 public double llGetGMTclock() 7015 public LSL_Float llGetGMTclock()
6907 { 7016 {
6908 m_host.AddScriptLPS(1); 7017 m_host.AddScriptLPS(1);
6909 return DateTime.UtcNow.TimeOfDay.TotalSeconds; 7018 return DateTime.UtcNow.TimeOfDay.TotalSeconds;
6910 } 7019 }
6911 7020
6912 public string llGetSimulatorHostname() 7021 public LSL_String llGetSimulatorHostname()
6913 { 7022 {
6914 m_host.AddScriptLPS(1); 7023 m_host.AddScriptLPS(1);
6915 return System.Environment.MachineName; 7024 return System.Environment.MachineName;
6916 } 7025 }
6917 7026
6918 public void llSetLocalRot(LSL_Types.Quaternion rot) 7027 public void llSetLocalRot(LSL_Rotation rot)
6919 { 7028 {
6920 m_host.AddScriptLPS(1); 7029 m_host.AddScriptLPS(1);
6921 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 7030 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
@@ -6970,7 +7079,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6970 // of arrays or other objects. 7079 // of arrays or other objects.
6971 // </remarks> 7080 // </remarks>
6972 7081
6973 public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) 7082 public LSL_List llParseStringKeepNulls(string src, LSL_List separators, LSL_List spacers)
6974 { 7083 {
6975 int beginning = 0; 7084 int beginning = 0;
6976 int srclen = src.Length; 7085 int srclen = src.Length;
@@ -6988,7 +7097,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6988 7097
6989 // Initial capacity reduces resize cost 7098 // Initial capacity reduces resize cost
6990 7099
6991 LSL_Types.list tokens = new LSL_Types.list(); 7100 LSL_List tokens = new LSL_List();
6992 7101
6993 m_host.AddScriptLPS(1); 7102 m_host.AddScriptLPS(1);
6994 7103
@@ -7098,7 +7207,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7098 return tokens; 7207 return tokens;
7099 } 7208 }
7100 7209
7101 public LSL_Types.LSLInteger llGetObjectPermMask(int mask) 7210 public LSL_Integer llGetObjectPermMask(int mask)
7102 { 7211 {
7103 m_host.AddScriptLPS(1); 7212 m_host.AddScriptLPS(1);
7104 7213
@@ -7171,7 +7280,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7171 } 7280 }
7172 } 7281 }
7173 7282
7174 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 7283 public LSL_Integer llGetInventoryPermMask(string item, int mask)
7175 { 7284 {
7176 m_host.AddScriptLPS(1); 7285 m_host.AddScriptLPS(1);
7177 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7286 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -7202,7 +7311,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7202 NotImplemented("llSetInventoryPermMask"); 7311 NotImplemented("llSetInventoryPermMask");
7203 } 7312 }
7204 7313
7205 public string llGetInventoryCreator(string item) 7314 public LSL_String llGetInventoryCreator(string item)
7206 { 7315 {
7207 m_host.AddScriptLPS(1); 7316 m_host.AddScriptLPS(1);
7208 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7317 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -7225,7 +7334,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7225// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 7334// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
7226 } 7335 }
7227 7336
7228 public string llRequestSimulatorData(string simulator, int data) 7337 public LSL_String llRequestSimulatorData(string simulator, int data)
7229 { 7338 {
7230 try 7339 try
7231 { 7340 {
@@ -7243,7 +7352,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7243 // ScriptSleep(1000); 7352 // ScriptSleep(1000);
7244 return UUID.Zero.ToString(); 7353 return UUID.Zero.ToString();
7245 } 7354 }
7246 reply = new LSL_Types.Vector3( 7355 reply = new LSL_Vector(
7247 info.RegionLocX * Constants.RegionSize, 7356 info.RegionLocX * Constants.RegionSize,
7248 info.RegionLocY * Constants.RegionSize, 7357 info.RegionLocY * Constants.RegionSize,
7249 0).ToString(); 7358 0).ToString();
@@ -7299,7 +7408,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7299 m_host.SetForceMouselook(mouselook != 0); 7408 m_host.SetForceMouselook(mouselook != 0);
7300 } 7409 }
7301 7410
7302 public double llGetObjectMass(string id) 7411 public LSL_Float llGetObjectMass(string id)
7303 { 7412 {
7304 m_host.AddScriptLPS(1); 7413 m_host.AddScriptLPS(1);
7305 UUID key = new UUID(); 7414 UUID key = new UUID();
@@ -7322,9 +7431,9 @@ namespace OpenSim.Region.ScriptEngine.Common
7322 /// and the source list is added as a suffix. 7431 /// and the source list is added as a suffix.
7323 /// </summary> 7432 /// </summary>
7324 7433
7325 public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) 7434 public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end)
7326 { 7435 {
7327 LSL_Types.list pref = null; 7436 LSL_List pref = null;
7328 7437
7329 m_host.AddScriptLPS(1); 7438 m_host.AddScriptLPS(1);
7330 7439
@@ -7401,7 +7510,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7401 // ScriptSleep(10000); 7510 // ScriptSleep(10000);
7402 } 7511 }
7403 7512
7404 public void llParcelMediaCommandList(LSL_Types.list commandList) 7513 public void llParcelMediaCommandList(LSL_List commandList)
7405 { 7514 {
7406 //TO DO: Implement the missing commands 7515 //TO DO: Implement the missing commands
7407 //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame. 7516 //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame.
@@ -7459,8 +7568,19 @@ namespace OpenSim.Region.ScriptEngine.Common
7459 { 7568 {
7460 if (commandList.Data[i + 1] is string) 7569 if (commandList.Data[i + 1] is string)
7461 { 7570 {
7462 //Set the new media URL only if the user is the owner of the land 7571 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
7463 osSetParcelMediaURL(commandList.Data[i + 1].ToString()); 7572
7573 if (landowner == UUID.Zero)
7574 {
7575 return;
7576 }
7577
7578 if (landowner != m_host.ObjectOwner)
7579 {
7580 return;
7581 }
7582
7583 World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, (string)commandList.GetLSLStringItem(i + 1));
7464 7584
7465 List<ScenePresence> scenePresenceList = World.GetScenePresences(); 7585 List<ScenePresence> scenePresenceList = World.GetScenePresences();
7466 LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 7586 LandData landData = World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
@@ -7485,12 +7605,13 @@ namespace OpenSim.Region.ScriptEngine.Common
7485 }//end switch 7605 }//end switch
7486 7606
7487 } 7607 }
7608 // ScriptSleep(2000);
7488 } 7609 }
7489 7610
7490 public LSL_Types.list llParcelMediaQuery(LSL_Types.list aList) 7611 public LSL_List llParcelMediaQuery(LSL_List aList)
7491 { 7612 {
7492 m_host.AddScriptLPS(1); 7613 m_host.AddScriptLPS(1);
7493 LSL_Types.list list = new LSL_Types.list(); 7614 LSL_List list = new LSL_List();
7494 //TO DO: make the implementation for the missing commands 7615 //TO DO: make the implementation for the missing commands
7495 //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. 7616 //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture.
7496 //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. 7617 //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
@@ -7506,13 +7627,13 @@ namespace OpenSim.Region.ScriptEngine.Common
7506 switch ((ParcelMediaCommandEnum) aList.Data[i]) 7627 switch ((ParcelMediaCommandEnum) aList.Data[i])
7507 { 7628 {
7508 case ParcelMediaCommandEnum.Url: 7629 case ParcelMediaCommandEnum.Url:
7509 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL); 7630 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL));
7510 break; 7631 break;
7511 case ParcelMediaCommandEnum.Desc: 7632 case ParcelMediaCommandEnum.Desc:
7512 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description); 7633 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description));
7513 break; 7634 break;
7514 case ParcelMediaCommandEnum.Texture: 7635 case ParcelMediaCommandEnum.Texture:
7515 list.Add(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID); 7636 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
7516 break; 7637 break;
7517 default: 7638 default:
7518 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; 7639 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
@@ -7526,7 +7647,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7526 return list; 7647 return list;
7527 } 7648 }
7528 7649
7529 public LSL_Types.LSLInteger llModPow(int a, int b, int c) 7650 public LSL_Integer llModPow(int a, int b, int c)
7530 { 7651 {
7531 m_host.AddScriptLPS(1); 7652 m_host.AddScriptLPS(1);
7532 Int64 tmp = 0; 7653 Int64 tmp = 0;
@@ -7535,7 +7656,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7535 return Convert.ToInt32(tmp); 7656 return Convert.ToInt32(tmp);
7536 } 7657 }
7537 7658
7538 public LSL_Types.LSLInteger llGetInventoryType(string name) 7659 public LSL_Integer llGetInventoryType(string name)
7539 { 7660 {
7540 m_host.AddScriptLPS(1); 7661 m_host.AddScriptLPS(1);
7541 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7662 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -7548,7 +7669,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7548 return -1; 7669 return -1;
7549 } 7670 }
7550 7671
7551 public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) 7672 public void llSetPayPrice(int price, LSL_List quick_pay_buttons)
7552 { 7673 {
7553 m_host.AddScriptLPS(1); 7674 m_host.AddScriptLPS(1);
7554 7675
@@ -7558,42 +7679,41 @@ namespace OpenSim.Region.ScriptEngine.Common
7558 return; 7679 return;
7559 } 7680 }
7560 m_host.ParentGroup.RootPart.PayPrice[0]=price; 7681 m_host.ParentGroup.RootPart.PayPrice[0]=price;
7561 m_host.ParentGroup.RootPart.PayPrice[1]=(int)quick_pay_buttons.Data[0]; 7682
7562 m_host.ParentGroup.RootPart.PayPrice[2]=(int)quick_pay_buttons.Data[1]; 7683 m_host.ParentGroup.RootPart.PayPrice[1]=(LSL_Integer)quick_pay_buttons.Data[0];
7563 m_host.ParentGroup.RootPart.PayPrice[3]=(int)quick_pay_buttons.Data[2]; 7684 m_host.ParentGroup.RootPart.PayPrice[2]=(LSL_Integer)quick_pay_buttons.Data[1];
7564 m_host.ParentGroup.RootPart.PayPrice[4]=(int)quick_pay_buttons.Data[3]; 7685 m_host.ParentGroup.RootPart.PayPrice[3]=(LSL_Integer)quick_pay_buttons.Data[2];
7686 m_host.ParentGroup.RootPart.PayPrice[4]=(LSL_Integer)quick_pay_buttons.Data[3];
7687 m_host.ParentGroup.HasGroupChanged = true;
7565 } 7688 }
7566 7689
7567 public LSL_Types.Vector3 llGetCameraPos() 7690 public LSL_Vector llGetCameraPos()
7568 { 7691 {
7569 m_host.AddScriptLPS(1); 7692 m_host.AddScriptLPS(1);
7570 UUID invItemID=InventorySelf(); 7693 UUID invItemID=InventorySelf();
7571 if (invItemID == UUID.Zero) 7694 if (invItemID == UUID.Zero)
7572 return new LSL_Types.Vector3(); 7695 return new LSL_Vector();
7573 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) 7696 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7574 return new LSL_Types.Vector3(); 7697 return new LSL_Vector();
7575 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) 7698 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0)
7576 { 7699 {
7577 ShoutError("No permissions to track the camera"); 7700 ShoutError("No permissions to track the camera");
7578 return new LSL_Types.Vector3(); 7701 return new LSL_Vector();
7579 } 7702 }
7580 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7703 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7581 if (presence != null) 7704 if (presence != null)
7582 { 7705 {
7583 LSL_Types.Vector3 pos = new LSL_Types.Vector3( 7706 LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z);
7584 presence.CameraPosition.X,
7585 presence.CameraPosition.Y,
7586 presence.CameraPosition.Z);
7587 return pos; 7707 return pos;
7588 } 7708 }
7589 return new LSL_Types.Vector3(); 7709 return new LSL_Vector();
7590 } 7710 }
7591 7711
7592 public LSL_Types.Quaternion llGetCameraRot() 7712 public LSL_Rotation llGetCameraRot()
7593 { 7713 {
7594 m_host.AddScriptLPS(1); 7714 m_host.AddScriptLPS(1);
7595 NotImplemented("llGetCameraRot"); 7715 NotImplemented("llGetCameraRot");
7596 return new LSL_Types.Quaternion(); 7716 return new LSL_Rotation();
7597 } 7717 }
7598 7718
7599 public void llSetPrimURL() 7719 public void llSetPrimURL()
@@ -7610,7 +7730,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7610 // ScriptSleep(20000); 7730 // ScriptSleep(20000);
7611 } 7731 }
7612 7732
7613 public string llEscapeURL(string url) 7733 public LSL_String llEscapeURL(string url)
7614 { 7734 {
7615 m_host.AddScriptLPS(1); 7735 m_host.AddScriptLPS(1);
7616 try 7736 try
@@ -7623,7 +7743,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7623 } 7743 }
7624 } 7744 }
7625 7745
7626 public string llUnescapeURL(string url) 7746 public LSL_String llUnescapeURL(string url)
7627 { 7747 {
7628 m_host.AddScriptLPS(1); 7748 m_host.AddScriptLPS(1);
7629 try 7749 try
@@ -7636,7 +7756,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7636 } 7756 }
7637 } 7757 }
7638 7758
7639 public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) 7759 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at)
7640 { 7760 {
7641 m_host.AddScriptLPS(1); 7761 m_host.AddScriptLPS(1);
7642 NotImplemented("llMapDestination"); 7762 NotImplemented("llMapDestination");
@@ -7706,7 +7826,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7706 // ScriptSleep(100); 7826 // ScriptSleep(100);
7707 } 7827 }
7708 7828
7709 public void llSetCameraParams(LSL_Types.list rules) 7829 public void llSetCameraParams(LSL_List rules)
7710 { 7830 {
7711 m_host.AddScriptLPS(1); 7831 m_host.AddScriptLPS(1);
7712 7832
@@ -7731,7 +7851,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7731 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>(); 7851 SortedDictionary<int, float> parameters = new SortedDictionary<int, float>();
7732 object[] data = rules.Data; 7852 object[] data = rules.Data;
7733 for (int i = 0; i < data.Length; ++i) { 7853 for (int i = 0; i < data.Length; ++i) {
7734 int type = Convert.ToInt32(data[i++]); 7854 int type = Convert.ToInt32(data[i++].ToString());
7735 if (i >= data.Length) break; // odd number of entries => ignore the last 7855 if (i >= data.Length) break; // odd number of entries => ignore the last
7736 7856
7737 // some special cases: Vector parameters are split into 3 float parameters (with type+1, type+2, type+3) 7857 // some special cases: Vector parameters are split into 3 float parameters (with type+1, type+2, type+3)
@@ -7739,17 +7859,17 @@ namespace OpenSim.Region.ScriptEngine.Common
7739 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS: 7859 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS:
7740 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS_OFFSET: 7860 case BuiltIn_Commands_BaseClass.CAMERA_FOCUS_OFFSET:
7741 case BuiltIn_Commands_BaseClass.CAMERA_POSITION: 7861 case BuiltIn_Commands_BaseClass.CAMERA_POSITION:
7742 LSL_Types.Vector3 v = (LSL_Types.Vector3)data[i]; 7862 LSL_Vector v = (LSL_Vector)data[i];
7743 parameters.Add(type + 1, (float)v.x); 7863 parameters.Add(type + 1, (float)v.x);
7744 parameters.Add(type + 2, (float)v.y); 7864 parameters.Add(type + 2, (float)v.y);
7745 parameters.Add(type + 3, (float)v.z); 7865 parameters.Add(type + 3, (float)v.z);
7746 break; 7866 break;
7747 default: 7867 default:
7748 // TODO: clean that up as soon as the implicit casts are in 7868 // TODO: clean that up as soon as the implicit casts are in
7749 if (data[i] is LSL_Types.LSLFloat) 7869 if (data[i] is LSL_Float)
7750 parameters.Add(type, (float)((LSL_Types.LSLFloat)data[i]).value); 7870 parameters.Add(type, (float)((LSL_Float)data[i]).value);
7751 else if (data[i] is LSL_Types.LSLInteger) 7871 else if (data[i] is LSL_Integer)
7752 parameters.Add(type, (float)((LSL_Types.LSLInteger)data[i]).value); 7872 parameters.Add(type, (float)((LSL_Integer)data[i]).value);
7753 else parameters.Add(type, Convert.ToSingle(data[i])); 7873 else parameters.Add(type, Convert.ToSingle(data[i]));
7754 break; 7874 break;
7755 } 7875 }
@@ -7782,10 +7902,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7782 presence.ControllingClient.SendClearFollowCamProperties(objectID); 7902 presence.ControllingClient.SendClearFollowCamProperties(objectID);
7783 } 7903 }
7784 7904
7785 public double llListStatistics(int operation, LSL_Types.list src) 7905 public LSL_Float llListStatistics(int operation, LSL_List src)
7786 { 7906 {
7787 m_host.AddScriptLPS(1); 7907 m_host.AddScriptLPS(1);
7788 LSL_Types.list nums = LSL_Types.list.ToDoubleList(src); 7908 LSL_List nums = LSL_List.ToDoubleList(src);
7789 switch (operation) 7909 switch (operation)
7790 { 7910 {
7791 case BuiltIn_Commands_BaseClass.LIST_STAT_RANGE: 7911 case BuiltIn_Commands_BaseClass.LIST_STAT_RANGE:
@@ -7815,19 +7935,19 @@ namespace OpenSim.Region.ScriptEngine.Common
7815 } 7935 }
7816 } 7936 }
7817 7937
7818 public LSL_Types.LSLInteger llGetUnixTime() 7938 public LSL_Integer llGetUnixTime()
7819 { 7939 {
7820 m_host.AddScriptLPS(1); 7940 m_host.AddScriptLPS(1);
7821 return Util.UnixTimeSinceEpoch(); 7941 return Util.UnixTimeSinceEpoch();
7822 } 7942 }
7823 7943
7824 public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos) 7944 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
7825 { 7945 {
7826 m_host.AddScriptLPS(1); 7946 m_host.AddScriptLPS(1);
7827 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; 7947 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags;
7828 } 7948 }
7829 7949
7830 public LSL_Types.LSLInteger llGetRegionFlags() 7950 public LSL_Integer llGetRegionFlags()
7831 { 7951 {
7832 m_host.AddScriptLPS(1); 7952 m_host.AddScriptLPS(1);
7833 IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); 7953 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
@@ -7836,7 +7956,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7836 return (int)estate.GetRegionFlags(); 7956 return (int)estate.GetRegionFlags();
7837 } 7957 }
7838 7958
7839 public string llXorBase64StringsCorrect(string str1, string str2) 7959 public LSL_String llXorBase64StringsCorrect(string str1, string str2)
7840 { 7960 {
7841 m_host.AddScriptLPS(1); 7961 m_host.AddScriptLPS(1);
7842 string ret = String.Empty; 7962 string ret = String.Empty;
@@ -7854,7 +7974,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7854 return llStringToBase64(ret); 7974 return llStringToBase64(ret);
7855 } 7975 }
7856 7976
7857 public string llHTTPRequest(string url, LSL_Types.list parameters, string body) 7977 public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
7858 { 7978 {
7859 // Partial implementation: support for parameter flags needed 7979 // Partial implementation: support for parameter flags needed
7860 // see http://wiki.secondlife.com/wiki/LlHTTPRequest 7980 // see http://wiki.secondlife.com/wiki/LlHTTPRequest
@@ -7931,7 +8051,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7931 // ScriptSleep(100); 8051 // ScriptSleep(100);
7932 } 8052 }
7933 8053
7934 public LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) 8054 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
7935 { 8055 {
7936 m_host.AddScriptLPS(1); 8056 m_host.AddScriptLPS(1);
7937 8057
@@ -7994,11 +8114,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7994 return 0; 8114 return 0;
7995 } 8115 }
7996 8116
7997 public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) 8117 public LSL_List llGetParcelPrimOwners(LSL_Vector pos)
7998 { 8118 {
7999 m_host.AddScriptLPS(1); 8119 m_host.AddScriptLPS(1);
8000 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 8120 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
8001 LSL_Types.list ret = new LSL_Types.list(); 8121 LSL_List ret = new LSL_List();
8002 if (land != null) 8122 if (land != null)
8003 { 8123 {
8004 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners()) 8124 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
@@ -8011,7 +8131,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8011 return ret; 8131 return ret;
8012 } 8132 }
8013 8133
8014 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 8134 public LSL_Integer llGetObjectPrimCount(string object_id)
8015 { 8135 {
8016 m_host.AddScriptLPS(1); 8136 m_host.AddScriptLPS(1);
8017 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); 8137 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
@@ -8025,7 +8145,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8025 } 8145 }
8026 } 8146 }
8027 8147
8028 public LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) 8148 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
8029 { 8149 {
8030 m_host.AddScriptLPS(1); 8150 m_host.AddScriptLPS(1);
8031 // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation 8151 // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation
@@ -8055,36 +8175,36 @@ namespace OpenSim.Region.ScriptEngine.Common
8055 8175
8056 } 8176 }
8057 8177
8058 public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) 8178 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
8059 { 8179 {
8060 m_host.AddScriptLPS(1); 8180 m_host.AddScriptLPS(1);
8061 LandData land = World.GetLandData((float)pos.x, (float)pos.y); 8181 LandData land = World.GetLandData((float)pos.x, (float)pos.y);
8062 if (land == null) 8182 if (land == null)
8063 { 8183 {
8064 return new LSL_Types.list(0); 8184 return new LSL_List(0);
8065 } 8185 }
8066 LSL_Types.list ret = new LSL_Types.list(); 8186 LSL_List ret = new LSL_List();
8067 foreach (object o in param.Data) 8187 foreach (object o in param.Data)
8068 { 8188 {
8069 switch (o.ToString()) 8189 switch (o.ToString())
8070 { 8190 {
8071 case "0": 8191 case "0":
8072 ret = ret + new LSL_Types.list(land.Name); 8192 ret = ret + new LSL_List(land.Name);
8073 break; 8193 break;
8074 case "1": 8194 case "1":
8075 ret = ret + new LSL_Types.list(land.Description); 8195 ret = ret + new LSL_List(land.Description);
8076 break; 8196 break;
8077 case "2": 8197 case "2":
8078 ret = ret + new LSL_Types.list(land.OwnerID.ToString()); 8198 ret = ret + new LSL_List(land.OwnerID.ToString());
8079 break; 8199 break;
8080 case "3": 8200 case "3":
8081 ret = ret + new LSL_Types.list(land.GroupID.ToString()); 8201 ret = ret + new LSL_List(land.GroupID.ToString());
8082 break; 8202 break;
8083 case "4": 8203 case "4":
8084 ret = ret + new LSL_Types.list(land.Area); 8204 ret = ret + new LSL_List(land.Area);
8085 break; 8205 break;
8086 default: 8206 default:
8087 ret = ret + new LSL_Types.list(0); 8207 ret = ret + new LSL_List(0);
8088 break; 8208 break;
8089 } 8209 }
8090 } 8210 }
@@ -8107,7 +8227,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8107 // ScriptSleep(200); 8227 // ScriptSleep(200);
8108 } 8228 }
8109 8229
8110 public string llStringTrim(string src, int type) 8230 public LSL_String llStringTrim(string src, int type)
8111 { 8231 {
8112 m_host.AddScriptLPS(1); 8232 m_host.AddScriptLPS(1);
8113 if (type == (int)BuiltIn_Commands_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } 8233 if (type == (int)BuiltIn_Commands_BaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); }
@@ -8116,10 +8236,10 @@ namespace OpenSim.Region.ScriptEngine.Common
8116 return src; 8236 return src;
8117 } 8237 }
8118 8238
8119 public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) 8239 public LSL_List llGetObjectDetails(string id, LSL_List args)
8120 { 8240 {
8121 m_host.AddScriptLPS(1); 8241 m_host.AddScriptLPS(1);
8122 LSL_Types.list ret = new LSL_Types.list(); 8242 LSL_List ret = new LSL_List();
8123 UUID key = new UUID(); 8243 UUID key = new UUID();
8124 if (UUID.TryParse(id, out key)) 8244 if (UUID.TryParse(id, out key))
8125 { 8245 {
@@ -8138,13 +8258,13 @@ namespace OpenSim.Region.ScriptEngine.Common
8138 ret.Add(""); 8258 ret.Add("");
8139 break; 8259 break;
8140 case "3": 8260 case "3":
8141 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 8261 ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
8142 break; 8262 break;
8143 case "4": 8263 case "4":
8144 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W)); 8264 ret.Add(new LSL_Rotation((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
8145 break; 8265 break;
8146 case "5": 8266 case "5":
8147 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); 8267 ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
8148 break; 8268 break;
8149 case "6": 8269 case "6":
8150 ret.Add(id); 8270 ret.Add(id);
@@ -8173,13 +8293,13 @@ namespace OpenSim.Region.ScriptEngine.Common
8173 ret.Add(obj.Description); 8293 ret.Add(obj.Description);
8174 break; 8294 break;
8175 case "3": 8295 case "3":
8176 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); 8296 ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
8177 break; 8297 break;
8178 case "4": 8298 case "4":
8179 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 8299 ret.Add(new LSL_Rotation(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
8180 break; 8300 break;
8181 case "5": 8301 case "5":
8182 ret.Add(new LSL_Types.Vector3(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z)); 8302 ret.Add(new LSL_Vector(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z));
8183 break; 8303 break;
8184 case "6": 8304 case "6":
8185 ret.Add(obj.OwnerID.ToString()); 8305 ret.Add(obj.OwnerID.ToString());
@@ -8195,7 +8315,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8195 return ret; 8315 return ret;
8196 } 8316 }
8197 } 8317 }
8198 return new LSL_Types.list(); 8318 return new LSL_List();
8199 } 8319 }
8200 8320
8201 8321
@@ -8232,7 +8352,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8232 throw new Exception("LSL Runtime Error: " + msg); 8352 throw new Exception("LSL Runtime Error: " + msg);
8233 } 8353 }
8234 8354
8235 public string llGetNumberOfNotecardLines(string name) 8355 public LSL_String llGetNumberOfNotecardLines(string name)
8236 { 8356 {
8237 m_host.AddScriptLPS(1); 8357 m_host.AddScriptLPS(1);
8238 8358
@@ -8255,7 +8375,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8255 // ScriptSleep(100); 8375 // ScriptSleep(100);
8256 } 8376 }
8257 8377
8258 public string llGetNotecardLine(string name, int line) 8378 public LSL_String llGetNotecardLine(string name, int line)
8259 { 8379 {
8260 m_host.AddScriptLPS(1); 8380 m_host.AddScriptLPS(1);
8261 8381
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index d4cf3f5..fa468bd 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -27,6 +27,14 @@
27 27
28using OpenSim.Region.Environment.Interfaces; 28using OpenSim.Region.Environment.Interfaces;
29 29
30using LSL_Float = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLFloat;
31using LSL_Integer = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLInteger;
32using LSL_Key = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
33using LSL_List = OpenSim.Region.ScriptEngine.Common.LSL_Types.list;
34using LSL_Rotation = OpenSim.Region.ScriptEngine.Common.LSL_Types.Quaternion;
35using LSL_String = OpenSim.Region.ScriptEngine.Common.LSL_Types.LSLString;
36using LSL_Vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3;
37
30namespace OpenSim.Region.ScriptEngine.Common 38namespace OpenSim.Region.ScriptEngine.Common
31{ 39{
32 public interface LSL_BuiltIn_Commands_Interface 40 public interface LSL_BuiltIn_Commands_Interface
@@ -37,618 +45,347 @@ namespace OpenSim.Region.ScriptEngine.Common
37 45
38 ICommander GetCommander(string name); 46 ICommander GetCommander(string name);
39 47
40 double llSin(double f); 48 LSL_Integer llAbs(int i);
41 double llCos(double f); 49 LSL_Float llAcos(double val);
42 double llTan(double f); 50 void llAddToLandBanList(string avatar, double hours);
43 double llAtan2(double x, double y); 51 void llAddToLandPassList(string avatar, double hours);
44 double llSqrt(double f); 52 void llAdjustSoundVolume(double volume);
45 double llPow(double fbase, double fexponent); 53 void llAllowInventoryDrop(int add);
46 LSL_Types.LSLInteger llAbs(int i); 54 LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b);
47 double llFabs(double f); 55 void llApplyImpulse(LSL_Vector force, int local);
48 double llFrand(double mag); 56 void llApplyRotationalImpulse(LSL_Vector force, int local);
49 LSL_Types.LSLInteger llFloor(double f); 57 LSL_Float llAsin(double val);
50 LSL_Types.LSLInteger llCeil(double f); 58 LSL_Float llAtan2(double x, double y);
51 LSL_Types.LSLInteger llRound(double f); 59 void llAttachToAvatar(int attachment);
52 double llVecMag(LSL_Types.Vector3 v); 60 LSL_Key llAvatarOnSitTarget();
53 LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v); 61 LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up);
54 double llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b); 62 LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle);
55 LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r); 63 LSL_Integer llBase64ToInteger(string str);
56 LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v); 64 LSL_String llBase64ToString(string str);
57 LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up); 65 void llBreakAllLinks();
58 LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r); 66 void llBreakLink(int linknum);
59 LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r); 67 LSL_Integer llCeil(double f);
60 LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r); 68 void llClearCameraParams();
61 LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 start, LSL_Types.Vector3 end); 69 void llCloseRemoteDataChannel(string channel);
62 void llWhisper(int channelID, string text); 70 LSL_Float llCloud(LSL_Vector offset);
63 //void llSay(int channelID, string text); 71 void llCollisionFilter(string name, string id, int accept);
64 void llSay(int channelID, string text); 72 void llCollisionSound(string impact_sound, double impact_volume);
65 void llShout(int channelID, string text); 73 void llCollisionSprite(string impact_sprite);
66 void llRegionSay(int channelID, string text); 74 LSL_Float llCos(double f);
67 LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg); 75 void llCreateLink(string target, int parent);
68 void llListenControl(int number, int active); 76 LSL_List llCSV2List(string src);
69 void llListenRemove(int number); 77 LSL_List llDeleteSubList(LSL_List src, int start, int end);
70 void llSensor(string name, string id, int type, double range, double arc); 78 LSL_String llDeleteSubString(string src, int start, int end);
71 void llSensorRepeat(string name, string id, int type, double range, double arc, double rate); 79 void llDetachFromAvatar();
72 void llSensorRemove(); 80 LSL_Vector llDetectedGrab(int number);
73 string llDetectedName(int number); 81 LSL_Integer llDetectedGroup(int number);
74 string llDetectedKey(int number); 82 LSL_Key llDetectedKey(int number);
75 string llDetectedOwner(int number); 83 LSL_Integer llDetectedLinkNumber(int number);
76 LSL_Types.LSLInteger llDetectedType(int number); 84 LSL_String llDetectedName(int number);
77 LSL_Types.Vector3 llDetectedPos(int number); 85 LSL_Key llDetectedOwner(int number);
78 LSL_Types.Vector3 llDetectedVel(int number); 86 LSL_Vector llDetectedPos(int number);
79 LSL_Types.Vector3 llDetectedGrab(int number); 87 LSL_Rotation llDetectedRot(int number);
80 LSL_Types.Quaternion llDetectedRot(int number); 88 LSL_Integer llDetectedType(int number);
81 LSL_Types.LSLInteger llDetectedGroup(int number); 89 LSL_Vector llDetectedTouchBinormal(int index);
82 LSL_Types.LSLInteger llDetectedLinkNumber(int number); 90 LSL_Integer llDetectedTouchFace(int index);
83 void llDie(); 91 LSL_Vector llDetectedTouchNormal(int index);
84 double llGround(LSL_Types.Vector3 offset); 92 LSL_Vector llDetectedTouchPos(int index);
85 double llCloud(LSL_Types.Vector3 offset); 93 LSL_Vector llDetectedTouchST(int index);
86 LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset); 94 LSL_Vector llDetectedTouchUV(int index);
87 void llSetStatus(int status, int value); 95 LSL_Vector llDetectedVel(int number);
88 LSL_Types.LSLInteger llGetStatus(int status); 96 void llDialog(string avatar, string message, LSL_List buttons, int chat_channel);
89 void llSetScale(LSL_Types.Vector3 scale); 97 void llDie();
90 LSL_Types.Vector3 llGetScale(); 98 LSL_String llDumpList2String(LSL_List src, string seperator);
91 void llSetColor(LSL_Types.Vector3 color, int face); 99 LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir);
92 double llGetAlpha(int face); 100 void llEjectFromLand(string pest);
93 void llSetAlpha(double alpha, int face); 101 void llEmail(string address, string subject, string message);
94 LSL_Types.Vector3 llGetColor(int face); 102 LSL_String llEscapeURL(string url);
95 void llSetTexture(string texture, int face); 103 LSL_Rotation llEuler2Rot(LSL_Vector v);
96 void llScaleTexture(double u, double v, int face); 104 LSL_Float llFabs(double f);
97 void llOffsetTexture(double u, double v, int face); 105 LSL_Integer llFloor(double f);
98 void llRotateTexture(double rotation, int face); 106 void llForceMouselook(int mouselook);
99 string llGetTexture(int face); 107 LSL_Float llFrand(double mag);
100 void llSetPos(LSL_Types.Vector3 pos); 108 LSL_Vector llGetAccel();
101 109 LSL_Integer llGetAgentInfo(string id);
102 //wiki: vector llGetPos() 110 LSL_Vector llGetAgentSize(string id);
103 LSL_Types.Vector3 llGetPos(); 111 LSL_Float llGetAlpha(int face);
104 //wiki: vector llGetLocalPos() 112 LSL_Float llGetAndResetTime();
105 LSL_Types.Vector3 llGetLocalPos(); 113 LSL_String llGetAnimation(string id);
106 //wiki: llSetRot(rotation rot) 114 LSL_List llGetAnimationList(string id);
107 void llSetRot(LSL_Types.Quaternion rot); 115 LSL_Integer llGetAttached();
108 //wiki: rotation llGetRot() 116 LSL_List llGetBoundingBox(string obj);
109 LSL_Types.Quaternion llGetRot(); 117 LSL_Vector llGetCameraPos();
110 //wiki: rotation llGetLocalRot() 118 LSL_Rotation llGetCameraRot();
111 LSL_Types.Quaternion llGetLocalRot(); 119 LSL_Vector llGetCenterOfMass();
112 //wiki: llSetForce(vector force, integer local) 120 LSL_Vector llGetColor(int face);
113 void llSetForce(LSL_Types.Vector3 force, int local); 121 LSL_String llGetCreator();
114 //wiki: vector llGetForce() 122 LSL_String llGetDate();
115 LSL_Types.Vector3 llGetForce(); 123 LSL_Float llGetEnergy();
116 //wiki: integer llTarget(vector position, double range) 124 LSL_Vector llGetForce();
117 LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range); 125 LSL_Integer llGetFreeMemory();
118 //wiki: llTargetRemove(integer number) 126 LSL_Vector llGetGeometricCenter();
119 void llTargetRemove(int number); 127 LSL_Float llGetGMTclock();
120 //wiki: integer llRotTarget(rotation rot, double error) 128 LSL_Key llGetInventoryCreator(string item);
121 LSL_Types.LSLInteger llRotTarget(LSL_Types.Quaternion rot, double error); 129 LSL_Key llGetInventoryKey(string name);
122 //wiki: integer llRotTargetRemove(integer number) 130 LSL_String llGetInventoryName(int type, int number);
123 void llRotTargetRemove(int number); 131 LSL_Integer llGetInventoryNumber(int type);
124 //wiki: llMoveToTarget(vector target, double tau) 132 LSL_Integer llGetInventoryPermMask(string item, int mask);
125 void llMoveToTarget(LSL_Types.Vector3 target, double tau); 133 LSL_Integer llGetInventoryType(string name);
126 //wiki: llStopMoveToTarget() 134 LSL_Key llGetKey();
127 void llStopMoveToTarget(); 135 LSL_Key llGetLandOwnerAt(LSL_Vector pos);
128 //wiki: llApplyImpulse(vector force, integer local) 136 LSL_Key llGetLinkKey(int linknum);
129 void llApplyImpulse(LSL_Types.Vector3 force, int local); 137 LSL_String llGetLinkName(int linknum);
130 //wiki: llapplyRotationalImpulse(vector force, integer local) 138 LSL_Integer llGetLinkNumber();
131 void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local); 139 LSL_Integer llGetListEntryType(LSL_List src, int index);
132 //wiki: llSetTorque(vector torque, integer local) 140 LSL_Integer llGetListLength(LSL_List src);
133 void llSetTorque(LSL_Types.Vector3 torque, int local); 141 LSL_Vector llGetLocalPos();
134 //wiki: vector llGetTorque() 142 LSL_Rotation llGetLocalRot();
135 LSL_Types.Vector3 llGetTorque(); 143 LSL_Float llGetMass();
136 //wiki: llSeForceAndTorque(vector force, vector torque, integer local) 144 void llGetNextEmail(string address, string subject);
137 void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local); 145 LSL_String llGetNotecardLine(string name, int line);
138 //wiki: vector llGetVel() 146 LSL_Key llGetNumberOfNotecardLines(string name);
139 LSL_Types.Vector3 llGetVel(); 147 LSL_Integer llGetNumberOfPrims();
140 //wiki: vector llGetAccel() 148 LSL_Integer llGetNumberOfSides();
141 LSL_Types.Vector3 llGetAccel(); 149 LSL_String llGetObjectDesc();
142 //wiki: vector llGetOmega() 150 LSL_List llGetObjectDetails(string id, LSL_List args);
143 LSL_Types.Vector3 llGetOmega(); 151 LSL_Float llGetObjectMass(string id);
144 //wiki: double llGetTimeOfDay() 152 LSL_String llGetObjectName();
145 double llGetTimeOfDay(); 153 LSL_Integer llGetObjectPermMask(int mask);
146 //wiki: double llGetWallclock() 154 LSL_Integer llGetObjectPrimCount(string object_id);
147 double llGetWallclock(); 155 LSL_Vector llGetOmega();
148 //wiki: double llGetTime() 156 LSL_Key llGetOwner();
149 double llGetTime(); 157 LSL_Key llGetOwnerKey(string id);
150 //wiki: llResetTime() 158 LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param);
151 void llResetTime(); 159 LSL_Integer llGetParcelFlags(LSL_Vector pos);
152 //wiki: double llGetAndResetTime() 160 LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide);
153 double llGetAndResetTime(); 161 LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide);
154 //wiki (deprecated) llSound(string sound, double volume, integer queue, integer loop) 162 LSL_List llGetParcelPrimOwners(LSL_Vector pos);
155 void llSound(); 163 LSL_Integer llGetPermissions();
156 //wiki: llPlaySound(string sound, double volume) 164 LSL_Key llGetPermissionsKey();
157 void llPlaySound(string sound, double volume); 165 LSL_Vector llGetPos();
158 //wiki: llLoopSound(string sound, double volume) 166 LSL_List llGetPrimitiveParams(LSL_List rules);
159 void llLoopSound(string sound, double volume); 167 LSL_Integer llGetRegionAgentCount();
160 //wiki: llLoopSoundMaster(string sound, double volume) 168 LSL_Vector llGetRegionCorner();
161 void llLoopSoundMaster(string sound, double volume); 169 LSL_Integer llGetRegionFlags();
162 //wiki: llLoopSoundSlave(string sound, double volume) 170 LSL_Float llGetRegionFPS();
163 void llLoopSoundSlave(string sound, double volume); 171 LSL_String llGetRegionName();
164 //wiki llPlaySoundSlave(string sound, double volume) 172 LSL_Float llGetRegionTimeDilation();
165 void llPlaySoundSlave(string sound, double volume); 173 LSL_Vector llGetRootPosition();
166 //wiki: llTriggerSound(string sound, double volume) 174 LSL_Rotation llGetRootRotation();
167 void llTriggerSound(string sound, double volume); 175 LSL_Rotation llGetRot();
168 //wiki: llStopSound() 176 LSL_Vector llGetScale();
169 void llStopSound(); 177 LSL_String llGetScriptName();
170 //wiki: llPreloadSound(string sound) 178 LSL_Integer llGetScriptState(string name);
171 void llPreloadSound(string sound); 179 LSL_String llGetSimulatorHostname();
172 //wiki: string llGetSubString(string src, integer start, integer end) 180 LSL_Integer llGetStartParameter();
173 string llGetSubString(string src, int start, int end); 181 LSL_Integer llGetStatus(int status);
174 //wiki: string llDeleteSubString(string src, integer start, integer end) 182 LSL_String llGetSubString(string src, int start, int end);
175 string llDeleteSubString(string src, int start, int end); 183 LSL_Vector llGetSunDirection();
176 //wiki string llInsertString(string dst, integer position, string src) 184 LSL_String llGetTexture(int face);
177 string llInsertString(string dst, int position, string src); 185 LSL_Vector llGetTextureOffset(int face);
178 //wiki: string llToUpper(string source) 186 LSL_Float llGetTextureRot(int side);
179 string llToUpper(string source); 187 LSL_Vector llGetTextureScale(int side);
180 //wiki: string llToLower(string source) 188 LSL_Float llGetTime();
181 string llToLower(string source); 189 LSL_Float llGetTimeOfDay();
182 //wiki: integer llGiveMoney(key destination, integer amount) 190 LSL_String llGetTimestamp();
183 LSL_Types.LSLInteger llGiveMoney(string destination, int amount); 191 LSL_Vector llGetTorque();
184 //wiki: (deprecated) 192 LSL_Integer llGetUnixTime();
185 void llMakeExplosion(); 193 LSL_Vector llGetVel();
186 //wiki: (deprecated) 194 LSL_Float llGetWallclock();
187 void llMakeFountain(); 195 void llGiveInventory(string destination, string inventory);
188 //wiki: (deprecated) 196 void llGiveInventoryList(string destination, string category, LSL_List inventory);
189 void llMakeSmoke(); 197 LSL_Integer llGiveMoney(string destination, int amount);
190 //wiki: (deprecated) 198 void llGodLikeRezObject(string inventory, LSL_Vector pos);
191 void llMakeFire(); 199 LSL_Float llGround(LSL_Vector offset);
192 //wiki: llRezObject(string inventory, vector pos, vector rel, rotation rot, integer param) 200 LSL_Vector llGroundContour(LSL_Vector offset);
193 void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param); 201 LSL_Vector llGroundNormal(LSL_Vector offset);
194 //wiki: llLookAt(vector target, double strength, double damping) 202 void llGroundRepel(double height, int water, double tau);
195 void llLookAt(LSL_Types.Vector3 target, double strength, double damping); 203 LSL_Vector llGroundSlope(LSL_Vector offset);
196 //wiki: llStopLookAt() 204 LSL_String llHTTPRequest(string url, LSL_List parameters, string body);
197 void llStopLookAt(); 205 LSL_String llInsertString(string dst, int position, string src);
198 //wiki: llSetTimerEvent(double sec) 206 void llInstantMessage(string user, string message);
199 void llSetTimerEvent(double sec); 207 LSL_String llIntegerToBase64(int number);
200 //wiki: llSleep(double sec) 208 LSL_String llKey2Name(string id);
201 void llSleep(double sec); 209 LSL_String llList2CSV(LSL_List src);
202 //wiki: double llGetMass() 210 LSL_Float llList2Float(LSL_List src, int index);
203 double llGetMass(); 211 LSL_Integer llList2Integer(LSL_List src, int index);
204 //wiki: llCollisionFilter(string name, key id, integer accept) 212 LSL_Key llList2Key(LSL_List src, int index);
205 void llCollisionFilter(string name, string id, int accept); 213 LSL_List llList2List(LSL_List src, int start, int end);
206 //wiki: llTakeControls(integer controls, integer accept, integer pass_on) 214 LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride);
207 void llTakeControls(int controls, int accept, int pass_on); 215 LSL_Rotation llList2Rot(LSL_List src, int index);
208 //wiki: llReleaseControls() 216 LSL_String llList2String(LSL_List src, int index);
209 void llReleaseControls(); 217 LSL_Vector llList2Vector(LSL_List src, int index);
210 //wiki: llAttachToAvatar(integer attachment) 218 LSL_Integer llListen(int channelID, string name, string ID, string msg);
211 void llAttachToAvatar(int attachment); 219 void llListenControl(int number, int active);
212 //wiki: llDetachFromAvatar() 220 void llListenRemove(int number);
213 void llDetachFromAvatar(); 221 LSL_Integer llListFindList(LSL_List src, LSL_List test);
214 //wiki: (deprecated) llTakeCamera(key avatar) 222 LSL_List llListInsertList(LSL_List dest, LSL_List src, int start);
215 void llTakeCamera(string avatar); 223 LSL_List llListRandomize(LSL_List src, int stride);
216 //wiki: (deprecated) llReleaseCamera(key avatar) 224 LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end);
217 void llReleaseCamera(string avatar); 225 LSL_List llListSort(LSL_List src, int stride, int ascending);
218 //wiki: key llGetOwner() 226 LSL_Float llListStatistics(int operation, LSL_List src);
219 string llGetOwner(); 227 void llLoadURL(string avatar_id, string message, string url);
220 //wiki: llInstantMessage(key user, string message) 228 LSL_Float llLog(double val);
221 void llInstantMessage(string user, string message); 229 LSL_Float llLog10(double val);
222 //wiki: llEmail(string address, string subject, string message) 230 void llLookAt(LSL_Vector target, double strength, double damping);
223 void llEmail(string address, string subject, string message); 231 void llLoopSound(string sound, double volume);
224 //wiki: llGetNextEmail(string address, string subject) 232 void llLoopSoundMaster(string sound, double volume);
225 void llGetNextEmail(string address, string subject); 233 void llLoopSoundSlave(string sound, double volume);
226 //wiki: key llGetKey() 234 void llMakeExplosion();
227 string llGetKey(); 235 void llMakeFire();
228 //wiki: llSetBuoyancy(double buoyancy) 236 void llMakeFountain();
229 void llSetBuoyancy(double buoyancy); 237 void llMakeSmoke();
230 //wiki: llSetHoverHeight(double height, integer water, double tau) 238 void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at);
231 void llSetHoverHeight(double height, int water, double tau); 239 LSL_String llMD5String(string src, int nonce);
232 //wiki: llStopHover 240 void llMessageLinked(int linknum, int num, string str, string id);
233 void llStopHover(); 241 void llMinEventDelay(double delay);
234 //wiki: llMinEventDelay(double delay) 242 void llModifyLand(int action, int brush);
235 void llMinEventDelay(double delay); 243 LSL_Integer llModPow(int a, int b, int c);
236 //wiki: (deprecated) llSoundPreload() 244 void llMoveToTarget(LSL_Vector target, double tau);
237 void llSoundPreload(); 245 void llOffsetTexture(double u, double v, int face);
238 //wiki: llRotLookAt(rotation target, double strength, double damping) 246 void llOpenRemoteDataChannel();
239 void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping); 247 LSL_Integer llOverMyLand(string id);
240 //wiki: integer llStringLength(string str) 248 void llOwnerSay(string msg);
241 LSL_Types.LSLInteger llStringLength(string str); 249 void llParcelMediaCommandList(LSL_List commandList);
242 //wiki: llStartAnimation(string anim) 250 LSL_List llParcelMediaQuery(LSL_List aList);
243 void llStartAnimation(string anim); 251 LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers);
244 //wiki: llStopAnimation(string anim) 252 LSL_List llParseStringKeepNulls(string src, LSL_List seperators, LSL_List spacers);
245 void llStopAnimation(string anim); 253 void llParticleSystem(LSL_List rules);
246 //wiki: (deprecated) llPointAt 254 void llPassCollisions(int pass);
247 void llPointAt(); 255 void llPassTouches(int pass);
248 //wiki: (deprecated) llStopPointAt 256 void llPlaySound(string sound, double volume);
249 void llStopPointAt(); 257 void llPlaySoundSlave(string sound, double volume);
250 //wiki: llTargetOmega(vector axis, double spinrate, double gain) 258 void llPointAt();
251 void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain); 259 LSL_Float llPow(double fbase, double fexponent);
252 //wiki: integer llGetStartParameter() 260 void llPreloadSound(string sound);
253 LSL_Types.LSLInteger llGetStartParameter(); 261 void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local);
254 //wiki: llGodLikeRezObject(key inventory, vector pos) 262 void llRefreshPrimURL();
255 void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos); 263 void llRegionSay(int channelID, string text);
256 //wiki: llRequestPermissions(key agent, integer perm) 264 void llReleaseCamera(string avatar);
257 void llRequestPermissions(string agent, int perm); 265 void llReleaseControls();
258 //wiki: key llGetPermissionsKey() 266 void llRemoteDataReply(string channel, string message_id, string sdata, int idata);
259 string llGetPermissionsKey(); 267 void llRemoteDataSetRegion();
260 //wiki: integer llGetPermissions() 268 void llRemoteLoadScript();
261 LSL_Types.LSLInteger llGetPermissions(); 269 void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param);
262 //wiki integer llGetLinkNumber() 270 void llRemoveFromLandBanList(string avatar);
263 LSL_Types.LSLInteger llGetLinkNumber(); 271 void llRemoveFromLandPassList(string avatar);
264 //wiki: llSetLinkColor(integer linknumber, vector color, integer face) 272 void llRemoveInventory(string item);
265 void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face); 273 void llRemoveVehicleFlags(int flags);
266 //wiki: llCreateLink(key target, integer parent) 274 LSL_Key llRequestAgentData(string id, int data);
267 void llCreateLink(string target, int parent); 275 LSL_Key llRequestInventoryData(string name);
268 //wiki: llBreakLink(integer linknum) 276 void llRequestPermissions(string agent, int perm);
269 void llBreakLink(int linknum); 277 LSL_Key llRequestSimulatorData(string simulator, int data);
270 //wiki: llBreakAllLinks() 278 void llResetLandBanList();
271 void llBreakAllLinks(); 279 void llResetLandPassList();
272 //wiki: key llGetLinkKey(integer linknum) 280 void llResetOtherScript(string name);
273 string llGetLinkKey(int linknum); 281 void llResetScript();
274 //wiki: llGetLinkName(integer linknum) 282 void llResetTime();
275 string llGetLinkName(int linknum); 283 void llRezAtRoot(string inventory, LSL_Vector position, LSL_Vector velocity, LSL_Rotation rot, int param);
276 //wiki: integer llGetInventoryNumber(integer type) 284 void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param);
277 LSL_Types.LSLInteger llGetInventoryNumber(int type); 285 LSL_Float llRot2Angle(LSL_Rotation rot);
278 //wiki: string llGetInventoryName(integer type, integer number) 286 LSL_Vector llRot2Axis(LSL_Rotation rot);
279 string llGetInventoryName(int type, int number); 287 LSL_Vector llRot2Euler(LSL_Rotation r);
280 //wiki: llSetScriptState(string name, integer run) 288 LSL_Vector llRot2Fwd(LSL_Rotation r);
281 void llSetScriptState(string name, int run); 289 LSL_Vector llRot2Left(LSL_Rotation r);
282 //wiki: double llGetEnergy() 290 LSL_Vector llRot2Up(LSL_Rotation r);
283 double llGetEnergy(); 291 void llRotateTexture(double rotation, int face);
284 //wiki: llGiveInventory(key destination, string inventory) 292 LSL_Rotation llRotBetween(LSL_Vector start, LSL_Vector end);
285 void llGiveInventory(string destination, string inventory); 293 void llRotLookAt(LSL_Rotation target, double strength, double damping);
286 //wiki: llRemoveInventory(string item) 294 LSL_Integer llRotTarget(LSL_Rotation rot, double error);
287 void llRemoveInventory(string item); 295 void llRotTargetRemove(int number);
288 //wiki: llSetText(string text, vector color, double alpha) 296 LSL_Integer llRound(double f);
289 void llSetText(string text, LSL_Types.Vector3 color, double alpha); 297 LSL_Integer llSameGroup(string agent);
290 //wiki: double llWater(vector offset) 298 void llSay(int channelID, string text);
291 double llWater(LSL_Types.Vector3 offset); 299 void llScaleTexture(double u, double v, int face);
292 //wiki: llPassTouches(integer pass) 300 LSL_Integer llScriptDanger(LSL_Vector pos);
293 void llPassTouches(int pass); 301 LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata);
294 //wiki: key llRequestAgentData(key id, integer data) 302 void llSensor(string name, string id, int type, double range, double arc);
295 string llRequestAgentData(string id, int data); 303 void llSensorRemove();
296 //wiki: key llRequestInventoryData(string name) 304 void llSensorRepeat(string name, string id, int type, double range, double arc, double rate);
297 string llRequestInventoryData(string name); 305 void llSetAlpha(double alpha, int face);
298 //wiki: llSetDamage(double damage) 306 void llSetBuoyancy(double buoyancy);
299 void llSetDamage(double damage); 307 void llSetCameraAtOffset(LSL_Vector offset);
300 //wiki: llTeleportAgentHome(key agent) 308 void llSetCameraEyeOffset(LSL_Vector offset);
301 void llTeleportAgentHome(string agent); 309 void llSetCameraParams(LSL_List rules);
302 //wiki: llModifyLand(integer action, integer brush) 310 void llSetClickAction(int action);
303 void llModifyLand(int action, int brush); 311 void llSetColor(LSL_Vector color, int face);
304 //wiki: llCollisionSound(string impact_sound, double impact_volume) 312 void llSetDamage(double damage);
305 void llCollisionSound(string impact_sound, double impact_volume); 313 void llSetForce(LSL_Vector force, int local);
306 //wiki: llCollisionSprite(string impact_sprite) 314 void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local);
307 void llCollisionSprite(string impact_sprite); 315 void llSetHoverHeight(double height, int water, double tau);
308 //wiki: string llGetAnimation(key id) 316 void llSetInventoryPermMask(string item, int mask, int value);
309 string llGetAnimation(string id); 317 void llSetLinkAlpha(int linknumber, double alpha, int face);
310 //wiki: llResetScript() 318 void llSetLinkColor(int linknumber, LSL_Vector color, int face);
311 void llResetScript(); 319 void llSetLinkPrimitiveParams(int linknumber, LSL_List rules);
312 //wiki: llMessageLinked(integer linknum, integer num, string str, key id) 320 void llSetLinkTexture(int linknumber, string texture, int face);
313 void llMessageLinked(int linknum, int num, string str, string id); 321 void llSetLocalRot(LSL_Rotation rot);
314 //wiki: llPushObject(key target, vector impulse, vector ang_impulse, integer local) 322 void llSetObjectDesc(string desc);
315 void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local); 323 void llSetObjectName(string name);
316 //wiki: llPassCollisions(integer pass) 324 void llSetObjectPermMask(int mask, int value);
317 void llPassCollisions(int pass); 325 void llSetParcelMusicURL(string url);
318 //wiki: string llGetScriptName() 326 void llSetPayPrice(int price, LSL_List quick_pay_buttons);
319 string llGetScriptName(); 327 void llSetPos(LSL_Vector pos);
320 //wiki: integer llGetNumberOfSides() 328 void llSetPrimitiveParams(LSL_List rules);
321 LSL_Types.LSLInteger llGetNumberOfSides(); 329 void llSetPrimURL();
322 //wiki: rotation llAxisAngle2Rot(vector axis, double angle) 330 void llSetRemoteScriptAccessPin(int pin);
323 LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle); 331 void llSetRot(LSL_Rotation rot);
324 //wiki: vector llRot2Axis(rotation rot) 332 void llSetScale(LSL_Vector scale);
325 LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot); 333 void llSetScriptState(string name, int run);
326 //wiki: double llRot2Angle(rotation rot); 334 void llSetSitText(string text);
327 double llRot2Angle(LSL_Types.Quaternion rot); 335 void llSetSoundQueueing(int queue);
328 //wiki: double llAcos(double val) 336 void llSetSoundRadius(double radius);
329 double llAcos(double val); 337 void llSetStatus(int status, int value);
330 //wiki: double llAsin(double val) 338 void llSetText(string text, LSL_Vector color, double alpha);
331 double llAsin(double val); 339 void llSetTexture(string texture, int face);
332 //wiki: double llAngleBetween(rotation a, rotation b) 340 void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate);
333 double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b); 341 void llSetTimerEvent(double sec);
334 //wiki: string llGetInventoryKey(string name) 342 void llSetTorque(LSL_Vector torque, int local);
335 string llGetInventoryKey(string name); 343 void llSetTouchText(string text);
336 //wiki: llAllowInventoryDrop(integer add) 344 void llSetVehicleFlags(int flags);
337 void llAllowInventoryDrop(int add); 345 void llSetVehicleFloatParam(int param, float value);
338 //wiki: vector llGetSunDirection() 346 void llSetVehicleRotationParam(int param, LSL_Rotation rot);
339 LSL_Types.Vector3 llGetSunDirection(); 347 void llSetVehicleType(int type);
340 //wiki: vector llGetTextureOffset(integer face) 348 void llSetVehicleVectorParam(int param, LSL_Vector vec);
341 LSL_Types.Vector3 llGetTextureOffset(int face); 349 void llShout(int channelID, string text);
342 //wiki: vector llGetTextureScale(integer side) 350 LSL_Float llSin(double f);
343 LSL_Types.Vector3 llGetTextureScale(int side); 351 void llSitTarget(LSL_Vector offset, LSL_Rotation rot);
344 //wiki: double llGetTextureRot(integer side) 352 void llSleep(double sec);
345 double llGetTextureRot(int side); 353 void llSound();
346 //wiki: integer llSubStringIndex(string source, string pattern) 354 void llSoundPreload();
347 LSL_Types.LSLInteger llSubStringIndex(string source, string pattern); 355 LSL_Float llSqrt(double f);
348 //wiki: key llGetOwnerKey(key id) 356 void llStartAnimation(string anim);
349 string llGetOwnerKey(string id); 357 void llStopAnimation(string anim);
350 //wiki: vector llGetCenterOfMass() 358 void llStopHover();
351 LSL_Types.Vector3 llGetCenterOfMass(); 359 void llStopLookAt();
352 //wiki: list llListSort(list src, integer stride, integer ascending) 360 void llStopMoveToTarget();
353 LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending); 361 void llStopPointAt();
354 //integer llGetListLength(list src) 362 void llStopSound();
355 LSL_Types.LSLInteger llGetListLength(LSL_Types.list src); 363 LSL_Integer llStringLength(string str);
356 //wiki: integer llList2Integer(list src, integer index) 364 LSL_String llStringToBase64(string str);
357 LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index); 365 LSL_String llStringTrim(string src, int type);
358 //wiki: double llList2double(list src, integer index) 366 LSL_Integer llSubStringIndex(string source, string pattern);
359 double llList2Float(LSL_Types.list src, int index); 367 void llTakeCamera(string avatar);
360 double osList2Double(LSL_Types.list src, int index); 368 void llTakeControls(int controls, int accept, int pass_on);
361 //wiki: string llList2String(list src, integer index) 369 LSL_Float llTan(double f);
362 string llList2String(LSL_Types.list src, int index); 370 LSL_Integer llTarget(LSL_Vector position, double range);
363 //wiki: key llList2Key(list src, integer index) 371 void llTargetOmega(LSL_Vector axis, double spinrate, double gain);
364 string llList2Key(LSL_Types.list src, int index); 372 void llTargetRemove(int number);
365 //wiki: vector llList2Vector(list src, integer index) 373 void llTeleportAgentHome(string agent);
366 LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index); 374 void llTextBox(string avatar, string message, int chat_channel);
367 //wiki rotation llList2Rot(list src, integer index) 375 LSL_String llToLower(string source);
368 LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index); 376 LSL_String llToUpper(string source);
369 //wiki: list llList2List(list src, integer start, integer end) 377 void llTriggerSound(string sound, double volume);
370 LSL_Types.list llList2List(LSL_Types.list src, int start, int end); 378 void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west);
371 //wiki: llDeleteSubList(list src, integer start, integer end) 379 LSL_String llUnescapeURL(string url);
372 LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end); 380 void llUnSit(string id);
373 //wiki: integer llGetListEntryType(list src, integer index) 381 LSL_Float llVecDist(LSL_Vector a, LSL_Vector b);
374 LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index); 382 LSL_Float llVecMag(LSL_Vector v);
375 //wiki: string llList2CSV(list src) 383 LSL_Vector llVecNorm(LSL_Vector v);
376 string llList2CSV(LSL_Types.list src); 384 void llVolumeDetect(int detect);
377 //wiki: list llCSV2List(string src) 385 LSL_Float llWater(LSL_Vector offset);
378 LSL_Types.list llCSV2List(string src); 386 void llWhisper(int channelID, string text);
379 //wiki: list llListRandomize(list src, integer stride) 387 LSL_Vector llWind(LSL_Vector offset);
380 LSL_Types.list llListRandomize(LSL_Types.list src, int stride); 388 void llXorBase64Strings();
381 //wiki: list llList2ListStrided(list src, integer start, integer end, integer stride) 389 LSL_String llXorBase64StringsCorrect(string str1, string str2);
382 LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride);
383 //wiki: vector llGetRegionCorner()
384 LSL_Types.Vector3 llGetRegionCorner();
385 //wiki: list llListInsertList(list dest, list src, integer start)
386 LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int start);
387 //wiki: integer llListFindList(list src, list test)
388 LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test);
389 //wiki: string llGetObjectName()
390 string llGetObjectName();
391 //wiki: llSetObjectName(string name)
392 void llSetObjectName(string name);
393 //wiki: string llGetDate()
394 string llGetDate();
395 //wiki: integer llEdgeOfWorld(vector pos, vector dir)
396 LSL_Types.LSLInteger llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir);
397 //wiki: integer llGetAgentInfo(key id)
398 LSL_Types.LSLInteger llGetAgentInfo(string id);
399 //wiki: llAdjustSoundVolume(double volume)
400 void llAdjustSoundVolume(double volume);
401 //wiki: llSetSoundQueueing(integer queue)
402 void llSetSoundQueueing(int queue);
403 //wiki: llSetSoundRadius(double radius)
404 void llSetSoundRadius(double radius);
405 //wiki: string llKey2Name(key id)
406 string llKey2Name(string id);
407 //wiki: llSetTextureAnim(integer mode, integer face, integer sizex, integer sizey, double start, double length, double rate)
408 void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate);
409 //wiki: llTriggerSoundLimited(string sound, double volume, vector top_north_east, vector bottom_south_west)
410 void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east,
411 LSL_Types.Vector3 bottom_south_west);
412
413 //wiki: llEjectFromLand(key pest)
414 void llEjectFromLand(string pest);
415 LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers);
416 //wiki: integer llOverMyLand(key id)
417 LSL_Types.LSLInteger llOverMyLand(string id);
418 //wiki: key llGetLandOwnerAt(vector pos)
419 string llGetLandOwnerAt(LSL_Types.Vector3 pos);
420 //wiki: key llGetNotecardLine(string name, integer line)
421 string llGetNotecardLine(string name, int line);
422 //wiki: vector llGetAgentSize(key id)
423 LSL_Types.Vector3 llGetAgentSize(string id);
424 //wiki: integer llSameGroup(key agent)
425 LSL_Types.LSLInteger llSameGroup(string agent);
426 //wiki: llUnSit(key id)
427 void llUnSit(string id);
428 //wiki: vector llGroundSlope(vector offset)
429 LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset);
430 //wiki: vector llGroundNormal(vector offset)
431 LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset);
432 //wiki: vector llGroundContour(vector offset)
433 LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset);
434 //wiki: integer llGetAttached()
435 LSL_Types.LSLInteger llGetAttached();
436 //wiki: integer llGetFreeMemory()
437 LSL_Types.LSLInteger llGetFreeMemory();
438 //wiki: string llGetRegionName()
439 string llGetRegionName();
440 //wiki: double llGetRegionTimeDilation()
441 double llGetRegionTimeDilation();
442 //wiki: double llGetRegionFPS()
443 double llGetRegionFPS();
444 //wiki: llParticleSystem(List<Object> rules
445 void llParticleSystem(LSL_Types.list rules);
446 //wiki: llGroundRepel(double height, integer water, double tau)
447 void llGroundRepel(double height, int water, double tau);
448 //wiki: llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
449 void llGiveInventoryList(string destination, string category, LSL_Types.list inventory);
450 //wiki: llSetVehicleType(integer type)
451 void llSetVehicleType(int type);
452 //wiki: llSetVehicledoubleParam(integer param, double value)
453 void llSetVehicledoubleParam(int param, double value);
454 // wiki: llSetVehicleFloatParam(integer param, float value)
455 void llSetVehicleFloatParam(int param, float value);
456 //wiki: llSetVehicleVectorParam(integer param, vector vec)
457 void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec);
458 //wiki: llSetVehicleRotationParam(integer param, rotation rot)
459 void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot);
460 //wiki: llSetVehicleFlags(integer flags)
461 void llSetVehicleFlags(int flags);
462 //wiki: llRemoveVehicleFlags(integer flags)
463 void llRemoveVehicleFlags(int flags);
464 //wiki: llSitTarget(vector offset, rotation rot)
465 void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot);
466 //wiki key llAvatarOnSitTarget()
467 string llAvatarOnSitTarget();
468 //wiki: llAddToLandPassList(key avatar, double hours)
469 void llAddToLandPassList(string avatar, double hours);
470 //wiki: llSetTouchText(string text)
471 void llSetTouchText(string text);
472 //wiki: llSetSitText(string text)
473 void llSetSitText(string text);
474 //wiki: llSetCameraEyeOffset(vector offset)
475 void llSetCameraEyeOffset(LSL_Types.Vector3 offset);
476 //wiki: llSeteCameraAtOffset(vector offset)
477 void llSetCameraAtOffset(LSL_Types.Vector3 offset);
478 //
479 string llDumpList2String(LSL_Types.list src, string seperator);
480 //wiki: integer llScriptDanger(vector pos)
481 LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos);
482 //wiki: llDialog(key avatar, string message, list buttons, integer chat_channel)
483 void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel);
484 //wiki: llVolumeDetect(integer detect)
485 void llVolumeDetect(int detect);
486 //wiki: llResetOtherScript(string name)
487 void llResetOtherScript(string name);
488 //wiki: integer llGetScriptState(string name)
489 LSL_Types.LSLInteger llGetScriptState(string name);
490 //wiki: (deprecated)
491 void llRemoteLoadScript();
492 //wiki: llSetRemoteScriptAccessPin(integer pin)
493 void llSetRemoteScriptAccessPin(int pin);
494 //wiki: llRemoteLoadScriptPin(key target, string name, integer pin, integer running, integer start_param)
495 void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param);
496 //wiki: llOpenRemoteDataChannel()
497 void llOpenRemoteDataChannel();
498 //wiki: key llSendRemoteData(key channel, string dest, integer idata, string sdata)
499 string llSendRemoteData(string channel, string dest, int idata, string sdata);
500 //wiki: llRemoteDataReply(key channel, key message_id, string sdata, integer idata)
501 void llRemoteDataReply(string channel, string message_id, string sdata, int idata);
502 //wiki: llCloseRemoteDataChannel(key channel)
503 void llCloseRemoteDataChannel(string channel);
504 //wiki: string llMD5String(string src, integer nonce)
505 string llMD5String(string src, int nonce);
506 //wiki: llSetPrimitiveParams(list rules)
507 void llSetPrimitiveParams(LSL_Types.list rules);
508 //wiki: llSetLinkPrimitiveParams(integer linknumber, list rules)
509 void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules);
510 //wiki: string llStringToBase64(string str)
511 string llStringToBase64(string str);
512 //wiki: string llBase64ToString(string str)
513 string llBase64ToString(string str);
514 //wiki: (deprecated)
515 void llXorBase64Strings();
516 //wiki: llRemoteDataSetRegion()
517 void llRemoteDataSetRegion();
518 //wiki: double llLog10(double val)
519 double llLog10(double val);
520 //wiki: double llLog(double val)
521 double llLog(double val);
522 //wiki: list llGetAnimationList(key id)
523 LSL_Types.list llGetAnimationList(string id);
524 //wiki: llSetParcelMusicURL(string url)
525 void llSetParcelMusicURL(string url);
526 //wiki: vector llGetRootPosition()
527 LSL_Types.Vector3 llGetRootPosition();
528 //wiki: rotation llGetRootRotation()
529 LSL_Types.Quaternion llGetRootRotation();
530 //wiki: string llGetObjectDesc()
531 string llGetObjectDesc();
532 //wiki: llSetObjectDesc(string desc)
533 void llSetObjectDesc(string desc);
534 //wiki: key llGetCreator()
535 string llGetCreator();
536 //wiki: string llGetTimestamp()
537 string llGetTimestamp();
538 //wiki: llSetLinkAlpha(integer linknumber, double alpha, integer face)
539 void llSetLinkAlpha(int linknumber, double alpha, int face);
540 //wiki: integer llGetNumberOfPrims()
541 LSL_Types.LSLInteger llGetNumberOfPrims();
542 //wiki: key llGetNumberOfNotecardLines(string name)
543 string llGetNumberOfNotecardLines(string name);
544 //wiki: list llGetBoundingBox(key object)
545 LSL_Types.list llGetBoundingBox(string obj);
546 //wiki: vector llGetGeometricCenter()
547 LSL_Types.Vector3 llGetGeometricCenter();
548 //wiki: list llGetPrimitiveParams(list rules)
549 LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules);
550 //wiki: string llIntegerToBase64(integer number)
551 string llIntegerToBase64(int number);
552 //wiki integer llBase64ToInteger(string str)
553 LSL_Types.LSLInteger llBase64ToInteger(string str);
554 //wiki: double llGetGMTclock()
555 double llGetGMTclock();
556 //wiki: string llGetSimulatorHostname()
557 string llGetSimulatorHostname();
558 //llSetLocalRot(rotation rot)
559 void llSetLocalRot(LSL_Types.Quaternion rot);
560 //wiki: list llParseStringKeepNulls(string src, list separators, list spacers)
561 LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list seperators, LSL_Types.list spacers);
562 //wiki: llRezAtRoot(string inventory, vector position, vector velocity, rotation rot, integer param)
563 void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity,
564 LSL_Types.Quaternion rot, int param);
565
566 //wiki: integer llGetObjectPermMask(integer mask)
567 LSL_Types.LSLInteger llGetObjectPermMask(int mask);
568 //wiki: llSetObjectPermMask(integer mask, integer value)
569 void llSetObjectPermMask(int mask, int value);
570 //wiki integer llGetInventoryPermMask(string item, integer mask)
571 LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask);
572 //wiki: llSetInventoryPermMask(string item, integer mask, integer value)
573 void llSetInventoryPermMask(string item, int mask, int value);
574 //wiki: key llGetInventoryCreator(string item)
575 string llGetInventoryCreator(string item);
576 //wiki: llOwnerSay(string msg)
577 void llOwnerSay(string msg);
578 //wiki: key llRequestSimulatorData(string simulator, integer data)
579 string llRequestSimulatorData(string simulator, int data);
580 //wiki: llForceMouselook(integer mouselook)
581 void llForceMouselook(int mouselook);
582 //wiki: double llGetObjectMass(key id)
583 double llGetObjectMass(string id);
584 LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end);
585 //wiki: llLoadURL(key avatar_id, string message, string url)
586 void llLoadURL(string avatar_id, string message, string url);
587 //wiki: llParcelMediaCommandList(list commandList)
588 void llParcelMediaCommandList(LSL_Types.list commandList);
589 LSL_Types.list llParcelMediaQuery(LSL_Types.list aList);
590 //wiki integer llModPow(integer a, integer b, integer c)
591 LSL_Types.LSLInteger llModPow(int a, int b, int c);
592 //wiki: integer llGetInventoryType(string name)
593 LSL_Types.LSLInteger llGetInventoryType(string name);
594 //wiki: llSetPayPrice(integer price, list quick_pay_buttons)
595 void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons);
596 //wiki: vector llGetCameraPos()
597 LSL_Types.Vector3 llGetCameraPos();
598 //wiki rotation llGetCameraRot()
599 LSL_Types.Quaternion llGetCameraRot();
600 //wiki: (deprecated)
601 void llSetPrimURL();
602 //wiki: (deprecated)
603 void llRefreshPrimURL();
604 //wiki: string llEscapeURL(string url)
605 string llEscapeURL(string url);
606 //wiki: string llUnescapeURL(string url)
607 string llUnescapeURL(string url);
608 //wiki: llMapDestination(string simname, vector pos, vector look_at)
609 void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at);
610 //wiki: llAddToLandBanList(key avatar, double hours)
611 void llAddToLandBanList(string avatar, double hours);
612 //wiki: llRemoveFromLandPassList(key avatar)
613 void llRemoveFromLandPassList(string avatar);
614 //wiki: llRemoveFromLandBanList(key avatar)
615 void llRemoveFromLandBanList(string avatar);
616 //wiki: llSetCameraParams(list rules)
617 void llSetCameraParams(LSL_Types.list rules);
618 //wiki: llClearCameraParams()
619 void llClearCameraParams();
620 //wiki: double llListStatistics(integer operation, list src)
621 double llListStatistics(int operation, LSL_Types.list src);
622 //wiki: integer llGetUnixTime()
623 LSL_Types.LSLInteger llGetUnixTime();
624 //wiki: integer llGetParcelFlags(vector pos)
625 LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos);
626 //wiki: integer llGetRegionFlags()
627 LSL_Types.LSLInteger llGetRegionFlags();
628 //wiki: string llXorBase64StringsCorrect(string str1, string str2)
629 string llXorBase64StringsCorrect(string str1, string str2);
630 string llHTTPRequest(string url, LSL_Types.list parameters, string body);
631 //wiki: llResetLandBanList()
632 void llResetLandBanList();
633 //wiki: llResetLandPassList()
634 void llResetLandPassList();
635 //wiki: integer llGetParcelPrimCount(vector pos, integer category, integer sim_wide)
636 LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide);
637 //wiki: list llGetParcelPrimOwners(vector pos)
638 LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos);
639 //wiki: integer llGetObjectPrimCount(key object_id)
640 LSL_Types.LSLInteger llGetObjectPrimCount(string object_id);
641 //wiki: integer llGetParcelMaxPrims(vector pos, integer sim_wide)
642 LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide);
643 //wiki: llGetParcelDetails(vector pos, list params)
644 LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param);
645 //wiki: llSetLinkTexture(integer linknumber, string texture, integer face)
646 void llSetLinkTexture(int linknumber, string texture, int face);
647 //wiki: string llStringTrim(string src, int type)
648 string llStringTrim(string src, int type);
649 //wiki: LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args)
650 LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args);
651
652 void osSetRegionWaterHeight(double height);
653 } 390 }
654} 391}
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index bff2101..21646ea 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Common
123 123
124 Vector3 vector = (Vector3)o; 124 Vector3 vector = (Vector3)o;
125 125
126 return (x == vector.x && y == vector.y && z == vector.y); 126 return (x == vector.x && y == vector.y && z == vector.z);
127 } 127 }
128 128
129 public static Vector3 operator -(Vector3 vector) 129 public static Vector3 operator -(Vector3 vector)
@@ -419,6 +419,80 @@ namespace OpenSim.Region.ScriptEngine.Common
419 m_data=new Object[0]; 419 m_data=new Object[0];
420 return m_data; 420 return m_data;
421 } 421 }
422
423 set {m_data = value; }
424 }
425
426 // Member functions to obtain item as specific types.
427 // For cases where implicit conversions would apply if items
428 // were not in a list (e.g. integer to float, but not float
429 // to integer) functions check for alternate types so as to
430 // down-cast from Object to the correct type.
431 // Note: no checks for item index being valid are performed
432
433 public LSL_Types.LSLFloat GetLSLFloatItem( int itemIndex )
434 {
435 if (m_data[itemIndex] is LSL_Types.LSLInteger)
436 {
437 return (LSL_Types.LSLInteger)m_data[itemIndex];
438 }
439 else if (m_data[itemIndex] is Int32)
440 {
441 return new LSL_Types.LSLFloat((int)m_data[itemIndex]);
442 }
443 else if (m_data[itemIndex] is float)
444 {
445 return new LSL_Types.LSLFloat((float)m_data[itemIndex]);
446 }
447 else if (m_data[itemIndex] is Double)
448 {
449 return new LSL_Types.LSLFloat((Double)m_data[itemIndex]);
450 }
451 else
452 {
453 return (LSL_Types.LSLFloat)m_data[itemIndex];
454 }
455 }
456
457 public LSL_Types.LSLString GetLSLStringItem(int itemIndex)
458 {
459 if (m_data[itemIndex] is LSL_Types.key)
460 {
461 return (LSL_Types.key)m_data[itemIndex];
462 }
463 else if (m_data[itemIndex] is String)
464 {
465 return new LSL_Types.LSLString((string)m_data[itemIndex]);
466 }
467 else
468 {
469 return (LSL_Types.LSLString)m_data[itemIndex];
470 }
471 }
472
473 public LSL_Types.LSLInteger GetLSLIntegerItem(int itemIndex)
474 {
475 if (m_data[itemIndex] is LSL_Types.LSLInteger)
476 return (LSL_Types.LSLInteger)m_data[itemIndex];
477 else if (m_data[itemIndex] is Int32)
478 return new LSLInteger((int)m_data[itemIndex]);
479 else
480 throw new InvalidCastException();
481 }
482
483 public LSL_Types.Vector3 GetVector3Item(int itemIndex)
484 {
485 return (LSL_Types.Vector3)m_data[itemIndex];
486 }
487
488 public LSL_Types.Quaternion GetQuaternionItem(int itemIndex)
489 {
490 return (LSL_Types.Quaternion)m_data[itemIndex];
491 }
492
493 public LSL_Types.key GetKeyItem(int itemIndex)
494 {
495 return (LSL_Types.key)m_data[itemIndex];
422 } 496 }
423 497
424 public static list operator +(list a, list b) 498 public static list operator +(list a, list b)
@@ -436,19 +510,19 @@ namespace OpenSim.Region.ScriptEngine.Common
436 m_data.SetValue(o, Length - 1); 510 m_data.SetValue(o, Length - 1);
437 } 511 }
438 512
439 public static list operator +(list a, string s) 513 public static list operator +(list a, LSLString s)
440 { 514 {
441 a.ExtendAndAdd(s); 515 a.ExtendAndAdd(s);
442 return a; 516 return a;
443 } 517 }
444 518
445 public static list operator +(list a, int i) 519 public static list operator +(list a, LSLInteger i)
446 { 520 {
447 a.ExtendAndAdd(i); 521 a.ExtendAndAdd(i);
448 return a; 522 return a;
449 } 523 }
450 524
451 public static list operator +(list a, double d) 525 public static list operator +(list a, LSLFloat d)
452 { 526 {
453 a.ExtendAndAdd(d); 527 a.ExtendAndAdd(d);
454 return a; 528 return a;
@@ -1167,6 +1241,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1167 return k.value; 1241 return k.value;
1168 } 1242 }
1169 1243
1244 static public implicit operator LSLString(key k)
1245 {
1246 return k.value;
1247 }
1248
1170 public static bool operator ==(key k1, key k2) 1249 public static bool operator ==(key k1, key k2)
1171 { 1250 {
1172 return k1.value == k2.value; 1251 return k1.value == k2.value;
@@ -1190,6 +1269,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1190 return value.GetHashCode(); 1269 return value.GetHashCode();
1191 } 1270 }
1192 1271
1272 public override string ToString()
1273 {
1274 return value;
1275 }
1276
1193 #endregion 1277 #endregion
1194 } 1278 }
1195 1279
@@ -1476,25 +1560,25 @@ namespace OpenSim.Region.ScriptEngine.Common
1476 return new LSLInteger(i1.value / i2); 1560 return new LSLInteger(i1.value / i2);
1477 } 1561 }
1478 1562
1479 static public LSLFloat operator +(LSLInteger i1, double f) 1563// static public LSLFloat operator +(LSLInteger i1, double f)
1480 { 1564// {
1481 return new LSLFloat((double)i1.value + f); 1565// return new LSLFloat((double)i1.value + f);
1482 } 1566// }
1483 1567//
1484 static public LSLFloat operator -(LSLInteger i1, double f) 1568// static public LSLFloat operator -(LSLInteger i1, double f)
1485 { 1569// {
1486 return new LSLFloat((double)i1.value - f); 1570// return new LSLFloat((double)i1.value - f);
1487 } 1571// }
1488 1572//
1489 static public LSLFloat operator *(LSLInteger i1, double f) 1573// static public LSLFloat operator *(LSLInteger i1, double f)
1490 { 1574// {
1491 return new LSLFloat((double)i1.value * f); 1575// return new LSLFloat((double)i1.value * f);
1492 } 1576// }
1493 1577//
1494 static public LSLFloat operator /(LSLInteger i1, double f) 1578// static public LSLFloat operator /(LSLInteger i1, double f)
1495 { 1579// {
1496 return new LSLFloat((double)i1.value / f); 1580// return new LSLFloat((double)i1.value / f);
1497 } 1581// }
1498 1582
1499 static public LSLInteger operator -(LSLInteger i) 1583 static public LSLInteger operator -(LSLInteger i)
1500 { 1584 {
@@ -1585,6 +1669,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1585 1669
1586 #region Operators 1670 #region Operators
1587 1671
1672 static public explicit operator float(LSLFloat f)
1673 {
1674 return (float)f.value;
1675 }
1676
1588 static public explicit operator int(LSLFloat f) 1677 static public explicit operator int(LSLFloat f)
1589 { 1678 {
1590 return (int)f.value; 1679 return (int)f.value;
@@ -1619,7 +1708,17 @@ namespace OpenSim.Region.ScriptEngine.Common
1619 1708
1620 static public explicit operator LSLFloat(string s) 1709 static public explicit operator LSLFloat(string s)
1621 { 1710 {
1622 return new LSLFloat(double.Parse(s)); 1711 Regex r = new Regex("^[ ]*-?[0-9]*\\.?[0-9]*[eE]?-?[0-9]*");
1712 Match m = r.Match(s);
1713 string v = m.Groups[0].Value;
1714
1715 while (v.Length > 0 && v.Substring(0, 1) == " ")
1716 v = v.Substring(1);
1717
1718 if (v == String.Empty)
1719 v = "0";
1720
1721 return new LSLFloat(double.Parse(v));
1623 } 1722 }
1624 1723
1625 static public implicit operator LSLFloat(double d) 1724 static public implicit operator LSLFloat(double d)
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 264a586..c9551ae 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -580,6 +580,24 @@ namespace OpenSim.Region.ScriptEngine.Common
580 } 580 }
581 } 581 }
582 582
583 public void osSetParcelMediaURL(string url)
584 {
585 m_host.AddScriptLPS(1);
586 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
587
588 if (landowner == UUID.Zero)
589 {
590 return;
591 }
592
593 if (landowner != m_host.ObjectOwner)
594 {
595 return;
596 }
597
598 World.SetLandMediaURL(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, url);
599 }
600
583 public string osGetScriptEngineName() 601 public string osGetScriptEngineName()
584 { 602 {
585 m_host.AddScriptLPS(1); 603 m_host.AddScriptLPS(1);