aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs41
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs16
3 files changed, 59 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 7fc7337..893fda1 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2539,6 +2539,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2539 2539
2540 public void osNpcSay(LSL_Key npc, string message) 2540 public void osNpcSay(LSL_Key npc, string message)
2541 { 2541 {
2542 osNpcSay(npc, 0, message);
2543 }
2544
2545 public void osNpcSay(LSL_Key npc, int channel, string message)
2546 {
2542 CheckThreatLevel(ThreatLevel.High, "osNpcSay"); 2547 CheckThreatLevel(ThreatLevel.High, "osNpcSay");
2543 m_host.AddScriptLPS(1); 2548 m_host.AddScriptLPS(1);
2544 2549
@@ -2550,7 +2555,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2550 if (!module.CheckPermissions(npcId, m_host.OwnerID)) 2555 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2551 return; 2556 return;
2552 2557
2553 module.Say(npcId, World, message); 2558 module.Say(npcId, World, message, channel);
2559 }
2560 }
2561
2562 public void osNpcShout(LSL_Key npc, int channel, string message)
2563 {
2564 CheckThreatLevel(ThreatLevel.High, "osNpcShout");
2565 m_host.AddScriptLPS(1);
2566
2567 INPCModule module = World.RequestModuleInterface<INPCModule>();
2568 if (module != null)
2569 {
2570 UUID npcId = new UUID(npc.m_string);
2571
2572 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2573 return;
2574
2575 module.Shout(npcId, World, message, channel);
2554 } 2576 }
2555 } 2577 }
2556 2578
@@ -2635,6 +2657,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2635 } 2657 }
2636 } 2658 }
2637 2659
2660 public void osNpcWhisper(LSL_Key npc, int channel, string message)
2661 {
2662 CheckThreatLevel(ThreatLevel.High, "osNpcWhisper");
2663 m_host.AddScriptLPS(1);
2664
2665 INPCModule module = World.RequestModuleInterface<INPCModule>();
2666 if (module != null)
2667 {
2668 UUID npcId = new UUID(npc.m_string);
2669
2670 if (!module.CheckPermissions(npcId, m_host.OwnerID))
2671 return;
2672
2673 module.Whisper(npcId, World, message, channel);
2674 }
2675 }
2676
2638 /// <summary> 2677 /// <summary>
2639 /// Save the current appearance of the script owner permanently to the named notecard. 2678 /// Save the current appearance of the script owner permanently to the named notecard.
2640 /// </summary> 2679 /// </summary>
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index d0c852b..e92518d 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -217,11 +217,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
217 void osNpcSetRot(LSL_Key npc, rotation rot); 217 void osNpcSetRot(LSL_Key npc, rotation rot);
218 void osNpcStopMoveToTarget(LSL_Key npc); 218 void osNpcStopMoveToTarget(LSL_Key npc);
219 void osNpcSay(key npc, string message); 219 void osNpcSay(key npc, string message);
220 void osNpcSay(key npc, int channel, string message);
221 void osNpcShout(key npc, int channel, string message);
220 void osNpcSit(key npc, key target, int options); 222 void osNpcSit(key npc, key target, int options);
221 void osNpcStand(LSL_Key npc); 223 void osNpcStand(LSL_Key npc);
222 void osNpcRemove(key npc); 224 void osNpcRemove(key npc);
223 void osNpcPlayAnimation(LSL_Key npc, string animation); 225 void osNpcPlayAnimation(LSL_Key npc, string animation);
224 void osNpcStopAnimation(LSL_Key npc, string animation); 226 void osNpcStopAnimation(LSL_Key npc, string animation);
227 void osNpcWhisper(key npc, int channel, string message);
225 228
226 LSL_Key osOwnerSaveAppearance(string notecard); 229 LSL_Key osOwnerSaveAppearance(string notecard);
227 LSL_Key osAgentSaveAppearance(key agentId, string notecard); 230 LSL_Key osAgentSaveAppearance(key agentId, string notecard);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index 36ac0e3..d230662 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -580,6 +580,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
580 m_OSSL_Functions.osNpcSay(npc, message); 580 m_OSSL_Functions.osNpcSay(npc, message);
581 } 581 }
582 582
583 public void osNpcSay(key npc, int channel, string message)
584 {
585 m_OSSL_Functions.osNpcSay(npc, channel, message);
586 }
587
588
589 public void osNpcShout(key npc, int channel, string message)
590 {
591 m_OSSL_Functions.osNpcShout(npc, channel, message);
592 }
593
583 public void osNpcSit(LSL_Key npc, LSL_Key target, int options) 594 public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
584 { 595 {
585 m_OSSL_Functions.osNpcSit(npc, target, options); 596 m_OSSL_Functions.osNpcSit(npc, target, options);
@@ -605,6 +616,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
605 m_OSSL_Functions.osNpcStopAnimation(npc, animation); 616 m_OSSL_Functions.osNpcStopAnimation(npc, animation);
606 } 617 }
607 618
619 public void osNpcWhisper(key npc, int channel, string message)
620 {
621 m_OSSL_Functions.osNpcWhisper(npc, channel, message);
622 }
623
608 public LSL_Key osOwnerSaveAppearance(string notecard) 624 public LSL_Key osOwnerSaveAppearance(string notecard)
609 { 625 {
610 return m_OSSL_Functions.osOwnerSaveAppearance(notecard); 626 return m_OSSL_Functions.osOwnerSaveAppearance(notecard);