From 0c041ce12f393367e2754e88d9b8dad5e45f88c4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Oct 2011 01:42:31 +0100 Subject: Implement osNpcSit(). This is still in development so don't trust it Format is osNpcSit(, , OS_NPC_SIT_IMMEDIATE) e.g. osNpcSit(npc, llGetKey(), OS_NPC_SIT_IMMEDIATE); At the moment, sit only succeeds if the part has a sit target set. NPC immediately sits on the target even if miles away - they do not walk up to it. This method is in development - it may change so please don't trust it yet. Standing will follow shortly since that's kind of important once you're sitting :) --- .../Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 268a599..7cf6642 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2351,6 +2351,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } + public void osNpcSit(LSL_Key npc, LSL_Key target, int options) + { + CheckThreatLevel(ThreatLevel.High, "osNpcSit"); + + INPCModule module = World.RequestModuleInterface(); + if (module != null) + { + module.Sit(new UUID(npc.m_string), new UUID(target.m_string), World); + } + } + public void osNpcRemove(LSL_Key npc) { CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); -- cgit v1.1