Change font size
It is currently Tue Dec 18, 2018 1:04 pm

Forum rules


{L_IMAGE}



Post a new topicPost a reply Page 1 of 2   [ 12 posts ]
Go to page 1, 2  Next
Author Message
 Post subject: [MRM] Telehub Script
PostPosted: Tue May 12, 2009 5:29 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
This script requires that you enable MRM but to do so safely please update your simulator to r9518 simulator.
You can thank Adam Frisby for supplying this handy script, thanks Adam.
Also users of this script should know you must own the Region and the Prim you are dropping this script into, else it wont work at all.
{L_CODE}:
//MRM:C#

// Demonstrates building a simple 'telehub' using MRM.

using OpenSim.Region.OptionalModules.Scripting.Minimodule;
using OpenMetaverse;

namespace OpenSim
{
    class MiniModule : MRMBase
    {
        public override void Start() {
            World.OnNewUser += OnUser;   
        }   
       
        public override void Stop() {
            World.OnNewUser -= OnUser;   
        }
       
        public void OnUser(IWorld world, NewUserEventArgs e) {
            e.Avatar.WorldPosition = new Vector3(128.0f, 128.0f, 22.0f);
            Host.Object.Say("Welcome " + e.Avatar.Name + " to the Region_Name_Here.");
        }
    }   
}


Enjoy

Neb :ugeek:


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Wed May 13, 2009 3:55 am 
OSG Elite
User avatar

Joined: Thu Jul 31, 2008 2:48 am
Posts: 394
Stop me if I'm entering territory I don't understand at all.
This script uses MRM:C#
so a script can be written in C# w/o allowing C# scripting in the OpenSim.ini
by using the MRM module?
Re: the gracious warning in OpenSim.ini.example concerning allowing C# and brethren scripting

{L_QUOTE}:
; Specify default script compiler
; If you do not specify //cs, //vb, //js or //lsl tag as the first characters of your script then the default compiler will be chosen
; Valid languages are: lsl, cs, js and vb
DefaultCompileLanguage=lsl

; Specify what compilers are allowed to be used
; Note vb only works on Windows for now (Mono lacks VB compile support)
; Valid languages are: lsl, cs, js and vb
; AllowedCompilers=lsl,cs,js,vb. *warning*, non lsl languages have access to static methods such as System.IO.File. Enable at your own risk.
AllowedCompilers=lsl


Though not obvious, access to System.IO.File is quite a lot of access, well beyond the need of the OpenSim server.
And you avatar/operators running OpenSim as root/adminstrator PLEASE take heed this warning.

Is MRM a way of avoiding or minimizing this risk?

PocoLoco

_________________
PocoLoco
Avatar@Large


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Wed May 13, 2009 10:05 am 
Furious Typer
User avatar

Joined: Thu Nov 20, 2008 6:22 am
Posts: 126
Hi Poco,

i recommend to read Adam's blog to learn more about MRM's

http://www.adamfrisby.com/blog/ and search for 'mrm'.

As Adam is the one behind MRM's, there you should find most of the answers.

regards

Ziah


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Wed May 13, 2009 12:54 pm 
OSG Elite
User avatar

Joined: Thu Jul 31, 2008 2:48 am
Posts: 394
Been there, done that.
Unless Adam has added something significant very recently I found a lot of talk about MRM but nothing that gets into the meat of the issue. Lot's of MetaData, very sparse on details. I'll give it another look, Adam's blog is in my Firefox bookmarks I'm sure.

PocoLoco

_________________
PocoLoco
Avatar@Large


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Wed May 13, 2009 1:43 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
Only the sim owner can run MRM so the risk is low. and to be even more clear, the Prim must be created by, and script and region must be owned by the same avatar UUID.

Neb


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Thu May 14, 2009 2:54 am 
OSG Elite
User avatar

Joined: Thu Jul 31, 2008 2:48 am
Posts: 394
nebadon {L_WROTE}:
Only the sim owner can run MRM so the risk is low. and to be even more clear, the Prim must be created by, and script and region must be owned by the same avatar UUID.

Neb

Tnx Nebs, that's the kind of reassurance I was looking for.
Apparently I need to reread Adam's blog a few more times.
I've caught a few of the highlights from the Planet OpenSim RSS feed. But to be honest, it read like most C# code to a non-coder.
Then there's the D'oh! moment I had when it dawned on me this is another feature than can be tested in Standalone mode :oops:

PocoLoco

_________________
PocoLoco
Avatar@Large


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Thu May 14, 2009 5:16 am 
Furious Typer

Joined: Sun Feb 22, 2009 12:30 am
Posts: 104
I'm a D# coder Doh!

_________________
Lost Packet - The avatar formerly known as Max Ping

Founder & Editor of Maxping Magazine http://maxping.org


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Thu May 14, 2009 5:30 am 
Furious Typer
User avatar

Joined: Thu Nov 20, 2008 6:22 am
Posts: 126
BTW, i suggest a small modification :

change

e.Avatar.WorldPosition = new Vector3(128.0f, 128.0f, 22.0f);

to

e.Avatar.WorldPosition = Host.Object.WorldPosition;

so that Avatars are relocated to the Position of the Object containing the script. So you don't need to modify the script, just rezz the object at the place where your telehub point should be.

regards

Ziah


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Thu Jun 25, 2009 9:47 am 

Joined: Mon Jun 22, 2009 12:55 am
Posts: 2
It looks like this doesn't distinguish between child and root agents. That has a neat side affect, in that a "ghost" of the child agent of an avatar that enters an adjacent region materializes over the prim. :D


Top
 Profile  
 
 Post subject: Re: [MRM] Telehub Script
PostPosted: Fri Jun 26, 2009 5:18 pm 
OSG Elite
User avatar

Joined: Thu Jul 31, 2008 2:48 am
Posts: 394
Frank Northmead {L_WROTE}:
It looks like this doesn't distinguish between child and root agents. That has a neat side affect, in that a "ghost" of the child agent of an avatar that enters an adjacent region materializes over the prim. :D

Wellie wellie well,
that's the ticket, a Sybil avatar
with built in multiple personality disorder :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 2   [ 12 posts ]
Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
610nm Style by Daniel St. Jules of Gamexe.net