OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Public Member Functions | Properties | List of all members
OpenSim.Region.Framework.Interfaces.INPCModule Interface Reference
Inheritance diagram for OpenSim.Region.Framework.Interfaces.INPCModule:
Inheritance graph
[legend]

Public Member Functions

UUID CreateNPC (string firstname, string lastname, Vector3 position, UUID owner, bool senseAsAgent, Scene scene, AvatarAppearance appearance)
 Create an NPC More...
 
UUID CreateNPC (string firstname, string lastname, Vector3 position, UUID agentID, UUID owner, bool senseAsAgent, Scene scene, AvatarAppearance appearance)
 Create an NPC with a user-supplied agentID More...
 
bool IsNPC (UUID agentID, Scene scene)
 Check if the agent is an NPC. More...
 
INPC GetNPC (UUID agentID, Scene scene)
 Get the NPC. More...
 
bool CheckPermissions (UUID npcID, UUID callerID)
 Check if the caller has permission to manipulate the given NPC. More...
 
bool SetNPCAppearance (UUID agentID, AvatarAppearance appearance, Scene scene)
 Set the appearance for an NPC. More...
 
bool MoveToTarget (UUID agentID, Scene scene, Vector3 pos, bool noFly, bool landAtTarget, bool running)
 Move an NPC to a target over time. More...
 
bool StopMoveToTarget (UUID agentID, Scene scene)
 Stop the NPC's current movement. More...
 
bool Say (UUID agentID, Scene scene, string text)
 Get the NPC to say something. More...
 
bool Say (UUID agentID, Scene scene, string text, int channel)
 Get the NPC to say something. More...
 
bool Shout (UUID agentID, Scene scene, string text, int channel)
 Get the NPC to shout something. More...
 
bool Whisper (UUID agentID, Scene scene, string text, int channel)
 Get the NPC to whisper something. More...
 
bool Sit (UUID agentID, UUID partID, Scene scene)
 Sit the NPC. More...
 
bool Stand (UUID agentID, Scene scene)
 Stand a sitting NPC. More...
 
bool Touch (UUID agentID, UUID partID)
 Get the NPC to touch an object. More...
 
bool DeleteNPC (UUID agentID, Scene scene)
 Delete an NPC. More...
 
UUID GetOwner (UUID agentID)
 Get the owner of a NPC More...
 

Properties

NPCOptionsFlags NPCOptionFlags [get]
 

Detailed Description

Definition at line 62 of file INPCModule.cs.

Member Function Documentation

bool OpenSim.Region.Framework.Interfaces.INPCModule.CheckPermissions ( UUID  npcID,
UUID  callerID 
)

Check if the caller has permission to manipulate the given NPC.

A caller has permission if

  • An NPC exists with the given npcID.
  • The caller UUID given is UUID.Zero.
  • The avatar is unowned (owner is UUID.Zero).
  • The avatar is owned and the owner and callerID match.
  • The avatar is owned and the callerID matches its agentID.
Parameters
av
callerID
Returns
true if they do, false if they don't.
Parameters
npcID
callerID
Returns
true if they do, false if they don't or if there's no NPC with the given ID.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

Here is the caller graph for this function:

UUID OpenSim.Region.Framework.Interfaces.INPCModule.CreateNPC ( string  firstname,
string  lastname,
Vector3  position,
UUID  owner,
bool  senseAsAgent,
Scene  scene,
AvatarAppearance  appearance 
)

Create an NPC

Parameters
firstname
lastname
position
senseAsAgentMake the NPC show up as an agent on LSL sensors. The default is that they show up as the NPC type instead, but this is currently an OpenSim-only extension.
scene
appearanceThe avatar appearance to use for the new NPC.
Returns
The UUID of the ScenePresence created. UUID.Zero if there was a failure.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

UUID OpenSim.Region.Framework.Interfaces.INPCModule.CreateNPC ( string  firstname,
string  lastname,
Vector3  position,
UUID  agentID,
UUID  owner,
bool  senseAsAgent,
Scene  scene,
AvatarAppearance  appearance 
)

