From 742ed9537df1cb45a0c57e38e4c0c0735fc92eca Mon Sep 17 00:00:00 2001 From: alondria Date: Sat, 2 Feb 2008 22:53:01 +0000 Subject: Implements LSL function llDialog(). The ScriptDialogReply packet handler is a bit of a hack job. It is currently handled similar to ChatFromViewer, which will trigger the listen() event, however this is not exactly how LL's implementation works and will/can be fixed up later. --- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs') diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 8ef33d7..9d228fa 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -2487,7 +2487,19 @@ namespace OpenSim.Region.ScriptEngine.Common public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) { - NotImplemented("llDialog"); + LLUUID av = new LLUUID(); + if (!LLUUID.TryParse(avatar,out av)) + { + LSLError("First parameter to llDialog needs to be a key"); + return; + } + string[] buts = new string[buttons.Length]; + for(int i = 0; i < buttons.Length; i++) + { + buts[i] = buttons.Data[i].ToString(); + } + World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); + //NotImplemented("llDialog"); } public void llVolumeDetect(int detect) -- cgit v1.1