Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008047opensim[REGION] Script Functionspublic2016-11-03 08:532019-08-13 10:37
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformPCOperating SystemWindowsOperating System VersionSeven
Product Versionmaster (dev code) 
Target VersionFixed in Version 
Summary0008047: [SCRIPT FUNCTION REQUEST] osForceAttachToAvatarTemp
DescriptionReading the 7960 mantis, i searched opensim wiki if we have the equivalent function llAttachToAvatarTemp in OSSL (without permission request) and I note that we do not have it.

It would be nice to have:
- osForceAttachToAvatarTemp
- osForceAttachToAvatarFromInventoryTemp
- osForceAttachToOtherAvatarFromInventoryTemp

Tank you in advance.

PS: Ty adding ubODE in the selection of physics engines :)
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineubODE
Script Engine
Mono VersionNone
Attached Files

- Relationships
related to 0008574new [FEATURE REQUEST] osForceAttach/Detach some new complementary features 

-  Notes
Mandarinka Tasty (reporter)
2016-11-03 22:38

Actual llAttachToAvatarTemp also works without any permission request.

But to do that, you need to activate it in so called: Region Console,

then it works for EO - Estate Owner and EM - Estate Manager without

permission request.

Certainly, please be aware of, that Region Console is not OpenSim console.
djphil (reporter)
2016-11-05 12:25

Currently with this example, i have a script error.

    touch_start(integer n)
        llRequestPermissions( llDetectedKey(0), PERMISSION_ATTACH );
    run_time_permissions(integer p)
       if(p & PERMISSION_ATTACH)
           llOwnerSay("Permission to attach denied");

   on_rez(integer rez)
       if (!llGetAttached())

Error is:

[12:16] System.Reflection.TargetInvocationException: Une exception a été levée par la cible d'un appel. ---> OpenSim.Region.ScriptEngine.Shared.ScriptException: MOD Runtime Error: llAttachToAvatarTemp: parameter type mismatch; expecting Int32, type(parm)=System.Int32

   à OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.MODError(String msg) dans k:\OSGRID\opensim-0.9.0-727-ged06bfb\OpenSim\Region\ScriptEngine\Shared\Api\Implementation\MOD_Api.cs:ligne 103

   à OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.ConvertFromLSL(Object lslparm, Type type, String fname) dans k:\OSGRID\opensim-0.9.0-727-ged06bfb\OpenSim\Region\ScriptEngine\Shared\Api\Implementation\MOD_Api.cs:ligne 451

   à OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.modInvoke(String fname, Object[] parms) dans k:\OSGRID\opensim-0.9.0-727-ged06bfb\OpenSim\Region\ScriptEngine\Shared\Api\Implementation\MOD_Api.cs:ligne 322

   à OpenSim.Region.ScriptEngine.Shared.Api.MOD_Api.modInvokeI(String fname, Object[] parms) dans k:\OSGRID\open

PS: @Mandarinka Tasty > I do not understand (of course) how you allow this function.
UbitUmarov (administrator)
2016-11-05 13:16

that should work now on master.
Mandarinka Tasty (reporter)
2016-11-05 17:36
edited on: 2016-11-05 18:07

Hello djPhil :)

Yes, I understand.

Let me explain you, how I enable it in my environments.

First at all, you need to make true value: AllowMODFunctions = true

in both files:

osslEnable.ini and OpenSim.ini in section XEngine.

Next to make it run without permission request for EO and EM,

you need to log in with Firestorm, or probably also other viewer,

press ALT+R, to open: Region / Estate window and go to:

Debug tab, then you notice button: Region Debug Console, press it,

do not afraid, next you can type: help all

and please read information there, you understand all :)

To enable it: you need to type: set auto_grant_attach_perms true

in this way, object owned by EO or EM temp_attaches itself without

permission request. do you understand ?

There is ( was) problem with ATTACH_LHAND or other value expressed as a string,

to make it work, you need to replace ATTACH_LHAND with integer 5:


I have not tested today Ubit's fix yet,

so probably it works with ATTACH_LHAND too, after his solution in his fix.

By the way, trick with set auto_grant_attach_perms true | false

does not want to work with regions running with SQL lite, that is not big

problem for me, since SQL lite regions i use for my home pc experiments with

code regions.

But it pretty nice works with my grid regions based on MySQL.

djphil (reporter)
2016-11-06 06:29
edited on: 2016-11-06 07:14

@Mandarinka Tasty: Tank's, i see now (good to know your workaround).
@UbitUmarov: I'll try to test as soon as possible, ty.

OSSL function would be welcome because alot easier to use, no need to go through the debug mode of the viewer.

I recall this initial request of this mantis, 3 new OSSL functions:
- osForceAttachToAvatarTemp
- osForceAttachToAvatarFromInventoryTemp
- osForceAttachToOtherAvatarFromInventoryTemp

UbitUmarov (administrator)
2016-11-06 06:39

Ubit reads "..Forced.." and cowardly looks the other way
djphil (reporter)
2016-11-06 07:13

@Ubit: OSSL have some other "forced" functions ...
- osForceAttachToAvatar
- osForceAttachToAvatarFromInventory
- osForceAttachToOtherAvatarFromInventory
- osForceDetachFromAvatar
- osForceOtherSit
- osForceDropAttachment
- osForceDropAttachmentAt
To my knowledge, they do not cause problems
Mandarinka Tasty (reporter)
2016-11-06 14:40
edited on: 2016-11-06 14:54

In my opinion, functionality that exists in actual llAttachToAvatarTemp covers

eventual usage of your request.

I. When you use llAttachToAvatarTemp with set auto_grant_attach_perms true

then it behaves like hypothetical osForceAttachToAvatarTemp.

It attaches itself to other avatar too !

You can see it here: if (target.UUID != hostPart.ParentGroup.OwnerID) ....

II. Object can be rezzed from inventory of other object and next you can use


So also it responds to analogous osForceAttachTo..FromInventory

III. And because set auto_grant_attach_perms true can be turned on by EO, EM

and generally everyone who has access to Region Debug Console, means God too.

Then it works like Force functions running with ThreatLevel.

Persons who use various sorts of osForceAttach... are rather, in 99,99%, people

with access to Region Debug Console. Because those functions start from Level:

High. In MySQL environments, when you activate set auto_grant_attach_perms true,

appropriate value is stored, hence you can use it after region's restart too

without activation. So in fact, you activate it only once.

So in my opinion creating osForceAttachTo..Temp would be duplication.

But implementation of them is quitely easy.

djphil (reporter)
2016-11-08 09:43

@Mandarinka Tasty: I understand your opigion, however, this manipulation is not intended for the average user unlike a OSSL script function that is accessible Interac traditional way. OSSL a specific function is also more explicit than in the handling of debug settings.

We will see ...

Thank you for your interest.

- Issue History
Date Modified Username Field Change
2016-11-03 08:53 djphil New Issue
2016-11-03 11:34 djphil Description Updated View Revisions
2016-11-03 22:38 Mandarinka Tasty Note Added: 0031229
2016-11-05 12:25 djphil Note Added: 0031247
2016-11-05 13:16 UbitUmarov Note Added: 0031248
2016-11-05 17:36 Mandarinka Tasty Note Added: 0031252
2016-11-05 18:07 Mandarinka Tasty Note Edited: 0031252 View Revisions
2016-11-06 06:29 djphil Note Added: 0031257
2016-11-06 06:39 UbitUmarov Note Added: 0031258
2016-11-06 07:13 djphil Note Added: 0031259
2016-11-06 07:13 djphil Description Updated View Revisions
2016-11-06 07:14 djphil Note Edited: 0031257 View Revisions
2016-11-06 14:40 Mandarinka Tasty Note Added: 0031263
2016-11-06 14:40 Mandarinka Tasty Note Edited: 0031263 View Revisions
2016-11-06 14:41 Mandarinka Tasty Note Edited: 0031263 View Revisions
2016-11-06 14:54 Mandarinka Tasty Note Edited: 0031263 View Revisions
2016-11-08 09:43 djphil Note Added: 0031265
2019-08-13 10:37 djphil Relationship added related to 0008574

Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker