OSSL Script Library

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (How to add your script to the Library)
(The Library)
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Quicklinks}}
+
{{Quicklinks}} {{information}}  
{{information}}
+
 
=OSSL Script Library=
+
= OSSL Script Library =
  
 
=== Rules for posting: ===
 
=== Rules for posting: ===
#Your script must depend on at least one [[OSSL Functions|OSSL function]], or on other OpenSim-specific functions.
 
#Test your script in-world, and make sure it works, so that other people can use it.
 
#No copies of scripts which already exist on this wiki, unless it exists in your own user page.
 
#Please, no short scripts, and definitely no one-liners!
 
  
=== How to add your script to the Library ===
+
# Your script '''MUST''' depend on at least one [[OSSL Functions|OSSL function]], or on other OpenSim-specific functions.
 +
# Test your script in-world, and make sure it works, so that other people can use it.
 +
# No copies of scripts which already exist on this wiki, unless it exists in your own user page.
 +
# Please, no short scripts (5 lines or less), and definitely no one-liners!
 +
# Make sure to read "[[OSSL Script Library#Adding your script to the Library|Adding your script to the Library]]" for important info!
 +
 
 +
== The Library ==
 +
 
 +
{| class="sortable" border="2" cellspacing="0" cellpadding="3"
 +
|-
 +
| Script Name
 +
| Posted by:
 +
| Description
 +
|-
 +
| [[OSSL Script Library/ModSendCommand|ModSendCommand]]
 +
| [[User:Justincc|Justincc]]
 +
| Demonstrates the use of an in-world script to communicate with a specific OpenSimulator module.
 +
|-
 +
| [[OSSL Script Library/ModInvoke|ModInvoke]]
 +
| [[User:Cmickeyb|Cmickeyb]]
 +
| Demonstrates the use of an in-world script to invoke functions defined in an OpenSimulator module.
 +
|-
 +
| [[OSSL Script Library/JsonStore|JsonStore]]
 +
| [[User:Cmickeyb|Cmickeyb]]
 +
| Demonstrates the use of the JsonStore module for managing structured data in an LSL script.
 +
|-
 +
| [[OSSL Script Library/OpenSim Radio|OpenSimulator Radio]]
 +
| [[User:Fritigern|Fritigern]]
 +
| A dialog controlled radio for OpenSimulator. Uses OSSL functions to read stations from a notecard,
 +
|-
 +
| [[OSSL Script Library/Persist NPC|Persist NPC]]
 +
| [[User:Marcus Llewellyn|Marcus Llewellyn]]
 +
| A short example of a method for persisting an NPC across simulator restarts.
 +
|-
 +
| [[OSSL Script Library/Simple Notecard Reader|Simple Notecard Reader]]
 +
| [[User:Fritigern|Fritigern]]
 +
| Reading notecards in OSSL is easy. This script is more of an example than a fully useful script, but it does work. Use it in your own scripts!
 +
|-
 +
| [[OSSL Script Library/OSSL Poseball|OSSL Poseball]]
 +
| [[User:Fritigern|Fritigern]]
 +
| Poseball script, written from scratch, using [[osAvatarPlayAnimation]]() and [[osAvatarStopAnimation]]()
 +
|-
 +
| [[OSSL Script Library/Teleport Map|Teleport Map]]
 +
| [[User:Fritigern|Fritigern]]
 +
| A region map that will instantly teleport the user to the corresponding place that they click on. Supports varregions!
 +
|}
 +
 
 +
== Adding your script to the Library ==
  
 
* First select, right-click, and copy the following code:
 
* First select, right-click, and copy the following code:
<pre><nowiki>
+
<pre> |-
|-
+
 
  | [[OSSL Script Library/SCRIPT_NAME|SCRIPT_NAME]]
 
  | [[OSSL Script Library/SCRIPT_NAME|SCRIPT_NAME]]
 
  | [[User:YOURNAME|YOURNAME]]
 
  | [[User:YOURNAME|YOURNAME]]
 
  | DESCRIPTION
 
  | DESCRIPTION
</nowiki></pre>
+
</pre>  
* Edit the Library section, and paste the above code to the end of the list,, but just above "'''|}'''"
+
* Edit the Library section, and paste the above code to the end of the list,, but just above "'''|}'''"  
* Replace "'''SCRIPT_NAME'''" with the name of your script. Make sure to change both instances.
+
* Replace "'''SCRIPT_NAME'''" with the name of your script. Make sure to change both instances.  
* Replace "'''YOURNAME'''" with your wiki username. Make sure to change both instances.
+
* Replace "'''YOURNAME'''" with your wiki username. Make sure to change both instances.  
* Replace the word '''DESCRIPTION''' with a short desription of what your script does.
+
* Replace the word '''DESCRIPTION''' with a short desription of what your script does.  
* Click the "'''Show preview'''" button to check and see if everything works as it's supposed to.
+
* Click the "'''Show preview'''" button to check and see if everything works as it's supposed to.  
* If something looks wrong, change whatever is not right, and click "'''Show preview'''" again.
+
* If something looks wrong, change whatever is not right, and click "'''Show preview'''" again.  
* If everything looks okay, click the "'''Save page'''" button.
+
* If everything looks okay, click the "'''Save page'''" button.  
* In the table, look up the name of your script (it should be red) and click it. This will create a new page.
+
* In the table, look up the name of your script (it should be red) and click it. This will create a new page.  
* In the new page, Type '''<nowiki><source lang="lsl"></nowiki>'''. This will make the wiki recognise your script as LSL, and apply the correct source highlighting.
+
* In the new page, Type '''<nowiki><source lang="lsl"></nowiki>'''. This will make the wiki recognise your script as LSL, and apply the correct source highlighting.  
* Paste your script into the page.
+
* Paste your script into the page.  
* Immediately below your script, type '''<nowiki></source></nowiki>'''. This will tell the wiki where your script ends.
+
* Immediately below your script, type '''<nowiki></source></nowiki>'''. This will tell the wiki where your script ends.  
* Optionally add an introductory text, though you are encouraged to place usage instructions for your script in your script's comments.
+
* Optionally add an introductory text, though you are encouraged to place usage instructions for your script in your script's comments.  
* Preview the page by clicking the "'''Show preview'''" button.
+
* Preview the page by clicking the "'''Show preview'''" button.  
* Make changes where nescessary and click the "'''Show preview'''" button again.
+
* Make changes where nescessary and click the "'''Show preview'''" button again.  
 
* Save your page by pressing the "'''Save page'''" button, and presto!
 
* Save your page by pressing the "'''Save page'''" button, and presto!
  
== The Library ==
+
[[Category:Scripts]]
{|class="sortable" border="2" cellspacing="0" valign="top" cellpadding="3" style="margin:1em 1em 1em 1em; border:solid 1px #FFFFFF; border-collapse:collapse; font-size:90%; empty-cells:show;
+
[[Category:OSSL]]
| Script Name
+
| Posted by:
+
| Description
+
|-
+
| [[ModSendCommand]]
+
| [[User:Justincc|Justincc]]
+
| Demonstrates the use of an in-world script to communicate with a specific OpenSim module.
+
|-
+
|}
+

Latest revision as of 20:49, 20 October 2015

The second OpenSimulator Community Conference will take place over the weekend of November 8th/9th 2014
See the conference website for more details.

Contents

[edit] OSSL Script Library

[edit] Rules for posting:

  1. Your script MUST depend on at least one OSSL function, or on other OpenSim-specific functions.
  2. Test your script in-world, and make sure it works, so that other people can use it.
  3. No copies of scripts which already exist on this wiki, unless it exists in your own user page.
  4. Please, no short scripts (5 lines or less), and definitely no one-liners!
  5. Make sure to read "Adding your script to the Library" for important info!

[edit] The Library

Script Name Posted by: Description
ModSendCommand Justincc Demonstrates the use of an in-world script to communicate with a specific OpenSimulator module.
ModInvoke Cmickeyb Demonstrates the use of an in-world script to invoke functions defined in an OpenSimulator module.
JsonStore Cmickeyb Demonstrates the use of the JsonStore module for managing structured data in an LSL script.
OpenSimulator Radio Fritigern A dialog controlled radio for OpenSimulator. Uses OSSL functions to read stations from a notecard,
Persist NPC Marcus Llewellyn A short example of a method for persisting an NPC across simulator restarts.
Simple Notecard Reader Fritigern Reading notecards in OSSL is easy. This script is more of an example than a fully useful script, but it does work. Use it in your own scripts!
OSSL Poseball Fritigern Poseball script, written from scratch, using osAvatarPlayAnimation() and osAvatarStopAnimation()
Teleport Map Fritigern A region map that will instantly teleport the user to the corresponding place that they click on. Supports varregions!

[edit] Adding your script to the Library

  • First select, right-click, and copy the following code:
 |-
 | [[OSSL Script Library/SCRIPT_NAME|SCRIPT_NAME]]
 | [[User:YOURNAME|YOURNAME]]
 | DESCRIPTION
  • Edit the Library section, and paste the above code to the end of the list,, but just above "|}"
  • Replace "SCRIPT_NAME" with the name of your script. Make sure to change both instances.
  • Replace "YOURNAME" with your wiki username. Make sure to change both instances.
  • Replace the word DESCRIPTION with a short desription of what your script does.
  • Click the "Show preview" button to check and see if everything works as it's supposed to.
  • If something looks wrong, change whatever is not right, and click "Show preview" again.
  • If everything looks okay, click the "Save page" button.
  • In the table, look up the name of your script (it should be red) and click it. This will create a new page.
  • In the new page, Type <source lang="lsl">. This will make the wiki recognise your script as LSL, and apply the correct source highlighting.
  • Paste your script into the page.
  • Immediately below your script, type </source>. This will tell the wiki where your script ends.
  • Optionally add an introductory text, though you are encouraged to place usage instructions for your script in your script's comments.
  • Preview the page by clicking the "Show preview" button.
  • Make changes where nescessary and click the "Show preview" button again.
  • Save your page by pressing the "Save page" button, and presto!
Personal tools
General
About This Wiki