Create an NPC with a user-supplied agentID

Parameters
firstname
lastname
position
agentID

The desired agent ID

Parameters
owner
senseAsAgentMake the NPC show up as an agent on LSL sensors. The default is that they show up as the NPC type instead, but this is currently an OpenSim-only extension.
scene
appearanceThe avatar appearance to use for the new NPC.
Returns
The UUID of the ScenePresence created. UUID.Zero if there was a failure.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.DeleteNPC ( UUID  agentID,
Scene  scene 
)

Delete an NPC.

Parameters
agentIDThe UUID of the NPC
scene
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

INPC OpenSim.Region.Framework.Interfaces.INPCModule.GetNPC ( UUID  agentID,
Scene  scene 
)

Get the NPC.

This is not currently complete - manipulation of NPCs still occurs through the region interface.

Parameters
agentID
scene
Returns
The NPC. null if it does not exist.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

UUID OpenSim.Region.Framework.Interfaces.INPCModule.GetOwner ( UUID  agentID)

Get the owner of a NPC

Parameters
agentIDThe UUID of the NPC
Returns
UUID of owner if the NPC exists, UUID.Zero if there was no such agent, the agent is unowned or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.IsNPC ( UUID  agentID,
Scene  scene 
)

Check if the agent is an NPC.

Parameters
agentID
scene
Returns
True if the agent is an NPC in the given scene. False otherwise.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

Here is the caller graph for this function:

bool OpenSim.Region.Framework.Interfaces.INPCModule.MoveToTarget ( UUID  agentID,
Scene  scene,
Vector3  pos,
bool  noFly,
bool  landAtTarget,
bool  running 
)

Move an NPC to a target over time.

Parameters
agentIDThe UUID of the NPC
scene
pos
noFlyIf true, then the avatar will attempt to walk to the location even if it's up in the air. This is to allow walking on prims.
landAtTargetIf true and the avatar is flying when it reaches the target, land.

name="running"> If true, NPC moves with running speed.

Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Say ( UUID  agentID,
Scene  scene,
string  text 
)

Get the NPC to say something.

Parameters
agentIDThe UUID of the NPC
scene
text
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Say ( UUID  agentID,
Scene  scene,
string  text,
int  channel 
)

Get the NPC to say something.

Parameters
agentIDThe UUID of the NPC
scene
text
channel
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.SetNPCAppearance ( UUID  agentID,
AvatarAppearance  appearance,
Scene  scene 
)

Set the appearance for an NPC.

Parameters
agentID
appearance
scene
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Shout ( UUID  agentID,
Scene  scene,
string  text,
int  channel 
)

Get the NPC to shout something.

Parameters
agentIDThe UUID of the NPC
scene
text
channel
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Sit ( UUID  agentID,
UUID  partID,
Scene  scene 
)

Sit the NPC.

Parameters
agentID
partID
scene
Returns
true if the sit succeeded, false if not

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Stand ( UUID  agentID,
Scene  scene 
)

Stand a sitting NPC.

Parameters
agentID
scene
Returns
true if the stand succeeded, false if not

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.StopMoveToTarget ( UUID  agentID,
Scene  scene 
)

Stop the NPC's current movement.

Parameters
agentIDThe UUID of the NPC
scene
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Touch ( UUID  agentID,
UUID  partID 
)

Get the NPC to touch an object.

Parameters
agentID
partID
Returns
true if the touch is actually attempted, false if not.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

bool OpenSim.Region.Framework.Interfaces.INPCModule.Whisper ( UUID  agentID,
Scene  scene,
string  text,
int  channel 
)

Get the NPC to whisper something.

Parameters
agentIDThe UUID of the NPC
scene
text
channel
Returns
True if the operation succeeded, false if there was no such agent or the agent was not an NPC.

Implemented in OpenSim.Region.OptionalModules.World.NPC.NPCModule.

Property Documentation

NPCOptionsFlags OpenSim.Region.Framework.Interfaces.INPCModule.NPCOptionFlags
get

Definition at line 301 of file INPCModule.cs.


The documentation for this interface was generated from the following file: