Change font size
It is currently Mon Nov 19, 2018 10:56 am

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: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 1:10 pm 

Joined: Sun Feb 01, 2009 1:04 pm
Posts: 1
You can use this simple scripted to create scripted gateways which support also hypergrid link regions:

{L_CODE}:
default
{
    state_entry()
    {
        llSay(0, "Script running");
    }
   
    touch_start(integer _det) {
        key AvatarKey = llDetectedKey(0);
        vector LandingPoint = <128,128,128>;
        vector LookAt = <1,1,0>;

        osTeleportAgent(AvatarKey, 998, 1000, LandingPoint, LookAt);
    }
   
    collision(integer _det)
    {
        key AvatarKey = llDetectedKey(0);
        vector LandingPoint = <128,128,128>;
        vector LookAt = <1,1,0>;

        osTeleportAgent(AvatarKey, 998, 1000, LandingPoint, LookAt);
    }

}


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 7:57 pm 
Furious Typer

Joined: Sat Jan 17, 2009 11:19 am
Posts: 88
Not sure if its just me but I dont think ive been able to run hardly Any scripts in my OpenSim, I just tried running that one you posted tlaukkan and I got this inworld error..

Primitive: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.

Server stack trace:
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000]
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000]
at OpenSim.Region.ScriptEngine.Shared.ScriptBase.Executor.ExecuteEvent (System.String state, System.String FunctionName, System.Object[] args) [0x00000]

Exception rethrown at [0]:
---> System.Exception: OSSL Runtime Error: osTeleportAgent permission denied. All OS functions are disabled.

Server stack trace:
at OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.OSSLError (System.String msg) [0x00000]
at OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.CheckThreatLevel (ThreatLevel level, System.String function) [0x00000]
at (wrapper remoting-invoke-with-che

I'll try some others now.


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 8:19 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
Jordy, if you read through the error you will see that your osFunctions are disabled. In your Xengine or DotnetEngine (depending on which is your default engine) section of the OpenSim.ini you will need to enable osFunctions and perhaps allow the functions in this script to be run, depending on your assigned threat level.

Neb :geek:


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 8:51 pm 
Furious Typer

Joined: Sat Jan 17, 2009 11:19 am
Posts: 88
I tried this..

Im using Xengine as default (which one out of the 2 is best btw?)

And inthe Xengine settings I change the following..

;Allow the use of os* functions (some are dangerous)
AllowOSFunctions = false CHANGED THIS TO "true" without the quotes.

And now i put the script in a prim, says it went fine but the prim doesnt interact.. It wont let me click/touch it to make the script do anything. Script went in fine and all.


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 9:02 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
ok but in the ini file did you do this in the Xengine section

AllowOSFunctions = false

change that to

AllowOSFunctions = true

but make sure you keep the threat level on verylow and then explicitly enable just the functions you are using as needed.

hope this helps

Neb :ugeek:


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Sun Feb 01, 2009 9:09 pm 
Furious Typer

Joined: Sat Jan 17, 2009 11:19 am
Posts: 88
I changed it to VeryHigh just to test and it works fine. I've put it back to VeryLow but im not too sure how to enable just the functions Im using and where to enable them.

What functions would this be using and well I will eventually have people in my Grid making scripts all the time so whats the best way to allow people to make scripts without me having to change the opensim.ini everytime to let that script run. I guessed by putting it as Severe level but then that just doesnt sound too good to me. Unless its not all that bad?


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Mon Feb 02, 2009 2:14 am 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
i just tested this on my simulator and it works ok, here is my Xengine section of the OpenSim.ini

{L_CODE}:
[XEngine]
    ; Enable this engine in this OpenSim instance
    Enabled = true
    ; How many threads to keep alive even if nothing is happening
    MinThreads = 2
    ; How many threads to start at maximum load
    MaxThreads = 100
    ; Time a thread must be idle (in seconds) before it dies
    IdleTimeout = 60
    ; Thread priority ("Lowest", "BelowNormal", "Normal", "AboveNormal", "Highest")
    Priority = "BelowNormal"
    ; Maximum number of events to queue for a script (excluding timers)
    MaxScriptEventQueue = 300
    ; Stack size per thread created
    ThreadStackSize = 262144
    ; Rate to poll for asynchronous command replies (ms)
    AsyncLLCommandLoopms = 50
    ; Save the source of all compiled scripts
    WriteScriptSourceToDebugFile = false
    ; Default language for scripts
    DefaultCompileLanguage = lsl
    ; List of allowed languages (lsl,vb,js,cs)
    ; 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

    ; Compile debug info (line numbers) into the script assemblies
    CompileWithDebugInformation = true
    ; Allow the use of os* functions (some are dangerous)
    AllowOSFunctions = true
    ; Threat level to allow, one of None, VeryLow, Low, Moderate, High, VeryHigh, Severe
    OSFunctionThreatLevel = VeryLow
    ; Interval (s) between background save of script states
    SaveInterval = 120
    ; Interval (s) between maintenance runs (0 = disable)
    MaintenanceInterval = 10
    ; Time a script can spend in an event handler before it is interrupted
    EventLimit = 30
    ; If a script overruns it's event limit, kill the script?
    KillTimedOutScripts = false
    ; Sets the multiplier for the scripting delays
    ScriptDelayFactor = 1.0
    ; The factor the 10 m distances llimits are multiplied by
    ScriptDistanceLimitFactor = 1.0

    ; OS Functions enable/disable
    ; For each function, you can add one line, as shown
    ; The default for all functions allows them if below threat level

    ; true allows the use of the function unconditionally
    ; Allow_osSetRegionWaterHeight = true
    Allow_osGetSimulatorVersion = true
    Allow_osTeleportAgent = true

    ; false disables the function completely
    ; Allow_osSetRegionWaterHeight = false

    ; Comma separated list of UUIDS allows the function for that list of UUIDS
    ; Allow_osSetRegionWaterHeight = 888760cb-a3cf-43ac-8ea4-8732fd3ee2bb


    ; Allow for llCreateLink and llBreakLink to work without asking for permission
    ; only enable this in a trusted environment otherwise you may be subject to hijacking
    ; AutomaticLinkPermission = false


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Mon Feb 02, 2009 5:23 am 
Furious Typer

Joined: Sat Jan 17, 2009 11:19 am
Posts: 88
How can I just allow all/nearly all funtiions/scripts to work without modifying the OpenSim.ini everytime?


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Mon Feb 02, 2009 12:20 pm 
Site Admin
User avatar

Joined: Sat Feb 02, 2008 5:27 pm
Posts: 843
Jordy, after trying to get this working on Wright Plaza last night, i found out that if you do not Own the parcel your using this on it will not work, so if you do want this to work, you will need to make atleast a small parcel where the device is and set yourself as the owner, or, make sure the script and object are the same owner as the land parcel. Took me hours to figure this out, I sure hope it helps you get past this problem.

Neb :ugeek:


Top
 Profile  
 
 Post subject: Re: Teleporting to region coordinates with osTeleportAgent
PostPosted: Mon Feb 02, 2009 1:51 pm 
Furious Typer

Joined: Sat Jan 17, 2009 11:19 am
Posts: 88
Yea I got this working after adding to the Xengine section however I wondered if I'd need to add to that Xengine sectio every single time someone makes a script which would keep me on my toes 24/7.

I could only think to change the threatlevel to Severe to allow all scripts to work but that doesnt sound too good to me unless its not actually too bad of an idea?

Will this mean someone could in Theory hack my server or somthing if its allowing scripts set to a threat of Severe?


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 1 guest


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:  
cron


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