OSSL Proposals
From OpenSimulator
(Proposed a new function osSetStatus) |
m (Left align) |
||
(76 intermediate revisions by 28 users not shown) | |||
Line 1: | Line 1: | ||
− | + | __NOTOC__ | |
+ | {{Quicklinks}} | ||
+ | {{proposal}} | ||
+ | {{content}} | ||
− | + | = What is OSSL? = | |
+ | == Introduction == | ||
+ | |||
+ | This is a page dedicated to OpenSim's very own home brew custom scripting language Known as "'''O'''pen '''S'''im '''S'''cripting '''L'''anguage" | ||
+ | |||
+ | <big>'''Please see [[OSSL Standards]] for proposed naming schema'''</big> | ||
* Please post your osFunction along with a brief description of what it would be for, or do and an example of it. | * Please post your osFunction along with a brief description of what it would be for, or do and an example of it. | ||
* Make sure it begins with os NOT ll. | * Make sure it begins with os NOT ll. | ||
* And remember, almost anything within reason can be posted here as an idea, who knows, maybe a variation of your request can be possible. | * And remember, almost anything within reason can be posted here as an idea, who knows, maybe a variation of your request can be possible. | ||
− | * If a function could implemented in standard LSL, there is no reason to make an OS function. LSL code and function code executes at the same speed in | + | * If a function could implemented in standard LSL, there is no reason to make an OS function. LSL code and function code executes at the same speed in OpenSimulator. |
− | ==OSSL Proposal Table== | + | * Post your proposal to the opensim-dev mailing list so that it can be discussed to see if there is any interest. Please indicate if you are willing to implement it yourself - such proposals have a much better chance of succeeding! |
− | {| | + | |
− | |- style="background-color:# | + | == OSSL Proposal Table == |
+ | |||
+ | {| cellspacing="0" cellpadding="5" border="1" align="left" style="width: 100%;" class="sortable" | ||
+ | |- style="background-color:#57C604;font-size:10pt;font-weight:bold;border-bottom:1px solid;" align="center" valign="bottom" | ||
| osFunction | | osFunction | ||
| Description | | Description | ||
− | | Example Usage | + | | Example Usage |
− | | Signed | + | | Signed |
+ | | Implemented | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | key osSetHTTPURL(string url); | ||
+ | | Sets the prim to a private HTTP:// url for use by this script. The http_request() event would be | ||
+ | triggered & the prim would serve as a "prim-server" for the private HTTP:// url. Also Returns a key that is the handle used for identifying the result in the http_request event. | ||
+ | | <source lang="lsl"> | ||
+ | string private_url = "http://thisprivatedomain.com/index.php" | ||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | osSetHTTPURL(private_url); | ||
+ | } | ||
+ | http_request(key request_id, string method, string body) | ||
+ | { | ||
+ | if(method == "POST") | ||
+ | { | ||
+ | osHTTPResponse(request_id,200,"Your $_POST was successful"); | ||
+ | } | ||
+ | else if(method == "GET") | ||
+ | { | ||
+ | osHTTPResponse(request_id,200,"Wait for the server to handle your request"); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | | Apollo Juez | ||
+ | | No | ||
|- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | | + | | list osGetRegionAgentKeys(); |
− | | | + | | C# Code: |
− | + | <source lang="csharp"> | |
− | + | public LSL_List osGetRegionAgentKeys() | |
+ | { | ||
+ | CheckThreatLevel(ThreatLevel.None, "osGetRegionAgentKeys"); | ||
+ | LSL_List result = new LSL_List(); | ||
+ | foreach (ScenePresence avatar in World.GetAvatars()) | ||
+ | { | ||
+ | result.Add(avatar.UUID); | ||
+ | } | ||
+ | return result; | ||
+ | } | ||
+ | </source> | ||
+ | Returns a list of keys for every agent in the region | ||
+ | | <source lang="lsl"> | ||
+ | list keys=osGetRegionAgentKeys(); | ||
+ | integer i; | ||
+ | integer l=llGetListLength(keys); | ||
+ | string names; for(i=0;i<l;i++) | ||
+ | { key id=llList2Key(keys,i); | ||
+ | string add=llKey2Name(id); | ||
+ | integer dist=llVecDist(llGetPos(),llList2Vector(llGetObjectDetails(id,[OBJECT_POS]),0))); | ||
+ | add+="["+(string)dist+"]\n"; | ||
+ | names+=add; | ||
+ | } llSetText(names,<1,1,1>,1.0); | ||
+ | </source> | ||
+ | | Joshua Driver | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | [NEW] various os functions including osDerezObject(), osMessageAgentAttachment(), ... | ||
+ | | see [[User:Athlon_Maurer]] for full source code | ||
+ | | tested on local opensimulator 0.6.9 (some of them doesnt seem to work on 0.7.x) | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osBin(string char); | ||
+ | | To convert a char into its binary value. Will only convert 1 char at a time. | ||
+ | | string bin_a = osBin("A"); // bin_a = "01000001"; | ||
+ | | Athlon Maurer (please send me a notecard into secondlife, if that are too much ideas xD, this hint can be deleted by an opensimulator admin, if neccesary xD) | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osHex(integer number); | ||
+ | | To convert a number into its hexadecimal value. | ||
+ | | string str_ff = osHex(255); // str_ff = "FF"; | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | integer osAsc(string char); | ||
+ | | To convert a char into its ascii index. Will only convert 1 char at a time. | ||
+ | | integer asc_a = osAsc("A"); // asc_a = 65; | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | void osScanRegionRemove(); | ||
+ | | Remove an osScanRegionRepeat(). [ nearly the same as llSensorRemove() ] | ||
+ | | osScanRegionRemove(); | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | void osScanRegion(string name, key id, integer type); | ||
+ | | Scan the whole region where the script task object is in regardless where it is positioned. Triggers sensor() or no_sensor(). | ||
+ | | osScanRegion("", "", AGENT); | ||
+ | | Athlon Maurer | ||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | void osScanRegionRepeat(string name, key id, integer type, float rate); | ||
+ | | Scan the whole region where the script task object is in regardless where it is positioned with rate. Triggers sensor() or no_sensor(). | ||
+ | | osScanRegionRepeat("", "", AGENT, 15.0); | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | key osGetRegionMapTexture(string RegionName) | ||
+ | | return the map texture uuid for the region named by RegionName. | ||
+ | | llSetTexture(osGetRegionMapTexture("OpenSimulator Test"), ALL_SIDES); | ||
+ | <math> | ||
+ | create a php file which is public | ||
+ | <?php | ||
+ | </p><p> // mapquery.php by Athlon Maurer (SL, OL, OS) | ||
+ | // | ||
+ | // hello, ive just started to learn php/mysql and this is one of my first | ||
+ | // scripts for opensim. this script returns the texture uuid for a given | ||
+ | // region by calling: mapquery.php?region=REGIONNAME | ||
+ | // if a region has been found, it returns that regions map texture uuid, | ||
+ | // otherwise it returns a null key uuid | ||
+ | // mysql connection info is here, please make this more safe | ||
+ | </p><p> // region name (do not change this) | ||
+ | $region = htmlspecialchars($_GET['region']); | ||
+ | </p><p> // default uuid (do not change this) | ||
+ | $uuid = '00000000-0000-0000-0000-000000000000'; | ||
+ | </p><p> // your mysql host name (change this) | ||
+ | $dbhost = 'localhost'; | ||
+ | </p><p> // your mysql user name (change this) | ||
+ | $dbuser = 'root'; | ||
+ | </p><p> // your mysql user password (change this) | ||
+ | $dbpass = ''; | ||
+ | </p><p> // your mysql opensim database (change this) | ||
+ | $dbname = 'opensim'; | ||
+ | </p><p> // try to connect | ||
+ | if ($conn = mysql_connect($dbhost, $dbuser, $dbpass)) | ||
+ | { | ||
+ | // try to select | ||
+ | if ($select = mysql_select_db($dbname, $conn)) | ||
+ | { | ||
+ | $sql = 'SELECT regionName, regionMapTexture FROM regions'; | ||
+ | $result = mysql_query($sql); | ||
+ | while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) | ||
+ | { | ||
+ | if ($row['regionName'] == $region) | ||
+ | { | ||
+ | $uuid = $row['regionMapTexture']; | ||
+ | } | ||
+ | } | ||
+ | // free result | ||
+ | mysql_free_result($result); | ||
+ | } | ||
+ | // close connection | ||
+ | mysql_close($conn); | ||
+ | } | ||
+ | // output | ||
+ | echo $uuid; | ||
+ | </p><p>?> | ||
+ | then llHTTPRequest(</math> | ||
+ | | Athlon Maurer (This function is available as of November 12, 2009) | ||
+ | | Yes | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | list osGetLinkPrimitiveParams(integer link, list params); | ||
+ | | Function llSetLinkPrimitiveParams() does exist, but no chance to get params from a prim in a linkset, like llGetPrimitiveParams() and llSetPrimitiveParams(). | ||
+ | | list linkparams = osGetLinkPrimitiveParams([PRIM_TYPE, PRIM_TEXTURE, ...]); | ||
+ | | Athlon Maurer (This function is available as of August 09, 2009) | ||
+ | | Yes | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | void osDerezObject(key object) | ||
+ | | Deletes an InWorld-Object specified by object as uuid. Only successful if the object the script is attached to and the object which should be derezzed is owned by the same owner :). Useful if the object to be deleted should be unscripted. | ||
+ | | osDerezObject("key_of_object"); | ||
+ | | Athlon Maurer | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | int osRestartRegion() | ||
+ | | Restarts the region the script is currently in. The script this is run in has to be owned by the master avatar for that region. Returns 1 if the region is restarting, 0 on failure. | ||
+ | | osRestartRegion(); | ||
+ | | gryc (Implemented by AFrisby) | ||
+ | | Yes | ||
|- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | int osWebTexture() | + | | int osWebTexture() |
− | | Sets the texture from a web-url | + | | Sets the texture from a web-url |
− | | osWebTexture(string url,integer maptype); | + | | osWebTexture(string url,integer maptype); |
| AFrisby? | | AFrisby? | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osGroupAdd(key, string Role) | + | | osGroupAdd(key, string Role) |
− | | Adds user to a group with given role, default role Everyone. Returns 1 if successful 0 if fail. | + | | Adds user to a group with given role, default role Everyone. Returns 1 if successful 0 if fail. |
− | | osGroupAdd(87f6e6a0-d884-11dc-95ff-0800200c9a66, "Officer") | + | | osGroupAdd(87f6e6a0-d884-11dc-95ff-0800200c9a66, "Officer") |
| Nitrus Nori | | Nitrus Nori | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | int osShutdownRegion() | + | | int osShutdownRegion() |
− | | Shuts down the region the script is currently in. | + | | Shuts down the region the script is currently in. The script this is run in has to be owned by the master avatar for that region. Returns 1 if the region is going down, 0 on failure. |
− | | osShutdownRegion(); | + | | osShutdownRegion(); |
| gryc | | gryc | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osAttachmentSay(integer channel, string msg) | + | | void osAttachmentSay(integer channel, string msg) |
− | | Provide a secure, low lag method of communicating between attachments over the chat channels by only sending messages to objects attached to the same avatar. Would fail (or not be heard) if in a non-attached object. | + | | Provide a secure, low lag method of communicating between attachments over the chat channels by only sending messages to objects attached to the same avatar. Would fail (or not be heard) if in a non-attached object. |
− | | osAttachmentSay(-20, "detatch"); | + | | osAttachmentSay(-20, "detatch"); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osMessageSecure(string message_key, string str, integer num, key id);<br>secure_message(string message_key, string str, integer num, key id); | + | | void osMessageSecure(string message_key, string str, integer num, key id);<br />secure_message(string message_key, string str, integer num, key id); |
− | | Provide a method of sending secure, salt encripted messages sim wide. Messages would only be able to be received by scripts with the matching key in the secure_message method. | + | | Provide a method of sending secure, salt encripted messages sim wide. Messages would only be able to be received by scripts with the matching key in the secure_message method. |
− | | osMessageSecure("myPassPhrase", "Hello World", 0, NULL_KEY); | + | | osMessageSecure("myPassPhrase", "Hello World", 0, NULL_KEY); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osSetText( vector color, string text [,vector color, string text]); | + | | void osSetText( vector color, string text [,vector color, string text]); |
− | | Allow setting of multiple colors on the prim text | + | | Allow setting of multiple colors on the prim text |
− | | osSetText( | + | | osSetText(<1,0,0>,"Red", <0,1,0>, "\nGreen", <0,0,1>, "\nBlue"); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osSensor | + | | osSensor |
− | | Gets ALL the objects in the specified range not just the first 16 | + | | Gets ALL the objects in the specified range not just the first 16 |
− | | (same as standard) | + | | (same as standard) |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | list lst=osDetectObjectsInSim(key id) | + | | list lst=osDetectObjectsInSim(key id) |
− | | given an Agent Key, provide a list of ALL object owned by that agent | + | | given an Agent Key, provide a list of ALL object owned by that agent |
− | | osDetectObjectsInSim(key id) returning a strided list of [ name, | + | | osDetectObjectsInSim(key id) returning a strided list of [ name, <pos> ] |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer=osDialog([ title, label1, type1, len1, label2, type2, len2].... | + | | integer=osDialog([ title, label1, type1, len1, label2, type2, len2].... |
− | | given title and a listing of fields, builds up a real form where to put structured checked data | + | | given title and a listing of fields, builds up a real form where to put structured checked data |
− | | will return a [ value1, value2, valuen ] corresponding to fields read. Type might be something like (string, text (multiline), integer, float, currency(decimals), options(combobox) | + | | will return a [ value1, value2, valuen ] corresponding to fields read. Type might be something like (string, text (multiline), integer, float, currency(decimals), options(combobox) |
| Sal | | Sal | ||
+ | | No | ||
− | |- style="font-size: | + | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" |
− | | key id=osMakeTextureText(string name,integer width, integer height,[posx1,posy1,font1,color1,size1,text1,posx2,posy2,font2,color2,size2,text2....]) | + | | key id=osMakeTextureText(string name,integer width, integer height,[posx1,posy1,font1,color1,size1,text1,posx2,posy2,font2,color2,size2,text2....]) |
− | | allow for producing a texture on the fly with desired Font content from a selected font selection. Width, Height in pixels 1024x512 to control how big will be the texture | + | | allow for producing a texture on the fly with desired Font content from a selected font selection. Width, Height in pixels 1024x512 to control how big will be the texture |
− | | will generate a texture with defined text. (Allow some support for at least ISO-8859-1) texture will be created in the object inventory. posx, posy in the range 0-1 to be pixel independent | + | | will generate a texture with defined text. (Allow some support for at least ISO-8859-1) texture will be created in the object inventory. posx, posy in the range 0-1 to be pixel independent |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osMakeNotecard(string name, [ line1, line2, line3, ...]) | + | | osMakeNotecard(string name, [ line1, line2, line3, ...]) |
− | | allow creation of new notecards in current object repository | + | | allow creation of new notecards in current object repository |
− | | generate a new asset id useful for storing modified configuration | + | | generate a new asset id useful for storing modified configuration |
| Sal | | Sal | ||
+ | | Yes | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer handler=osReadNotecardKey(string notecard, string key) | + | | integer handler=osReadNotecardKey(string notecard, string key) |
− | | allows reading notecards (through dataserver) in format key=value in convenient and efficient way | + | | allows reading notecards (through dataserver) in format key=value in convenient and efficient way |
− | | ... | + | | ... |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osWriteNotecardKey(string notecard, string key,string value) | + | | osWriteNotecardKey(string notecard, string key,string value) |
− | | allows WRITING notecards in format key=value in convenient and efficient way. Might be optimized having a fixed record length "file" so to avoid rewriting of the entire notecard | + | | allows WRITING notecards in format key=value in convenient and efficient way. Might be optimized having a fixed record length "file" so to avoid rewriting of the entire notecard |
− | | ... | + | | ... |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer handle=osXMLParser(string xml) | + | | integer handle=osXMLParser(string xml) |
− | | will activate a listener xmlparser(integer handler,string parent, string field, string value) | + | | will activate a listener xmlparser(integer handler,string parent, string field, string value) |
− | | to easily parse xml without writing php external code | + | | to easily parse xml without writing php external code |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osReturnObjects(key owner, integer type); | + | | integer osReturnObjects(key owner, integer type); |
− | | Provide a scriptable method of returning objects from a sim. type would be OBJECT_SCRIPTED, OBJECT_PASSIVE or OBJECT_ALL. Would return a binary Success/Fail, and work inline with land permissions for the script owner. | + | | Provide a scriptable method of returning objects from a sim. type would be OBJECT_SCRIPTED, OBJECT_PASSIVE or OBJECT_ALL. Would return a binary Success/Fail, and work inline with land permissions for the script owner. |
− | | osReturnObjects( target, OBJECT_ALL); | + | | osReturnObjects( target, OBJECT_ALL); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osReturnItem(key item); | + | | integer osReturnItem(key item); |
− | | Provide a scriptable method of returning individual objects from a sim. Would return a binary Success/Fail, and work inline with land permissions for the script owner. | + | | Provide a scriptable method of returning individual objects from a sim. Would return a binary Success/Fail, and work inline with land permissions for the script owner. |
− | | osReturnItem(uuid); | + | | osReturnItem(uuid); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osSetTimerEvent(integer timer, float rate); <br> (event) timer(integer timer_num) | + | | osSetTimerEvent(integer timer, float rate); <br /> (event) timer(integer timer_num) |
− | | Support for multiple timers in a script. | + | | Support for multiple timers in a script. |
− | | osSetTimerEvent(2, 0.5); | + | | osSetTimerEvent(2, 0.5); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osTimerOnce(integer timer, float rate); | + | | osTimerOnce(integer timer, float rate); |
− | | Allow for a one shot timer event, rather than the normal repeating heartbeat type | + | | Allow for a one shot timer event, rather than the normal repeating heartbeat type |
− | | osTimerOnce(2, 10); | + | | osTimerOnce(2, 10); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osVerifyScripts(); | + | | integer osVerifyScripts(); |
− | | Check to see if all scripts in an object are created by the owner of the script calling the function. Return TRUE if they are, FALSE otherwise, to prevent insertion of alien scripts into an object | + | | Check to see if all scripts in an object are created by the owner of the script calling the function. Return TRUE if they are, FALSE otherwise, to prevent insertion of alien scripts into an object |
− | | if (!osVerifyScripts()) { llDie(); } | + | | if (!osVerifyScripts()) { llDie(); } |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osStopOtherAnimations(list animation_exceptions); | + | | void osStopOtherAnimations(list animation_exceptions); |
− | | Provide a method of stopping all animations on an avatar, except those defined in the list | + | | Provide a method of stopping all animations on an avatar, except those defined in the list |
− | | osStopOtherAnimations(["my_sitting_anim"]); | + | | osStopOtherAnimations(["my_sitting_anim"]); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osPutScriptInLinkedSet(string name,integer linknum, integer starting_parm, integer running) | + | | void osPutScriptInLinkedSet(string name,integer linknum, integer starting_parm, integer running) |
− | | Use this to propagate one script to ALL or part of linked set. | + | | Use this to propagate one script to ALL or part of linked set. |
− | | Useful to have all objects in a linked set sharing a common behaviour | + | | Useful to have all objects in a linked set sharing a common behaviour |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osRezObject(string name, string description, integer permissionmask, list setPrimitiveObjectLikeList) will trigger the object_rez object as usual | + | | osRezObject(string name, string description, integer permissionmask, list setPrimitiveObjectLikeList) will trigger the object_rez object as usual |
− | | similar to llRezObject, but without the need of having a prim inside the inventory (which produced a lot of problems in deploying and in sl). Newly created object will have the same owner of current object where script is running. | + | | similar to llRezObject, but without the need of having a prim inside the inventory (which produced a lot of problems in deploying and in sl). Newly created object will have the same owner of current object where script is running. |
− | | In case list is empty or position not specified, suitable defaults should apply like pos being 1 m higher in the z axis | + | | In case list is empty or position not specified, suitable defaults should apply like pos being 1 m higher in the z axis |
| Sal | | Sal | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | string osGetOwnerName(); | + | | string osGetOwnerName(); |
− | | Provide a method of getting the owner name without having to use llKey2Name | + | | Provide a method of getting the owner name without having to use llKey2Name |
− | | myName = osGetOwnerName(); | + | | myName = osGetOwnerName(); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osXMPPOpen(string server, string username, string password, string resource); | + | | integer osXMPPOpen(string server, string username, string password, string resource); |
− | | Open an XMPP session to a jabber or other XMPP server, returning a handle to be able to manipulate the connection. Incoming messages to be parsed through a xmpp_message(integer handle, string sender, string service, string message) event. Accounts would have to be set up manually by the scripter, or by some other method, to prevent scripted spamming of a server, and to allow users to set up gateways and other services if needed. | + | | Open an XMPP session to a jabber or other XMPP server, returning a handle to be able to manipulate the connection. Incoming messages to be parsed through a xmpp_message(integer handle, string sender, string service, string message) event. Accounts would have to be set up manually by the scripter, or by some other method, to prevent scripted spamming of a server, and to allow users to set up gateways and other services if needed. |
− | | handle = osXMPPOpen("jabber.org", "MyObject", "MyPassword", "OpenSim"); | + | | handle = osXMPPOpen("jabber.org", "MyObject", "MyPassword", "OpenSim"); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | list osXMPPGetRosta(integer handle); | + | | list osXMPPGetRosta(integer handle); |
− | | Get the rosta from the XMPP server, list in the strided form of [username, presence, resource]; | + | | Get the rosta from the XMPP server, list in the strided form of [username, presence, resource]; |
− | | list presence = osXMPPGetRosta(handle); | + | | list presence = osXMPPGetRosta(handle); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | list osXMPPGetServices(integer handle); | + | | list osXMPPGetServices(integer handle); |
− | | Get a list of available services from the XMPP Server. | + | | Get a list of available services from the XMPP Server. |
− | | list services = osXMPPGetServices(handle); | + | | list services = osXMPPGetServices(handle); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osXMPPAdd(string username, string service) | + | | integer osXMPPAdd(string username, string service) |
− | | Add a username to the account rosta. Return boolean success or fail | + | | Add a username to the account rosta. Return boolean success or fail |
− | | if (osXMPPAdd("Test User", "Yahoo")) { ... } | + | | if (osXMPPAdd("Test User", "Yahoo")) { ... } |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer oxXMPPDelete(string username) | + | | integer oxXMPPDelete(string username) |
− | | Remove a username from the account rosta. Return boolean success or fail | + | | Remove a username from the account rosta. Return boolean success or fail |
− | | if (osXMPPDelete("Test User")) { ... } | + | | if (osXMPPDelete("Test User")) { ... } |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osXMPPGetStatus(string username); | + | | integer osXMPPGetStatus(string username); |
− | | Poll the server for the status of a specific username on the rosta - returns would be OFFLINE, BUSY, AWAY and ONLINE | + | | Poll the server for the status of a specific username on the rosta - returns would be OFFLINE, BUSY, AWAY and ONLINE |
− | | if (osXMPPGetStatus("Test User") & ONLINE) { ... } | + | | if (osXMPPGetStatus("Test User") & ONLINE) { ... } |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osXMPPSendMessage(integer handle, string message, string target); | + | | integer osXMPPSendMessage(integer handle, string message, string target); |
− | | Send a message via the open XMPP channel, to the specified target. Return boolean success values | + | | Send a message via the open XMPP channel, to the specified target. Return boolean success values |
− | | if (osXMPPSendMessage(handle, "Hello World", osGetOwnerName()) { llOwnerSay("Successfully sent message"); | + | | if (osXMPPSendMessage(handle, "Hello World", osGetOwnerName()) { llOwnerSay("Successfully sent message"); |
| Del M | | Del M | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | void osXMPPClose(integer handle); | + | | void osXMPPClose(integer handle); |
− | | Close the XMPP session | + | | Close the XMPP session |
− | | osXMPPClose(); | + | | osXMPPClose(); |
| Del M | | Del M | ||
+ | | No | ||
− | |- style="font-size: | + | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" |
− | | void osRezObjectKey(key object,vector pos,vector vel,rotation rot, int param); | + | | void osRezObjectKey(key object,vector pos,vector vel,rotation rot, int param); |
− | | Basically llGodLikeRezObject[http://lslwiki.net/lslwiki/wakka.php?wakka=llGodLikeRezObject] with the features of llRezObject[http://lslwiki.net/lslwiki/wakka.php?wakka=llRezObject] but for everyone to use. Calls object_rez. | + | | Basically llGodLikeRezObject[http://lslwiki.net/lslwiki/wakka.php?wakka=llGodLikeRezObject] with the features of llRezObject[http://lslwiki.net/lslwiki/wakka.php?wakka=llRezObject] but for everyone to use. Calls object_rez. |
− | | osRezObjectKey(object_key,llGetPos(),ZERO_VECTOR,llGetRot(),0); | + | | osRezObjectKey(object_key,llGetPos(),ZERO_VECTOR,llGetRot(),0); |
| Tdub | | Tdub | ||
+ | | No | ||
− | |- style="font-size: | + | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" |
− | | osRezFromURL(string url, vector pos, vector vel, rotation rot, integer param) - calls on_rez | + | | osRezFromURL(string url, vector pos, vector vel, rotation rot, integer param) - calls on_rez |
− | | Fetch a fragment of xml from a web server and rez its contents in-world as in 'load-xml'. | + | | Fetch a fragment of xml from a web server and rez its contents in-world as in 'load-xml'. Off or intergrid object repositories, such as objects stored in SVN via websvn, CMS, etc. |
− | | osRezFromURL("http://my.objectstore.com/myawesomeprims.xml", | + | | osRezFromURL("http://my.objectstore.com/myawesomeprims.xml", <1, 1, 1>, <0, 0, 0>, <0, 0, 0>, 0) |
| Jimbo2120 | | Jimbo2120 | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | list osRunCustom(string function, list params) | + | | list osRunCustom(string function, list params) |
− | | Allow scripts to call external custom routines that are grid-specific without modifying the set of LSL and OSL functions. | + | | Allow scripts to call external custom routines that are grid-specific without modifying the set of LSL and OSL functions. |
− | | list results = osRunCustom("function1", [...]) | + | | list results = osRunCustom("function1", [...]) |
| Ezekiel | | Ezekiel | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osSetScriptServer() | + | | osSetScriptServer() |
− | | Create a 'Server' prim that allows for extended scripting capabilities: more memory, higher bandwidth when communicating with external servers, probably some database connectivity, no artificial delays, can receive IMs, etc. Could be limited to one server per prim / parcel or per avatar, could be forced to remain in a fixed position. A server is important for residents that want to set up a virtual business. | + | | Create a 'Server' prim that allows for extended scripting capabilities: more memory, higher bandwidth when communicating with external servers, probably some database connectivity, no artificial delays, can receive IMs, etc. Could be limited to one server per prim / parcel or per avatar, could be forced to remain in a fixed position. A server is important for residents that want to set up a virtual business. |
− | | osSetScriptServer() | + | | osSetScriptServer() |
| Ezekiel | | Ezekiel | ||
+ | | No | ||
− | |- style="font-size: | + | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" |
− | | integer osRemoteLoadScript(string url, string target) | + | | integer osRemoteLoadScript(string url, string target) |
− | | Load a source file in txt format from "URL" and compile it into script "target" in the inventory of the same prim. Requires permission of the object owner (RequestPermission). Returns boolean success value. Replaces an existing script with same name. This function would allow updates to scripted solutions that operate in any grid and sim worldwide, allowing the creator of the solution to distribute code fixes and implement new functions. Since the source code is distributed openly, it can be copied and modified by anyone. A function that would allow for secure code distribution, protecting copyrights and certificates, would also be very interesting but should be far more difficult to implement. | + | | Load a source file in txt format from "URL" and compile it into script "target" in the inventory of the same prim. Requires permission of the object owner (RequestPermission). Returns boolean success value. Replaces an existing script with same name. This function would allow updates to scripted solutions that operate in any grid and sim worldwide, allowing the creator of the solution to distribute code fixes and implement new functions. Since the source code is distributed openly, it can be copied and modified by anyone. A function that would allow for secure code distribution, protecting copyrights and certificates, would also be very interesting but should be far more difficult to implement. |
− | | integer updatestatus = osRemoteLoadScript("http://www.xyz.com/updates/script1013.txt", "betterscript" ) | + | | integer updatestatus = osRemoteLoadScript("http://www.xyz.com/updates/script1013.txt", "betterscript" ) |
| Ezekiel | | Ezekiel | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osSetCustomPrimitiveAttributes(list params) | + | | integer osSetCustomPrimitiveAttributes(list params) |
− | | Set some custom persistent primitive attributes, the same way as llSetPrimitiveParams do. The attribute name has to be specified as a string, then the attribute type using a lSL constant. In the example, we set a "magnet" custom attribute as -0.5, supposing a customized physic engine handles this attribute to provide prim attraction. | + | | Set some custom persistent primitive attributes, the same way as llSetPrimitiveParams do. The attribute name has to be specified as a string, then the attribute type using a lSL constant. In the example, we set a "magnet" custom attribute as -0.5, supposing a customized physic engine handles this attribute to provide prim attraction. |
− | | integer osSetCustomPrimitiveAttributes(["magnet", TYPE_FLOAT, -0.5]) | + | | integer osSetCustomPrimitiveAttributes(["magnet", TYPE_FLOAT, -0.5]) |
| Grumly | | Grumly | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | list osGetCustomPrimitiveAttributes(list paramNames) | + | | list osGetCustomPrimitiveAttributes(list paramNames) |
− | | Return a list values of the specified attributes names, the same way as llGetPrimitiveParams do. | + | | Return a list values of the specified attributes names, the same way as llGetPrimitiveParams do. |
− | | list osGetCustomPrimitiveAttributes(["Magnetic"]) | + | | list osGetCustomPrimitiveAttributes(["Magnetic"]) |
| Grumly | | Grumly | ||
− | + | | No | |
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osSyncUUID(key oldUUID, key newUUID); | + | | integer osSyncUUID(key oldUUID, key newUUID); |
| Allows to change the UUID of an avatar or item(requires permission from owner). | | Allows to change the UUID of an avatar or item(requires permission from owner). | ||
− | | Suppose a terminal in the LL-grid wants to communicate with an OS-Grid terminal. It can only send messages, if the UUID's of avatars match. An OS-Grid script can get the avatar's LL-UUID by calling the dataserver script. Then it calls osSyncUUID(llDetectedKey(0), keyFromHTTPRequest); . Now the two keys are equal, and avatar-avatar communication between grids can take place! | + | | Suppose a terminal in the LL-grid wants to communicate with an OS-Grid terminal. It can only send messages, if the UUID's of avatars match. An OS-Grid script can get the avatar's LL-UUID by calling the dataserver script. Then it calls osSyncUUID(llDetectedKey(0), keyFromHTTPRequest); . Now the two keys are equal, and avatar-avatar communication between grids can take place! |
− | | Phrearch | + | | Phrearch |
− | + | | No | |
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | integer osTeleport(string RegionName, int x, int y, int z); | + | | integer osTeleport(string RegionName, int x, int y, int z); |
− | | Teleports an avatar to a custom region | + | | Teleports an avatar to a custom region as : osTeleportAgent(key agentId, string regionName, vector position, vector lookAt); |
− | | | + | | (this is implemented now - edited April 2009 by Wordfromthe Wise) |
| Phrearch | | Phrearch | ||
+ | | No | ||
|- style="font-size:8pt;border-bottom:1px solid;" valign="top" | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
− | | osSetStatus(integer status, integer value); | + | | osSetStatus(integer status, integer value); |
| Improved verion of the LSL function llSetStatus. | | Improved verion of the LSL function llSetStatus. | ||
− | | The function works basically the same way as llSetStatus, except that an extra flag is added named STATUS_PHYSICS_ROOT. When this flag is TRUE, physics would be enabled Only for the root prim in a linked set, while the other prims in the set would behave as phantom. This would be useful for bypassing the 32-prim physics limit for vehicles by using only the root prim as a collision mesh. | + | | The function works basically the same way as llSetStatus, except that an extra flag is added named STATUS_PHYSICS_ROOT. When this flag is TRUE, physics would be enabled Only for the root prim in a linked set, while the other prims in the set would behave as phantom. This would be useful for bypassing the 32-prim physics limit for vehicles by using only the root prim as a collision mesh. |
| Pesho | | Pesho | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | vector osGetBonePos(); | ||
+ | | When called from an Attachment, retrieves the position of the bone it is attached to, in Region Coordinates. | ||
+ | | When llGetPos() is called from an attachment, the vector returned is the one of the avatar center, whereas llGetLocalPos() returns the local offset from the bone it is attached to. It would be useful to know where the attachment's location really is in world space. | ||
+ | | Pesho | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osGetOSLLRelease(); | ||
+ | | When called return the actual release of OSSL running on the sim. | ||
+ | | if osGetOSSLRelease() > 1.1 {llSay(0,"good");} | ||
+ | | Sacha Magne | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | List osGetServerLib(); | ||
+ | | When called return a list of all the additional libraries loaded on the server. it will avoid any scripts using a specific library to crash in case of missing libs. | ||
+ | | List lib=osGetServerLib(); | ||
+ | | Sacha Magne | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osSetAttachmentPoint(integer attachment); | ||
+ | | When called from an Attachment sets the default attachment point to attachment value. | ||
+ | | osSetAttachmentPoint(ATTACH_HUD_BOTTOM_RIGHT); | ||
+ | | Peter | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osMySQLQuery(string query); | ||
+ | | Used to get informations out of a sql database. Works together with osMySQLConnect(), osMySQLSelectDatabase() and osMySQLClose(). | ||
+ | | osMySQLQuery("Select name FROM user LIMIT 0,1;"); | ||
+ | | Peter | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osGetGridName(); | ||
+ | | When called it return the hostname of the grid server. Useful to find out what grid you are on. | ||
+ | | string gridHostname = osGetGridHostname(); | ||
+ | | Patnad | ||
+ | | No | ||
+ | |||
+ | <!-- Already implemented. See [[osName2Key]] | ||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | key osName2Key(string avatarname); | ||
+ | | When called it return the key associated with a Avatar Name. | ||
+ | | key avKey = osName2Key("avatar name"); | ||
+ | | Patnad | ||
+ | | Yes | ||
+ | --> | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | vector osParcelCenterpoint(vector pos); | ||
+ | | When called it return the vector that represent the center point of the current parcel. Same height as the object running the script but centerpoint for x,y. | ||
+ | | vector parcel_center = osParcelCenterpoint(llGetPos()); | ||
+ | | Patnad | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | integer osSetMapDestination(integer mode, string simname, vector position, vector lookat); | ||
+ | | Sets a new "beacon" (red pole) without opening the worldmap: mode is for 1 (simname is a standard region name) or 0 (simname is a SLURL). If the code can handle standard sim names and SLURL(s) at the same time, the "mode" flag can be left behind. | ||
+ | | integer error = osSetMapDestination(TRUE, "cyberlandia", <128.0, 128.0, 0.0>, ZERO_VECTOR); | ||
+ | If error is FALSE then no errors have occurred setting up the new beacon. Errors can arise using unknown simnames/SLURL(s), out of ranges vector coords and so on (nearly the same as llSetMapDestination). | ||
+ | | Elwe Ewing | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osTeleportAgentPerm(key agentId, string regionName, vector position, vector lookAt); | ||
+ | osTeleportAgentPerm(key agentId, vector position, vector lookAt); | ||
+ | | Works similarly as the two implemented osTeleportAgent but requires (at least the first time) the PERMISSION_TELEPORT flag set (via llRequestPermissions(key id, PERMISSION_TELEPORT); which should be implemented) and can be used by everyone (or restricted to a member of the group wich the region is deed, maybe with a new "Restrict teleports" Estate flag). | ||
+ | | <source lang="lsl"> | ||
+ | // requests permission to Teleport then do it | ||
+ | |||
+ | key avie = NULL_KEY; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | llSay(0, "Touch to be teleported"); | ||
+ | } | ||
+ | |||
+ | run_time_permissions(integer vBitPermissions) | ||
+ | { | ||
+ | if(PERMISSION_TELEPORT & vBitPermissions){ | ||
+ | osTeleportAgentPerm(avie, <128.0,128.0,0.0>, | ||
+ | ZERO_VECTOR); | ||
+ | } else { | ||
+ | llSay(0, "You deny teleport permission"); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | touch_start(integer num_detected) | ||
+ | { | ||
+ | avie = llDetectedKey(0); | ||
+ | |||
+ | llRequestPermissions(avie, | ||
+ | PERMISSION_TELEPORT | | ||
+ | PERMISSION_TRIGGER_ANIMATION | | ||
+ | 0); | ||
+ | integer perm = llGetPermissions(); | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | | Elwe Ewing | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osGetSimulatorStatus(string Simulator) | ||
+ | | Extended / Enhanced version of llGetSimulatorData. | ||
+ | Purpose: When an avatar is Teleported with osTeleportAgent, there is no check to see if a given simulator is available. If it's down, Agent is Teleported to NULL resulting in Agent being fragged and viewer broken, requiring a relog. This would be especially useful for HyperGrid Teleporting. Returns: integer "0 = DOWN", "1 = UP", "2 = UNKNOWN" Security: Would require some form of Throttle to prevent recurring requests of destination Simulator. Command: osGetSimulatorStatus(string Simulator) Where Simulator = "RegionName", "IPAddress:PortNum", "HostName:PortNum" | ||
+ | | <source lang="lsl"> | ||
+ | // CHecks if simulator is online before teleporting agent -kizmut | ||
+ | |||
+ | string destination = "Wright Plaza"; | ||
+ | |||
+ | default | ||
+ | { | ||
+ | state_entry() | ||
+ | { | ||
+ | llSay(0, "Touch to be teleported to: "+destination); | ||
+ | } | ||
+ | touch_start(integer num_detected) | ||
+ | { | ||
+ | llSay(0,llDetectedName(0)+" requesting teleport to: "+destination); | ||
+ | integer sim_stat = osGetSimulatorStatus(destination); | ||
+ | if (sim_stat == 2) { | ||
+ | llSay(0, "Could not teleport to "+destination+": Region status unknown."); | ||
+ | } | ||
+ | else if (sim_stat) { | ||
+ | osTeleportAgent(llDetectedKey(0),destination,ZERO_VECTOR); | ||
+ | } | ||
+ | else { | ||
+ | llSay(0, "Could not teleport to "+destination+": Region is down"); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </source> | ||
+ | | WhiteStar Magic | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osTeleportOwner(string regionName, vector position, vector lookAt); | ||
+ | | Works similarly as osTeleportAgent but could only teleport the owner of the script itself. Would be very useful for HUD and would not require any authorization. | ||
+ | | integer error=osTeleportOwner("Snoopies",<100,25,25>,ZERO_VECTOR); | ||
+ | | Agnes Chalet | ||
+ | | Yes | ||
+ | |||
+ | <!-- | ||
+ | Already implemented. See [[osName2Key]] | ||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osName2Key(string name); | ||
+ | | A command which gives the UUID of an agent. Would work in the same way as llKey2Name, but in reverse. (Linden Lab may implement this first) | ||
+ | | osName2Key("Bob Smith"); | ||
+ | | Drava | ||
+ | | Yes | ||
+ | --> | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | integer osHyperGrid(); | ||
+ | | Detects whether or not the region the person is in is Hypergrid enabled. Could be expanded to any region in the current grid. | ||
+ | | osHyperGrid() == TRUE | ||
+ | | Drava | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | void osTurnAvatar(rotation rot); | ||
+ | | Turns an avatar about the vertical axis to rotation rot relative to the grid rotation. | ||
+ | | osTurnAvatar(newrot); // turns the avatar to the new rotation specified by newrot. | ||
+ | | Valradica | ||
+ | | No | ||
+ | |||
+ | |- style="background-color:#CCFFCC;font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osRezLink(string inventory, vector position, vector velocity, rotation rot, integer param) ; | ||
+ | | osRezLink would work just like llRezObject but instead of a separate object it would be directly part of the original object's link system. This would be very useful in HUDs and attachments. | ||
+ | | osRezLink("myobject",llGetPos()+<0.0,0.0,0.5>,ZERO_VECTOR,ZERO_ROTATION,10); | ||
+ | | Nihlaeth | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osSaveObject(); | ||
+ | | osSaveObject would be used in attachments and HUDs to save changes made while the object was worn. | ||
+ | | osSaveObject(); | ||
+ | | Nihlaeth | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osPauze(integer); | ||
+ | | Adds an timer-interruptible wait state. Where sleep holds the entire script, this would function more like a non-operation for the user-set duration. For this to be a real addition, osPauze(integer) should be interruptible by any event. | ||
+ | | osPauze(5); | ||
+ | | [[User:Fritigern]] | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osDieOnAttachment(); | ||
+ | | osDieOnAttachment()plays the same role as llDie() but on any attachment. Useful in HUDs instead of using the trick of resizing and hiding unwanted primitives, this function simply kills them. This function could be used with the already proposed functions to Rez Directly on Attachments | ||
+ | | osDieOnAttachment(); | ||
+ | | Hussein Bakri | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osGetTextureLocationTouch(integer number,list UVParameters); | ||
+ | | osGetTextureLocationTouch() plays the role of the following LSL functions: vector llDetectedTouchPos(integer number) [returns the position touched by the touch event (number) in region coordinates] in other words it tell which touch to examine like the family of llDetected* functions. The other function that is part of the parameters is vector llDetectedTouchFace(integer number) [returns the face of the prim touched by the touch event number] Another function in the UVParameters would be: vector llDetectedTouchUV(integer number)[returns the position touched by touch event number as texture coordinates in the form of <u,v,0> ] | ||
+ | vector llDetectedTouchST(integer number) return the surface coordinates of the touch event number | ||
+ | llDetectedTouchNormal and llDetectedTouchBinormal get the Normal and binormal vector positions. | ||
+ | The function will look like llGetPrimParams(). Usage: every texture becomes a user interface, useful in maps also. | ||
+ | | osGetTextureLocationTouch(integer number,list UVParameters); | ||
+ | UVParameters:: [PRIM_TOUCH_POSITION, <x,y,z>, PRIM_TOUCH_FACE,x, PRIM_TEXTURE_COORDINATES,<x,y,0>,PRIM_SURFACE_COORDINATES,<x,y,0>,PRIM_TOUCH_SURFACE_NORMAL,x,PRIM_TOUCH_SURFACE_BINORMAL,x] | ||
+ | | Hussein Bakri | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osBreakLinkOnAttachment(integer alternativeAttachmentPoint); | ||
+ | | osBreakLinkOnAttachment(integer alternativeAttachmentPoint) plays the same role as llBreakLink() but for attachments only. Not only that when it Breaks the link of a prim and it set the prim to another attachment point. Require attachment permition. Useful to break a link in HUD and create a separate HUD from the initial one. It will override the functionality of osDieAttachement() when alternativeAttachmentPoint = 0 meaning it kill the object. | ||
+ | | osBreakLinkOnAttachment(integer alternativeAttachmentPoint); | ||
+ | | Hussein Bakri | ||
+ | | No | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | string osDrawFilledEllipse(string drawList, integer width, integer height) | ||
+ | | osDrawFilledEllipse same like osDrawEllipse but filled | ||
+ | | osDrawFilledEllipse(string drawList, integer width, integer height) | ||
+ | | djphil | ||
+ | | Yes | ||
+ | |||
+ | |- style="font-size:8pt;border-bottom:1px solid;" valign="top" | ||
+ | | osGetProfileImage, osGetProfileAbout, osGetProfilePartner, osGetProfileInterest, osGetProfile... | ||
+ | | for ProfilBoard, VisitorBoard, InfoBoard etc. | ||
+ | | osGetProfileImage, osGetProfileAbout, osGetProfilePartner, osGetProfileInterest, osGetProfile... | ||
+ | | Manfred Aabye | ||
+ | | Yes<br>(Partially) | ||
|} | |} | ||
− | [[ | + | <br> |
− | [[Category: | + | |
+ | = See Also = | ||
+ | * [[LSL Status|LSL/OSSL Status Page]] | ||
+ | * OSSL | ||
+ | ** [[OSSL Status/Types|OSSL Types Status Page]] | ||
+ | ** [[OSSL Status/Events|OSSL Events Status Page]] | ||
+ | ** [[OSSL Proposals|OSSL Proposed Functions]] | ||
+ | ** [[OSSL Implemented|OSSL Implemented Functions]] | ||
+ | ** [[OSSL Standards]] | ||
+ | |||
+ | [[Category:OSSL]] | ||
[[Category:Users]] | [[Category:Users]] | ||
+ | [[Category:Support]] | ||
+ | [[Category:Getting Started]] | ||
+ | [[Category:Development]] | ||
+ | [[Category:Todo]] |
Latest revision as of 09:38, 28 November 2020
This article or section is a Proposal It does not represent the current state of OpenSim, but is an idea for future work in OpenSim. Please feel free to update this page as part of the proposal discussion. |
This article or section contains incomplete information. Please help us by completing the content on this page. |
[edit] What is OSSL?
[edit] Introduction
This is a page dedicated to OpenSim's very own home brew custom scripting language Known as "Open Sim Scripting Language"
Please see OSSL Standards for proposed naming schema
- Please post your osFunction along with a brief description of what it would be for, or do and an example of it.
- Make sure it begins with os NOT ll.
- And remember, almost anything within reason can be posted here as an idea, who knows, maybe a variation of your request can be possible.
- If a function could implemented in standard LSL, there is no reason to make an OS function. LSL code and function code executes at the same speed in OpenSimulator.
- Post your proposal to the opensim-dev mailing list so that it can be discussed to see if there is any interest. Please indicate if you are willing to implement it yourself - such proposals have a much better chance of succeeding!
[edit] OSSL Proposal Table
osFunction | Description | Example Usage | Signed | Implemented |
key osSetHTTPURL(string url); | Sets the prim to a private HTTP:// url for use by this script. The http_request() event would be
triggered & the prim would serve as a "prim-server" for the private HTTP:// url. Also Returns a key that is the handle used for identifying the result in the http_request event. |
string private_url = "http://thisprivatedomain.com/index.php" default { state_entry() { osSetHTTPURL(private_url); } http_request(key request_id, string method, string body) { if(method == "POST") { osHTTPResponse(request_id,200,"Your $_POST was successful"); } else if(method == "GET") { osHTTPResponse(request_id,200,"Wait for the server to handle your request"); } } |
Apollo Juez | No |
list osGetRegionAgentKeys(); | C# Code:
public LSL_List osGetRegionAgentKeys() { CheckThreatLevel(ThreatLevel.None, "osGetRegionAgentKeys"); LSL_List result = new LSL_List(); foreach (ScenePresence avatar in World.GetAvatars()) { result.Add(avatar.UUID); } return result; } Returns a list of keys for every agent in the region |
list keys=osGetRegionAgentKeys(); integer i; integer l=llGetListLength(keys); string names; for(i=0;i<l;i++) { key id=llList2Key(keys,i); string add=llKey2Name(id); integer dist=llVecDist(llGetPos(),llList2Vector(llGetObjectDetails(id,[OBJECT_POS]),0))); add+="["+(string)dist+"]\n"; names+=add; } llSetText(names,<1,1,1>,1.0); |
Joshua Driver | No |
[NEW] various os functions including osDerezObject(), osMessageAgentAttachment(), ... | see User:Athlon_Maurer for full source code | tested on local opensimulator 0.6.9 (some of them doesnt seem to work on 0.7.x) | Athlon Maurer | No |
string osBin(string char); | To convert a char into its binary value. Will only convert 1 char at a time. | string bin_a = osBin("A"); // bin_a = "01000001"; | Athlon Maurer (please send me a notecard into secondlife, if that are too much ideas xD, this hint can be deleted by an opensimulator admin, if neccesary xD) | No |
string osHex(integer number); | To convert a number into its hexadecimal value. | string str_ff = osHex(255); // str_ff = "FF"; | Athlon Maurer | No |
integer osAsc(string char); | To convert a char into its ascii index. Will only convert 1 char at a time. | integer asc_a = osAsc("A"); // asc_a = 65; | Athlon Maurer | No |
void osScanRegionRemove(); | Remove an osScanRegionRepeat(). [ nearly the same as llSensorRemove() ] | osScanRegionRemove(); | Athlon Maurer | No |
void osScanRegion(string name, key id, integer type); | Scan the whole region where the script task object is in regardless where it is positioned. Triggers sensor() or no_sensor(). | osScanRegion("", "", AGENT); | Athlon Maurer | |
void osScanRegionRepeat(string name, key id, integer type, float rate); | Scan the whole region where the script task object is in regardless where it is positioned with rate. Triggers sensor() or no_sensor(). | osScanRegionRepeat("", "", AGENT, 15.0); | Athlon Maurer | No |
key osGetRegionMapTexture(string RegionName) | return the map texture uuid for the region named by RegionName. | llSetTexture(osGetRegionMapTexture("OpenSimulator Test"), ALL_SIDES);
<math> create a php file which is public <?php </p>// mapquery.php by Athlon Maurer (SL, OL, OS) // // hello, ive just started to learn php/mysql and this is one of my first // scripts for opensim. this script returns the texture uuid for a given // region by calling: mapquery.php?region=REGIONNAME // if a region has been found, it returns that regions map texture uuid, // otherwise it returns a null key uuid // mysql connection info is here, please make this more safe // region name (do not change this) $region = htmlspecialchars($_GET['region']); // default uuid (do not change this) $uuid = '00000000-0000-0000-0000-000000000000'; // your mysql host name (change this) $dbhost = 'localhost'; // your mysql user name (change this) $dbuser = 'root'; // your mysql user password (change this) $dbpass = ; // your mysql opensim database (change this) $dbname = 'opensim'; // try to connect if ($conn = mysql_connect($dbhost, $dbuser, $dbpass)) { // try to select if ($select = mysql_select_db($dbname, $conn)) { $sql = 'SELECT regionName, regionMapTexture FROM regions'; $result = mysql_query($sql); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { if ($row['regionName'] == $region) { $uuid = $row['regionMapTexture']; } } // free result mysql_free_result($result); } // close connection mysql_close($conn); } // output echo $uuid; ?> then llHTTPRequest(</math> |
Athlon Maurer (This function is available as of November 12, 2009) | Yes |
list osGetLinkPrimitiveParams(integer link, list params); | Function llSetLinkPrimitiveParams() does exist, but no chance to get params from a prim in a linkset, like llGetPrimitiveParams() and llSetPrimitiveParams(). | list linkparams = osGetLinkPrimitiveParams([PRIM_TYPE, PRIM_TEXTURE, ...]); | Athlon Maurer (This function is available as of August 09, 2009) | Yes |
void osDerezObject(key object) | Deletes an InWorld-Object specified by object as uuid. Only successful if the object the script is attached to and the object which should be derezzed is owned by the same owner :). Useful if the object to be deleted should be unscripted. | osDerezObject("key_of_object"); | Athlon Maurer | No |
int osRestartRegion() | Restarts the region the script is currently in. The script this is run in has to be owned by the master avatar for that region. Returns 1 if the region is restarting, 0 on failure. | osRestartRegion(); | gryc (Implemented by AFrisby) | Yes |
int osWebTexture() | Sets the texture from a web-url | osWebTexture(string url,integer maptype); | AFrisby? | No |
osGroupAdd(key, string Role) | Adds user to a group with given role, default role Everyone. Returns 1 if successful 0 if fail. | osGroupAdd(87f6e6a0-d884-11dc-95ff-0800200c9a66, "Officer") | Nitrus Nori | No |
int osShutdownRegion() | Shuts down the region the script is currently in. The script this is run in has to be owned by the master avatar for that region. Returns 1 if the region is going down, 0 on failure. | osShutdownRegion(); | gryc | No |
void osAttachmentSay(integer channel, string msg) | Provide a secure, low lag method of communicating between attachments over the chat channels by only sending messages to objects attached to the same avatar. Would fail (or not be heard) if in a non-attached object. | osAttachmentSay(-20, "detatch"); | Del M | No |
void osMessageSecure(string message_key, string str, integer num, key id); secure_message(string message_key, string str, integer num, key id); |
Provide a method of sending secure, salt encripted messages sim wide. Messages would only be able to be received by scripts with the matching key in the secure_message method. | osMessageSecure("myPassPhrase", "Hello World", 0, NULL_KEY); | Del M | No |
void osSetText( vector color, string text [,vector color, string text]); | Allow setting of multiple colors on the prim text | osSetText(<1,0,0>,"Red", <0,1,0>, "\nGreen", <0,0,1>, "\nBlue"); | Del M | No |
osSensor | Gets ALL the objects in the specified range not just the first 16 | (same as standard) | Sal | No |
list lst=osDetectObjectsInSim(key id) | given an Agent Key, provide a list of ALL object owned by that agent | osDetectObjectsInSim(key id) returning a strided list of [ name, <pos> ] | Sal | No |
integer=osDialog([ title, label1, type1, len1, label2, type2, len2].... | given title and a listing of fields, builds up a real form where to put structured checked data | will return a [ value1, value2, valuen ] corresponding to fields read. Type might be something like (string, text (multiline), integer, float, currency(decimals), options(combobox) | Sal | No |
key id=osMakeTextureText(string name,integer width, integer height,[posx1,posy1,font1,color1,size1,text1,posx2,posy2,font2,color2,size2,text2....]) | allow for producing a texture on the fly with desired Font content from a selected font selection. Width, Height in pixels 1024x512 to control how big will be the texture | will generate a texture with defined text. (Allow some support for at least ISO-8859-1) texture will be created in the object inventory. posx, posy in the range 0-1 to be pixel independent | Sal | No |
osMakeNotecard(string name, [ line1, line2, line3, ...]) | allow creation of new notecards in current object repository | generate a new asset id useful for storing modified configuration | Sal | Yes |
integer handler=osReadNotecardKey(string notecard, string key) | allows reading notecards (through dataserver) in format key=value in convenient and efficient way | ... | Sal | No |
osWriteNotecardKey(string notecard, string key,string value) | allows WRITING notecards in format key=value in convenient and efficient way. Might be optimized having a fixed record length "file" so to avoid rewriting of the entire notecard | ... | Sal | No |
integer handle=osXMLParser(string xml) | will activate a listener xmlparser(integer handler,string parent, string field, string value) | to easily parse xml without writing php external code | Sal | No |
integer osReturnObjects(key owner, integer type); | Provide a scriptable method of returning objects from a sim. type would be OBJECT_SCRIPTED, OBJECT_PASSIVE or OBJECT_ALL. Would return a binary Success/Fail, and work inline with land permissions for the script owner. | osReturnObjects( target, OBJECT_ALL); | Del M | No |
integer osReturnItem(key item); | Provide a scriptable method of returning individual objects from a sim. Would return a binary Success/Fail, and work inline with land permissions for the script owner. | osReturnItem(uuid); | Del M | No |
osSetTimerEvent(integer timer, float rate); (event) timer(integer timer_num) |
Support for multiple timers in a script. | osSetTimerEvent(2, 0.5); | Del M | No |
osTimerOnce(integer timer, float rate); | Allow for a one shot timer event, rather than the normal repeating heartbeat type | osTimerOnce(2, 10); | Del M | No |
integer osVerifyScripts(); | Check to see if all scripts in an object are created by the owner of the script calling the function. Return TRUE if they are, FALSE otherwise, to prevent insertion of alien scripts into an object | if (!osVerifyScripts()) { llDie(); } | Del M | No |
void osStopOtherAnimations(list animation_exceptions); | Provide a method of stopping all animations on an avatar, except those defined in the list | osStopOtherAnimations(["my_sitting_anim"]); | Del M | No |
void osPutScriptInLinkedSet(string name,integer linknum, integer starting_parm, integer running) | Use this to propagate one script to ALL or part of linked set. | Useful to have all objects in a linked set sharing a common behaviour | Sal | No |
osRezObject(string name, string description, integer permissionmask, list setPrimitiveObjectLikeList) will trigger the object_rez object as usual | similar to llRezObject, but without the need of having a prim inside the inventory (which produced a lot of problems in deploying and in sl). Newly created object will have the same owner of current object where script is running. | In case list is empty or position not specified, suitable defaults should apply like pos being 1 m higher in the z axis | Sal | No |
string osGetOwnerName(); | Provide a method of getting the owner name without having to use llKey2Name | myName = osGetOwnerName(); | Del M | No |
integer osXMPPOpen(string server, string username, string password, string resource); | Open an XMPP session to a jabber or other XMPP server, returning a handle to be able to manipulate the connection. Incoming messages to be parsed through a xmpp_message(integer handle, string sender, string service, string message) event. Accounts would have to be set up manually by the scripter, or by some other method, to prevent scripted spamming of a server, and to allow users to set up gateways and other services if needed. | handle = osXMPPOpen("jabber.org", "MyObject", "MyPassword", "OpenSim"); | Del M | No |
list osXMPPGetRosta(integer handle); | Get the rosta from the XMPP server, list in the strided form of [username, presence, resource]; | list presence = osXMPPGetRosta(handle); | Del M | No |
list osXMPPGetServices(integer handle); | Get a list of available services from the XMPP Server. | list services = osXMPPGetServices(handle); | Del M | No |
integer osXMPPAdd(string username, string service) | Add a username to the account rosta. Return boolean success or fail | if (osXMPPAdd("Test User", "Yahoo")) { ... } | Del M | No |
integer oxXMPPDelete(string username) | Remove a username from the account rosta. Return boolean success or fail | if (osXMPPDelete("Test User")) { ... } | Del M | No |
integer osXMPPGetStatus(string username); | Poll the server for the status of a specific username on the rosta - returns would be OFFLINE, BUSY, AWAY and ONLINE | if (osXMPPGetStatus("Test User") & ONLINE) { ... } | Del M | No |
integer osXMPPSendMessage(integer handle, string message, string target); | Send a message via the open XMPP channel, to the specified target. Return boolean success values | if (osXMPPSendMessage(handle, "Hello World", osGetOwnerName()) { llOwnerSay("Successfully sent message"); | Del M | No |
void osXMPPClose(integer handle); | Close the XMPP session | osXMPPClose(); | Del M | No |
void osRezObjectKey(key object,vector pos,vector vel,rotation rot, int param); | Basically llGodLikeRezObject[1] with the features of llRezObject[2] but for everyone to use. Calls object_rez. | osRezObjectKey(object_key,llGetPos(),ZERO_VECTOR,llGetRot(),0); | Tdub | No |
osRezFromURL(string url, vector pos, vector vel, rotation rot, integer param) - calls on_rez | Fetch a fragment of xml from a web server and rez its contents in-world as in 'load-xml'. Off or intergrid object repositories, such as objects stored in SVN via websvn, CMS, etc. | osRezFromURL("http://my.objectstore.com/myawesomeprims.xml", <1, 1, 1>, <0, 0, 0>, <0, 0, 0>, 0) | Jimbo2120 | No |
list osRunCustom(string function, list params) | Allow scripts to call external custom routines that are grid-specific without modifying the set of LSL and OSL functions. | list results = osRunCustom("function1", [...]) | Ezekiel | No |
osSetScriptServer() | Create a 'Server' prim that allows for extended scripting capabilities: more memory, higher bandwidth when communicating with external servers, probably some database connectivity, no artificial delays, can receive IMs, etc. Could be limited to one server per prim / parcel or per avatar, could be forced to remain in a fixed position. A server is important for residents that want to set up a virtual business. | osSetScriptServer() | Ezekiel | No |
integer osRemoteLoadScript(string url, string target) | Load a source file in txt format from "URL" and compile it into script "target" in the inventory of the same prim. Requires permission of the object owner (RequestPermission). Returns boolean success value. Replaces an existing script with same name. This function would allow updates to scripted solutions that operate in any grid and sim worldwide, allowing the creator of the solution to distribute code fixes and implement new functions. Since the source code is distributed openly, it can be copied and modified by anyone. A function that would allow for secure code distribution, protecting copyrights and certificates, would also be very interesting but should be far more difficult to implement. | integer updatestatus = osRemoteLoadScript("http://www.xyz.com/updates/script1013.txt", "betterscript" ) | Ezekiel | No |
integer osSetCustomPrimitiveAttributes(list params) | Set some custom persistent primitive attributes, the same way as llSetPrimitiveParams do. The attribute name has to be specified as a string, then the attribute type using a lSL constant. In the example, we set a "magnet" custom attribute as -0.5, supposing a customized physic engine handles this attribute to provide prim attraction. | integer osSetCustomPrimitiveAttributes(["magnet", TYPE_FLOAT, -0.5]) | Grumly | No |
list osGetCustomPrimitiveAttributes(list paramNames) | Return a list values of the specified attributes names, the same way as llGetPrimitiveParams do. | list osGetCustomPrimitiveAttributes(["Magnetic"]) | Grumly | No |
integer osSyncUUID(key oldUUID, key newUUID); | Allows to change the UUID of an avatar or item(requires permission from owner). | Suppose a terminal in the LL-grid wants to communicate with an OS-Grid terminal. It can only send messages, if the UUID's of avatars match. An OS-Grid script can get the avatar's LL-UUID by calling the dataserver script. Then it calls osSyncUUID(llDetectedKey(0), keyFromHTTPRequest); . Now the two keys are equal, and avatar-avatar communication between grids can take place! | Phrearch | No |
integer osTeleport(string RegionName, int x, int y, int z); | Teleports an avatar to a custom region as : osTeleportAgent(key agentId, string regionName, vector position, vector lookAt); | (this is implemented now - edited April 2009 by Wordfromthe Wise) | Phrearch | No |
osSetStatus(integer status, integer value); | Improved verion of the LSL function llSetStatus. | The function works basically the same way as llSetStatus, except that an extra flag is added named STATUS_PHYSICS_ROOT. When this flag is TRUE, physics would be enabled Only for the root prim in a linked set, while the other prims in the set would behave as phantom. This would be useful for bypassing the 32-prim physics limit for vehicles by using only the root prim as a collision mesh. | Pesho | No |
vector osGetBonePos(); | When called from an Attachment, retrieves the position of the bone it is attached to, in Region Coordinates. | When llGetPos() is called from an attachment, the vector returned is the one of the avatar center, whereas llGetLocalPos() returns the local offset from the bone it is attached to. It would be useful to know where the attachment's location really is in world space. | Pesho | No |
string osGetOSLLRelease(); | When called return the actual release of OSSL running on the sim. | if osGetOSSLRelease() > 1.1 {llSay(0,"good");} | Sacha Magne | No |
List osGetServerLib(); | When called return a list of all the additional libraries loaded on the server. it will avoid any scripts using a specific library to crash in case of missing libs. | List lib=osGetServerLib(); | Sacha Magne | No |
osSetAttachmentPoint(integer attachment); | When called from an Attachment sets the default attachment point to attachment value. | osSetAttachmentPoint(ATTACH_HUD_BOTTOM_RIGHT); | Peter | No |
string osMySQLQuery(string query); | Used to get informations out of a sql database. Works together with osMySQLConnect(), osMySQLSelectDatabase() and osMySQLClose(). | osMySQLQuery("Select name FROM user LIMIT 0,1;"); | Peter | No |
string osGetGridName(); | When called it return the hostname of the grid server. Useful to find out what grid you are on. | string gridHostname = osGetGridHostname(); | Patnad | No
|
vector osParcelCenterpoint(vector pos); | When called it return the vector that represent the center point of the current parcel. Same height as the object running the script but centerpoint for x,y. | vector parcel_center = osParcelCenterpoint(llGetPos()); | Patnad | No |
integer osSetMapDestination(integer mode, string simname, vector position, vector lookat); | Sets a new "beacon" (red pole) without opening the worldmap: mode is for 1 (simname is a standard region name) or 0 (simname is a SLURL). If the code can handle standard sim names and SLURL(s) at the same time, the "mode" flag can be left behind. | integer error = osSetMapDestination(TRUE, "cyberlandia", <128.0, 128.0, 0.0>, ZERO_VECTOR);
If error is FALSE then no errors have occurred setting up the new beacon. Errors can arise using unknown simnames/SLURL(s), out of ranges vector coords and so on (nearly the same as llSetMapDestination). |
Elwe Ewing | No |
osTeleportAgentPerm(key agentId, string regionName, vector position, vector lookAt);
osTeleportAgentPerm(key agentId, vector position, vector lookAt); |
Works similarly as the two implemented osTeleportAgent but requires (at least the first time) the PERMISSION_TELEPORT flag set (via llRequestPermissions(key id, PERMISSION_TELEPORT); which should be implemented) and can be used by everyone (or restricted to a member of the group wich the region is deed, maybe with a new "Restrict teleports" Estate flag). | // requests permission to Teleport then do it key avie = NULL_KEY; default { state_entry() { llSay(0, "Touch to be teleported"); } run_time_permissions(integer vBitPermissions) { if(PERMISSION_TELEPORT & vBitPermissions){ osTeleportAgentPerm(avie, <128.0,128.0,0.0>, ZERO_VECTOR); } else { llSay(0, "You deny teleport permission"); } } touch_start(integer num_detected) { avie = llDetectedKey(0); llRequestPermissions(avie, PERMISSION_TELEPORT | PERMISSION_TRIGGER_ANIMATION | 0); integer perm = llGetPermissions(); } } |
Elwe Ewing | No |
osGetSimulatorStatus(string Simulator) | Extended / Enhanced version of llGetSimulatorData.
Purpose: When an avatar is Teleported with osTeleportAgent, there is no check to see if a given simulator is available. If it's down, Agent is Teleported to NULL resulting in Agent being fragged and viewer broken, requiring a relog. This would be especially useful for HyperGrid Teleporting. Returns: integer "0 = DOWN", "1 = UP", "2 = UNKNOWN" Security: Would require some form of Throttle to prevent recurring requests of destination Simulator. Command: osGetSimulatorStatus(string Simulator) Where Simulator = "RegionName", "IPAddress:PortNum", "HostName:PortNum" |
// CHecks if simulator is online before teleporting agent -kizmut string destination = "Wright Plaza"; default { state_entry() { llSay(0, "Touch to be teleported to: "+destination); } touch_start(integer num_detected) { llSay(0,llDetectedName(0)+" requesting teleport to: "+destination); integer sim_stat = osGetSimulatorStatus(destination); if (sim_stat == 2) { llSay(0, "Could not teleport to "+destination+": Region status unknown."); } else if (sim_stat) { osTeleportAgent(llDetectedKey(0),destination,ZERO_VECTOR); } else { llSay(0, "Could not teleport to "+destination+": Region is down"); } } } |
WhiteStar Magic | No |
osTeleportOwner(string regionName, vector position, vector lookAt); | Works similarly as osTeleportAgent but could only teleport the owner of the script itself. Would be very useful for HUD and would not require any authorization. | integer error=osTeleportOwner("Snoopies",<100,25,25>,ZERO_VECTOR); | Agnes Chalet | Yes
|
integer osHyperGrid(); | Detects whether or not the region the person is in is Hypergrid enabled. Could be expanded to any region in the current grid. | osHyperGrid() == TRUE | Drava | No |
void osTurnAvatar(rotation rot); | Turns an avatar about the vertical axis to rotation rot relative to the grid rotation. | osTurnAvatar(newrot); // turns the avatar to the new rotation specified by newrot. | Valradica | No |
osRezLink(string inventory, vector position, vector velocity, rotation rot, integer param) ; | osRezLink would work just like llRezObject but instead of a separate object it would be directly part of the original object's link system. This would be very useful in HUDs and attachments. | osRezLink("myobject",llGetPos()+<0.0,0.0,0.5>,ZERO_VECTOR,ZERO_ROTATION,10); | Nihlaeth | No |
osSaveObject(); | osSaveObject would be used in attachments and HUDs to save changes made while the object was worn. | osSaveObject(); | Nihlaeth | No |
osPauze(integer); | Adds an timer-interruptible wait state. Where sleep holds the entire script, this would function more like a non-operation for the user-set duration. For this to be a real addition, osPauze(integer) should be interruptible by any event. | osPauze(5); | User:Fritigern | No |
osDieOnAttachment(); | osDieOnAttachment()plays the same role as llDie() but on any attachment. Useful in HUDs instead of using the trick of resizing and hiding unwanted primitives, this function simply kills them. This function could be used with the already proposed functions to Rez Directly on Attachments | osDieOnAttachment(); | Hussein Bakri | No |
osGetTextureLocationTouch(integer number,list UVParameters); | osGetTextureLocationTouch() plays the role of the following LSL functions: vector llDetectedTouchPos(integer number) [returns the position touched by the touch event (number) in region coordinates] in other words it tell which touch to examine like the family of llDetected* functions. The other function that is part of the parameters is vector llDetectedTouchFace(integer number) [returns the face of the prim touched by the touch event number] Another function in the UVParameters would be: vector llDetectedTouchUV(integer number)[returns the position touched by touch event number as texture coordinates in the form of ]
vector llDetectedTouchST(integer number) return the surface coordinates of the touch event number llDetectedTouchNormal and llDetectedTouchBinormal get the Normal and binormal vector positions. The function will look like llGetPrimParams(). Usage: every texture becomes a user interface, useful in maps also. |
osGetTextureLocationTouch(integer number,list UVParameters);
UVParameters:: [PRIM_TOUCH_POSITION, <x,y,z>, PRIM_TOUCH_FACE,x, PRIM_TEXTURE_COORDINATES,<x,y,0>,PRIM_SURFACE_COORDINATES,<x,y,0>,PRIM_TOUCH_SURFACE_NORMAL,x,PRIM_TOUCH_SURFACE_BINORMAL,x] |
Hussein Bakri | No |
osBreakLinkOnAttachment(integer alternativeAttachmentPoint); | osBreakLinkOnAttachment(integer alternativeAttachmentPoint) plays the same role as llBreakLink() but for attachments only. Not only that when it Breaks the link of a prim and it set the prim to another attachment point. Require attachment permition. Useful to break a link in HUD and create a separate HUD from the initial one. It will override the functionality of osDieAttachement() when alternativeAttachmentPoint = 0 meaning it kill the object. | osBreakLinkOnAttachment(integer alternativeAttachmentPoint); | Hussein Bakri | No |
string osDrawFilledEllipse(string drawList, integer width, integer height) | osDrawFilledEllipse same like osDrawEllipse but filled | osDrawFilledEllipse(string drawList, integer width, integer height) | djphil | Yes |
osGetProfileImage, osGetProfileAbout, osGetProfilePartner, osGetProfileInterest, osGetProfile... | for ProfilBoard, VisitorBoard, InfoBoard etc. | osGetProfileImage, osGetProfileAbout, osGetProfilePartner, osGetProfileInterest, osGetProfile... | Manfred Aabye | Yes (Partially) |
[edit] See Also
- LSL/OSSL Status Page
- OSSL
- OSSL Types Status Page
- OSSL Events Status Page
- OSSL Proposed Functions
- OSSL Implemented Functions
- OSSL Standards