[Opensim-users] Rezzing Scripts in Prims from Region Modules (part 2)

Chris Stevens chris.stevens at daden.co.uk
Wed Aug 3 14:56:16 UTC 2011


Hi,

Thanks to JCC for his initial advice, i've now got something that looks
roughly like this:


 //TEST ADD SCRIPT
        private static void AddTouchScript(SceneObjectGroup parts)
        {
            SceneObjectPart part = parts.RootPart;
            Scene scene = rmDataCube.m_scene;

            //TaskInventoryItem t = new TaskInventoryItem();
            //part.Inventory.AddInventoryItem(

            InventoryItemBase b = new InventoryItemBase(UUID.Zero);
            parts.AddInventoryItem(null, part.LocalId, b, new UUID());
            scene.RezScript(null,b,new UUID(),part.LocalId);
            //parts.ResumeScripts();

        }

Unfortunately scene.RezScript has the following slightly problematic issue:

if (!Permissions.CanCreateObjectInventory(
                    itemBase.InvType, part.UUID, remoteClient.AgentId))
                    return;

So it's not even returning an error report, I think it's dying silently
since as a region module call has a remoteClient of null (This is part of my
query, is there a way to spoof a remoteClient?)

Does anyone have an idea how to get a Prim to just rez itself a nice,
unowned blank script without modifying Scene.cs to not silently die if I try
and call RezScript without a client?

Going to try altering Scene.cs though...

Regards,
Chris.

-- 
Chris Stevens
Lead Programmer
Daden Limited

t: +44 (0)121 250 5678
e: chris.stevens at daden.co.uk
w: www.daden.co.uk
skype: christopher.michael.stevens
sl: http://www.slurl.com/secondlife/daden%20prime/160/184/26
sl IM: Chris Taselian

Daden specialise in immersive learning & training systems, built environment
visualisations, and creating interactive virtual personalities (chatbots).

Daden are a Linden Lab Gold Solution Provider for Second Life.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-users/attachments/20110803/c6837018/attachment.html>


More information about the Opensim-users mailing list