<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Casiasfalta</id>
		<title>OpenSimulator - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Casiasfalta"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Special:Contributions/Casiasfalta"/>
		<updated>2026-05-11T06:46:15Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/wiki/OSSLNPC</id>
		<title>OSSLNPC</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/OSSLNPC"/>
				<updated>2011-08-19T20:54:41Z</updated>
		
		<summary type="html">&lt;p&gt;Casiasfalta: /* Questions/Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Since 12th August 2011 in the Git master development code branch, OpenSim had provided a number of functions for creating and manipulating NPCs.  These replace the previous functions, that had stopped working by OpenSim 0.7.1.1 (possibly broken since OpenSim 0.6.9).&lt;br /&gt;
&lt;br /&gt;
The general philosophy in creating these new functions is to &lt;br /&gt;
&lt;br /&gt;
# Give script writers the simple tools needed to create more sophisticated behaviour.&lt;br /&gt;
# Avoid duplicating existing LSL and OSSL functions.  For instance, finding out what state an agent is in can be done through llGetAgentInfo() rather than creating a special NPC function.  &lt;br /&gt;
&lt;br /&gt;
NPCs are controlled via a script which must be in the same region as the NPC.  This could be housed in an attachment that is attached to the avatar.&lt;br /&gt;
&lt;br /&gt;
NPCs created user these scripts cannot leave the region in which they were born.  If you want region crossing behaviour, please look at the options on the [[NPC]] wiki page.&lt;br /&gt;
&lt;br /&gt;
NPC appearance is saved and loaded by serializing the appearance data structure to a notecard present in the same prim as the script.  The required textures should be preserved when an OAR is saved and loaded.&lt;br /&gt;
&lt;br /&gt;
This functionality is at an early stage and method signatures could change, certainly before the release of OpenSim 0.7.2.  However, we hope to avoid this.&lt;br /&gt;
&lt;br /&gt;
=Enabling=&lt;br /&gt;
&lt;br /&gt;
To use these functions, in the OpenSim.ini file you will need the following config&lt;br /&gt;
&lt;br /&gt;
# Enabled = true set in the [NPC] section.&lt;br /&gt;
# Enabled = true set in the [XEngine] section.&lt;br /&gt;
# AllowOSFunctions = true in the [XEngine] section.&lt;br /&gt;
# OSFunctionThreatLevel = VeryHigh in the [XEngine] section.  The functions osAgentSaveAppearance(), osAvatarPlayAnimation() and osAvatarStopAnimation() need this level.  If you don't need these functions, then a &amp;quot;High&amp;quot; level will suffice.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
When using your avatar to model appearance before saving, you will need to wait a few seconds before invoking any save appearance command.  This is because appearance saving currently operates on a timer in order to manage multiple appearance updates from the viewer.&lt;br /&gt;
&lt;br /&gt;
=Functions=&lt;br /&gt;
&lt;br /&gt;
==Create and Remove==&lt;br /&gt;
===[[osNpcCreate]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcCreate(string firstname, string lastname, vector position, string cloneFrom):key&lt;br /&gt;
&lt;br /&gt;
cloneFrom may be:&lt;br /&gt;
&lt;br /&gt;
* Name of the notecard containing a serialized avatar appearance, or&lt;br /&gt;
* Asset UUID of the Notecard, or&lt;br /&gt;
* UUID of an avatar logged into the same region. However, please note that this appearance will not be persisted unless osNpcSaveAppearance() is called.&lt;br /&gt;
&lt;br /&gt;
If the NPC is successfully created, then its UUID is returned, which is required for all subsequent functions. Example is available at [[osNpcCreate]]&lt;br /&gt;
&lt;br /&gt;
===[[osNpcRemove]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcRemove(key npc):void&lt;br /&gt;
&lt;br /&gt;
Remove the given avatar from the region.  Example at [[osNpcRemove]].&lt;br /&gt;
&lt;br /&gt;
==Get and Set==&lt;br /&gt;
===[[osNpcGetRot]]===&lt;br /&gt;
&lt;br /&gt;
Gets the rotation of the avatar.  Only the rotation around the Z plane in Euler rotation (horizontal rotation) has any meaning.&lt;br /&gt;
&lt;br /&gt;
 osNpcGetRot(key npc):rotation&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSetRot]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSetRot(key npc, rotation rot):void&lt;br /&gt;
&lt;br /&gt;
Set the rotation of the avatar.  Only setting the rotation in the Z plane in Euler rotation will have any meaningful effect (turning the avatar to point in one direction or another).  Setting X or Y Euler values will result in the avatar rotating in an undefined manner.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcGetPos]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcGetPos(key npc):vector&lt;br /&gt;
&lt;br /&gt;
Return the current position of the NPC.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveTo]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveTo(key npc, vector position):void&lt;br /&gt;
&lt;br /&gt;
An older function that performs an osNpcMoveToTarget() by flying and landing at the target.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(key npc, vector target, int options):void&lt;br /&gt;
&lt;br /&gt;
Move the avatar to a given target over time.  How the avatar will get there depends on the following options.&lt;br /&gt;
&lt;br /&gt;
* OS_NPC_FLY - Fly the avatar to the given position.  The avatar will not land unless the OS_NPC_LAND_AT_TARGET option is also given.&lt;br /&gt;
* OS_NPC_NO_FLY - Do not fly to the target.  The NPC will attempt to walk to the location.  If it's up in the air then the avatar will keep bouncing hopeless until another move target is given or the move is stopped&lt;br /&gt;
* OS_NPC_LAND_AT_TARGET - If given and the avatar is flying, then it will land when it reaches the target.  If OS_NPC_NO_FLY is given then this option has no effect.&lt;br /&gt;
&lt;br /&gt;
OS_NPC_FLY and OS_NPC_NO_FLY are options that cannot be combined - the avatar will end up doing one or the other.  If you want the avatar to fly and land at the target, then OS_NPC_LAND_AT_TARGET must be combined with OS_NPC_FLY.  For instance,&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
&lt;br /&gt;
===[[osNpcStopMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcStopMoveToTarget(key npc):void&lt;br /&gt;
&lt;br /&gt;
Stop a current move to a target.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSay]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSay(key npc, string message):void&lt;br /&gt;
&lt;br /&gt;
Get the NPC to say the given message.&lt;br /&gt;
&lt;br /&gt;
==Appearance==&lt;br /&gt;
&lt;br /&gt;
NPC appearance is manipulated by saving and loading appearance data to notecards from the same inventory as the invoking script.&lt;br /&gt;
&lt;br /&gt;
===[[osOwnerSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osOwnerSaveAppearance(string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the owner's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The owner must be present in the region when this function is invoked.  The baked textures for the owner (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osAgentSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osAgentSaveAppearance(key agentId, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save an arbitrary avatar's appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSaveAppearance(key npc, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the NPC's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcLoadAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcLoadAppearance(key npc, string notecard):void&lt;br /&gt;
&lt;br /&gt;
Load appearance from a notecard.  This notecard must contain appearance data created with one of the save appearance functions.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
This is a rough example script for most of the current NPC functionality.  Please feel free to improve it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
key npc;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llListen(10,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;);&lt;br /&gt;
    }  &lt;br /&gt;
     &lt;br /&gt;
    listen(integer channel, string name, key id, string msg)&lt;br /&gt;
    {&lt;br /&gt;
        if (msg != &amp;quot;&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            if (msg == &amp;quot;create&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
                npc = osNpcCreate(&amp;quot;Jane&amp;quot;, &amp;quot;Doe&amp;quot;, &amp;lt;115, 165, 23&amp;gt;, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;remove&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;You will pay for this with your liiiiiivvveeessss!!!.....&amp;quot;);&lt;br /&gt;
                osNpcRemove (npc);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;say&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;I am your worst Nightmare!!!!&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;move&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveTo(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;movetarget&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;movetargetnoland&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY);&lt;br /&gt;
            }            &lt;br /&gt;
            else if (msg == &amp;quot;movetargetwalk&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;, OS_NPC_NO_FLY);                &lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;rot&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                vector xyz_angles = &amp;lt;0,0,45&amp;gt;; // This is to define a 45 degree change&lt;br /&gt;
                vector angles_in_radians = xyz_angles * DEG_TO_RAD; // Change to Radians&lt;br /&gt;
                rotation rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation                &lt;br /&gt;
                rotation rot = osNpcGetRot(npc);&lt;br /&gt;
                osNpcSetRot(npc, rot * rot_xyzq);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;animate&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osAvatarPlayAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
                llSleep(3);&lt;br /&gt;
                osAvatarStopAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;save&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSaveAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;load&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcLoadAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;clone&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;stop&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcStopMoveToTarget(npc);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                llOwnerSay(&amp;quot;I don't understand [&amp;quot; + msg + &amp;quot;]&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }   &lt;br /&gt;
    }   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Questions/Comments=&lt;br /&gt;
&lt;br /&gt;
Please feel free to write any questions or comments you have about OSSL NPC functionality here.&lt;br /&gt;
&lt;br /&gt;
I am assuming that we should add a NEW section called [NPC] to the opensim.ini file with the line Enabled = true.&lt;br /&gt;
&lt;br /&gt;
[[Category:OSSL_Functions]]&lt;/div&gt;</summary>
		<author><name>Casiasfalta</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/OSSLNPC</id>
		<title>OSSLNPC</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/OSSLNPC"/>
				<updated>2011-08-19T20:53:52Z</updated>
		
		<summary type="html">&lt;p&gt;Casiasfalta: /* Questions/Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Since 12th August 2011 in the Git master development code branch, OpenSim had provided a number of functions for creating and manipulating NPCs.  These replace the previous functions, that had stopped working by OpenSim 0.7.1.1 (possibly broken since OpenSim 0.6.9).&lt;br /&gt;
&lt;br /&gt;
The general philosophy in creating these new functions is to &lt;br /&gt;
&lt;br /&gt;
# Give script writers the simple tools needed to create more sophisticated behaviour.&lt;br /&gt;
# Avoid duplicating existing LSL and OSSL functions.  For instance, finding out what state an agent is in can be done through llGetAgentInfo() rather than creating a special NPC function.  &lt;br /&gt;
&lt;br /&gt;
NPCs are controlled via a script which must be in the same region as the NPC.  This could be housed in an attachment that is attached to the avatar.&lt;br /&gt;
&lt;br /&gt;
NPCs created user these scripts cannot leave the region in which they were born.  If you want region crossing behaviour, please look at the options on the [[NPC]] wiki page.&lt;br /&gt;
&lt;br /&gt;
NPC appearance is saved and loaded by serializing the appearance data structure to a notecard present in the same prim as the script.  The required textures should be preserved when an OAR is saved and loaded.&lt;br /&gt;
&lt;br /&gt;
This functionality is at an early stage and method signatures could change, certainly before the release of OpenSim 0.7.2.  However, we hope to avoid this.&lt;br /&gt;
&lt;br /&gt;
=Enabling=&lt;br /&gt;
&lt;br /&gt;
To use these functions, in the OpenSim.ini file you will need the following config&lt;br /&gt;
&lt;br /&gt;
# Enabled = true set in the [NPC] section.&lt;br /&gt;
# Enabled = true set in the [XEngine] section.&lt;br /&gt;
# AllowOSFunctions = true in the [XEngine] section.&lt;br /&gt;
# OSFunctionThreatLevel = VeryHigh in the [XEngine] section.  The functions osAgentSaveAppearance(), osAvatarPlayAnimation() and osAvatarStopAnimation() need this level.  If you don't need these functions, then a &amp;quot;High&amp;quot; level will suffice.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
When using your avatar to model appearance before saving, you will need to wait a few seconds before invoking any save appearance command.  This is because appearance saving currently operates on a timer in order to manage multiple appearance updates from the viewer.&lt;br /&gt;
&lt;br /&gt;
=Functions=&lt;br /&gt;
&lt;br /&gt;
==Create and Remove==&lt;br /&gt;
===[[osNpcCreate]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcCreate(string firstname, string lastname, vector position, string cloneFrom):key&lt;br /&gt;
&lt;br /&gt;
cloneFrom may be:&lt;br /&gt;
&lt;br /&gt;
* Name of the notecard containing a serialized avatar appearance, or&lt;br /&gt;
* Asset UUID of the Notecard, or&lt;br /&gt;
* UUID of an avatar logged into the same region. However, please note that this appearance will not be persisted unless osNpcSaveAppearance() is called.&lt;br /&gt;
&lt;br /&gt;
If the NPC is successfully created, then its UUID is returned, which is required for all subsequent functions. Example is available at [[osNpcCreate]]&lt;br /&gt;
&lt;br /&gt;
===[[osNpcRemove]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcRemove(key npc):void&lt;br /&gt;
&lt;br /&gt;
Remove the given avatar from the region.  Example at [[osNpcRemove]].&lt;br /&gt;
&lt;br /&gt;
==Get and Set==&lt;br /&gt;
===[[osNpcGetRot]]===&lt;br /&gt;
&lt;br /&gt;
Gets the rotation of the avatar.  Only the rotation around the Z plane in Euler rotation (horizontal rotation) has any meaning.&lt;br /&gt;
&lt;br /&gt;
 osNpcGetRot(key npc):rotation&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSetRot]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSetRot(key npc, rotation rot):void&lt;br /&gt;
&lt;br /&gt;
Set the rotation of the avatar.  Only setting the rotation in the Z plane in Euler rotation will have any meaningful effect (turning the avatar to point in one direction or another).  Setting X or Y Euler values will result in the avatar rotating in an undefined manner.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcGetPos]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcGetPos(key npc):vector&lt;br /&gt;
&lt;br /&gt;
Return the current position of the NPC.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveTo]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveTo(key npc, vector position):void&lt;br /&gt;
&lt;br /&gt;
An older function that performs an osNpcMoveToTarget() by flying and landing at the target.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(key npc, vector target, int options):void&lt;br /&gt;
&lt;br /&gt;
Move the avatar to a given target over time.  How the avatar will get there depends on the following options.&lt;br /&gt;
&lt;br /&gt;
* OS_NPC_FLY - Fly the avatar to the given position.  The avatar will not land unless the OS_NPC_LAND_AT_TARGET option is also given.&lt;br /&gt;
* OS_NPC_NO_FLY - Do not fly to the target.  The NPC will attempt to walk to the location.  If it's up in the air then the avatar will keep bouncing hopeless until another move target is given or the move is stopped&lt;br /&gt;
* OS_NPC_LAND_AT_TARGET - If given and the avatar is flying, then it will land when it reaches the target.  If OS_NPC_NO_FLY is given then this option has no effect.&lt;br /&gt;
&lt;br /&gt;
OS_NPC_FLY and OS_NPC_NO_FLY are options that cannot be combined - the avatar will end up doing one or the other.  If you want the avatar to fly and land at the target, then OS_NPC_LAND_AT_TARGET must be combined with OS_NPC_FLY.  For instance,&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
&lt;br /&gt;
===[[osNpcStopMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcStopMoveToTarget(key npc):void&lt;br /&gt;
&lt;br /&gt;
Stop a current move to a target.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSay]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSay(key npc, string message):void&lt;br /&gt;
&lt;br /&gt;
Get the NPC to say the given message.&lt;br /&gt;
&lt;br /&gt;
==Appearance==&lt;br /&gt;
&lt;br /&gt;
NPC appearance is manipulated by saving and loading appearance data to notecards from the same inventory as the invoking script.&lt;br /&gt;
&lt;br /&gt;
===[[osOwnerSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osOwnerSaveAppearance(string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the owner's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The owner must be present in the region when this function is invoked.  The baked textures for the owner (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osAgentSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osAgentSaveAppearance(key agentId, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save an arbitrary avatar's appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSaveAppearance(key npc, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the NPC's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcLoadAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcLoadAppearance(key npc, string notecard):void&lt;br /&gt;
&lt;br /&gt;
Load appearance from a notecard.  This notecard must contain appearance data created with one of the save appearance functions.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
This is a rough example script for most of the current NPC functionality.  Please feel free to improve it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
key npc;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llListen(10,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;);&lt;br /&gt;
    }  &lt;br /&gt;
     &lt;br /&gt;
    listen(integer channel, string name, key id, string msg)&lt;br /&gt;
    {&lt;br /&gt;
        if (msg != &amp;quot;&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            if (msg == &amp;quot;create&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
                npc = osNpcCreate(&amp;quot;Jane&amp;quot;, &amp;quot;Doe&amp;quot;, &amp;lt;115, 165, 23&amp;gt;, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;remove&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;You will pay for this with your liiiiiivvveeessss!!!.....&amp;quot;);&lt;br /&gt;
                osNpcRemove (npc);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;say&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;I am your worst Nightmare!!!!&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;move&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveTo(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;movetarget&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;movetargetnoland&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY);&lt;br /&gt;
            }            &lt;br /&gt;
            else if (msg == &amp;quot;movetargetwalk&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;, OS_NPC_NO_FLY);                &lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;rot&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                vector xyz_angles = &amp;lt;0,0,45&amp;gt;; // This is to define a 45 degree change&lt;br /&gt;
                vector angles_in_radians = xyz_angles * DEG_TO_RAD; // Change to Radians&lt;br /&gt;
                rotation rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation                &lt;br /&gt;
                rotation rot = osNpcGetRot(npc);&lt;br /&gt;
                osNpcSetRot(npc, rot * rot_xyzq);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;animate&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osAvatarPlayAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
                llSleep(3);&lt;br /&gt;
                osAvatarStopAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;save&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSaveAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;load&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcLoadAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;clone&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;stop&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcStopMoveToTarget(npc);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                llOwnerSay(&amp;quot;I don't understand [&amp;quot; + msg + &amp;quot;]&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }   &lt;br /&gt;
    }   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Questions/Comments=&lt;br /&gt;
&lt;br /&gt;
Please feel free to write any questions or comments you have about OSSL NPC functionality here.&lt;br /&gt;
&lt;br /&gt;
I am assuming that we should add a new [NPC] section to the opensim.ini file with the line Enable = true.&lt;br /&gt;
&lt;br /&gt;
[[Category:OSSL_Functions]]&lt;/div&gt;</summary>
		<author><name>Casiasfalta</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/OSSLNPC</id>
		<title>OSSLNPC</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/OSSLNPC"/>
				<updated>2011-08-19T20:48:57Z</updated>
		
		<summary type="html">&lt;p&gt;Casiasfalta: /* Questions/Comments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
Since 12th August 2011 in the Git master development code branch, OpenSim had provided a number of functions for creating and manipulating NPCs.  These replace the previous functions, that had stopped working by OpenSim 0.7.1.1 (possibly broken since OpenSim 0.6.9).&lt;br /&gt;
&lt;br /&gt;
The general philosophy in creating these new functions is to &lt;br /&gt;
&lt;br /&gt;
# Give script writers the simple tools needed to create more sophisticated behaviour.&lt;br /&gt;
# Avoid duplicating existing LSL and OSSL functions.  For instance, finding out what state an agent is in can be done through llGetAgentInfo() rather than creating a special NPC function.  &lt;br /&gt;
&lt;br /&gt;
NPCs are controlled via a script which must be in the same region as the NPC.  This could be housed in an attachment that is attached to the avatar.&lt;br /&gt;
&lt;br /&gt;
NPCs created user these scripts cannot leave the region in which they were born.  If you want region crossing behaviour, please look at the options on the [[NPC]] wiki page.&lt;br /&gt;
&lt;br /&gt;
NPC appearance is saved and loaded by serializing the appearance data structure to a notecard present in the same prim as the script.  The required textures should be preserved when an OAR is saved and loaded.&lt;br /&gt;
&lt;br /&gt;
This functionality is at an early stage and method signatures could change, certainly before the release of OpenSim 0.7.2.  However, we hope to avoid this.&lt;br /&gt;
&lt;br /&gt;
=Enabling=&lt;br /&gt;
&lt;br /&gt;
To use these functions, in the OpenSim.ini file you will need the following config&lt;br /&gt;
&lt;br /&gt;
# Enabled = true set in the [NPC] section.&lt;br /&gt;
# Enabled = true set in the [XEngine] section.&lt;br /&gt;
# AllowOSFunctions = true in the [XEngine] section.&lt;br /&gt;
# OSFunctionThreatLevel = VeryHigh in the [XEngine] section.  The functions osAgentSaveAppearance(), osAvatarPlayAnimation() and osAvatarStopAnimation() need this level.  If you don't need these functions, then a &amp;quot;High&amp;quot; level will suffice.&lt;br /&gt;
&lt;br /&gt;
=Notes=&lt;br /&gt;
&lt;br /&gt;
When using your avatar to model appearance before saving, you will need to wait a few seconds before invoking any save appearance command.  This is because appearance saving currently operates on a timer in order to manage multiple appearance updates from the viewer.&lt;br /&gt;
&lt;br /&gt;
=Functions=&lt;br /&gt;
&lt;br /&gt;
==Create and Remove==&lt;br /&gt;
===[[osNpcCreate]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcCreate(string firstname, string lastname, vector position, string cloneFrom):key&lt;br /&gt;
&lt;br /&gt;
cloneFrom may be:&lt;br /&gt;
&lt;br /&gt;
* Name of the notecard containing a serialized avatar appearance, or&lt;br /&gt;
* Asset UUID of the Notecard, or&lt;br /&gt;
* UUID of an avatar logged into the same region. However, please note that this appearance will not be persisted unless osNpcSaveAppearance() is called.&lt;br /&gt;
&lt;br /&gt;
If the NPC is successfully created, then its UUID is returned, which is required for all subsequent functions. Example is available at [[osNpcCreate]]&lt;br /&gt;
&lt;br /&gt;
===[[osNpcRemove]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcRemove(key npc):void&lt;br /&gt;
&lt;br /&gt;
Remove the given avatar from the region.  Example at [[osNpcRemove]].&lt;br /&gt;
&lt;br /&gt;
==Get and Set==&lt;br /&gt;
===[[osNpcGetRot]]===&lt;br /&gt;
&lt;br /&gt;
Gets the rotation of the avatar.  Only the rotation around the Z plane in Euler rotation (horizontal rotation) has any meaning.&lt;br /&gt;
&lt;br /&gt;
 osNpcGetRot(key npc):rotation&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSetRot]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSetRot(key npc, rotation rot):void&lt;br /&gt;
&lt;br /&gt;
Set the rotation of the avatar.  Only setting the rotation in the Z plane in Euler rotation will have any meaningful effect (turning the avatar to point in one direction or another).  Setting X or Y Euler values will result in the avatar rotating in an undefined manner.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcGetPos]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcGetPos(key npc):vector&lt;br /&gt;
&lt;br /&gt;
Return the current position of the NPC.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveTo]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveTo(key npc, vector position):void&lt;br /&gt;
&lt;br /&gt;
An older function that performs an osNpcMoveToTarget() by flying and landing at the target.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(key npc, vector target, int options):void&lt;br /&gt;
&lt;br /&gt;
Move the avatar to a given target over time.  How the avatar will get there depends on the following options.&lt;br /&gt;
&lt;br /&gt;
* OS_NPC_FLY - Fly the avatar to the given position.  The avatar will not land unless the OS_NPC_LAND_AT_TARGET option is also given.&lt;br /&gt;
* OS_NPC_NO_FLY - Do not fly to the target.  The NPC will attempt to walk to the location.  If it's up in the air then the avatar will keep bouncing hopeless until another move target is given or the move is stopped&lt;br /&gt;
* OS_NPC_LAND_AT_TARGET - If given and the avatar is flying, then it will land when it reaches the target.  If OS_NPC_NO_FLY is given then this option has no effect.&lt;br /&gt;
&lt;br /&gt;
OS_NPC_FLY and OS_NPC_NO_FLY are options that cannot be combined - the avatar will end up doing one or the other.  If you want the avatar to fly and land at the target, then OS_NPC_LAND_AT_TARGET must be combined with OS_NPC_FLY.  For instance,&lt;br /&gt;
&lt;br /&gt;
 osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
&lt;br /&gt;
===[[osNpcStopMoveToTarget]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcStopMoveToTarget(key npc):void&lt;br /&gt;
&lt;br /&gt;
Stop a current move to a target.&lt;br /&gt;
&lt;br /&gt;
==Communication==&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSay]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSay(key npc, string message):void&lt;br /&gt;
&lt;br /&gt;
Get the NPC to say the given message.&lt;br /&gt;
&lt;br /&gt;
==Appearance==&lt;br /&gt;
&lt;br /&gt;
NPC appearance is manipulated by saving and loading appearance data to notecards from the same inventory as the invoking script.&lt;br /&gt;
&lt;br /&gt;
===[[osOwnerSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osOwnerSaveAppearance(string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the owner's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The owner must be present in the region when this function is invoked.  The baked textures for the owner (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osAgentSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osAgentSaveAppearance(key agentId, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save an arbitrary avatar's appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance on the NPC) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcSaveAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcSaveAppearance(key npc, string notecard):key&lt;br /&gt;
&lt;br /&gt;
Save the NPC's current appearance to a notecard in the prim's inventory.  This includes body part data, clothing items and attachments.  If a notecard with the same name already exists then it is replaced.  The avatar must be present in the region when this function is invoked.  The baked textures for the avatar (necessary to recreate appearance) are saved permanently.&lt;br /&gt;
&lt;br /&gt;
===[[osNpcLoadAppearance]]===&lt;br /&gt;
&lt;br /&gt;
 osNpcLoadAppearance(key npc, string notecard):void&lt;br /&gt;
&lt;br /&gt;
Load appearance from a notecard.  This notecard must contain appearance data created with one of the save appearance functions.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&lt;br /&gt;
This is a rough example script for most of the current NPC functionality.  Please feel free to improve it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;lsl&amp;quot;&amp;gt;&lt;br /&gt;
key npc;&lt;br /&gt;
default&lt;br /&gt;
{&lt;br /&gt;
    state_entry()&lt;br /&gt;
    {&lt;br /&gt;
        llListen(10,&amp;quot;&amp;quot;,NULL_KEY,&amp;quot;&amp;quot;);&lt;br /&gt;
    }  &lt;br /&gt;
     &lt;br /&gt;
    listen(integer channel, string name, key id, string msg)&lt;br /&gt;
    {&lt;br /&gt;
        if (msg != &amp;quot;&amp;quot;)&lt;br /&gt;
        {&lt;br /&gt;
            if (msg == &amp;quot;create&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
                npc = osNpcCreate(&amp;quot;Jane&amp;quot;, &amp;quot;Doe&amp;quot;, &amp;lt;115, 165, 23&amp;gt;, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;remove&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;You will pay for this with your liiiiiivvveeessss!!!.....&amp;quot;);&lt;br /&gt;
                osNpcRemove (npc);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;say&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSay(npc, &amp;quot;I am your worst Nightmare!!!!&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;move&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveTo(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;movetarget&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY|OS_NPC_LAND_AT_TARGET);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;movetargetnoland&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,5&amp;gt;, OS_NPC_FLY);&lt;br /&gt;
            }            &lt;br /&gt;
            else if (msg == &amp;quot;movetargetwalk&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcMoveToTarget(npc, llGetPos() + &amp;lt;9,9,0&amp;gt;, OS_NPC_NO_FLY);                &lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;rot&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                vector xyz_angles = &amp;lt;0,0,45&amp;gt;; // This is to define a 45 degree change&lt;br /&gt;
                vector angles_in_radians = xyz_angles * DEG_TO_RAD; // Change to Radians&lt;br /&gt;
                rotation rot_xyzq = llEuler2Rot(angles_in_radians); // Change to a Rotation                &lt;br /&gt;
                rotation rot = osNpcGetRot(npc);&lt;br /&gt;
                osNpcSetRot(npc, rot * rot_xyzq);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;animate&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osAvatarPlayAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
                llSleep(3);&lt;br /&gt;
                osAvatarStopAnimation(npc, &amp;quot;stabbed+die_2&amp;quot;);&lt;br /&gt;
            }   &lt;br /&gt;
            else if (msg == &amp;quot;save&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcSaveAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;load&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcLoadAppearance(npc, &amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;clone&amp;quot;)&lt;br /&gt;
            {&lt;br /&gt;
                osOwnerSaveAppearance(&amp;quot;appearance&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
            else if (msg == &amp;quot;stop&amp;quot; &amp;amp;&amp;amp; npc != NULL_KEY)&lt;br /&gt;
            {&lt;br /&gt;
                osNpcStopMoveToTarget(npc);&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {&lt;br /&gt;
                llOwnerSay(&amp;quot;I don't understand [&amp;quot; + msg + &amp;quot;]&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }   &lt;br /&gt;
    }   &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Questions/Comments=&lt;br /&gt;
&lt;br /&gt;
Please feel free to write any questions or comments you have about OSSL NPC functionality here.&lt;br /&gt;
I am assuming that we should add a new [NPC] section to the opensim.ini file with the line Enable = true.&lt;br /&gt;
&lt;br /&gt;
[[Category:OSSL_Functions]]&lt;/div&gt;</summary>
		<author><name>Casiasfalta</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Talk:Virtual_World_Model</id>
		<title>Talk:Virtual World Model</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Talk:Virtual_World_Model"/>
				<updated>2011-08-19T17:12:44Z</updated>
		
		<summary type="html">&lt;p&gt;Casiasfalta: /* OSGrid and trust domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simulator Trust Domain definition==&lt;br /&gt;
&lt;br /&gt;
It currently states: &amp;quot;One or more simulators that completely trust each other, operated by one single authority.&amp;quot;  Does it really need to be operated by a single authority?  Could I not say I fully and completely trust sims operated by John Smith and/or he fully and completely trusts sims operated by me?  --[[User:DaveCoyle|DaveCoyle]] 11:40, 20 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, you are right. I changed the definition. Basically, I think what you're getting at is that each simulator, or each seed trust domain, can extend trust to other trust domains, and this is not transitive: you trust W, but you don't necessarily trust the sims that W trusts. Needs more thinking.  --[[User:Diva|Diva]] 07:50, 20 April 2009 (PST)&lt;br /&gt;
&lt;br /&gt;
== OSGrid and trust domains ==&lt;br /&gt;
&lt;br /&gt;
There seems to be continued disagreement regarding OSGrid and trust domains, so let's discuss it here.  Charles, you removed the sentence &amp;quot;For example, OSGrid has, by nature and intent, several hundred simulator trust domains.&amp;quot;  I disagree with its removal, and based on the -dev list thread everyone doesn't seem to be on the same page on this point.  So let's talk it out.&lt;br /&gt;
&lt;br /&gt;
I am a region operator on OSGrid.  I fully trust sims operated by myself.  I fully trust sims operated by a handful of others who I believe will not do anything nefarious to me, my communications, my inventory, etc.  I neither trust nor don't trust sims operated by most others, as I neither know them nor have reason to believe they'll do bad things.  I do not trust some regions (e.g. DNCH).&lt;br /&gt;
&lt;br /&gt;
Sounds like multiple trust domains to me.  --[[User:DaveCoyle|DaveCoyle]] 11:31, 20 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I would really like to hear more from the OSGrid community about wishes for the future, 1 year ahead. The only reason why I am making that subtle distinction between Grid and Trust Domain is OSGrid. I mention LL grid, but, really, I have no idea what their plans are, that's just speculation. OSGrid, however, exists. Unifying the concept of Grid with that of trust domain will make the model a whole lot simpler and easier to implement, so if that is what's on the map for OSGrid, it would be good to know. --[[User:Diva|Diva]] 09:45, 20 April 2009 (PST)&lt;br /&gt;
&lt;br /&gt;
We have 15 regions on osgrid and our role is one of applying the tech that others are developing. When i need to explain what a grid is to an end-user it is a &amp;quot;world of regions&amp;quot; - the world map is my metaphor. Also, as an &amp;quot;application provider&amp;quot;, I would probably prefer grid &amp;quot;safety&amp;quot; to be controlled as much as possible by the person who is providing the opensim.exe instance rather then the grid manager. Just my thoughts. Casias Falta Aug. 19, 2011&lt;br /&gt;
&lt;br /&gt;
== The meaning of ''safety'' ==&lt;br /&gt;
&lt;br /&gt;
There seems to be an important reference left undefined in this useful page.  Various paragraphs refer to &amp;quot;safely exchange messages&amp;quot;, &amp;quot;unsafe teleports&amp;quot;, and &amp;quot;safe simulator connectivity&amp;quot;, but nowhere is the meaning of &amp;quot;safety&amp;quot; explained or illustrated.  I can imagine a variety of possible considerations that can give rise to a verdict of &amp;quot;safe&amp;quot; versus &amp;quot;unsafe&amp;quot;, such as the desire to safeguard assets, or protect system integrity, or prevent abuse, or simply to disallow unauthorized access, but which of these were intended here?  Perhaps all of them?  Or does &amp;quot;safety&amp;quot; have a specific meaning in this context?&lt;br /&gt;
&lt;br /&gt;
I think it's worth spending a little time defining what is meant here, because the foundational idea of &amp;quot;trust domain&amp;quot; is currently being described in terms of a fuzzy concept that obscures rather than explains.  Yes, we all love the motherhood and apple pie implied by &amp;quot;safe&amp;quot;, but what does it actually mean in this specific context, for the purposes of model definition? :-) [[User:Morgaine|Morgaine]] 12:37, 10 June 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Casiasfalta</name></author>	</entry>

	<entry>
		<id>http://opensimulator.org/wiki/Talk:Virtual_World_Model</id>
		<title>Talk:Virtual World Model</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/wiki/Talk:Virtual_World_Model"/>
				<updated>2011-08-19T17:11:44Z</updated>
		
		<summary type="html">&lt;p&gt;Casiasfalta: /* OSGrid and trust domains */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Simulator Trust Domain definition==&lt;br /&gt;
&lt;br /&gt;
It currently states: &amp;quot;One or more simulators that completely trust each other, operated by one single authority.&amp;quot;  Does it really need to be operated by a single authority?  Could I not say I fully and completely trust sims operated by John Smith and/or he fully and completely trusts sims operated by me?  --[[User:DaveCoyle|DaveCoyle]] 11:40, 20 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, you are right. I changed the definition. Basically, I think what you're getting at is that each simulator, or each seed trust domain, can extend trust to other trust domains, and this is not transitive: you trust W, but you don't necessarily trust the sims that W trusts. Needs more thinking.  --[[User:Diva|Diva]] 07:50, 20 April 2009 (PST)&lt;br /&gt;
&lt;br /&gt;
== OSGrid and trust domains ==&lt;br /&gt;
&lt;br /&gt;
There seems to be continued disagreement regarding OSGrid and trust domains, so let's discuss it here.  Charles, you removed the sentence &amp;quot;For example, OSGrid has, by nature and intent, several hundred simulator trust domains.&amp;quot;  I disagree with its removal, and based on the -dev list thread everyone doesn't seem to be on the same page on this point.  So let's talk it out.&lt;br /&gt;
&lt;br /&gt;
I am a region operator on OSGrid.  I fully trust sims operated by myself.  I fully trust sims operated by a handful of others who I believe will not do anything nefarious to me, my communications, my inventory, etc.  I neither trust nor don't trust sims operated by most others, as I neither know them nor have reason to believe they'll do bad things.  I do not trust some regions (e.g. DNCH).&lt;br /&gt;
&lt;br /&gt;
Sounds like multiple trust domains to me.  --[[User:DaveCoyle|DaveCoyle]] 11:31, 20 April 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
I would really like to hear more from the OSGrid community about wishes for the future, 1 year ahead. The only reason why I am making that subtle distinction between Grid and Trust Domain is OSGrid. I mention LL grid, but, really, I have no idea what their plans are, that's just speculation. OSGrid, however, exists. Unifying the concept of Grid with that of trust domain will make the model a whole lot simpler and easier to implement, so if that is what's on the map for OSGrid, it would be good to know. --[[User:Diva|Diva]] 09:45, 20 April 2009 (PST)&lt;br /&gt;
&lt;br /&gt;
We have 15 regions on osgrid and our role is one of applying the tech that others are developing. When i need to explain what a grid is to an end-user it is a &amp;quot;world of regions&amp;quot; - the world map is my metaphor. Also, as an &amp;quot;application provider&amp;quot;, I would probably prefer grid &amp;quot;safety&amp;quot; to be controlled as much as possible by the person who is providing the opensim.exe instance rather then the grid manager. Just my thoughts.&lt;br /&gt;
&lt;br /&gt;
== The meaning of ''safety'' ==&lt;br /&gt;
&lt;br /&gt;
There seems to be an important reference left undefined in this useful page.  Various paragraphs refer to &amp;quot;safely exchange messages&amp;quot;, &amp;quot;unsafe teleports&amp;quot;, and &amp;quot;safe simulator connectivity&amp;quot;, but nowhere is the meaning of &amp;quot;safety&amp;quot; explained or illustrated.  I can imagine a variety of possible considerations that can give rise to a verdict of &amp;quot;safe&amp;quot; versus &amp;quot;unsafe&amp;quot;, such as the desire to safeguard assets, or protect system integrity, or prevent abuse, or simply to disallow unauthorized access, but which of these were intended here?  Perhaps all of them?  Or does &amp;quot;safety&amp;quot; have a specific meaning in this context?&lt;br /&gt;
&lt;br /&gt;
I think it's worth spending a little time defining what is meant here, because the foundational idea of &amp;quot;trust domain&amp;quot; is currently being described in terms of a fuzzy concept that obscures rather than explains.  Yes, we all love the motherhood and apple pie implied by &amp;quot;safe&amp;quot;, but what does it actually mean in this specific context, for the purposes of model definition? :-) [[User:Morgaine|Morgaine]] 12:37, 10 June 2009 (UTC)&lt;/div&gt;</summary>
		<author><name>Casiasfalta</name></author>	</entry>

	</feed>