aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs586
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs29
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs42
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs64
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs10
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs48
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs58
-rw-r--r--OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs18
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs70
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs559
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs31
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs50
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs12
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Helpers.cs28
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs30
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/EventManager.cs35
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs86
34 files changed, 949 insertions, 929 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
index 1a50f0b..9c45ab5 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuilIn_Commands.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using libsecondlife; 28using OpenMetaverse;
29using OpenSim.Region.Environment.Scenes; 29using OpenSim.Region.Environment.Scenes;
30 30
31namespace OpenSim.Region.ScriptEngine.Common 31namespace OpenSim.Region.ScriptEngine.Common
@@ -36,7 +36,7 @@ namespace OpenSim.Region.ScriptEngine.Common
36 public class BuilIn_Commands : OSSL_BuilIn_Commands 36 public class BuilIn_Commands : OSSL_BuilIn_Commands
37 { 37 {
38 public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, 38 public BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID,
39 LLUUID itemID) : base(scriptEngine, host, localID, itemID) 39 UUID itemID) : base(scriptEngine, host, localID, itemID)
40 { 40 {
41 } 41 }
42 } 42 }
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index bcdff8f..0c5d60b 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -32,9 +32,8 @@ using System.Runtime.Remoting.Lifetime;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using Nini.Config; 34using Nini.Config;
35using Axiom.Math; 35using OpenMetaverse;
36using libsecondlife; 36using OpenMetaverse.Packets;
37using libsecondlife.Packets;
38using OpenSim.Framework; 37using OpenSim.Framework;
39using OpenSim.Framework.Communications.Cache; 38using OpenSim.Framework.Communications.Cache;
40using OpenSim.Region.Environment; 39using OpenSim.Region.Environment;
@@ -60,10 +59,10 @@ namespace OpenSim.Region.ScriptEngine.Common
60 internal ScriptEngineBase.ScriptEngine m_ScriptEngine; 59 internal ScriptEngineBase.ScriptEngine m_ScriptEngine;
61 internal SceneObjectPart m_host; 60 internal SceneObjectPart m_host;
62 internal uint m_localID; 61 internal uint m_localID;
63 internal LLUUID m_itemID; 62 internal UUID m_itemID;
64 internal bool throwErrorOnNotImplemented = true; 63 internal bool throwErrorOnNotImplemented = true;
65 64
66 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 65 public LSL_BuiltIn_Commands(ScriptEngineBase.ScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
67 { 66 {
68 m_ScriptEngine = ScriptEngine; 67 m_ScriptEngine = ScriptEngine;
69 m_host = host; 68 m_host = host;
@@ -151,11 +150,11 @@ namespace OpenSim.Region.ScriptEngine.Common
151 return World.GetCommander(name); 150 return World.GetCommander(name);
152 } 151 }
153 152
154 private LLUUID InventorySelf() 153 private UUID InventorySelf()
155 { 154 {
156 LLUUID invItemID = new LLUUID(); 155 UUID invItemID = new UUID();
157 156
158 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 157 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
159 { 158 {
160 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) 159 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
161 { 160 {
@@ -167,54 +166,54 @@ namespace OpenSim.Region.ScriptEngine.Common
167 return invItemID; 166 return invItemID;
168 } 167 }
169 168
170 private LLUUID InventoryKey(string name, int type) 169 private UUID InventoryKey(string name, int type)
171 { 170 {
172 m_host.AddScriptLPS(1); 171 m_host.AddScriptLPS(1);
173 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 172 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
174 { 173 {
175 if (inv.Value.Name == name) 174 if (inv.Value.Name == name)
176 { 175 {
177 if (inv.Value.Type != type) 176 if (inv.Value.Type != type)
178 return LLUUID.Zero; 177 return UUID.Zero;
179 178
180 return inv.Value.AssetID.ToString(); 179 return inv.Value.AssetID.ToString();
181 } 180 }
182 } 181 }
183 return LLUUID.Zero; 182 return UUID.Zero;
184 } 183 }
185 184
186 private LLUUID InventoryKey(string name) 185 private UUID InventoryKey(string name)
187 { 186 {
188 m_host.AddScriptLPS(1); 187 m_host.AddScriptLPS(1);
189 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 188 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
190 { 189 {
191 if (inv.Value.Name == name) 190 if (inv.Value.Name == name)
192 { 191 {
193 return inv.Value.AssetID.ToString(); 192 return inv.Value.AssetID.ToString();
194 } 193 }
195 } 194 }
196 return LLUUID.Zero; 195 return UUID.Zero;
197 } 196 }
198 197
199 198
200 /// <summary> 199 /// <summary>
201 /// accepts a valid LLUUID, -or- a name of an inventory item. 200 /// accepts a valid UUID, -or- a name of an inventory item.
202 /// Returns a valid LLUUID or LLUUID.Zero if key invalid and item not found 201 /// Returns a valid UUID or UUID.Zero if key invalid and item not found
203 /// in prim inventory. 202 /// in prim inventory.
204 /// </summary> 203 /// </summary>
205 /// <param name="k"></param> 204 /// <param name="k"></param>
206 /// <returns></returns> 205 /// <returns></returns>
207 private LLUUID KeyOrName(string k) 206 private UUID KeyOrName(string k)
208 { 207 {
209 LLUUID key = LLUUID.Zero; 208 UUID key = UUID.Zero;
210 209
211 // if we can parse the string as a key, use it. 210 // if we can parse the string as a key, use it.
212 if (LLUUID.TryParse(k, out key)) 211 if (UUID.TryParse(k, out key))
213 { 212 {
214 return key; 213 return key;
215 } 214 }
216 // else try to locate the name in inventory of object. found returns key, 215 // else try to locate the name in inventory of object. found returns key,
217 // not found returns LLUUID.Zero which will translate to the default particle texture 216 // not found returns UUID.Zero which will translate to the default particle texture
218 else 217 else
219 { 218 {
220 return InventoryKey(k); 219 return InventoryKey(k);
@@ -573,7 +572,7 @@ namespace OpenSim.Region.ScriptEngine.Common
573 if (text.Length > 1023) 572 if (text.Length > 1023)
574 text = text.Substring(0, 1023); 573 text = text.Substring(0, 1023);
575 574
576 World.SimChat(Helpers.StringToField(text), 575 World.SimChat(Utils.StringToBytes(text),
577 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 576 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
578 577
579 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 578 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -587,7 +586,7 @@ namespace OpenSim.Region.ScriptEngine.Common
587 if (text.Length > 1023) 586 if (text.Length > 1023)
588 text = text.Substring(0, 1023); 587 text = text.Substring(0, 1023);
589 588
590 World.SimChat(Helpers.StringToField(text), 589 World.SimChat(Utils.StringToBytes(text),
591 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 590 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
592 591
593 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 592 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -601,7 +600,7 @@ namespace OpenSim.Region.ScriptEngine.Common
601 if (text.Length > 1023) 600 if (text.Length > 1023)
602 text = text.Substring(0, 1023); 601 text = text.Substring(0, 1023);
603 602
604 World.SimChat(Helpers.StringToField(text), 603 World.SimChat(Utils.StringToBytes(text),
605 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); 604 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true);
606 605
607 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 606 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -628,8 +627,8 @@ namespace OpenSim.Region.ScriptEngine.Common
628 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 627 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg)
629 { 628 {
630 m_host.AddScriptLPS(1); 629 m_host.AddScriptLPS(1);
631 LLUUID keyID; 630 UUID keyID;
632 LLUUID.TryParse(ID, out keyID); 631 UUID.TryParse(ID, out keyID);
633 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 632 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
634 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); 633 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
635 } 634 }
@@ -651,8 +650,8 @@ namespace OpenSim.Region.ScriptEngine.Common
651 public void llSensor(string name, string id, int type, double range, double arc) 650 public void llSensor(string name, string id, int type, double range, double arc)
652 { 651 {
653 m_host.AddScriptLPS(1); 652 m_host.AddScriptLPS(1);
654 LLUUID keyID = LLUUID.Zero; 653 UUID keyID = UUID.Zero;
655 LLUUID.TryParse(id, out keyID); 654 UUID.TryParse(id, out keyID);
656 655
657 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); 656 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host);
658 } 657 }
@@ -660,8 +659,8 @@ namespace OpenSim.Region.ScriptEngine.Common
660 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 659 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
661 { 660 {
662 m_host.AddScriptLPS(1); 661 m_host.AddScriptLPS(1);
663 LLUUID keyID = LLUUID.Zero; 662 UUID keyID = UUID.Zero;
664 LLUUID.TryParse(id, out keyID); 663 UUID.TryParse(id, out keyID);
665 664
666 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); 665 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host);
667 } 666 }
@@ -672,7 +671,7 @@ namespace OpenSim.Region.ScriptEngine.Common
672 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID); 671 m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.UnSetSenseRepeaterEvents(m_localID, m_itemID);
673 } 672 }
674 673
675 public string resolveName(LLUUID objecUUID) 674 public string resolveName(UUID objecUUID)
676 { 675 {
677 // try avatar username surname 676 // try avatar username surname
678 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); 677 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
@@ -708,7 +707,7 @@ namespace OpenSim.Region.ScriptEngine.Common
708 { 707 {
709 if ((number >= 0) && (number <= SenseList.Length)) 708 if ((number >= 0) && (number <= SenseList.Length))
710 { 709 {
711 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 710 UUID SensedUUID = (UUID)SenseList.Data[number];
712 return resolveName(SensedUUID); 711 return resolveName(SensedUUID);
713 } 712 }
714 } 713 }
@@ -741,14 +740,14 @@ namespace OpenSim.Region.ScriptEngine.Common
741 return String.Empty; 740 return String.Empty;
742 } 741 }
743 742
744 public LLUUID uuidDetectedKey(int number) 743 public UUID uuidDetectedKey(int number)
745 { 744 {
746 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID); 745 LSL_Types.list SenseList = m_ScriptEngine.m_ASYNCLSLCommandManager.m_SensorRepeat.GetSensorList(m_localID, m_itemID);
747 if (SenseList != null) 746 if (SenseList != null)
748 { 747 {
749 if ((number >= 0) && (number < SenseList.Length)) 748 if ((number >= 0) && (number < SenseList.Length))
750 { 749 {
751 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 750 UUID SensedUUID = (UUID)SenseList.Data[number];
752 return SensedUUID; 751 return SensedUUID;
753 } 752 }
754 } 753 }
@@ -768,14 +767,14 @@ namespace OpenSim.Region.ScriptEngine.Common
768 { 767 {
769 if (script.llDetectParams._key[number]) 768 if (script.llDetectParams._key[number])
770 { 769 {
771 return new LLUUID(script.llDetectParams._key[number]); 770 return new UUID(script.llDetectParams._key[number]);
772 } 771 }
773 } 772 }
774 } 773 }
775 } 774 }
776 } 775 }
777 } 776 }
778 return LLUUID.Zero; 777 return UUID.Zero;
779 } 778 }
780 779
781 public EntityBase entityDetectedKey(int number) 780 public EntityBase entityDetectedKey(int number)
@@ -785,7 +784,7 @@ namespace OpenSim.Region.ScriptEngine.Common
785 { 784 {
786 if ((number >= 0) && (number < SenseList.Length)) 785 if ((number >= 0) && (number < SenseList.Length))
787 { 786 {
788 LLUUID SensedUUID = (LLUUID)SenseList.Data[number]; 787 UUID SensedUUID = (UUID)SenseList.Data[number];
789 EntityBase SensedObject = null; 788 EntityBase SensedObject = null;
790 lock (World.Entities) 789 lock (World.Entities)
791 { 790 {
@@ -810,7 +809,7 @@ namespace OpenSim.Region.ScriptEngine.Common
810 { 809 {
811 if (script.llDetectParams._key[number]) 810 if (script.llDetectParams._key[number])
812 { 811 {
813 LLUUID SensedUUID = new LLUUID(script.llDetectParams._key[number]); 812 UUID SensedUUID = new UUID(script.llDetectParams._key[number]);
814 EntityBase SensedObject = null; 813 EntityBase SensedObject = null;
815 lock (World.Entities) 814 lock (World.Entities)
816 { 815 {
@@ -830,8 +829,8 @@ namespace OpenSim.Region.ScriptEngine.Common
830 public string llDetectedKey(int number) 829 public string llDetectedKey(int number)
831 { 830 {
832 m_host.AddScriptLPS(1); 831 m_host.AddScriptLPS(1);
833 LLUUID SensedUUID = uuidDetectedKey(number); 832 UUID SensedUUID = uuidDetectedKey(number);
834 if (SensedUUID == LLUUID.Zero) 833 if (SensedUUID == UUID.Zero)
835 return String.Empty; 834 return String.Empty;
836 return SensedUUID.ToString(); 835 return SensedUUID.ToString();
837 } 836 }
@@ -843,7 +842,7 @@ namespace OpenSim.Region.ScriptEngine.Common
843 EntityBase SensedObject = entityDetectedKey(number); 842 EntityBase SensedObject = entityDetectedKey(number);
844 if (SensedObject ==null) 843 if (SensedObject ==null)
845 return String.Empty; 844 return String.Empty;
846 LLUUID SensedUUID = uuidDetectedKey(number); 845 UUID SensedUUID = uuidDetectedKey(number);
847 if (World.GetScenePresence(SensedUUID) == null) 846 if (World.GetScenePresence(SensedUUID) == null)
848 { 847 {
849 // sensed object is not an avatar 848 // sensed object is not an avatar
@@ -870,7 +869,7 @@ namespace OpenSim.Region.ScriptEngine.Common
870 return 0; 869 return 0;
871 int mask = 0; 870 int mask = 0;
872 871
873 LLUUID SensedUUID = uuidDetectedKey(number); 872 UUID SensedUUID = uuidDetectedKey(number);
874 LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0); 873 LSL_Types.Vector3 ZeroVector = new LSL_Types.Vector3(0, 0, 0);
875 874
876 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor 875 if (World.GetScenePresence(SensedUUID) != null) mask |= 0x01; // actor
@@ -888,7 +887,10 @@ namespace OpenSim.Region.ScriptEngine.Common
888 EntityBase SensedObject = entityDetectedKey(number); 887 EntityBase SensedObject = entityDetectedKey(number);
889 if (SensedObject == null) 888 if (SensedObject == null)
890 return new LSL_Types.Vector3(0, 0, 0); 889 return new LSL_Types.Vector3(0, 0, 0);
891 return new LSL_Types.Vector3(SensedObject.AbsolutePosition.X,SensedObject.AbsolutePosition.Y,SensedObject.AbsolutePosition.Z); 890 return new LSL_Types.Vector3(
891 SensedObject.AbsolutePosition.X,
892 SensedObject.AbsolutePosition.Y,
893 SensedObject.AbsolutePosition.Z);
892 } 894 }
893 895
894 public LSL_Types.Vector3 llDetectedVel(int number) 896 public LSL_Types.Vector3 llDetectedVel(int number)
@@ -897,7 +899,10 @@ namespace OpenSim.Region.ScriptEngine.Common
897 EntityBase SensedObject = entityDetectedKey(number); 899 EntityBase SensedObject = entityDetectedKey(number);
898 if (SensedObject == null) 900 if (SensedObject == null)
899 return new LSL_Types.Vector3(0, 0, 0); 901 return new LSL_Types.Vector3(0, 0, 0);
900 return new LSL_Types.Vector3(SensedObject.Velocity.X, SensedObject.Velocity.Y, SensedObject.Velocity.Z); 902 return new LSL_Types.Vector3(
903 SensedObject.Velocity.X,
904 SensedObject.Velocity.Y,
905 SensedObject.Velocity.Z);
901 } 906 }
902 907
903 public LSL_Types.Vector3 llDetectedGrab(int number) 908 public LSL_Types.Vector3 llDetectedGrab(int number)
@@ -910,7 +915,7 @@ namespace OpenSim.Region.ScriptEngine.Common
910 return new LSL_Types.Vector3( 915 return new LSL_Types.Vector3(
911 SensedObject.AbsolutePosition.X, 916 SensedObject.AbsolutePosition.X,
912 SensedObject.AbsolutePosition.Y, 917 SensedObject.AbsolutePosition.Y,
913 SensedObject.AbsolutePosition.Y); 918 SensedObject.AbsolutePosition.Z);
914 } 919 }
915 920
916 public LSL_Types.Quaternion llDetectedRot(int number) 921 public LSL_Types.Quaternion llDetectedRot(int number)
@@ -919,7 +924,11 @@ namespace OpenSim.Region.ScriptEngine.Common
919 EntityBase SensedObject = entityDetectedKey(number); 924 EntityBase SensedObject = entityDetectedKey(number);
920 if (SensedObject == null) 925 if (SensedObject == null)
921 return new LSL_Types.Quaternion(); 926 return new LSL_Types.Quaternion();
922 return new LSL_Types.Quaternion(SensedObject.Rotation.x, SensedObject.Rotation.y, SensedObject.Rotation.z, SensedObject.Rotation.w); 927 return new LSL_Types.Quaternion(
928 SensedObject.Rotation.X,
929 SensedObject.Rotation.Y,
930 SensedObject.Rotation.Z,
931 SensedObject.Rotation.W);
923 } 932 }
924 933
925 public LSL_Types.LSLInteger llDetectedGroup(int number) 934 public LSL_Types.LSLInteger llDetectedGroup(int number)
@@ -1005,7 +1014,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1005 1014
1006 if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) 1015 if ((status & BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS) == BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS)
1007 { 1016 {
1008 m_host.AddFlag(LLObject.ObjectFlags.CastShadows); 1017 m_host.AddFlag(PrimFlags.CastShadows);
1009 } 1018 }
1010 1019
1011 if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) 1020 if ((status & BuiltIn_Commands_BaseClass.STATUS_ROTATE_X) == BuiltIn_Commands_BaseClass.STATUS_ROTATE_X)
@@ -1055,25 +1064,25 @@ namespace OpenSim.Region.ScriptEngine.Common
1055 public LSL_Types.LSLInteger llGetStatus(int status) 1064 public LSL_Types.LSLInteger llGetStatus(int status)
1056 { 1065 {
1057 m_host.AddScriptLPS(1); 1066 m_host.AddScriptLPS(1);
1058 // Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 1067 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
1059 switch (status) 1068 switch (status)
1060 { 1069 {
1061 case BuiltIn_Commands_BaseClass.STATUS_PHYSICS: 1070 case BuiltIn_Commands_BaseClass.STATUS_PHYSICS:
1062 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) 1071 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics)
1063 { 1072 {
1064 return 1; 1073 return 1;
1065 } 1074 }
1066 return 0; 1075 return 0;
1067 1076
1068 case BuiltIn_Commands_BaseClass.STATUS_PHANTOM: 1077 case BuiltIn_Commands_BaseClass.STATUS_PHANTOM:
1069 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) 1078 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom)
1070 { 1079 {
1071 return 1; 1080 return 1;
1072 } 1081 }
1073 return 0; 1082 return 0;
1074 1083
1075 case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS: 1084 case BuiltIn_Commands_BaseClass.STATUS_CAST_SHADOWS:
1076 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) 1085 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.CastShadows) == (uint)PrimFlags.CastShadows)
1077 { 1086 {
1078 return 1; 1087 return 1;
1079 } 1088 }
@@ -1140,7 +1149,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1140 scale.y = World.m_maxNonphys; 1149 scale.y = World.m_maxNonphys;
1141 if (scale.z > World.m_maxNonphys) 1150 if (scale.z > World.m_maxNonphys)
1142 scale.z = World.m_maxNonphys; 1151 scale.z = World.m_maxNonphys;
1143 LLVector3 tmp = part.Scale; 1152 Vector3 tmp = part.Scale;
1144 tmp.X = (float)scale.x; 1153 tmp.X = (float)scale.x;
1145 tmp.Y = (float)scale.y; 1154 tmp.Y = (float)scale.y;
1146 tmp.Z = (float)scale.z; 1155 tmp.Z = (float)scale.z;
@@ -1163,8 +1172,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1163 1172
1164 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 1173 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face)
1165 { 1174 {
1166 LLObject.TextureEntry tex = part.Shape.Textures; 1175 Primitive.TextureEntry tex = part.Shape.Textures;
1167 LLColor texcolor; 1176 Color4 texcolor;
1168 if (face > -1) 1177 if (face > -1)
1169 { 1178 {
1170 texcolor = tex.CreateFace((uint)face).RGBA; 1179 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1200,7 +1209,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1200 1209
1201 public void SetGlow(SceneObjectPart part, int face, float glow) 1210 public void SetGlow(SceneObjectPart part, int face, float glow)
1202 { 1211 {
1203 LLObject.TextureEntry tex = part.Shape.Textures; 1212 Primitive.TextureEntry tex = part.Shape.Textures;
1204 if (face > -1) 1213 if (face > -1)
1205 { 1214 {
1206 tex.CreateFace((uint) face); 1215 tex.CreateFace((uint) face);
@@ -1247,7 +1256,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1247 break; 1256 break;
1248 } 1257 }
1249 1258
1250 LLObject.TextureEntry tex = part.Shape.Textures; 1259 Primitive.TextureEntry tex = part.Shape.Textures;
1251 if (face > -1) 1260 if (face > -1)
1252 { 1261 {
1253 tex.CreateFace((uint) face); 1262 tex.CreateFace((uint) face);
@@ -1275,7 +1284,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1275 1284
1276 public void SetFullBright(SceneObjectPart part, int face, bool bright) 1285 public void SetFullBright(SceneObjectPart part, int face, bool bright)
1277 { 1286 {
1278 LLObject.TextureEntry tex = part.Shape.Textures; 1287 Primitive.TextureEntry tex = part.Shape.Textures;
1279 if (face > -1) 1288 if (face > -1)
1280 { 1289 {
1281 tex.CreateFace((uint) face); 1290 tex.CreateFace((uint) face);
@@ -1301,7 +1310,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1301 public double llGetAlpha(int face) 1310 public double llGetAlpha(int face)
1302 { 1311 {
1303 m_host.AddScriptLPS(1); 1312 m_host.AddScriptLPS(1);
1304 LLObject.TextureEntry tex = m_host.Shape.Textures; 1313 Primitive.TextureEntry tex = m_host.Shape.Textures;
1305 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1314 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1306 { 1315 {
1307 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 1316 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255);
@@ -1322,8 +1331,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1322 1331
1323 private void SetAlpha(SceneObjectPart part, double alpha, int face) 1332 private void SetAlpha(SceneObjectPart part, double alpha, int face)
1324 { 1333 {
1325 LLObject.TextureEntry tex = part.Shape.Textures; 1334 Primitive.TextureEntry tex = part.Shape.Textures;
1326 LLColor texcolor; 1335 Color4 texcolor;
1327 if (face > -1) 1336 if (face > -1)
1328 { 1337 {
1329 texcolor = tex.CreateFace((uint)face).RGBA; 1338 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1450,8 +1459,8 @@ namespace OpenSim.Region.ScriptEngine.Common
1450 public LSL_Types.Vector3 llGetColor(int face) 1459 public LSL_Types.Vector3 llGetColor(int face)
1451 { 1460 {
1452 m_host.AddScriptLPS(1); 1461 m_host.AddScriptLPS(1);
1453 LLObject.TextureEntry tex = m_host.Shape.Textures; 1462 Primitive.TextureEntry tex = m_host.Shape.Textures;
1454 LLColor texcolor; 1463 Color4 texcolor;
1455 LSL_Types.Vector3 rgb; 1464 LSL_Types.Vector3 rgb;
1456 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1465 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1457 { 1466 {
@@ -1484,21 +1493,21 @@ namespace OpenSim.Region.ScriptEngine.Common
1484 1493
1485 private void SetTexture(SceneObjectPart part, string texture, int face) 1494 private void SetTexture(SceneObjectPart part, string texture, int face)
1486 { 1495 {
1487 LLUUID textureID=new LLUUID(); 1496 UUID textureID=new UUID();
1488 1497
1489 if (!LLUUID.TryParse(texture, out textureID)) 1498 if (!UUID.TryParse(texture, out textureID))
1490 { 1499 {
1491 textureID=InventoryKey(texture, (int)AssetType.Texture); 1500 textureID=InventoryKey(texture, (int)AssetType.Texture);
1492 } 1501 }
1493 1502
1494 if (textureID == LLUUID.Zero) 1503 if (textureID == UUID.Zero)
1495 return; 1504 return;
1496 1505
1497 LLObject.TextureEntry tex = part.Shape.Textures; 1506 Primitive.TextureEntry tex = part.Shape.Textures;
1498 1507
1499 if (face > -1) 1508 if (face > -1)
1500 { 1509 {
1501 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1510 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1502 texface.TextureID = textureID; 1511 texface.TextureID = textureID;
1503 tex.FaceTextures[face] = texface; 1512 tex.FaceTextures[face] = texface;
1504 part.UpdateTexture(tex); 1513 part.UpdateTexture(tex);
@@ -1529,10 +1538,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1529 1538
1530 private void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1539 private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
1531 { 1540 {
1532 LLObject.TextureEntry tex = part.Shape.Textures; 1541 Primitive.TextureEntry tex = part.Shape.Textures;
1533 if (face > -1) 1542 if (face > -1)
1534 { 1543 {
1535 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1544 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1536 texface.RepeatU = (float)u; 1545 texface.RepeatU = (float)u;
1537 texface.RepeatV = (float)v; 1546 texface.RepeatV = (float)v;
1538 tex.FaceTextures[face] = texface; 1547 tex.FaceTextures[face] = texface;
@@ -1565,10 +1574,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1565 1574
1566 private void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1575 private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
1567 { 1576 {
1568 LLObject.TextureEntry tex = part.Shape.Textures; 1577 Primitive.TextureEntry tex = part.Shape.Textures;
1569 if (face > -1) 1578 if (face > -1)
1570 { 1579 {
1571 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1580 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1572 texface.OffsetU = (float)u; 1581 texface.OffsetU = (float)u;
1573 texface.OffsetV = (float)v; 1582 texface.OffsetV = (float)v;
1574 tex.FaceTextures[face] = texface; 1583 tex.FaceTextures[face] = texface;
@@ -1601,10 +1610,10 @@ namespace OpenSim.Region.ScriptEngine.Common
1601 1610
1602 private void RotateTexture(SceneObjectPart part, double rotation, int face) 1611 private void RotateTexture(SceneObjectPart part, double rotation, int face)
1603 { 1612 {
1604 LLObject.TextureEntry tex = part.Shape.Textures; 1613 Primitive.TextureEntry tex = part.Shape.Textures;
1605 if (face > -1) 1614 if (face > -1)
1606 { 1615 {
1607 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1616 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1608 texface.Rotation = (float)rotation; 1617 texface.Rotation = (float)rotation;
1609 tex.FaceTextures[face] = texface; 1618 tex.FaceTextures[face] = texface;
1610 part.UpdateTexture(tex); 1619 part.UpdateTexture(tex);
@@ -1628,14 +1637,14 @@ namespace OpenSim.Region.ScriptEngine.Common
1628 public string llGetTexture(int face) 1637 public string llGetTexture(int face)
1629 { 1638 {
1630 m_host.AddScriptLPS(1); 1639 m_host.AddScriptLPS(1);
1631 LLObject.TextureEntry tex = m_host.Shape.Textures; 1640 Primitive.TextureEntry tex = m_host.Shape.Textures;
1632 if (face == -1) 1641 if (face == -1)
1633 { 1642 {
1634 face = 0; 1643 face = 0;
1635 } 1644 }
1636 if (face > -1) 1645 if (face > -1)
1637 { 1646 {
1638 LLObject.TextureEntryFace texface; 1647 Primitive.TextureEntryFace texface;
1639 texface = tex.GetFace((uint)face); 1648 texface = tex.GetFace((uint)face);
1640 return texface.TextureID.ToString(); 1649 return texface.TextureID.ToString();
1641 } 1650 }
@@ -1665,11 +1674,11 @@ namespace OpenSim.Region.ScriptEngine.Common
1665 1674
1666 if (part.ParentID != 0) 1675 if (part.ParentID != 0)
1667 { 1676 {
1668 part.UpdateOffSet(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1677 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1669 } 1678 }
1670 else 1679 else
1671 { 1680 {
1672 part.UpdateGroupPosition(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1681 part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1673 } 1682 }
1674 } 1683 }
1675 1684
@@ -1709,7 +1718,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1709 1718
1710 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1719 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot)
1711 { 1720 {
1712 part.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1721 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1713 // Update rotation does not move the object in the physics scene if it's a linkset. 1722 // Update rotation does not move the object in the physics scene if it's a linkset.
1714 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1723 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1715 } 1724 }
@@ -1717,14 +1726,18 @@ namespace OpenSim.Region.ScriptEngine.Common
1717 public LSL_Types.Quaternion llGetRot() 1726 public LSL_Types.Quaternion llGetRot()
1718 { 1727 {
1719 m_host.AddScriptLPS(1); 1728 m_host.AddScriptLPS(1);
1720 LLQuaternion q = m_host.RotationOffset; 1729 Quaternion q = m_host.RotationOffset;
1721 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1730 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
1722 } 1731 }
1723 1732
1724 public LSL_Types.Quaternion llGetLocalRot() 1733 public LSL_Types.Quaternion llGetLocalRot()
1725 { 1734 {
1726 m_host.AddScriptLPS(1); 1735 m_host.AddScriptLPS(1);
1727 return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); 1736 return new LSL_Types.Quaternion(
1737 m_host.RotationOffset.X,
1738 m_host.RotationOffset.Y,
1739 m_host.RotationOffset.Z,
1740 m_host.RotationOffset.W);
1728 } 1741 }
1729 1742
1730 public void llSetForce(LSL_Types.Vector3 force, int local) 1743 public void llSetForce(LSL_Types.Vector3 force, int local)
@@ -1769,7 +1782,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1769 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1782 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range)
1770 { 1783 {
1771 m_host.AddScriptLPS(1); 1784 m_host.AddScriptLPS(1);
1772 return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1785 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
1773 1786
1774 } 1787 }
1775 1788
@@ -1795,7 +1808,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1795 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1808 public void llMoveToTarget(LSL_Types.Vector3 target, double tau)
1796 { 1809 {
1797 m_host.AddScriptLPS(1); 1810 m_host.AddScriptLPS(1);
1798 m_host.MoveToTarget(new LLVector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1811 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
1799 } 1812 }
1800 1813
1801 public void llStopMoveToTarget() 1814 public void llStopMoveToTarget()
@@ -1816,7 +1829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1816 if (force.z > 20000) 1829 if (force.z > 20000)
1817 force.z = 20000; 1830 force.z = 20000;
1818 1831
1819 m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1832 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1820 } 1833 }
1821 1834
1822 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1835 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local)
@@ -1925,7 +1938,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1925 { 1938 {
1926 m_host.AddScriptLPS(1); 1939 m_host.AddScriptLPS(1);
1927 1940
1928 if (m_host.Sound != LLUUID.Zero) 1941 if (m_host.Sound != UUID.Zero)
1929 llStopSound(); 1942 llStopSound();
1930 1943
1931 m_host.Sound = KeyOrName(sound); 1944 m_host.Sound = KeyOrName(sound);
@@ -1967,7 +1980,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1967 { 1980 {
1968 m_host.AddScriptLPS(1); 1981 m_host.AddScriptLPS(1);
1969 1982
1970 m_host.Sound = LLUUID.Zero; 1983 m_host.Sound = UUID.Zero;
1971 m_host.SoundGain = 0; 1984 m_host.SoundGain = 0;
1972 m_host.SoundFlags = 0; 1985 m_host.SoundFlags = 0;
1973 m_host.SoundRadius = 0; 1986 m_host.SoundRadius = 0;
@@ -1975,7 +1988,7 @@ namespace OpenSim.Region.ScriptEngine.Common
1975 m_host.ScheduleFullUpdate(); 1988 m_host.ScheduleFullUpdate();
1976 m_host.SendFullUpdateToAllClients(); 1989 m_host.SendFullUpdateToAllClients();
1977 1990
1978 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); 1991 // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
1979 } 1992 }
1980 1993
1981 public void llPreloadSound(string sound) 1994 public void llPreloadSound(string sound)
@@ -2223,13 +2236,13 @@ namespace OpenSim.Region.ScriptEngine.Common
2223 2236
2224 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2237 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount)
2225 { 2238 {
2226 LLUUID invItemID=InventorySelf(); 2239 UUID invItemID=InventorySelf();
2227 if (invItemID == LLUUID.Zero) 2240 if (invItemID == UUID.Zero)
2228 return 0; 2241 return 0;
2229 2242
2230 m_host.AddScriptLPS(1); 2243 m_host.AddScriptLPS(1);
2231 2244
2232 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2245 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2233 return 0; 2246 return 0;
2234 2247
2235 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0) 2248 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_DEBIT) == 0)
@@ -2238,9 +2251,9 @@ namespace OpenSim.Region.ScriptEngine.Common
2238 return 0; 2251 return 0;
2239 } 2252 }
2240 2253
2241 LLUUID toID=new LLUUID(); 2254 UUID toID=new UUID();
2242 2255
2243 if (!LLUUID.TryParse(destination, out toID)) 2256 if (!UUID.TryParse(destination, out toID))
2244 { 2257 {
2245 LSLError("Bad key in llGiveMoney"); 2258 LSLError("Bad key in llGiveMoney");
2246 return 0; 2259 return 0;
@@ -2303,7 +2316,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2303 // it's possible to have two items with the same task inventory name. 2316 // it's possible to have two items with the same task inventory name.
2304 // this is an easter egg of sorts. 2317 // this is an easter egg of sorts.
2305 2318
2306 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2319 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2307 { 2320 {
2308 if (inv.Value.Name == inventory) 2321 if (inv.Value.Name == inventory)
2309 { 2322 {
@@ -2314,18 +2327,18 @@ namespace OpenSim.Region.ScriptEngine.Common
2314 continue; 2327 continue;
2315 } 2328 }
2316 2329
2317 LLVector3 llpos = new LLVector3((float)pos.x, (float)pos.y, (float)pos.z); 2330 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
2318 2331
2319 // test if we're further away then 10m 2332 // test if we're further away then 10m
2320 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) 2333 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10)
2321 return; // wiki says, if it's further away then 10m, silently fail. 2334 return; // wiki says, if it's further away then 10m, silently fail.
2322 2335
2323 LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); 2336 Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z);
2324 2337
2325 // need the magnitude later 2338 // need the magnitude later
2326 float velmag = (float)Util.GetMagnitude(llvel); 2339 float velmag = (float)Util.GetMagnitude(llvel);
2327 2340
2328 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); 2341 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
2329 2342
2330 // If either of these are null, then there was an unknown error. 2343 // If either of these are null, then there was an unknown error.
2331 if (new_group == null) 2344 if (new_group == null)
@@ -2336,7 +2349,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2336 // objects rezzed with this method are die_at_edge by default. 2349 // objects rezzed with this method are die_at_edge by default.
2337 new_group.RootPart.SetDieAtEdge(true); 2350 new_group.RootPart.SetDieAtEdge(true);
2338 2351
2339 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.UUID.ToString()) }); 2352 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "object_rez", EventQueueManager.llDetectNull, new Object[] { new LSL_Types.LSLString(new_group.RootPart.ToString()) });
2340 float groupmass = new_group.GetMass(); 2353 float groupmass = new_group.GetMass();
2341 2354
2342 //Recoil. 2355 //Recoil.
@@ -2401,7 +2414,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2401 return; 2414 return;
2402 } 2415 }
2403 2416
2404 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2417 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2405 { 2418 {
2406 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2419 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2407 2420
@@ -2428,7 +2441,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2428 return; 2441 return;
2429 } 2442 }
2430 2443
2431 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2444 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2432 { 2445 {
2433 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2446 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2434 2447
@@ -2489,14 +2502,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2489 2502
2490 // TODO: figure out values for client, fromSession, and imSessionID 2503 // TODO: figure out values for client, fromSession, and imSessionID
2491 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); 2504 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch());
2492 LLUUID friendTransactionID = LLUUID.Random(); 2505 UUID friendTransactionID = UUID.Random();
2493 2506
2494 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 2507 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
2495 2508
2496 GridInstantMessage msg = new GridInstantMessage(); 2509 GridInstantMessage msg = new GridInstantMessage();
2497 msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; 2510 msg.fromAgentID = new Guid(m_host.ToString()); // fromAgentID.Guid;
2498 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; 2511 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID;
2499 msg.toAgentID = new Guid(user); // toAgentID.UUID; 2512 msg.toAgentID = new Guid(user); // toAgentID.Guid;
2500 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here 2513 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
2501// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); 2514// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
2502// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); 2515// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
@@ -2514,8 +2527,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2514 msg.fromGroup = false;// fromGroup; 2527 msg.fromGroup = false;// fromGroup;
2515 msg.offline = (byte)0; //offline; 2528 msg.offline = (byte)0; //offline;
2516 msg.ParentEstateID = 0; //ParentEstateID; 2529 msg.ParentEstateID = 0; //ParentEstateID;
2517 msg.Position = new sLLVector3();// new sLLVector3(m_host.AbsolutePosition); 2530 msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
2518 msg.RegionID = World.RegionInfo.RegionID.UUID;//RegionID.UUID; 2531 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
2519 msg.binaryBucket = new byte[0];// binaryBucket; 2532 msg.binaryBucket = new byte[0];// binaryBucket;
2520 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2533 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2521 // ScriptSleep(2000); 2534 // ScriptSleep(2000);
@@ -2543,7 +2556,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2543 public string llGetKey() 2556 public string llGetKey()
2544 { 2557 {
2545 m_host.AddScriptLPS(1); 2558 m_host.AddScriptLPS(1);
2546 return m_host.UUID.ToString(); 2559 return m_host.ToString();
2547 } 2560 }
2548 2561
2549 public void llSetBuoyancy(double buoyancy) 2562 public void llSetBuoyancy(double buoyancy)
@@ -2607,11 +2620,11 @@ namespace OpenSim.Region.ScriptEngine.Common
2607 { 2620 {
2608 m_host.AddScriptLPS(1); 2621 m_host.AddScriptLPS(1);
2609 2622
2610 LLUUID invItemID=InventorySelf(); 2623 UUID invItemID=InventorySelf();
2611 if (invItemID == LLUUID.Zero) 2624 if (invItemID == UUID.Zero)
2612 return; 2625 return;
2613 2626
2614 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2627 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2615 return; 2628 return;
2616 2629
2617 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2630 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
@@ -2620,9 +2633,9 @@ namespace OpenSim.Region.ScriptEngine.Common
2620 2633
2621 if (presence != null) 2634 if (presence != null)
2622 { 2635 {
2623 // Do NOT try to parse LLUUID, animations cannot be triggered by ID 2636 // Do NOT try to parse UUID, animations cannot be triggered by ID
2624 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); 2637 UUID animID=InventoryKey(anim, (int)AssetType.Animation);
2625 if (animID == LLUUID.Zero) 2638 if (animID == UUID.Zero)
2626 presence.AddAnimation(anim); 2639 presence.AddAnimation(anim);
2627 else 2640 else
2628 presence.AddAnimation(animID); 2641 presence.AddAnimation(animID);
@@ -2634,30 +2647,30 @@ namespace OpenSim.Region.ScriptEngine.Common
2634 { 2647 {
2635 m_host.AddScriptLPS(1); 2648 m_host.AddScriptLPS(1);
2636 2649
2637 LLUUID invItemID=InventorySelf(); 2650 UUID invItemID=InventorySelf();
2638 if (invItemID == LLUUID.Zero) 2651 if (invItemID == UUID.Zero)
2639 return; 2652 return;
2640 2653
2641 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2654 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2642 return; 2655 return;
2643 2656
2644 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2657 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2645 { 2658 {
2646 LLUUID animID = new LLUUID(); 2659 UUID animID = new UUID();
2647 2660
2648 if (!LLUUID.TryParse(anim, out animID)) 2661 if (!UUID.TryParse(anim, out animID))
2649 { 2662 {
2650 animID=InventoryKey(anim); 2663 animID=InventoryKey(anim);
2651 } 2664 }
2652 2665
2653 if (animID == LLUUID.Zero) 2666 if (animID == UUID.Zero)
2654 return; 2667 return;
2655 2668
2656 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); 2669 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2657 2670
2658 if (presence != null) 2671 if (presence != null)
2659 { 2672 {
2660 if (animID == LLUUID.Zero) 2673 if (animID == UUID.Zero)
2661 presence.RemoveAnimation(anim); 2674 presence.RemoveAnimation(anim);
2662 else 2675 else
2663 presence.RemoveAnimation(animID); 2676 presence.RemoveAnimation(animID);
@@ -2680,8 +2693,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2680 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2693 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain)
2681 { 2694 {
2682 m_host.AddScriptLPS(1); 2695 m_host.AddScriptLPS(1);
2683 m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2696 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2684 m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2697 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2685 m_host.ScheduleTerseUpdate(); 2698 m_host.ScheduleTerseUpdate();
2686 m_host.SendTerseUpdateToAllClients(); 2699 m_host.SendTerseUpdateToAllClients();
2687 } 2700 }
@@ -2700,19 +2713,19 @@ namespace OpenSim.Region.ScriptEngine.Common
2700 2713
2701 public void llRequestPermissions(string agent, int perm) 2714 public void llRequestPermissions(string agent, int perm)
2702 { 2715 {
2703 LLUUID agentID=new LLUUID(); 2716 UUID agentID=new UUID();
2704 2717
2705 if (!LLUUID.TryParse(agent, out agentID)) 2718 if (!UUID.TryParse(agent, out agentID))
2706 return; 2719 return;
2707 2720
2708 LLUUID invItemID=InventorySelf(); 2721 UUID invItemID=InventorySelf();
2709 2722
2710 if (invItemID == LLUUID.Zero) 2723 if (invItemID == UUID.Zero)
2711 return; // Not in a prim? How?? 2724 return; // Not in a prim? How??
2712 2725
2713 if (agentID == LLUUID.Zero || perm == 0) // Releasing permissions 2726 if (agentID == UUID.Zero || perm == 0) // Releasing permissions
2714 { 2727 {
2715 m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; 2728 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero;
2716 m_host.TaskInventory[invItemID].PermsMask=0; 2729 m_host.TaskInventory[invItemID].PermsMask=0;
2717 2730
2718 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 2731 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -2786,14 +2799,14 @@ namespace OpenSim.Region.ScriptEngine.Common
2786 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)}); 2799 m_localID, m_itemID, "run_time_permissions", EventQueueManager.llDetectNull, new Object[] {new LSL_Types.LSLInteger(0)});
2787 } 2800 }
2788 2801
2789 void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) 2802 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer)
2790 { 2803 {
2791 if (taskID != m_host.UUID) 2804 if (taskID != m_host.UUID)
2792 return; 2805 return;
2793 2806
2794 LLUUID invItemID=InventorySelf(); 2807 UUID invItemID=InventorySelf();
2795 2808
2796 if (invItemID == LLUUID.Zero) 2809 if (invItemID == UUID.Zero)
2797 return; 2810 return;
2798 2811
2799 client.OnScriptAnswer-=handleScriptAnswer; 2812 client.OnScriptAnswer-=handleScriptAnswer;
@@ -2816,7 +2829,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2816 } 2829 }
2817 } 2830 }
2818 2831
2819 return LLUUID.Zero.ToString(); 2832 return UUID.Zero.ToString();
2820 } 2833 }
2821 2834
2822 public LSL_Types.LSLInteger llGetPermissions() 2835 public LSL_Types.LSLInteger llGetPermissions()
@@ -2854,8 +2867,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2854 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2867 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2855 if (linknumber > -1) 2868 if (linknumber > -1)
2856 { 2869 {
2857 LLObject.TextureEntry tex = part.Shape.Textures; 2870 Primitive.TextureEntry tex = part.Shape.Textures;
2858 LLColor texcolor; 2871 Color4 texcolor;
2859 if (face > -1) 2872 if (face > -1)
2860 { 2873 {
2861 texcolor = tex.CreateFace((uint)face).RGBA; 2874 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2901,8 +2914,8 @@ namespace OpenSim.Region.ScriptEngine.Common
2901 { 2914 {
2902 linknumber = w; 2915 linknumber = w;
2903 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2916 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2904 LLObject.TextureEntry tex = part.Shape.Textures; 2917 Primitive.TextureEntry tex = part.Shape.Textures;
2905 LLColor texcolor; 2918 Color4 texcolor;
2906 if (face > -1) 2919 if (face > -1)
2907 { 2920 {
2908 texcolor = tex.CreateFace((uint)face).RGBA; 2921 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2945,7 +2958,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2945 public void llCreateLink(string target, int parent) 2958 public void llCreateLink(string target, int parent)
2946 { 2959 {
2947 m_host.AddScriptLPS(1); 2960 m_host.AddScriptLPS(1);
2948 LLUUID invItemID = InventorySelf(); 2961 UUID invItemID = InventorySelf();
2949 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) { 2962 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2950 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); 2963 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2951 return; 2964 return;
@@ -2970,7 +2983,7 @@ namespace OpenSim.Region.ScriptEngine.Common
2970 childPrim.RootPart.UpdateFlag = uf; 2983 childPrim.RootPart.UpdateFlag = uf;
2971 } 2984 }
2972 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 2985 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2973 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 2986 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
2974 parentPrim.GetProperties(client); 2987 parentPrim.GetProperties(client);
2975 2988
2976 ScriptSleep(1000); 2989 ScriptSleep(1000);
@@ -2994,11 +3007,11 @@ namespace OpenSim.Region.ScriptEngine.Common
2994 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 3007 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
2995 if (part != null) 3008 if (part != null)
2996 { 3009 {
2997 return part.UUID.ToString(); 3010 return part.ToString();
2998 } 3011 }
2999 else 3012 else
3000 { 3013 {
3001 return LLUUID.Zero.ToString(); 3014 return UUID.Zero.ToString();
3002 } 3015 }
3003 } 3016 }
3004 3017
@@ -3020,7 +3033,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3020 { 3033 {
3021 m_host.AddScriptLPS(1); 3034 m_host.AddScriptLPS(1);
3022 int count = 0; 3035 int count = 0;
3023 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3036 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3024 { 3037 {
3025 if (inv.Value.Type == type || type == -1) 3038 if (inv.Value.Type == type || type == -1)
3026 { 3039 {
@@ -3034,7 +3047,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3034 { 3047 {
3035 m_host.AddScriptLPS(1); 3048 m_host.AddScriptLPS(1);
3036 ArrayList keys = new ArrayList(); 3049 ArrayList keys = new ArrayList();
3037 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3050 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3038 { 3051 {
3039 if (inv.Value.Type == type || type == -1) 3052 if (inv.Value.Type == type || type == -1)
3040 { 3053 {
@@ -3055,7 +3068,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3055 3068
3056 public void llSetScriptState(string name, int run) 3069 public void llSetScriptState(string name, int run)
3057 { 3070 {
3058 LLUUID item; 3071 UUID item;
3059 ScriptManager sm; 3072 ScriptManager sm;
3060 IScript script = null; 3073 IScript script = null;
3061 3074
@@ -3064,7 +3077,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3064 // These functions are supposed to be robust, 3077 // These functions are supposed to be robust,
3065 // so get the state one step at a time. 3078 // so get the state one step at a time.
3066 3079
3067 if ((item = ScriptByName(name)) != LLUUID.Zero) 3080 if ((item = ScriptByName(name)) != UUID.Zero)
3068 { 3081 {
3069 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 3082 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
3070 { 3083 {
@@ -3098,17 +3111,17 @@ namespace OpenSim.Region.ScriptEngine.Common
3098 { 3111 {
3099 m_host.AddScriptLPS(1); 3112 m_host.AddScriptLPS(1);
3100 bool found = false; 3113 bool found = false;
3101 LLUUID destId = LLUUID.Zero; 3114 UUID destId = UUID.Zero;
3102 LLUUID objId = LLUUID.Zero; 3115 UUID objId = UUID.Zero;
3103 3116
3104 if (!LLUUID.TryParse(destination, out destId)) 3117 if (!UUID.TryParse(destination, out destId))
3105 { 3118 {
3106 llSay(0, "Could not parse key " + destination); 3119 llSay(0, "Could not parse key " + destination);
3107 return; 3120 return;
3108 } 3121 }
3109 3122
3110 // move the first object found with this inventory name 3123 // move the first object found with this inventory name
3111 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3124 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3112 { 3125 {
3113 if (inv.Value.Name == inventory) 3126 if (inv.Value.Name == inventory)
3114 { 3127 {
@@ -3186,22 +3199,22 @@ namespace OpenSim.Region.ScriptEngine.Common
3186 { 3199 {
3187 if (item.Type == 3 && item.Name == name) 3200 if (item.Type == 3 && item.Name == name)
3188 { 3201 {
3189 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest( 3202 UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.m_Dataserver.RegisterRequest(
3190 m_localID, m_itemID, item.AssetID.ToString()); 3203 m_localID, m_itemID, item.AssetID.ToString());
3191 3204
3192 LLVector3 region = new LLVector3( 3205 Vector3 region = new Vector3(
3193 World.RegionInfo.RegionLocX * Constants.RegionSize, 3206 World.RegionInfo.RegionLocX * Constants.RegionSize,
3194 World.RegionInfo.RegionLocY * Constants.RegionSize, 3207 World.RegionInfo.RegionLocY * Constants.RegionSize,
3195 0); 3208 0);
3196 3209
3197 World.AssetCache.GetAsset(item.AssetID, 3210 World.AssetCache.GetAsset(item.AssetID,
3198 delegate(LLUUID i, AssetBase a) 3211 delegate(UUID i, AssetBase a)
3199 { 3212 {
3200 AssetLandmark lm = new AssetLandmark(a); 3213 AssetLandmark lm = new AssetLandmark(a);
3201 3214
3202 float rx = (uint)(lm.RegionHandle >> 32); 3215 float rx = (uint)(lm.RegionHandle >> 32);
3203 float ry = (uint)lm.RegionHandle; 3216 float ry = (uint)lm.RegionHandle;
3204 region = lm.Position + new LLVector3(rx, ry, 0) - region; 3217 region = lm.Position + new Vector3(rx, ry, 0) - region;
3205 3218
3206 string reply = region.ToString(); 3219 string reply = region.ToString();
3207 m_ScriptEngine.m_ASYNCLSLCommandManager. 3220 m_ScriptEngine.m_ASYNCLSLCommandManager.
@@ -3226,8 +3239,8 @@ namespace OpenSim.Region.ScriptEngine.Common
3226 public void llTeleportAgentHome(string agent) 3239 public void llTeleportAgentHome(string agent)
3227 { 3240 {
3228 m_host.AddScriptLPS(1); 3241 m_host.AddScriptLPS(1);
3229 LLUUID agentId = new LLUUID(); 3242 UUID agentId = new UUID();
3230 if (LLUUID.TryParse(agent, out agentId)) 3243 if (UUID.TryParse(agent, out agentId))
3231 { 3244 {
3232 ScenePresence presence = World.GetScenePresence(agentId); 3245 ScenePresence presence = World.GetScenePresence(agentId);
3233 if (presence != null) 3246 if (presence != null)
@@ -3243,7 +3256,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3243 public void llModifyLand(int action, int brush) 3256 public void llModifyLand(int action, int brush)
3244 { 3257 {
3245 m_host.AddScriptLPS(1); 3258 m_host.AddScriptLPS(1);
3246 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); 3259 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0));
3247 } 3260 }
3248 3261
3249 public void llCollisionSound(string impact_sound, double impact_volume) 3262 public void llCollisionSound(string impact_sound, double impact_volume)
@@ -3277,7 +3290,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3277 m_host.AddScriptLPS(1); 3290 m_host.AddScriptLPS(1);
3278 3291
3279 uint partLocalID; 3292 uint partLocalID;
3280 LLUUID partItemID; 3293 UUID partItemID;
3281 3294
3282 switch ((int)linknum) 3295 switch ((int)linknum)
3283 { 3296 {
@@ -3452,7 +3465,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3452 SceneObjectPart targ = World.GetSceneObjectPart(target); 3465 SceneObjectPart targ = World.GetSceneObjectPart(target);
3453 if (targ == null) 3466 if (targ == null)
3454 return; 3467 return;
3455 targ.ApplyImpulse(new LLVector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); 3468 targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0);
3456 } 3469 }
3457 3470
3458 public void llPassCollisions(int pass) 3471 public void llPassCollisions(int pass)
@@ -3731,7 +3744,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3731 public string llGetInventoryKey(string name) 3744 public string llGetInventoryKey(string name)
3732 { 3745 {
3733 m_host.AddScriptLPS(1); 3746 m_host.AddScriptLPS(1);
3734 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3747 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3735 { 3748 {
3736 if (inv.Value.Name == name) 3749 if (inv.Value.Name == name)
3737 { 3750 {
@@ -3741,11 +3754,11 @@ namespace OpenSim.Region.ScriptEngine.Common
3741 } 3754 }
3742 else 3755 else
3743 { 3756 {
3744 return LLUUID.Zero.ToString(); 3757 return UUID.Zero.ToString();
3745 } 3758 }
3746 } 3759 }
3747 } 3760 }
3748 return LLUUID.Zero.ToString(); 3761 return UUID.Zero.ToString();
3749 } 3762 }
3750 3763
3751 public void llAllowInventoryDrop(int add) 3764 public void llAllowInventoryDrop(int add)
@@ -3763,10 +3776,10 @@ namespace OpenSim.Region.ScriptEngine.Common
3763 m_host.AddScriptLPS(1); 3776 m_host.AddScriptLPS(1);
3764 3777
3765 LSL_Types.Vector3 SunDoubleVector3; 3778 LSL_Types.Vector3 SunDoubleVector3;
3766 LLVector3 SunFloatVector3; 3779 Vector3 SunFloatVector3;
3767 3780
3768 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3781 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3769 // have to convert from LLVector3 (float) to LSL_Types.Vector3 (double) 3782 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double)
3770 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3783 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3771 SunDoubleVector3.x = (double)SunFloatVector3.X; 3784 SunDoubleVector3.x = (double)SunFloatVector3.X;
3772 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3785 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3778,7 +3791,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3778 public LSL_Types.Vector3 llGetTextureOffset(int face) 3791 public LSL_Types.Vector3 llGetTextureOffset(int face)
3779 { 3792 {
3780 m_host.AddScriptLPS(1); 3793 m_host.AddScriptLPS(1);
3781 LLObject.TextureEntry tex = m_host.Shape.Textures; 3794 Primitive.TextureEntry tex = m_host.Shape.Textures;
3782 LSL_Types.Vector3 offset; 3795 LSL_Types.Vector3 offset;
3783 if (face == -1) 3796 if (face == -1)
3784 { 3797 {
@@ -3793,7 +3806,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3793 public LSL_Types.Vector3 llGetTextureScale(int side) 3806 public LSL_Types.Vector3 llGetTextureScale(int side)
3794 { 3807 {
3795 m_host.AddScriptLPS(1); 3808 m_host.AddScriptLPS(1);
3796 LLObject.TextureEntry tex = m_host.Shape.Textures; 3809 Primitive.TextureEntry tex = m_host.Shape.Textures;
3797 LSL_Types.Vector3 scale; 3810 LSL_Types.Vector3 scale;
3798 if (side == -1) 3811 if (side == -1)
3799 { 3812 {
@@ -3808,7 +3821,7 @@ namespace OpenSim.Region.ScriptEngine.Common
3808 public double llGetTextureRot(int face) 3821 public double llGetTextureRot(int face)
3809 { 3822 {
3810 m_host.AddScriptLPS(1); 3823 m_host.AddScriptLPS(1);
3811 LLObject.TextureEntry tex = m_host.Shape.Textures; 3824 Primitive.TextureEntry tex = m_host.Shape.Textures;
3812 if (face == -1) 3825 if (face == -1)
3813 { 3826 {
3814 face = 0; 3827 face = 0;
@@ -3825,14 +3838,14 @@ namespace OpenSim.Region.ScriptEngine.Common
3825 public string llGetOwnerKey(string id) 3838 public string llGetOwnerKey(string id)
3826 { 3839 {
3827 m_host.AddScriptLPS(1); 3840 m_host.AddScriptLPS(1);
3828 LLUUID key = new LLUUID(); 3841 UUID key = new UUID();
3829 if (LLUUID.TryParse(id, out key)) 3842 if (UUID.TryParse(id, out key))
3830 { 3843 {
3831 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3844 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString();
3832 } 3845 }
3833 else 3846 else
3834 { 3847 {
3835 return LLUUID.Zero.ToString(); 3848 return UUID.Zero.ToString();
3836 } 3849 }
3837 } 3850 }
3838 3851
@@ -4041,8 +4054,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4041 return 2; 4054 return 2;
4042 if (src.Data[index] is String) 4055 if (src.Data[index] is String)
4043 { 4056 {
4044 LLUUID tuuid; 4057 UUID tuuid;
4045 if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) 4058 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
4046 { 4059 {
4047 return 3; 4060 return 3;
4048 } 4061 }
@@ -4454,8 +4467,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4454 public string llKey2Name(string id) 4467 public string llKey2Name(string id)
4455 { 4468 {
4456 m_host.AddScriptLPS(1); 4469 m_host.AddScriptLPS(1);
4457 LLUUID key = new LLUUID(); 4470 UUID key = new UUID();
4458 if (LLUUID.TryParse(id,out key)) 4471 if (UUID.TryParse(id,out key))
4459 { 4472 {
4460 ScenePresence presence = World.GetScenePresence(key); 4473 ScenePresence presence = World.GetScenePresence(key);
4461 4474
@@ -4479,7 +4492,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4479 { 4492 {
4480 m_host.AddScriptLPS(1); 4493 m_host.AddScriptLPS(1);
4481 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); 4494 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
4482 pTexAnim.Flags =(uint) mode; 4495 pTexAnim.Flags =(Primitive.TextureAnimMode)mode;
4483 4496
4484 //ALL_SIDES 4497 //ALL_SIDES
4485 if (face == -1) 4498 if (face == -1)
@@ -4568,8 +4581,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4568 public LSL_Types.LSLInteger llOverMyLand(string id) 4581 public LSL_Types.LSLInteger llOverMyLand(string id)
4569 { 4582 {
4570 m_host.AddScriptLPS(1); 4583 m_host.AddScriptLPS(1);
4571 LLUUID key = new LLUUID(); 4584 UUID key = new UUID();
4572 if (LLUUID.TryParse(id,out key)) 4585 if (UUID.TryParse(id,out key))
4573 { 4586 {
4574 ScenePresence presence = World.GetScenePresence(key); 4587 ScenePresence presence = World.GetScenePresence(key);
4575 if (presence != null) // object is an avatar 4588 if (presence != null) // object is an avatar
@@ -4612,8 +4625,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4612 { 4625 {
4613 m_host.AddScriptLPS(1); 4626 m_host.AddScriptLPS(1);
4614 4627
4615 LLUUID key = new LLUUID(); 4628 UUID key = new UUID();
4616 if (LLUUID.TryParse(id, out key)) 4629 if (UUID.TryParse(id, out key))
4617 { 4630 {
4618 ScenePresence av = World.GetScenePresence(key); 4631 ScenePresence av = World.GetScenePresence(key);
4619 4632
@@ -4751,8 +4764,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4751 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); 4764 Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
4752 4765
4753 // TODO find out about the other defaults and add them here 4766 // TODO find out about the other defaults and add them here
4754 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4767 ps.PartStartColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4755 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4768 ps.PartEndColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4756 ps.PartStartScaleX = 1.0f; 4769 ps.PartStartScaleX = 1.0f;
4757 ps.PartStartScaleY = 1.0f; 4770 ps.PartStartScaleY = 1.0f;
4758 ps.PartEndScaleX = 1.0f; 4771 ps.PartEndScaleX = 1.0f;
@@ -4800,7 +4813,7 @@ namespace OpenSim.Region.ScriptEngine.Common
4800 4813
4801 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR: 4814 case (int)BuiltIn_Commands_BaseClass.PSYS_PART_END_COLOR:
4802 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 4815 tempv = (LSL_Types.Vector3)rules.Data[i + 1];
4803 //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); 4816 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1);
4804 4817
4805 prules.PartEndColor.R = (float)tempv.x; 4818 prules.PartEndColor.R = (float)tempv.x;
4806 prules.PartEndColor.G = (float)tempv.y; 4819 prules.PartEndColor.G = (float)tempv.y;
@@ -4879,8 +4892,8 @@ namespace OpenSim.Region.ScriptEngine.Common
4879 break; 4892 break;
4880 4893
4881 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY: 4894 case (int)BuiltIn_Commands_BaseClass.PSYS_SRC_TARGET_KEY:
4882 LLUUID key = LLUUID.Zero; 4895 UUID key = UUID.Zero;
4883 if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) 4896 if (UUID.TryParse(rules.Data[i + 1].ToString(), out key))
4884 { 4897 {
4885 prules.Target = key; 4898 prules.Target = key;
4886 } 4899 }
@@ -4924,37 +4937,37 @@ namespace OpenSim.Region.ScriptEngine.Common
4924 NotImplemented("llGroundRepel"); 4937 NotImplemented("llGroundRepel");
4925 } 4938 }
4926 4939
4927 private LLUUID GetTaskInventoryItem(string name) 4940 private UUID GetTaskInventoryItem(string name)
4928 { 4941 {
4929 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 4942 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
4930 { 4943 {
4931 if (inv.Value.Name == name) 4944 if (inv.Value.Name == name)
4932 return inv.Key; 4945 return inv.Key;
4933 } 4946 }
4934 return LLUUID.Zero; 4947 return UUID.Zero;
4935 } 4948 }
4936 4949
4937 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4950 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4938 { 4951 {
4939 m_host.AddScriptLPS(1); 4952 m_host.AddScriptLPS(1);
4940 4953
4941 LLUUID destID; 4954 UUID destID;
4942 if (!LLUUID.TryParse(destination, out destID)) 4955 if (!UUID.TryParse(destination, out destID))
4943 return; 4956 return;
4944 4957
4945 List<LLUUID> itemList = new List<LLUUID>(); 4958 List<UUID> itemList = new List<UUID>();
4946 4959
4947 foreach (Object item in inventory.Data) 4960 foreach (Object item in inventory.Data)
4948 { 4961 {
4949 LLUUID itemID; 4962 UUID itemID;
4950 if (LLUUID.TryParse(item.ToString(), out itemID)) 4963 if (UUID.TryParse(item.ToString(), out itemID))
4951 { 4964 {
4952 itemList.Add(itemID); 4965 itemList.Add(itemID);
4953 } 4966 }
4954 else 4967 else
4955 { 4968 {
4956 itemID = GetTaskInventoryItem(item.ToString()); 4969 itemID = GetTaskInventoryItem(item.ToString());
4957 if (itemID != LLUUID.Zero) 4970 if (itemID != UUID.Zero)
4958 itemList.Add(itemID); 4971 itemList.Add(itemID);
4959 } 4972 }
4960 } 4973 }
@@ -5015,7 +5028,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5015 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 5028 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
5016 5029
5017 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 5030 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
5018 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z); 5031 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
5019 } 5032 }
5020 5033
5021 public string llAvatarOnSitTarget() 5034 public string llAvatarOnSitTarget()
@@ -5027,12 +5040,12 @@ namespace OpenSim.Region.ScriptEngine.Common
5027 public void llAddToLandPassList(string avatar, double hours) 5040 public void llAddToLandPassList(string avatar, double hours)
5028 { 5041 {
5029 m_host.AddScriptLPS(1); 5042 m_host.AddScriptLPS(1);
5030 LLUUID key; 5043 UUID key;
5031 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 5044 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
5032 if (land.OwnerID == m_host.OwnerID) 5045 if (land.OwnerID == m_host.OwnerID)
5033 { 5046 {
5034 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 5047 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
5035 if (LLUUID.TryParse(avatar, out key)) 5048 if (UUID.TryParse(avatar, out key))
5036 { 5049 {
5037 entry.AgentID = key; 5050 entry.AgentID = key;
5038 entry.Flags = ParcelManager.AccessList.Access; 5051 entry.Flags = ParcelManager.AccessList.Access;
@@ -5058,13 +5071,13 @@ namespace OpenSim.Region.ScriptEngine.Common
5058 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 5071 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
5059 { 5072 {
5060 m_host.AddScriptLPS(1); 5073 m_host.AddScriptLPS(1);
5061 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 5074 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5062 } 5075 }
5063 5076
5064 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 5077 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
5065 { 5078 {
5066 m_host.AddScriptLPS(1); 5079 m_host.AddScriptLPS(1);
5067 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 5080 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5068 } 5081 }
5069 5082
5070 public string llDumpList2String(LSL_Types.list src, string seperator) 5083 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -5086,7 +5099,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5086 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 5099 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos)
5087 { 5100 {
5088 m_host.AddScriptLPS(1); 5101 m_host.AddScriptLPS(1);
5089 bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); 5102 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
5090 if (result) 5103 if (result)
5091 { 5104 {
5092 return 1; 5105 return 1;
@@ -5101,8 +5114,8 @@ namespace OpenSim.Region.ScriptEngine.Common
5101 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5114 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
5102 { 5115 {
5103 m_host.AddScriptLPS(1); 5116 m_host.AddScriptLPS(1);
5104 LLUUID av = new LLUUID(); 5117 UUID av = new UUID();
5105 if (!LLUUID.TryParse(avatar,out av)) 5118 if (!UUID.TryParse(avatar,out av))
5106 { 5119 {
5107 LSLError("First parameter to llDialog needs to be a key"); 5120 LSLError("First parameter to llDialog needs to be a key");
5108 return; 5121 return;
@@ -5127,7 +5140,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5127 } 5140 }
5128 buts[i] = buttons.Data[i].ToString(); 5141 buts[i] = buttons.Data[i].ToString();
5129 } 5142 }
5130 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 5143 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
5131 // ScriptSleep(1000); 5144 // ScriptSleep(1000);
5132 } 5145 }
5133 5146
@@ -5144,7 +5157,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5144 5157
5145 public void llResetOtherScript(string name) 5158 public void llResetOtherScript(string name)
5146 { 5159 {
5147 LLUUID item; 5160 UUID item;
5148 ScriptManager sm; 5161 ScriptManager sm;
5149 IScript script = null; 5162 IScript script = null;
5150 5163
@@ -5153,7 +5166,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5153 // These functions are supposed to be robust, 5166 // These functions are supposed to be robust,
5154 // so get the state one step at a time. 5167 // so get the state one step at a time.
5155 5168
5156 if ((item = ScriptByName(name)) != LLUUID.Zero) 5169 if ((item = ScriptByName(name)) != UUID.Zero)
5157 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 5170 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
5158 sm.ResetScript(m_localID, item); 5171 sm.ResetScript(m_localID, item);
5159 5172
@@ -5168,7 +5181,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5168 5181
5169 public LSL_Types.LSLInteger llGetScriptState(string name) 5182 public LSL_Types.LSLInteger llGetScriptState(string name)
5170 { 5183 {
5171 LLUUID item; 5184 UUID item;
5172 ScriptManager sm; 5185 ScriptManager sm;
5173 IScript script = null; 5186 IScript script = null;
5174 5187
@@ -5177,7 +5190,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5177 // These functions are supposed to be robust, 5190 // These functions are supposed to be robust,
5178 // so get the state one step at a time. 5191 // so get the state one step at a time.
5179 5192
5180 if ((item = ScriptByName(name)) != LLUUID.Zero) 5193 if ((item = ScriptByName(name)) != UUID.Zero)
5181 { 5194 {
5182 if ((sm = m_ScriptEngine.m_ScriptManager) != null) 5195 if ((sm = m_ScriptEngine.m_ScriptManager) != null)
5183 { 5196 {
@@ -5216,10 +5229,10 @@ namespace OpenSim.Region.ScriptEngine.Common
5216 { 5229 {
5217 m_host.AddScriptLPS(1); 5230 m_host.AddScriptLPS(1);
5218 bool found = false; 5231 bool found = false;
5219 LLUUID destId = LLUUID.Zero; 5232 UUID destId = UUID.Zero;
5220 LLUUID srcId = LLUUID.Zero; 5233 UUID srcId = UUID.Zero;
5221 5234
5222 if (!LLUUID.TryParse(target, out destId)) 5235 if (!UUID.TryParse(target, out destId))
5223 { 5236 {
5224 llSay(0, "Could not parse key " + target); 5237 llSay(0, "Could not parse key " + target);
5225 return; 5238 return;
@@ -5232,7 +5245,7 @@ namespace OpenSim.Region.ScriptEngine.Common
5232 } 5245 }
5233 5246
5234 // copy the first script found with this inventory name 5247 // copy the first script found with this inventory name
5235 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 5248 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
5236 { 5249 {
5237 if (inv.Value.Name == name) 5250 if (inv.Value.Name == name)
5238 { 5251 {
@@ -5264,8 +5277,8 @@ namespace OpenSim.Region.ScriptEngine.Common
5264 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5277 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
5265 if (xmlrpcMod.IsEnabled()) 5278 if (xmlrpcMod.IsEnabled())
5266 { 5279 {
5267 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); 5280 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5268 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5281 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
5269 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); 5282 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
5270 } 5283 }
5271 // ScriptSleep(1000); 5284 // ScriptSleep(1000);
@@ -5583,9 +5596,9 @@ namespace OpenSim.Region.ScriptEngine.Common
5583 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) 5596 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type)
5584 { 5597 {
5585 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5598 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5586 LLUUID sculptId; 5599 UUID sculptId;
5587 5600
5588 if (!LLUUID.TryParse(map, out sculptId)) 5601 if (!UUID.TryParse(map, out sculptId))
5589 { 5602 {
5590 llSay(0, "Could not parse key " + map); 5603 llSay(0, "Could not parse key " + map);
5591 return; 5604 return;
@@ -6015,9 +6028,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6015 ScenePresence av = World.GetScenePresence(id); 6028 ScenePresence av = World.GetScenePresence(id);
6016 if (av == null) 6029 if (av == null)
6017 return l; 6030 return l;
6018 LLUUID[] anims; 6031 UUID[] anims;
6019 anims = av.GetAnimationArray(); 6032 anims = av.GetAnimationArray();
6020 foreach (LLUUID foo in anims) 6033 foreach (UUID foo in anims)
6021 l.Add(foo.ToString()); 6034 l.Add(foo.ToString());
6022 return l; 6035 return l;
6023 } 6036 }
@@ -6025,8 +6038,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6025 public void llSetParcelMusicURL(string url) 6038 public void llSetParcelMusicURL(string url)
6026 { 6039 {
6027 m_host.AddScriptLPS(1); 6040 m_host.AddScriptLPS(1);
6028 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6041 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
6029 if (landowner == LLUUID.Zero) 6042 if (landowner == UUID.Zero)
6030 { 6043 {
6031 return; 6044 return;
6032 } 6045 }
@@ -6041,9 +6054,9 @@ namespace OpenSim.Region.ScriptEngine.Common
6041 public void osSetParcelMediaURL(string url) 6054 public void osSetParcelMediaURL(string url)
6042 { 6055 {
6043 m_host.AddScriptLPS(1); 6056 m_host.AddScriptLPS(1);
6044 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 6057 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
6045 6058
6046 if (landowner == LLUUID.Zero) 6059 if (landowner == UUID.Zero)
6047 { 6060 {
6048 return; 6061 return;
6049 } 6062 }
@@ -6059,13 +6072,20 @@ namespace OpenSim.Region.ScriptEngine.Common
6059 public LSL_Types.Vector3 llGetRootPosition() 6072 public LSL_Types.Vector3 llGetRootPosition()
6060 { 6073 {
6061 m_host.AddScriptLPS(1); 6074 m_host.AddScriptLPS(1);
6062 return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); 6075 return new LSL_Types.Vector3(
6076 m_host.ParentGroup.AbsolutePosition.X,
6077 m_host.ParentGroup.AbsolutePosition.Y,
6078 m_host.ParentGroup.AbsolutePosition.Z);
6063 } 6079 }
6064 6080
6065 public LSL_Types.Quaternion llGetRootRotation() 6081 public LSL_Types.Quaternion llGetRootRotation()
6066 { 6082 {
6067 m_host.AddScriptLPS(1); 6083 m_host.AddScriptLPS(1);
6068 return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); 6084 return new LSL_Types.Quaternion(
6085 m_host.ParentGroup.GroupRotation.X,
6086 m_host.ParentGroup.GroupRotation.Y,
6087 m_host.ParentGroup.GroupRotation.Z,
6088 m_host.ParentGroup.GroupRotation.W);
6069 } 6089 }
6070 6090
6071 public string llGetObjectDesc() 6091 public string llGetObjectDesc()
@@ -6097,8 +6117,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6097 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6117 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6098 if (linknumber > -1) 6118 if (linknumber > -1)
6099 { 6119 {
6100 LLObject.TextureEntry tex = part.Shape.Textures; 6120 Primitive.TextureEntry tex = part.Shape.Textures;
6101 LLColor texcolor; 6121 Color4 texcolor;
6102 if (face > -1) 6122 if (face > -1)
6103 { 6123 {
6104 texcolor = tex.CreateFace((uint)face).RGBA; 6124 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6136,8 +6156,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6136 { 6156 {
6137 linknumber = w; 6157 linknumber = w;
6138 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6158 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6139 LLObject.TextureEntry tex = part.Shape.Textures; 6159 Primitive.TextureEntry tex = part.Shape.Textures;
6140 LLColor texcolor; 6160 Color4 texcolor;
6141 if (face > -1) 6161 if (face > -1)
6142 { 6162 {
6143 texcolor = tex.CreateFace((uint)face).RGBA; 6163 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6184,7 +6204,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6184 6204
6185 public LSL_Types.Vector3 llGetGeometricCenter() 6205 public LSL_Types.Vector3 llGetGeometricCenter()
6186 { 6206 {
6187 return new LSL_Types.Vector3(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); 6207 return new LSL_Types.Vector3(
6208 m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z);
6188 } 6209 }
6189 6210
6190 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) 6211 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules)
@@ -6205,21 +6226,21 @@ namespace OpenSim.Region.ScriptEngine.Common
6205 break; 6226 break;
6206 6227
6207 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS: 6228 case (int)BuiltIn_Commands_BaseClass.PRIM_PHYSICS:
6208 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 6229 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6209 res.Add(new LSL_Types.LSLInteger(1)); 6230 res.Add(new LSL_Types.LSLInteger(1));
6210 else 6231 else
6211 res.Add(new LSL_Types.LSLInteger(0)); 6232 res.Add(new LSL_Types.LSLInteger(0));
6212 break; 6233 break;
6213 6234
6214 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ: 6235 case (int)BuiltIn_Commands_BaseClass.PRIM_TEMP_ON_REZ:
6215 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 6236 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6216 res.Add(new LSL_Types.LSLInteger(1)); 6237 res.Add(new LSL_Types.LSLInteger(1));
6217 else 6238 else
6218 res.Add(new LSL_Types.LSLInteger(0)); 6239 res.Add(new LSL_Types.LSLInteger(0));
6219 break; 6240 break;
6220 6241
6221 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM: 6242 case (int)BuiltIn_Commands_BaseClass.PRIM_PHANTOM:
6222 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 6243 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6223 res.Add(new LSL_Types.LSLInteger(1)); 6244 res.Add(new LSL_Types.LSLInteger(1));
6224 else 6245 else
6225 res.Add(new LSL_Types.LSLInteger(0)); 6246 res.Add(new LSL_Types.LSLInteger(0));
@@ -6324,8 +6345,8 @@ namespace OpenSim.Region.ScriptEngine.Common
6324 if (face == -1) 6345 if (face == -1)
6325 face = 0; 6346 face = 0;
6326 6347
6327 LLObject.TextureEntry tex = m_host.Shape.Textures; 6348 Primitive.TextureEntry tex = m_host.Shape.Textures;
6328 LLObject.TextureEntryFace texface = tex.GetFace((uint)face); 6349 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6329 6350
6330 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6351 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString()));
6331 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6352 res.Add(new LSL_Types.Vector3(texface.RepeatU,
@@ -6344,7 +6365,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6344 face=Convert.ToInt32("" + rules.Data[idx++]); 6365 face=Convert.ToInt32("" + rules.Data[idx++]);
6345 6366
6346 tex = m_host.Shape.Textures; 6367 tex = m_host.Shape.Textures;
6347 LLColor texcolor; 6368 Color4 texcolor;
6348 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 6369 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
6349 texcolor = tex.DefaultTexture.RGBA; 6370 texcolor = tex.DefaultTexture.RGBA;
6350 else 6371 else
@@ -6698,7 +6719,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6698 public void llSetLocalRot(LSL_Types.Quaternion rot) 6719 public void llSetLocalRot(LSL_Types.Quaternion rot)
6699 { 6720 {
6700 m_host.AddScriptLPS(1); 6721 m_host.AddScriptLPS(1);
6701 m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 6722 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
6702 // ScriptSleep(200); 6723 // ScriptSleep(200);
6703 } 6724 }
6704 6725
@@ -6954,7 +6975,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6954 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 6975 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask)
6955 { 6976 {
6956 m_host.AddScriptLPS(1); 6977 m_host.AddScriptLPS(1);
6957 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6978 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6958 { 6979 {
6959 if (inv.Value.Name == item) 6980 if (inv.Value.Name == item)
6960 { 6981 {
@@ -6985,7 +7006,7 @@ namespace OpenSim.Region.ScriptEngine.Common
6985 public string llGetInventoryCreator(string item) 7006 public string llGetInventoryCreator(string item)
6986 { 7007 {
6987 m_host.AddScriptLPS(1); 7008 m_host.AddScriptLPS(1);
6988 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7009 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6989 { 7010 {
6990 if (inv.Value.Name == item) 7011 if (inv.Value.Name == item)
6991 { 7012 {
@@ -7000,7 +7021,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7000 { 7021 {
7001 m_host.AddScriptLPS(1); 7022 m_host.AddScriptLPS(1);
7002 7023
7003 World.SimChatBroadcast(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 7024 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
7004// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 7025// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
7005// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 7026// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
7006 } 7027 }
@@ -7021,7 +7042,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7021 if (info == null) 7042 if (info == null)
7022 { 7043 {
7023 // ScriptSleep(1000); 7044 // ScriptSleep(1000);
7024 return LLUUID.Zero.ToString(); 7045 return UUID.Zero.ToString();
7025 } 7046 }
7026 reply = new LSL_Types.Vector3( 7047 reply = new LSL_Types.Vector3(
7027 info.RegionLocX * Constants.RegionSize, 7048 info.RegionLocX * Constants.RegionSize,
@@ -7038,7 +7059,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7038 if (info == null) 7059 if (info == null)
7039 { 7060 {
7040 // ScriptSleep(1000); 7061 // ScriptSleep(1000);
7041 return LLUUID.Zero.ToString(); 7062 return UUID.Zero.ToString();
7042 } 7063 }
7043 int access = info.RegionSettings.Maturity; 7064 int access = info.RegionSettings.Maturity;
7044 if (access == 0) 7065 if (access == 0)
@@ -7053,11 +7074,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7053 break; 7074 break;
7054 default: 7075 default:
7055 // ScriptSleep(1000); 7076 // ScriptSleep(1000);
7056 return LLUUID.Zero.ToString(); // Raise no event 7077 return UUID.Zero.ToString(); // Raise no event
7057 } 7078 }
7058 LLUUID rq = LLUUID.Random(); 7079 UUID rq = UUID.Random();
7059 7080
7060 LLUUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager. 7081 UUID tid = m_ScriptEngine.m_ASYNCLSLCommandManager.
7061 m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString()); 7082 m_Dataserver.RegisterRequest(m_localID, m_itemID, rq.ToString());
7062 7083
7063 m_ScriptEngine.m_ASYNCLSLCommandManager. 7084 m_ScriptEngine.m_ASYNCLSLCommandManager.
@@ -7069,7 +7090,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7069 catch(Exception e) 7090 catch(Exception e)
7070 { 7091 {
7071 Console.WriteLine(e.ToString()); 7092 Console.WriteLine(e.ToString());
7072 return LLUUID.Zero.ToString(); 7093 return UUID.Zero.ToString();
7073 } 7094 }
7074 } 7095 }
7075 7096
@@ -7082,8 +7103,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7082 public double llGetObjectMass(string id) 7103 public double llGetObjectMass(string id)
7083 { 7104 {
7084 m_host.AddScriptLPS(1); 7105 m_host.AddScriptLPS(1);
7085 LLUUID key = new LLUUID(); 7106 UUID key = new UUID();
7086 if (LLUUID.TryParse(id,out key)) 7107 if (UUID.TryParse(id,out key))
7087 { 7108 {
7088 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); 7109 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass();
7089 } 7110 }
@@ -7175,7 +7196,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7175 public void llLoadURL(string avatar_id, string message, string url) 7196 public void llLoadURL(string avatar_id, string message, string url)
7176 { 7197 {
7177 m_host.AddScriptLPS(1); 7198 m_host.AddScriptLPS(1);
7178 LLUUID avatarId = new LLUUID(avatar_id); 7199 UUID avatarId = new UUID(avatar_id);
7179 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, 7200 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
7180 url); 7201 url);
7181 // ScriptSleep(10000); 7202 // ScriptSleep(10000);
@@ -7321,7 +7342,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7321 public LSL_Types.LSLInteger llGetInventoryType(string name) 7342 public LSL_Types.LSLInteger llGetInventoryType(string name)
7322 { 7343 {
7323 m_host.AddScriptLPS(1); 7344 m_host.AddScriptLPS(1);
7324 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7345 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
7325 { 7346 {
7326 if (inv.Value.Name == name) 7347 if (inv.Value.Name == name)
7327 { 7348 {
@@ -7350,10 +7371,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7350 public LSL_Types.Vector3 llGetCameraPos() 7371 public LSL_Types.Vector3 llGetCameraPos()
7351 { 7372 {
7352 m_host.AddScriptLPS(1); 7373 m_host.AddScriptLPS(1);
7353 LLUUID invItemID=InventorySelf(); 7374 UUID invItemID=InventorySelf();
7354 if (invItemID == LLUUID.Zero) 7375 if (invItemID == UUID.Zero)
7355 return new LSL_Types.Vector3(); 7376 return new LSL_Types.Vector3();
7356 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 7377 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7357 return new LSL_Types.Vector3(); 7378 return new LSL_Types.Vector3();
7358 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0) 7379 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0)
7359 { 7380 {
@@ -7363,7 +7384,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7363 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7384 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7364 if (presence != null) 7385 if (presence != null)
7365 { 7386 {
7366 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); 7387 LSL_Types.Vector3 pos = new LSL_Types.Vector3(
7388 presence.CameraPosition.X,
7389 presence.CameraPosition.Y,
7390 presence.CameraPosition.Z);
7367 return pos; 7391 return pos;
7368 } 7392 }
7369 return new LSL_Types.Vector3(); 7393 return new LSL_Types.Vector3();
@@ -7426,12 +7450,12 @@ namespace OpenSim.Region.ScriptEngine.Common
7426 public void llAddToLandBanList(string avatar, double hours) 7450 public void llAddToLandBanList(string avatar, double hours)
7427 { 7451 {
7428 m_host.AddScriptLPS(1); 7452 m_host.AddScriptLPS(1);
7429 LLUUID key; 7453 UUID key;
7430 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7454 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7431 if (land.OwnerID == m_host.OwnerID) 7455 if (land.OwnerID == m_host.OwnerID)
7432 { 7456 {
7433 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 7457 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
7434 if (LLUUID.TryParse(avatar, out key)) 7458 if (UUID.TryParse(avatar, out key))
7435 { 7459 {
7436 entry.AgentID = key; 7460 entry.AgentID = key;
7437 entry.Flags = ParcelManager.AccessList.Ban; 7461 entry.Flags = ParcelManager.AccessList.Ban;
@@ -7445,11 +7469,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7445 public void llRemoveFromLandPassList(string avatar) 7469 public void llRemoveFromLandPassList(string avatar)
7446 { 7470 {
7447 m_host.AddScriptLPS(1); 7471 m_host.AddScriptLPS(1);
7448 LLUUID key; 7472 UUID key;
7449 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7473 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7450 if (land.OwnerID == m_host.OwnerID) 7474 if (land.OwnerID == m_host.OwnerID)
7451 { 7475 {
7452 if (LLUUID.TryParse(avatar, out key)) 7476 if (UUID.TryParse(avatar, out key))
7453 { 7477 {
7454 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7478 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7455 { 7479 {
@@ -7467,11 +7491,11 @@ namespace OpenSim.Region.ScriptEngine.Common
7467 public void llRemoveFromLandBanList(string avatar) 7491 public void llRemoveFromLandBanList(string avatar)
7468 { 7492 {
7469 m_host.AddScriptLPS(1); 7493 m_host.AddScriptLPS(1);
7470 LLUUID key; 7494 UUID key;
7471 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7495 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7472 if (land.OwnerID == m_host.OwnerID) 7496 if (land.OwnerID == m_host.OwnerID)
7473 { 7497 {
7474 if (LLUUID.TryParse(avatar, out key)) 7498 if (UUID.TryParse(avatar, out key))
7475 { 7499 {
7476 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7500 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7477 { 7501 {
@@ -7491,16 +7515,16 @@ namespace OpenSim.Region.ScriptEngine.Common
7491 m_host.AddScriptLPS(1); 7515 m_host.AddScriptLPS(1);
7492 7516
7493 // our key in the object we are in 7517 // our key in the object we are in
7494 LLUUID invItemID=InventorySelf(); 7518 UUID invItemID=InventorySelf();
7495 if (invItemID == LLUUID.Zero) return; 7519 if (invItemID == UUID.Zero) return;
7496 7520
7497 // the object we are in 7521 // the object we are in
7498 LLUUID objectID = m_host.ParentUUID; 7522 UUID objectID = m_host.ParentUUID;
7499 if (objectID == LLUUID.Zero) return; 7523 if(objectID == UUID.Zero) return;
7500 7524
7501 // we need the permission first, to know which avatar we want to set the camera for 7525 // we need the permission first, to know which avatar we want to set the camera for
7502 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7526 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7503 if (agentID == LLUUID.Zero) return; 7527 if (agentID == UUID.Zero) return;
7504 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7528 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7505 7529
7506 ScenePresence presence = World.GetScenePresence(agentID); 7530 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7542,16 +7566,16 @@ namespace OpenSim.Region.ScriptEngine.Common
7542 m_host.AddScriptLPS(1); 7566 m_host.AddScriptLPS(1);
7543 7567
7544 // our key in the object we are in 7568 // our key in the object we are in
7545 LLUUID invItemID=InventorySelf(); 7569 UUID invItemID=InventorySelf();
7546 if (invItemID == LLUUID.Zero) return; 7570 if (invItemID == UUID.Zero) return;
7547 7571
7548 // the object we are in 7572 // the object we are in
7549 LLUUID objectID = m_host.ParentUUID; 7573 UUID objectID = m_host.ParentUUID;
7550 if (objectID == LLUUID.Zero) return; 7574 if(objectID == UUID.Zero) return;
7551 7575
7552 // we need the permission first, to know which avatar we want to clear the camera for 7576 // we need the permission first, to know which avatar we want to clear the camera for
7553 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7577 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7554 if (agentID == LLUUID.Zero) return; 7578 if (agentID == UUID.Zero) return;
7555 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7579 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7556 7580
7557 ScenePresence presence = World.GetScenePresence(agentID); 7581 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7650,9 +7674,9 @@ namespace OpenSim.Region.ScriptEngine.Common
7650 param.Add(o.ToString()); 7674 param.Add(o.ToString());
7651 } 7675 }
7652 7676
7653 LLVector3 position = m_host.AbsolutePosition; 7677 Vector3 position = m_host.AbsolutePosition;
7654 LLVector3 velocity = m_host.Velocity; 7678 Vector3 velocity = m_host.Velocity;
7655 LLQuaternion rotation = m_host.RotationOffset; 7679 Quaternion rotation = m_host.RotationOffset;
7656 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 7680 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner);
7657 RegionInfo regionInfo = World.RegionInfo; 7681 RegionInfo regionInfo = World.RegionInfo;
7658 7682
@@ -7668,10 +7692,10 @@ namespace OpenSim.Region.ScriptEngine.Common
7668 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; 7692 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name;
7669 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 7693 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString();
7670 7694
7671 LLUUID reqID = httpScriptMod. 7695 UUID reqID = httpScriptMod.
7672 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); 7696 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body);
7673 7697
7674 if (reqID != LLUUID.Zero) 7698 if (reqID != UUID.Zero)
7675 return reqID.ToString(); 7699 return reqID.ToString();
7676 else 7700 else
7677 return null; 7701 return null;
@@ -7781,7 +7805,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7781 LSL_Types.list ret = new LSL_Types.list(); 7805 LSL_Types.list ret = new LSL_Types.list();
7782 if (land != null) 7806 if (land != null)
7783 { 7807 {
7784 foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners()) 7808 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
7785 { 7809 {
7786 ret.Add(d.Key.ToString()); 7810 ret.Add(d.Key.ToString());
7787 ret.Add(d.Value); 7811 ret.Add(d.Value);
@@ -7794,7 +7818,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7794 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 7818 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id)
7795 { 7819 {
7796 m_host.AddScriptLPS(1); 7820 m_host.AddScriptLPS(1);
7797 SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); 7821 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
7798 if (part == null) 7822 if (part == null)
7799 { 7823 {
7800 return 0; 7824 return 0;
@@ -7900,8 +7924,8 @@ namespace OpenSim.Region.ScriptEngine.Common
7900 { 7924 {
7901 m_host.AddScriptLPS(1); 7925 m_host.AddScriptLPS(1);
7902 LSL_Types.list ret = new LSL_Types.list(); 7926 LSL_Types.list ret = new LSL_Types.list();
7903 LLUUID key = new LLUUID(); 7927 UUID key = new UUID();
7904 if (LLUUID.TryParse(id, out key)) 7928 if (UUID.TryParse(id, out key))
7905 { 7929 {
7906 ScenePresence av = World.GetScenePresence(key); 7930 ScenePresence av = World.GetScenePresence(key);
7907 7931
@@ -7921,19 +7945,19 @@ namespace OpenSim.Region.ScriptEngine.Common
7921 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 7945 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
7922 break; 7946 break;
7923 case "4": 7947 case "4":
7924 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); 7948 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
7925 break; 7949 break;
7926 case "5": 7950 case "5":
7927 ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); 7951 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
7928 break; 7952 break;
7929 case "6": 7953 case "6":
7930 ret.Add(id); 7954 ret.Add(id);
7931 break; 7955 break;
7932 case "7": 7956 case "7":
7933 ret.Add(LLUUID.Zero.ToString()); 7957 ret.Add(UUID.Zero.ToString());
7934 break; 7958 break;
7935 case "8": 7959 case "8":
7936 ret.Add(LLUUID.Zero.ToString()); 7960 ret.Add(UUID.Zero.ToString());
7937 break; 7961 break;
7938 } 7962 }
7939 } 7963 }
@@ -7953,7 +7977,7 @@ namespace OpenSim.Region.ScriptEngine.Common
7953 ret.Add(obj.Description); 7977 ret.Add(obj.Description);
7954 break; 7978 break;
7955 case "3": 7979 case "3":
7956 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); 7980 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
7957 break; 7981 break;
7958 case "4": 7982 case "4":
7959 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 7983 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
@@ -7979,14 +8003,14 @@ namespace OpenSim.Region.ScriptEngine.Common
7979 } 8003 }
7980 8004
7981 8005
7982 internal LLUUID ScriptByName(string name) 8006 internal UUID ScriptByName(string name)
7983 { 8007 {
7984 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 8008 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
7985 { 8009 {
7986 if (item.Type == 10 && item.Name == name) 8010 if (item.Type == 10 && item.Name == name)
7987 return item.ItemID; 8011 return item.ItemID;
7988 } 8012 }
7989 return LLUUID.Zero; 8013 return UUID.Zero;
7990 } 8014 }
7991 8015
7992 internal void ShoutError(string msg) 8016 internal void ShoutError(string msg)
@@ -8063,7 +8087,7 @@ namespace OpenSim.Region.ScriptEngine.Common
8063 String[] notecardLines = { "0" }; 8087 String[] notecardLines = { "0" };
8064 notecardLines[0] = String.Empty; 8088 notecardLines[0] = String.Empty;
8065 8089
8066 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 8090 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
8067 { 8091 {
8068 if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard)) 8092 if ((inv.Value.Name == name) && (inv.Value.InvType == (int)InventoryType.Notecard))
8069 { 8093 {
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 581b820..8c24ae3 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Common
123 123
124 Vector3 vector = (Vector3)o; 124 Vector3 vector = (Vector3)o;
125 125
126 return (x == vector.x && x == vector.x && z == vector.z); 126 return (x == vector.x && y == vector.y && z == vector.y);
127 } 127 }
128 128
129 public static Vector3 operator -(Vector3 vector) 129 public static Vector3 operator -(Vector3 vector)
diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
index 687d5e1..b410eec 100644
--- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs
@@ -25,8 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27using System; 27using System;
28using Axiom.Math; 28using OpenMetaverse;
29using libsecondlife;
30using Nini.Config; 29using Nini.Config;
31using OpenSim.Framework.Console; 30using OpenSim.Framework.Console;
32using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
@@ -40,7 +39,7 @@ namespace OpenSim.Region.ScriptEngine.Common
40 public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface 39 public class OSSL_BuilIn_Commands : LSL_BuiltIn_Commands, OSSL_BuilIn_Commands_Interface
41 { 40 {
42 public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID, 41 public OSSL_BuilIn_Commands(ScriptEngineBase.ScriptEngine scriptEngine, SceneObjectPart host, uint localID,
43 LLUUID itemID) 42 UUID itemID)
44 : base(scriptEngine, host, localID, itemID) 43 : base(scriptEngine, host, localID, itemID)
45 { 44 {
46 Prim = new OSSLPrim(this); 45 Prim = new OSSLPrim(this);
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Common
259 if (x > 255 || x < 0 || y > 255 || y < 0) 258 if (x > 255 || x < 0 || y > 255 || y < 0)
260 LSLError("osTerrainSetHeight: Coordinate out of bounds"); 259 LSLError("osTerrainSetHeight: Coordinate out of bounds");
261 260
262 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) 261 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
263 { 262 {
264 World.Heightmap[x, y] = val; 263 World.Heightmap[x, y] = val;
265 return 1; 264 return 1;
@@ -299,7 +298,7 @@ namespace OpenSim.Region.ScriptEngine.Common
299 World.SendGeneralAlert(msg); 298 World.SendGeneralAlert(msg);
300 } 299 }
301 300
302 public void osSetRot(LLUUID target, Quaternion rotation) 301 public void osSetRot(UUID target, Quaternion rotation)
303 { 302 {
304 m_host.AddScriptLPS(1); 303 m_host.AddScriptLPS(1);
305 if (World.Entities.ContainsKey(target)) 304 if (World.Entities.ContainsKey(target))
@@ -319,7 +318,7 @@ namespace OpenSim.Region.ScriptEngine.Common
319 if (dynamicID == String.Empty) 318 if (dynamicID == String.Empty)
320 { 319 {
321 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 320 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
322 LLUUID createdTexture = 321 UUID createdTexture =
323 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 322 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
324 extraParams, timer); 323 extraParams, timer);
325 return createdTexture.ToString(); 324 return createdTexture.ToString();
@@ -329,7 +328,7 @@ namespace OpenSim.Region.ScriptEngine.Common
329 //TODO update existing dynamic textures 328 //TODO update existing dynamic textures
330 } 329 }
331 330
332 return LLUUID.Zero.ToString(); 331 return UUID.Zero.ToString();
333 } 332 }
334 333
335 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 334 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
@@ -339,7 +338,7 @@ namespace OpenSim.Region.ScriptEngine.Common
339 if (dynamicID == String.Empty) 338 if (dynamicID == String.Empty)
340 { 339 {
341 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 340 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
342 LLUUID createdTexture = 341 UUID createdTexture =
343 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 342 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
344 extraParams, timer, true, (byte) alpha); 343 extraParams, timer, true, (byte) alpha);
345 return createdTexture.ToString(); 344 return createdTexture.ToString();
@@ -349,7 +348,7 @@ namespace OpenSim.Region.ScriptEngine.Common
349 //TODO update existing dynamic textures 348 //TODO update existing dynamic textures
350 } 349 }
351 350
352 return LLUUID.Zero.ToString(); 351 return UUID.Zero.ToString();
353 } 352 }
354 353
355 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, 354 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
@@ -361,7 +360,7 @@ namespace OpenSim.Region.ScriptEngine.Common
361 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 360 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
362 if (textureManager != null) 361 if (textureManager != null)
363 { 362 {
364 LLUUID createdTexture = 363 UUID createdTexture =
365 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 364 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
366 extraParams, timer); 365 extraParams, timer);
367 return createdTexture.ToString(); 366 return createdTexture.ToString();
@@ -372,7 +371,7 @@ namespace OpenSim.Region.ScriptEngine.Common
372 //TODO update existing dynamic textures 371 //TODO update existing dynamic textures
373 } 372 }
374 373
375 return LLUUID.Zero.ToString(); 374 return UUID.Zero.ToString();
376 } 375 }
377 376
378 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, 377 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
@@ -384,7 +383,7 @@ namespace OpenSim.Region.ScriptEngine.Common
384 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 383 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
385 if (textureManager != null) 384 if (textureManager != null)
386 { 385 {
387 LLUUID createdTexture = 386 UUID createdTexture =
388 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 387 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
389 extraParams, timer, true, (byte) alpha); 388 extraParams, timer, true, (byte) alpha);
390 return createdTexture.ToString(); 389 return createdTexture.ToString();
@@ -395,7 +394,7 @@ namespace OpenSim.Region.ScriptEngine.Common
395 //TODO update existing dynamic textures 394 //TODO update existing dynamic textures
396 } 395 }
397 396
398 return LLUUID.Zero.ToString(); 397 return UUID.Zero.ToString();
399 } 398 }
400 399
401 public bool osConsoleCommand(string command) 400 public bool osConsoleCommand(string command)
@@ -538,8 +537,8 @@ namespace OpenSim.Region.ScriptEngine.Common
538 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 537 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
539 if (xmlrpcMod.IsEnabled()) 538 if (xmlrpcMod.IsEnabled())
540 { 539 {
541 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new LLUUID(channel)); 540 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, new UUID(channel));
542 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 541 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
543 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj); 542 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
544 } 543 }
545 } 544 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
index 64f6970..ee86500 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandManager.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections; 28using System.Collections;
29using System.Threading; 29using System.Threading;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins; 33using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
153 /// </summary> 153 /// </summary>
154 /// <param name="localID"></param> 154 /// <param name="localID"></param>
155 /// <param name="itemID"></param> 155 /// <param name="itemID"></param>
156 public void RemoveScript(uint localID, LLUUID itemID) 156 public void RemoveScript(uint localID, UUID itemID)
157 { 157 {
158 // Remove a specific script 158 // Remove a specific script
159 159
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
index 77cc7ea..378610a 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Dataserver.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34 34
@@ -48,28 +48,28 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
48 private class DataserverRequest 48 private class DataserverRequest
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 52
53 public LLUUID ID; 53 public UUID ID;
54 public string handle; 54 public string handle;
55 55
56 public DateTime startTime; 56 public DateTime startTime;
57 } 57 }
58 58
59 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 59 public UUID RegisterRequest(uint localID, UUID itemID,
60 string identifier) 60 string identifier)
61 { 61 {
62 lock (DataserverRequests) 62 lock (DataserverRequests)
63 { 63 {
64 if (DataserverRequests.ContainsKey(identifier)) 64 if (DataserverRequests.ContainsKey(identifier))
65 return LLUUID.Zero; 65 return UUID.Zero;
66 66
67 DataserverRequest ds = new DataserverRequest(); 67 DataserverRequest ds = new DataserverRequest();
68 68
69 ds.localID = localID; 69 ds.localID = localID;
70 ds.itemID = itemID; 70 ds.itemID = itemID;
71 71
72 ds.ID = LLUUID.Random(); 72 ds.ID = UUID.Random();
73 ds.handle = identifier; 73 ds.handle = identifier;
74 74
75 ds.startTime = DateTime.Now; 75 ds.startTime = DateTime.Now;
@@ -99,7 +99,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
99 new LSL_Types.LSLString(reply)}); 99 new LSL_Types.LSLString(reply)});
100 } 100 }
101 101
102 public void RemoveEvents(uint localID, LLUUID itemID) 102 public void RemoveEvents(uint localID, UUID itemID)
103 { 103 {
104 lock (DataserverRequests) 104 lock (DataserverRequests)
105 { 105 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
index 9b636fd..0fce1f2 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
27//#define SPAM 27//#define SPAM
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Scenes; 32using OpenSim.Region.Environment.Scenes;
33using OpenSim.Framework.Communications.Cache; 33using OpenSim.Framework.Communications.Cache;
@@ -43,8 +43,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
43 m_CmdManager = CmdManager; 43 m_CmdManager = CmdManager;
44 } 44 }
45 45
46 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 46 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
47 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 47 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
48 private Object SenseLock = new Object(); 48 private Object SenseLock = new Object();
49 49
50 // 50 //
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
53 private class SenseRepeatClass 53 private class SenseRepeatClass
54 { 54 {
55 public uint localID; 55 public uint localID;
56 public LLUUID itemID; 56 public UUID itemID;
57 public double interval; 57 public double interval;
58 public DateTime next; 58 public DateTime next;
59 59
60 public string name; 60 public string name;
61 public LLUUID keyID; 61 public UUID keyID;
62 public int type; 62 public int type;
63 public double range; 63 public double range;
64 public double arc; 64 public double arc;
@@ -68,8 +68,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 68 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
69 private object SenseRepeatListLock = new object(); 69 private object SenseRepeatListLock = new object();
70 70
71 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 71 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
72 string name, LLUUID keyID, int type, double range, double arc, double sec, SceneObjectPart host) 72 string name, UUID keyID, int type, double range, double arc, double sec, SceneObjectPart host)
73 { 73 {
74 #if SPAM 74 #if SPAM
75 Console.WriteLine("SetSensorEvent"); 75 Console.WriteLine("SetSensorEvent");
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 #if SPAM 166 #if SPAM
@@ -199,11 +199,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
199 } 199 }
200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan"); 200 //m_ScriptEngine.Log.Info("[AsyncLSL]: Enter SensorSweep Scan");
201 201
202 LLVector3 sensorPos = SensePoint.AbsolutePosition; 202 Vector3 sensorPos = SensePoint.AbsolutePosition;
203 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 203 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
204 LLVector3 fromRegionPos = sensorPos + regionPos; 204 Vector3 fromRegionPos = sensorPos + regionPos;
205 205
206 LLQuaternion q = SensePoint.RotationOffset; 206 Quaternion q = SensePoint.RotationOffset;
207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 207 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 208 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 209 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -215,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
215 215
216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 216 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
217 { 217 {
218 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 218 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 219 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
220 if (dis <= ts.range) 220 if (dis <= ts.range)
221 { 221 {
@@ -248,7 +248,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
248 double ang_obj = 0; 248 double ang_obj = 0;
249 try 249 try
250 { 250 {
251 LLVector3 diff = toRegionPos - fromRegionPos; 251 Vector3 diff = toRegionPos - fromRegionPos;
252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 252 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 253 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 254 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -261,7 +261,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
261 if (ang_obj > ts.arc) keep = false; 261 if (ang_obj > ts.arc) keep = false;
262 } 262 }
263 263
264 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 264 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
265 { 265 {
266 keep = false; 266 keep = false;
267 } 267 }
@@ -303,10 +303,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
303 // Create object if it doesn't exist 303 // Create object if it doesn't exist
304 if (SenseEvents.ContainsKey(ts.localID) == false) 304 if (SenseEvents.ContainsKey(ts.localID) == false)
305 { 305 {
306 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 306 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
307 } 307 }
308 // clear if previous traces exist 308 // clear if previous traces exist
309 Dictionary<LLUUID, LSL_Types.list> Obj; 309 Dictionary<UUID, LSL_Types.list> Obj;
310 SenseEvents.TryGetValue(ts.localID, out Obj); 310 SenseEvents.TryGetValue(ts.localID, out Obj);
311 if (Obj.ContainsKey(ts.itemID) == true) 311 if (Obj.ContainsKey(ts.itemID) == true)
312 Obj.Remove(ts.itemID); 312 Obj.Remove(ts.itemID);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
index 09af34a..7940b36 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AsyncCommandPlugins/Timer.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugins
34{ 34{
@@ -47,7 +47,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
47 private class TimerClass 47 private class TimerClass
48 { 48 {
49 public uint localID; 49 public uint localID;
50 public LLUUID itemID; 50 public UUID itemID;
51 //public double interval; 51 //public double interval;
52 public long interval; 52 public long interval;
53 //public DateTime next; 53 //public DateTime next;
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
57 private List<TimerClass> Timers = new List<TimerClass>(); 57 private List<TimerClass> Timers = new List<TimerClass>();
58 private object TimerListLock = new object(); 58 private object TimerListLock = new object();
59 59
60 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 60 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
61 { 61 {
62 // Console.WriteLine("SetTimerEvent"); 62 // Console.WriteLine("SetTimerEvent");
63 63
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.AsyncCommandPlugin
82 } 82 }
83 } 83 }
84 84
85 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 85 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
86 { 86 {
87 // Remove from timer 87 // Remove from timer
88 lock (TimerListLock) 88 lock (TimerListLock)
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
index 3fdfd8a..89d7045 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 32using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
33using OpenSim.Region.Environment; 33using OpenSim.Region.Environment;
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
96 { 96 {
97 } 97 }
98 98
99 private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, int amount) 99 private void HandleObjectPaid(UUID objectID, UUID agentID, int amount)
100 { 100 {
101 SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID); 101 SceneObjectPart part=myScriptEngine.World.GetSceneObjectPart(objectID);
102 if (part != null) 102 if (part != null)
@@ -117,7 +117,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
117 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { }); 117 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
118 } 118 }
119 119
120 public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient) 120 public void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient)
121 { 121 {
122 // Add to queue for all scripts in ObjectID object 122 // Add to queue for all scripts in ObjectID object
123 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct(); 123 EventQueueManager.Queue_llDetectParams_Struct detstruct = new EventQueueManager.Queue_llDetectParams_Struct();
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
135 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 135 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
136 detstruct._string[0] = remoteClient.Name; 136 detstruct._string[0] = remoteClient.Name;
137 detstruct._int[0] = 0; 137 detstruct._int[0] = 0;
138 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x,av.Rotation.y,av.Rotation.z,av.Rotation.w); 138 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X,av.Rotation.Y,av.Rotation.Z,av.Rotation.W);
139 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z); 139 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X,av.AbsolutePosition.Y,av.AbsolutePosition.Z);
140 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z); 140 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z);
141 } 141 }
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
170 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString()); 170 detstruct._key2[0] = new LSL_Types.key(remoteClient.AgentId.ToString());
171 detstruct._string[0] = remoteClient.Name; 171 detstruct._string[0] = remoteClient.Name;
172 detstruct._int[0] = 0; 172 detstruct._int[0] = 0;
173 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.x, av.Rotation.y, av.Rotation.z, av.Rotation.w); 173 detstruct._Quaternion[0] = new LSL_Types.Quaternion(av.Rotation.X, av.Rotation.Y, av.Rotation.Z, av.Rotation.W);
174 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z); 174 detstruct._Vector3[0] = new LSL_Types.Vector3(av.AbsolutePosition.X, av.AbsolutePosition.Y, av.AbsolutePosition.Z);
175 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z); 175 detstruct._Vector32[0] = new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z);
176 } 176 }
@@ -187,14 +187,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
187 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) }); 187 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_end", detstruct, new object[] { new LSL_Types.LSLInteger(1) });
188 } 188 }
189 189
190 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 190 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
191 { 191 {
192 myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " + 192 myScriptEngine.Log.Debug("OnRezScript localID: " + localID + " LLUID: " + itemID.ToString() + " Size: " +
193 script.Length); 193 script.Length);
194 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez); 194 myScriptEngine.m_ScriptManager.StartScript(localID, itemID, script, startParam, postOnRez);
195 } 195 }
196 196
197 public void OnRemoveScript(uint localID, LLUUID itemID) 197 public void OnRemoveScript(uint localID, UUID itemID)
198 { 198 {
199 myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString()); 199 myScriptEngine.Log.Debug("OnRemoveScript localID: " + localID + " LLUID: " + itemID.ToString());
200 myScriptEngine.m_ScriptManager.StopScript( 200 myScriptEngine.m_ScriptManager.StopScript(
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
203 ); 203 );
204 } 204 }
205 205
206 public void money(uint localID, LLUUID agentID, int amount) 206 public void money(uint localID, UUID agentID, int amount)
207 { 207 {
208 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) }); 208 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "money", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(amount) });
209 } 209 }
@@ -220,12 +220,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
220 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { }); 220 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "state_exit", EventQueueManager.llDetectNull, new object[] { });
221 } 221 }
222 222
223 public void touch(uint localID, uint originalID, LLUUID itemID) 223 public void touch(uint localID, uint originalID, UUID itemID)
224 { 224 {
225 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull); 225 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull);
226 } 226 }
227 227
228 public void touch_end(uint localID, uint originalID, LLUUID itemID) 228 public void touch_end(uint localID, uint originalID, UUID itemID)
229 { 229 {
230 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) }); 230 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(1) });
231 } 231 }
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
314 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) }); 314 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "collision_end", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(col.Colliders.Count) });
315 } 315 }
316 316
317 public void land_collision_start(uint localID, LLUUID itemID) 317 public void land_collision_start(uint localID, UUID itemID)
318 { 318 {
319 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull); 319 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull);
320 } 320 }
@@ -324,48 +324,48 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
324 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull); 324 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "land_collision", EventQueueManager.llDetectNull);
325 } 325 }
326 326
327 public void land_collision_end(uint localID, LLUUID itemID) 327 public void land_collision_end(uint localID, UUID itemID)
328 { 328 {
329 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull); 329 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull);
330 } 330 }
331 331
332 // Handled by long commands 332 // Handled by long commands
333 public void timer(uint localID, LLUUID itemID) 333 public void timer(uint localID, UUID itemID)
334 { 334 {
335 //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty); 335 //myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, String.Empty);
336 } 336 }
337 337
338 public void listen(uint localID, LLUUID itemID) 338 public void listen(uint localID, UUID itemID)
339 { 339 {
340 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull); 340 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull);
341 } 341 }
342 342
343 public void on_rez(uint localID, LLUUID itemID) 343 public void on_rez(uint localID, UUID itemID)
344 { 344 {
345 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull); 345 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull);
346 } 346 }
347 347
348 public void sensor(uint localID, LLUUID itemID) 348 public void sensor(uint localID, UUID itemID)
349 { 349 {
350 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull); 350 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull);
351 } 351 }
352 352
353 public void no_sensor(uint localID, LLUUID itemID) 353 public void no_sensor(uint localID, UUID itemID)
354 { 354 {
355 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull); 355 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull);
356 } 356 }
357 357
358 public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change) 358 public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change)
359 { 359 {
360 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)}); 360 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLString(agentID.ToString()), new LSL_Types.LSLInteger(held), new LSL_Types.LSLInteger(change)});
361 } 361 }
362 362
363 public void email(uint localID, LLUUID itemID) 363 public void email(uint localID, UUID itemID)
364 { 364 {
365 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull); 365 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull);
366 } 366 }
367 367
368 public void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos) 368 public void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos)
369 { 369 {
370 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) }); 370 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "at_target", EventQueueManager.llDetectNull, new object[] { new LSL_Types.LSLInteger(handle), new LSL_Types.Vector3(targetpos.X,targetpos.Y,targetpos.Z), new LSL_Types.Vector3(atpos.X,atpos.Y,atpos.Z) });
371 } 371 }
@@ -375,63 +375,63 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
375 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull); 375 myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "not_at_target", EventQueueManager.llDetectNull);
376 } 376 }
377 377
378 public void at_rot_target(uint localID, LLUUID itemID) 378 public void at_rot_target(uint localID, UUID itemID)
379 { 379 {
380 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull); 380 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull);
381 } 381 }
382 382
383 public void not_at_rot_target(uint localID, LLUUID itemID) 383 public void not_at_rot_target(uint localID, UUID itemID)
384 { 384 {
385 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull); 385 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull);
386 } 386 }
387 387
388 public void run_time_permissions(uint localID, LLUUID itemID) 388 public void run_time_permissions(uint localID, UUID itemID)
389 { 389 {
390 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull); 390 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull);
391 } 391 }
392 392
393 public void changed(uint localID, LLUUID itemID) 393 public void changed(uint localID, UUID itemID)
394 { 394 {
395 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull); 395 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull);
396 } 396 }
397 397
398 public void attach(uint localID, LLUUID itemID) 398 public void attach(uint localID, UUID itemID)
399 { 399 {
400 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull); 400 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull);
401 } 401 }
402 402
403 public void dataserver(uint localID, LLUUID itemID) 403 public void dataserver(uint localID, UUID itemID)
404 { 404 {
405 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull); 405 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull);
406 } 406 }
407 407
408 public void link_message(uint localID, LLUUID itemID) 408 public void link_message(uint localID, UUID itemID)
409 { 409 {
410 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull); 410 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull);
411 } 411 }
412 412
413 public void moving_start(uint localID, LLUUID itemID) 413 public void moving_start(uint localID, UUID itemID)
414 { 414 {
415 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull); 415 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull);
416 } 416 }
417 417
418 public void moving_end(uint localID, LLUUID itemID) 418 public void moving_end(uint localID, UUID itemID)
419 { 419 {
420 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull); 420 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull);
421 } 421 }
422 422
423 public void object_rez(uint localID, LLUUID itemID) 423 public void object_rez(uint localID, UUID itemID)
424 { 424 {
425 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull); 425 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull);
426 } 426 }
427 427
428 public void remote_data(uint localID, LLUUID itemID) 428 public void remote_data(uint localID, UUID itemID)
429 { 429 {
430 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull); 430 myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull);
431 } 431 }
432 432
433 // Handled by long commands 433 // Handled by long commands
434 public void http_response(uint localID, LLUUID itemID) 434 public void http_response(uint localID, UUID itemID)
435 { 435 {
436 // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull); 436 // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull);
437 } 437 }
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
index 5c57874..1a08795 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32 32
33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 33namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
34{ 34{
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
134 public struct QueueItemStruct 134 public struct QueueItemStruct
135 { 135 {
136 public uint localID; 136 public uint localID;
137 public LLUUID itemID; 137 public UUID itemID;
138 public string functionName; 138 public string functionName;
139 public Queue_llDetectParams_Struct llDetectParams; 139 public Queue_llDetectParams_Struct llDetectParams;
140 public object[] param; 140 public object[] param;
@@ -308,10 +308,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
308 return; 308 return;
309 } 309 }
310 310
311 Dictionary<LLUUID, IScript>.KeyCollection scriptKeys = 311 Dictionary<UUID, IScript>.KeyCollection scriptKeys =
312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID); 312 m_ScriptEngine.m_ScriptManager.GetScriptKeys(localID);
313 313
314 foreach (LLUUID itemID in scriptKeys) 314 foreach (UUID itemID in scriptKeys)
315 { 315 {
316 // Add to each script in that object 316 // Add to each script in that object
317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? 317 // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
@@ -326,7 +326,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
326 /// <param name="itemID">Region script ID</param> 326 /// <param name="itemID">Region script ID</param>
327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> 327 /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
328 /// <param name="param">Array of parameters to match event mask</param> 328 /// <param name="param">Array of parameters to match event mask</param>
329 public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) 329 public void AddToScriptQueue(uint localID, UUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
330 { 330 {
331 lock (eventQueue) 331 lock (eventQueue)
332 { 332 {
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 4376e00..1e71ae5 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -31,7 +31,7 @@ using System.Reflection;
31using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using System.Threading; 32using System.Threading;
33using System.Globalization; 33using System.Globalization;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Scenes.Scripting; 37using OpenSim.Region.Environment.Scenes.Scripting;
@@ -327,7 +327,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID); 327 m_ScriptEngine.World.GetSceneObjectPart(QIS.localID);
328 //if (m_host != null) 328 //if (m_host != null)
329 //{ 329 //{
330 m_ScriptEngine.World.SimChat(Helpers.StringToField(text), 330 m_ScriptEngine.World.SimChat(Utils.StringToBytes(text),
331 ChatTypeEnum.DebugChannel, 2147483647, 331 ChatTypeEnum.DebugChannel, 2147483647,
332 m_host.AbsolutePosition, 332 m_host.AbsolutePosition,
333 m_host.Name, m_host.UUID, false); 333 m_host.Name, m_host.UUID, false);
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
index 99bbdee..60333b1 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Runtime.Serialization.Formatters.Binary; 32using System.Runtime.Serialization.Formatters.Binary;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
36 36
37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase 37namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
@@ -69,7 +69,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
69 private struct LUStruct 69 private struct LUStruct
70 { 70 {
71 public uint localID; 71 public uint localID;
72 public LLUUID itemID; 72 public UUID itemID;
73 public string script; 73 public string script;
74 public LUType Action; 74 public LUType Action;
75 public int startParam; 75 public int startParam;
@@ -84,13 +84,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
84 } 84 }
85 85
86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse 86 // Xantor 20080525: Keep a list of compiled scripts this session for reuse
87 public Dictionary<LLUUID, String> scriptList = new Dictionary<LLUUID, string>(); 87 public Dictionary<UUID, String> scriptList = new Dictionary<UUID, string>();
88 88
89 // Object<string, Script<string, script>> 89 // Object<string, Script<string, script>>
90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. 90 // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory.
91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! 91 // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead!
92 public Dictionary<uint, Dictionary<LLUUID, IScript>> Scripts = 92 public Dictionary<uint, Dictionary<UUID, IScript>> Scripts =
93 new Dictionary<uint, Dictionary<LLUUID, IScript>>(); 93 new Dictionary<uint, Dictionary<UUID, IScript>>();
94 94
95 95
96 public Scene World 96 public Scene World
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
254 /// </summary> 254 /// </summary>
255 /// <param name="itemID"></param> 255 /// <param name="itemID"></param>
256 /// <param name="localID"></param> 256 /// <param name="localID"></param>
257 public void StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 257 public void StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
258 { 258 {
259 lock (LUQueue) 259 lock (LUQueue)
260 { 260 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
280 /// </summary> 280 /// </summary>
281 /// <param name="localID"></param> 281 /// <param name="localID"></param>
282 /// <param name="itemID"></param> 282 /// <param name="itemID"></param>
283 public void StopScript(uint localID, LLUUID itemID) 283 public void StopScript(uint localID, UUID itemID)
284 { 284 {
285 LUStruct ls = new LUStruct(); 285 LUStruct ls = new LUStruct();
286 ls.localID = localID; 286 ls.localID = localID;
@@ -297,8 +297,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
297 // Create a new instance of the compiler (reuse) 297 // Create a new instance of the compiler (reuse)
298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler(); 298 //private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
299 299
300 public abstract void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez); 300 public abstract void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez);
301 public abstract void _StopScript(uint localID, LLUUID itemID); 301 public abstract void _StopScript(uint localID, UUID itemID);
302 302
303 303
304 #endregion 304 #endregion
@@ -312,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
312 /// <param name="itemID">Script ID</param> 312 /// <param name="itemID">Script ID</param>
313 /// <param name="FunctionName">Name of function</param> 313 /// <param name="FunctionName">Name of function</param>
314 /// <param name="args">Arguments to pass to function</param> 314 /// <param name="args">Arguments to pass to function</param>
315 internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args) 315 internal void ExecuteEvent(uint localID, UUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
316 { 316 {
317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined 317 //cfk 2-7-08 dont need this right now and the default Linux build has DEBUG defined
318 ///#if DEBUG 318 ///#if DEBUG
@@ -335,7 +335,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
335 Script.Exec.ExecuteEvent(FunctionName, args); 335 Script.Exec.ExecuteEvent(FunctionName, args);
336 } 336 }
337 337
338 public int GetStateEventFlags(uint localID, LLUUID itemID) 338 public int GetStateEventFlags(uint localID, UUID itemID)
339 { 339 {
340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">"); 340 // Console.WriteLine("GetStateEventFlags for <" + localID + "," + itemID + ">");
341 try 341 try
@@ -360,25 +360,25 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
360 360
361 #region Internal functions to keep track of script 361 #region Internal functions to keep track of script
362 362
363 public Dictionary<LLUUID, IScript>.KeyCollection GetScriptKeys(uint localID) 363 public Dictionary<UUID, IScript>.KeyCollection GetScriptKeys(uint localID)
364 { 364 {
365 if (Scripts.ContainsKey(localID) == false) 365 if (Scripts.ContainsKey(localID) == false)
366 return null; 366 return null;
367 367
368 Dictionary<LLUUID, IScript> Obj; 368 Dictionary<UUID, IScript> Obj;
369 Scripts.TryGetValue(localID, out Obj); 369 Scripts.TryGetValue(localID, out Obj);
370 370
371 return Obj.Keys; 371 return Obj.Keys;
372 } 372 }
373 373
374 public IScript GetScript(uint localID, LLUUID itemID) 374 public IScript GetScript(uint localID, UUID itemID)
375 { 375 {
376 lock (scriptLock) 376 lock (scriptLock)
377 { 377 {
378 if (Scripts.ContainsKey(localID) == false) 378 if (Scripts.ContainsKey(localID) == false)
379 return null; 379 return null;
380 380
381 Dictionary<LLUUID, IScript> Obj; 381 Dictionary<UUID, IScript> Obj;
382 Scripts.TryGetValue(localID, out Obj); 382 Scripts.TryGetValue(localID, out Obj);
383 if (Obj.ContainsKey(itemID) == false) 383 if (Obj.ContainsKey(itemID) == false)
384 return null; 384 return null;
@@ -390,18 +390,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
390 } 390 }
391 } 391 }
392 392
393 public void SetScript(uint localID, LLUUID itemID, IScript Script) 393 public void SetScript(uint localID, UUID itemID, IScript Script)
394 { 394 {
395 lock (scriptLock) 395 lock (scriptLock)
396 { 396 {
397 // Create object if it doesn't exist 397 // Create object if it doesn't exist
398 if (Scripts.ContainsKey(localID) == false) 398 if (Scripts.ContainsKey(localID) == false)
399 { 399 {
400 Scripts.Add(localID, new Dictionary<LLUUID, IScript>()); 400 Scripts.Add(localID, new Dictionary<UUID, IScript>());
401 } 401 }
402 402
403 // Delete script if it exists 403 // Delete script if it exists
404 Dictionary<LLUUID, IScript> Obj; 404 Dictionary<UUID, IScript> Obj;
405 Scripts.TryGetValue(localID, out Obj); 405 Scripts.TryGetValue(localID, out Obj);
406 if (Obj.ContainsKey(itemID) == true) 406 if (Obj.ContainsKey(itemID) == true)
407 Obj.Remove(itemID); 407 Obj.Remove(itemID);
@@ -411,14 +411,14 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
411 } 411 }
412 } 412 }
413 413
414 public void RemoveScript(uint localID, LLUUID itemID) 414 public void RemoveScript(uint localID, UUID itemID)
415 { 415 {
416 // Don't have that object? 416 // Don't have that object?
417 if (Scripts.ContainsKey(localID) == false) 417 if (Scripts.ContainsKey(localID) == false)
418 return; 418 return;
419 419
420 // Delete script if it exists 420 // Delete script if it exists
421 Dictionary<LLUUID, IScript> Obj; 421 Dictionary<UUID, IScript> Obj;
422 Scripts.TryGetValue(localID, out Obj); 422 Scripts.TryGetValue(localID, out Obj);
423 if (Obj.ContainsKey(itemID) == true) 423 if (Obj.ContainsKey(itemID) == true)
424 Obj.Remove(itemID); 424 Obj.Remove(itemID);
@@ -427,21 +427,21 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
427 #endregion 427 #endregion
428 428
429 429
430 public void ResetScript(uint localID, LLUUID itemID) 430 public void ResetScript(uint localID, UUID itemID)
431 { 431 {
432 IScript s = GetScript(localID, itemID); 432 IScript s = GetScript(localID, itemID);
433 string script = s.Source; 433 string script = s.Source;
434 StopScript(localID, itemID); 434 StopScript(localID, itemID);
435 SceneObjectPart part = World.GetSceneObjectPart(localID); 435 SceneObjectPart part = World.GetSceneObjectPart(localID);
436 part.GetInventoryItem(itemID).PermsMask = 0; 436 part.GetInventoryItem(itemID).PermsMask = 0;
437 part.GetInventoryItem(itemID).PermsGranter = LLUUID.Zero; 437 part.GetInventoryItem(itemID).PermsGranter = UUID.Zero;
438 StartScript(localID, itemID, script, s.StartParam, false); 438 StartScript(localID, itemID, script, s.StartParam, false);
439 } 439 }
440 440
441 441
442 #region Script serialization/deserialization 442 #region Script serialization/deserialization
443 443
444 public void GetSerializedScript(uint localID, LLUUID itemID) 444 public void GetSerializedScript(uint localID, UUID itemID)
445 { 445 {
446 // Serialize the script and return it 446 // Serialize the script and return it
447 // Should not be a problem 447 // Should not be a problem
@@ -451,7 +451,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
451 fs.Close(); 451 fs.Close();
452 } 452 }
453 453
454 public void PutSerializedScript(uint localID, LLUUID itemID) 454 public void PutSerializedScript(uint localID, UUID itemID)
455 { 455 {
456 // Deserialize the script and inject it into an AppDomain 456 // Deserialize the script and inject it into an AppDomain
457 457
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
index 41fde02..a6473ee 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -38,40 +38,40 @@ namespace OpenSim.Region.ScriptEngine.Common
38 { 38 {
39 public interface RemoteEvents 39 public interface RemoteEvents
40 { 40 {
41 void touch_start(uint localID, uint originalID, LLVector3 offsetPos, IClientAPI remoteClient); 41 void touch_start(uint localID, uint originalID, Vector3 offsetPos, IClientAPI remoteClient);
42 void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez); 42 void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez);
43 void OnRemoveScript(uint localID, LLUUID itemID); 43 void OnRemoveScript(uint localID, UUID itemID);
44 void state_exit(uint localID); 44 void state_exit(uint localID);
45 void touch(uint localID, uint originalID, LLUUID itemID); 45 void touch(uint localID, uint originalID, UUID itemID);
46 void touch_end(uint localID, uint originalID, LLUUID itemID); 46 void touch_end(uint localID, uint originalID, UUID itemID);
47 void collision_start(uint localID, ColliderArgs col); 47 void collision_start(uint localID, ColliderArgs col);
48 void collision(uint localID, ColliderArgs col); 48 void collision(uint localID, ColliderArgs col);
49 void collision_end(uint localID, ColliderArgs col); 49 void collision_end(uint localID, ColliderArgs col);
50 void land_collision_start(uint localID, LLUUID itemID); 50 void land_collision_start(uint localID, UUID itemID);
51 void land_collision(uint localID, ColliderArgs col); 51 void land_collision(uint localID, ColliderArgs col);
52 void land_collision_end(uint localID, LLUUID itemID); 52 void land_collision_end(uint localID, UUID itemID);
53 void timer(uint localID, LLUUID itemID); 53 void timer(uint localID, UUID itemID);
54 void listen(uint localID, LLUUID itemID); 54 void listen(uint localID, UUID itemID);
55 void on_rez(uint localID, LLUUID itemID); 55 void on_rez(uint localID, UUID itemID);
56 void sensor(uint localID, LLUUID itemID); 56 void sensor(uint localID, UUID itemID);
57 void no_sensor(uint localID, LLUUID itemID); 57 void no_sensor(uint localID, UUID itemID);
58 void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change); 58 void control(uint localID, UUID itemID, UUID agentID, uint held, uint change);
59 void money(uint LocalID, LLUUID agentID, int amount); 59 void money(uint LocalID, UUID agentID, int amount);
60 void email(uint localID, LLUUID itemID); 60 void email(uint localID, UUID itemID);
61 void at_target(uint localID, uint handle, LLVector3 targetpos, LLVector3 atpos); 61 void at_target(uint localID, uint handle, Vector3 targetpos, Vector3 atpos);
62 void not_at_target(uint localID); 62 void not_at_target(uint localID);
63 void at_rot_target(uint localID, LLUUID itemID); 63 void at_rot_target(uint localID, UUID itemID);
64 void not_at_rot_target(uint localID, LLUUID itemID); 64 void not_at_rot_target(uint localID, UUID itemID);
65 void run_time_permissions(uint localID, LLUUID itemID); 65 void run_time_permissions(uint localID, UUID itemID);
66 void changed(uint localID, LLUUID itemID); 66 void changed(uint localID, UUID itemID);
67 void attach(uint localID, LLUUID itemID); 67 void attach(uint localID, UUID itemID);
68 void dataserver(uint localID, LLUUID itemID); 68 void dataserver(uint localID, UUID itemID);
69 void link_message(uint localID, LLUUID itemID); 69 void link_message(uint localID, UUID itemID);
70 void moving_start(uint localID, LLUUID itemID); 70 void moving_start(uint localID, UUID itemID);
71 void moving_end(uint localID, LLUUID itemID); 71 void moving_end(uint localID, UUID itemID);
72 void object_rez(uint localID, LLUUID itemID); 72 void object_rez(uint localID, UUID itemID);
73 void remote_data(uint localID, LLUUID itemID); 73 void remote_data(uint localID, UUID itemID);
74 void http_response(uint localID, LLUUID itemID); 74 void http_response(uint localID, UUID itemID);
75 } 75 }
76 76
77 public interface ServerRemotingObject 77 public interface ServerRemotingObject
diff --git a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
index a310978..b02f2f5 100644
--- a/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
+++ b/OpenSim/Region/ScriptEngine/Common/TRPC_Remote.cs
@@ -31,7 +31,7 @@ using System.Diagnostics;
31using System.Net; 31using System.Net;
32using System.Text; 32using System.Text;
33using System.Web; 33using System.Web;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Region.ScriptEngine.Common.TRPC; 35using OpenSim.Region.ScriptEngine.Common.TRPC;
36 36
37namespace OpenSim.Region.ScriptEngine.Common 37namespace OpenSim.Region.ScriptEngine.Common
@@ -53,7 +53,7 @@ namespace OpenSim.Region.ScriptEngine.Common
53 typeof(Double), 53 typeof(Double),
54 typeof(Decimal), 54 typeof(Decimal),
55 typeof(Array), 55 typeof(Array),
56 typeof(LLUUID), 56 typeof(UUID),
57 typeof(UInt16), 57 typeof(UInt16),
58 typeof(UInt32), 58 typeof(UInt32),
59 typeof(UInt64) 59 typeof(UInt64)
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 371ba45..cf1d489 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -120,7 +120,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
120 //System.Console.WriteLine("SCRIPT:" + checkscript); 120 //System.Console.WriteLine("SCRIPT:" + checkscript);
121 121
122 // checks for alpha.alpha way of referring to objects in C# 122 // checks for alpha.alpha way of referring to objects in C#
123 // ignores alpha.x alpha.y, alpha.z for refering to vector components 123 // ignores alpha.X alpha.Y, alpha.Z for refering to vector components
124 Match SecurityM; 124 Match SecurityM;
125 125
126 126
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index c94b56a..8176d3f 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using log4net; 30using log4net;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
34using OpenSim.Region.ScriptEngine.Common; 34using OpenSim.Region.ScriptEngine.Common;
@@ -54,13 +54,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
54 } 54 }
55 55
56 // KEEP TRACK OF SCRIPTS <int id, whatever script> 56 // KEEP TRACK OF SCRIPTS <int id, whatever script>
57 //internal Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<LLUUID, LSL_BaseClass>>(); 57 //internal Dictionary<uint, Dictionary<UUID, LSL_BaseClass>> Scripts = new Dictionary<uint, Dictionary<UUID, LSL_BaseClass>>();
58 // LOAD SCRIPT 58 // LOAD SCRIPT
59 // UNLOAD SCRIPT 59 // UNLOAD SCRIPT
60 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim 60 // PROVIDE SCRIPT WITH ITS INTERFACE TO OpenSim
61 61
62 62
63 public override void _StartScript(uint localID, LLUUID itemID, string Script, int startParam, bool postOnRez) 63 public override void _StartScript(uint localID, UUID itemID, string Script, int startParam, bool postOnRez)
64 { 64 {
65 m_log.DebugFormat( 65 m_log.DebugFormat(
66 "[{0}]: ScriptManager StartScript: localID: {1}, itemID: {2}", 66 "[{0}]: ScriptManager StartScript: localID: {1}, itemID: {2}",
@@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
84 } 84 }
85 85
86 // Xantor 20080525: I need assetID here to see if we already compiled this one previously 86 // Xantor 20080525: I need assetID here to see if we already compiled this one previously
87 LLUUID assetID = LLUUID.Zero; 87 UUID assetID = UUID.Zero;
88 TaskInventoryItem taskInventoryItem = new TaskInventoryItem(); 88 TaskInventoryItem taskInventoryItem = new TaskInventoryItem();
89 if (m_host.TaskInventory.TryGetValue(itemID, out taskInventoryItem)) 89 if (m_host.TaskInventory.TryGetValue(itemID, out taskInventoryItem))
90 assetID = taskInventoryItem.AssetID; 90 assetID = taskInventoryItem.AssetID;
@@ -153,7 +153,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
153 string text = "Error compiling script:\r\n" + e.Message.ToString(); 153 string text = "Error compiling script:\r\n" + e.Message.ToString();
154 if (text.Length > 1500) 154 if (text.Length > 1500)
155 text = text.Substring(0, 1499); // 0-1499 is 1500 characters 155 text = text.Substring(0, 1499); // 0-1499 is 1500 characters
156 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.DebugChannel, 2147483647, 156 World.SimChat(Utils.StringToBytes(text), ChatTypeEnum.DebugChannel, 2147483647,
157 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 157 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
158 } 158 }
159 catch (Exception e2) // LEGIT: User Scripting 159 catch (Exception e2) // LEGIT: User Scripting
@@ -165,7 +165,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
165 } 165 }
166 } 166 }
167 167
168 public override void _StopScript(uint localID, LLUUID itemID) 168 public override void _StopScript(uint localID, UUID itemID)
169 { 169 {
170 // Stop script 170 // Stop script
171#if DEBUG 171#if DEBUG
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
index 2df41d0..e94de68 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptApi.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment.Scenes; 30using OpenSim.Region.Environment.Scenes;
31 31
32 32
@@ -38,6 +38,6 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
38 // Each API has an identifier, which is used to load the 38 // Each API has an identifier, which is used to load the
39 // proper runtime assembly at load time. 39 // proper runtime assembly at load time.
40 // 40 //
41 void Initialize(IScriptEngine engine, SceneObjectPart part, uint localID, LLUUID item); 41 void Initialize(IScriptEngine engine, SceneObjectPart part, uint localID, UUID item);
42 } 42 }
43} 43}
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
index 6b3804c..4b46c21 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs
@@ -29,7 +29,7 @@ using log4net;
29using System; 29using System;
30using OpenSim.Region.ScriptEngine.Shared; 30using OpenSim.Region.ScriptEngine.Shared;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Region.ScriptEngine.Interfaces; 34using OpenSim.Region.ScriptEngine.Interfaces;
35using Amib.Threading; 35using Amib.Threading;
@@ -49,16 +49,16 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
49 ILog Log { get; } 49 ILog Log { get; }
50 string ScriptEngineName { get; } 50 string ScriptEngineName { get; }
51 51
52 bool PostScriptEvent(LLUUID itemID, EventParams parms); 52 bool PostScriptEvent(UUID itemID, EventParams parms);
53 bool PostObjectEvent(uint localID, EventParams parms); 53 bool PostObjectEvent(uint localID, EventParams parms);
54 void ApiResetScript(LLUUID itemID); 54 void ApiResetScript(UUID itemID);
55 void ResetScript(LLUUID itemID); 55 void ResetScript(UUID itemID);
56 void SetScriptState(LLUUID itemID, bool state); 56 void SetScriptState(UUID itemID, bool state);
57 bool GetScriptState(LLUUID itemID); 57 bool GetScriptState(UUID itemID);
58 void SetState(LLUUID itemID, string newState); 58 void SetState(UUID itemID, string newState);
59 int GetStartParameter(LLUUID itemID); 59 int GetStartParameter(UUID itemID);
60 IScriptWorkItem QueueEventHandler(object parms); 60 IScriptWorkItem QueueEventHandler(object parms);
61 61
62 DetectParams GetDetectParams(LLUUID item, int number); 62 DetectParams GetDetectParams(UUID item, int number);
63 } 63 }
64} 64}
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 3aeb602..f79c1a3 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.ScriptEngine.Shared; 34using OpenSim.Region.ScriptEngine.Shared;
@@ -55,13 +55,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
55 bool Running { get; set; } 55 bool Running { get; set; }
56 string State { get; set; } 56 string State { get; set; }
57 IScriptEngine Engine { get; } 57 IScriptEngine Engine { get; }
58 LLUUID AppDomain { get; set; } 58 UUID AppDomain { get; set; }
59 string PrimName { get; } 59 string PrimName { get; }
60 string ScriptName { get; } 60 string ScriptName { get; }
61 LLUUID ItemID { get; } 61 UUID ItemID { get; }
62 LLUUID ObjectID { get; } 62 UUID ObjectID { get; }
63 uint LocalID { get; } 63 uint LocalID { get; }
64 LLUUID AssetID { get; } 64 UUID AssetID { get; }
65 Queue EventQueue { get; } 65 Queue EventQueue { get; }
66 66
67 void ClearQueue(); 67 void ClearQueue();
@@ -82,7 +82,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
82 Dictionary<string, object> GetVars(); 82 Dictionary<string, object> GetVars();
83 void SetVars(Dictionary<string, object> vars); 83 void SetVars(Dictionary<string, object> vars);
84 DetectParams GetDetectParams(int idx); 84 DetectParams GetDetectParams(int idx);
85 LLUUID GetDetectID(int idx); 85 UUID GetDetectID(int idx);
86 void SaveState(string assembly); 86 void SaveState(string assembly);
87 } 87 }
88} 88}
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
index 21888fa..afb7311 100644
--- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs
@@ -28,7 +28,7 @@
28/* Original code: Tedd Hansen */ 28/* Original code: Tedd Hansen */
29 29
30using System; 30using System;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.ScriptEngine.Common; 33using OpenSim.Region.ScriptEngine.Common;
34using OpenSim.Region.ScriptEngine.Common.TRPC; 34using OpenSim.Region.ScriptEngine.Common.TRPC;
@@ -77,7 +77,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
77 } 77 }
78 } 78 }
79 79
80 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 80 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
81 { 81 {
82 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID 82 // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID
83 myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); 83 myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)");
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
90 //remoteScript[localID].Events().OnRezScript(localID, itemID, script); 90 //remoteScript[localID].Events().OnRezScript(localID, itemID, script);
91 } 91 }
92 92
93 public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) 93 public void touch_start(uint localID, Vector3 offsetPos, IClientAPI remoteClient)
94 { 94 {
95 //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); 95 //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient);
96 RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); 96 RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?");
@@ -100,162 +100,162 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer
100 // PLACEHOLDERS -- CODE WILL CHANGE! 100 // PLACEHOLDERS -- CODE WILL CHANGE!
101 101
102 102
103 //public void OnRemoveScript(uint localID, LLUUID itemID) 103 //public void OnRemoveScript(uint localID, UUID itemID)
104 //{ 104 //{
105 // remoteScript[localID].Events.OnRemoveScript(localID, itemID); 105 // remoteScript[localID].Events.OnRemoveScript(localID, itemID);
106 //} 106 //}
107 107
108 //public void state_exit(uint localID, LLUUID itemID) 108 //public void state_exit(uint localID, UUID itemID)
109 //{ 109 //{
110 // remoteScript[localID].Events.state_exit(localID, itemID); 110 // remoteScript[localID].Events.state_exit(localID, itemID);
111 //} 111 //}
112 112
113 //public void touch(uint localID, LLUUID itemID) 113 //public void touch(uint localID, UUID itemID)
114 //{ 114 //{
115 // remoteScript[localID].Events.touch(localID, itemID); 115 // remoteScript[localID].Events.touch(localID, itemID);
116 //} 116 //}
117 117
118 //public void touch_end(uint localID, LLUUID itemID) 118 //public void touch_end(uint localID, UUID itemID)
119 //{ 119 //{
120 // remoteScript[localID].Events.touch_end(localID, itemID); 120 // remoteScript[localID].Events.touch_end(localID, itemID);
121 //} 121 //}
122 122
123 //public void collision_start(uint localID, LLUUID itemID) 123 //public void collision_start(uint localID, UUID itemID)
124 //{ 124 //{
125 // remoteScript[localID].Events.collision_start(localID, itemID); 125 // remoteScript[localID].Events.collision_start(localID, itemID);
126 //} 126 //}
127 127
128 //public void collision(uint localID, LLUUID itemID) 128 //public void collision(uint localID, UUID itemID)
129 //{ 129 //{
130 // remoteScript[localID].Events.collision(localID, itemID); 130 // remoteScript[localID].Events.collision(localID, itemID);
131 //} 131 //}
132 132
133 //public void collision_end(uint localID, LLUUID itemID) 133 //public void collision_end(uint localID, UUID itemID)
134 //{ 134 //{
135 // remoteScript[localID].Events.collision_end(localID, itemID); 135 // remoteScript[localID].Events.collision_end(localID, itemID);
136 //} 136 //}
137 137
138 //public void land_collision_start(uint localID, LLUUID itemID) 138 //public void land_collision_start(uint localID, UUID itemID)
139 //{ 139 //{
140 // remoteScript[localID].Events.land_collision_start(localID, itemID); 140 // remoteScript[localID].Events.land_collision_start(localID, itemID);
141 //} 141 //}
142 142
143 //public void land_collision(uint localID, LLUUID itemID) 143 //public void land_collision(uint localID, UUID itemID)
144 //{ 144 //{
145 // remoteScript[localID].Events.land_collision(localID, itemID); 145 // remoteScript[localID].Events.land_collision(localID, itemID);
146 //} 146 //}
147 147
148 //public void land_collision_end(uint localID, LLUUID itemID) 148 //public void land_collision_end(uint localID, UUID itemID)
149 //{ 149 //{
150 // remoteScript[localID].Events.land_collision_end(localID, itemID); 150 // remoteScript[localID].Events.land_collision_end(localID, itemID);
151 //} 151 //}
152 152
153 //public void timer(uint localID, LLUUID itemID) 153 //public void timer(uint localID, UUID itemID)
154 //{ 154 //{
155 // remoteScript[localID].Events.timer(localID, itemID); 155 // remoteScript[localID].Events.timer(localID, itemID);
156 //} 156 //}
157 157
158 //public void listen(uint localID, LLUUID itemID) 158 //public void listen(uint localID, UUID itemID)
159 //{ 159 //{
160 // remoteScript[localID].Events.listen(localID, itemID); 160 // remoteScript[localID].Events.listen(localID, itemID);
161 //} 161 //}
162 162
163 //public void on_rez(uint localID, LLUUID itemID) 163 //public void on_rez(uint localID, UUID itemID)
164 //{ 164 //{
165 // remoteScript[localID].Events.on_rez(localID, itemID); 165 // remoteScript[localID].Events.on_rez(localID, itemID);
166 //} 166 //}
167 167
168 //public void sensor(uint localID, LLUUID itemID) 168 //public void sensor(uint localID, UUID itemID)
169 //{ 169 //{
170 // remoteScript[localID].Events.sensor(localID, itemID); 170 // remoteScript[localID].Events.sensor(localID, itemID);
171 //} 171 //}
172 172
173 //public void no_sensor(uint localID, LLUUID itemID) 173 //public void no_sensor(uint localID, UUID itemID)
174 //{ 174 //{
175 // remoteScript[localID].Events.no_sensor(localID, itemID); 175 // remoteScript[localID].Events.no_sensor(localID, itemID);
176 //} 176 //}
177 177
178 //public void control(uint localID, LLUUID itemID) 178 //public void control(uint localID, UUID itemID)
179 //{ 179 //{
180 // remoteScript[localID].Events.control(localID, itemID); 180 // remoteScript[localID].Events.control(localID, itemID);
181 //} 181 //}
182 182
183 //public void money(uint localID, LLUUID itemID) 183 //public void money(uint localID, UUID itemID)
184 //{ 184 //{
185 // remoteScript[localID].Events.money(localID, itemID); 185 // remoteScript[localID].Events.money(localID, itemID);
186 //} 186 //}
187 187
188 //public void email(uint localID, LLUUID itemID) 188 //public void email(uint localID, UUID itemID)
189 //{ 189 //{
190 // remoteScript[localID].Events.email(localID, itemID); 190 // remoteScript[localID].Events.email(localID, itemID);
191 //} 191 //}
192 192
193 //public void at_target(uint localID, LLUUID itemID) 193 //public void at_target(uint localID, UUID itemID)
194 //{ 194 //{
195 // remoteScript[localID].Events.at_target(localID, itemID); 195 // remoteScript[localID].Events.at_target(localID, itemID);
196 //} 196 //}
197 197
198 //public void not_at_target(uint localID, LLUUID itemID) 198 //public void not_at_target(uint localID, UUID itemID)
199 //{ 199 //{
200 // remoteScript[localID].Events.not_at_target(localID, itemID); 200 // remoteScript[localID].Events.not_at_target(localID, itemID);
201 //} 201 //}
202 202
203 //public void at_rot_target(uint localID, LLUUID itemID) 203 //public void at_rot_target(uint localID, UUID itemID)
204 //{ 204 //{
205 // remoteScript[localID].Events.at_rot_target(localID, itemID); 205 // remoteScript[localID].Events.at_rot_target(localID, itemID);
206 //} 206 //}
207 207
208 //public void not_at_rot_target(uint localID, LLUUID itemID) 208 //public void not_at_rot_target(uint localID, UUID itemID)
209 //{ 209 //{
210 // remoteScript[localID].Events.not_at_rot_target(localID, itemID); 210 // remoteScript[localID].Events.not_at_rot_target(localID, itemID);
211 //} 211 //}
212 212
213 //public void run_time_permissions(uint localID, LLUUID itemID) 213 //public void run_time_permissions(uint localID, UUID itemID)
214 //{ 214 //{
215 // remoteScript[localID].Events.run_time_permissions(localID, itemID); 215 // remoteScript[localID].Events.run_time_permissions(localID, itemID);
216 //} 216 //}
217 217
218 //public void changed(uint localID, LLUUID itemID) 218 //public void changed(uint localID, UUID itemID)
219 //{ 219 //{
220 // remoteScript[localID].Events.changed(localID, itemID); 220 // remoteScript[localID].Events.changed(localID, itemID);
221 //} 221 //}
222 222
223 //public void attach(uint localID, LLUUID itemID) 223 //public void attach(uint localID, UUID itemID)
224 //{ 224 //{
225 // remoteScript[localID].Events.attach(localID, itemID); 225 // remoteScript[localID].Events.attach(localID, itemID);
226 //} 226 //}
227 227
228 //public void dataserver(uint localID, LLUUID itemID) 228 //public void dataserver(uint localID, UUID itemID)
229 //{ 229 //{
230 // remoteScript[localID].Events.dataserver(localID, itemID); 230 // remoteScript[localID].Events.dataserver(localID, itemID);
231 //} 231 //}
232 232
233 //public void link_message(uint localID, LLUUID itemID) 233 //public void link_message(uint localID, UUID itemID)
234 //{ 234 //{
235 // remoteScript[localID].Events.link_message(localID, itemID); 235 // remoteScript[localID].Events.link_message(localID, itemID);
236 //} 236 //}
237 237
238 //public void moving_start(uint localID, LLUUID itemID) 238 //public void moving_start(uint localID, UUID itemID)
239 //{ 239 //{
240 // remoteScript[localID].Events.moving_start(localID, itemID); 240 // remoteScript[localID].Events.moving_start(localID, itemID);
241 //} 241 //}
242 242
243 //public void moving_end(uint localID, LLUUID itemID) 243 //public void moving_end(uint localID, UUID itemID)
244 //{ 244 //{
245 // remoteScript[localID].Events.moving_end(localID, itemID); 245 // remoteScript[localID].Events.moving_end(localID, itemID);
246 //} 246 //}
247 247
248 //public void object_rez(uint localID, LLUUID itemID) 248 //public void object_rez(uint localID, UUID itemID)
249 //{ 249 //{
250 // remoteScript[localID].Events.object_rez(localID, itemID); 250 // remoteScript[localID].Events.object_rez(localID, itemID);
251 //} 251 //}
252 252
253 //public void remote_data(uint localID, LLUUID itemID) 253 //public void remote_data(uint localID, UUID itemID)
254 //{ 254 //{
255 // remoteScript[localID].Events.remote_data(localID, itemID); 255 // remoteScript[localID].Events.remote_data(localID, itemID);
256 //} 256 //}
257 257
258 //public void http_response(uint localID, LLUUID itemID) 258 //public void http_response(uint localID, UUID itemID)
259 //{ 259 //{
260 // remoteScript[localID].Events.http_response(localID, itemID); 260 // remoteScript[localID].Events.http_response(localID, itemID);
261 //} 261 //}
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
index fcd1df8..93a1a80 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/AsyncCommandManager.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.ScriptEngine.Interfaces; 35using OpenSim.Region.ScriptEngine.Interfaces;
@@ -192,7 +192,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
192 /// </summary> 192 /// </summary>
193 /// <param name="localID"></param> 193 /// <param name="localID"></param>
194 /// <param name="itemID"></param> 194 /// <param name="itemID"></param>
195 public void RemoveScript(uint localID, LLUUID itemID) 195 public void RemoveScript(uint localID, UUID itemID)
196 { 196 {
197 // Remove a specific script 197 // Remove a specific script
198 198
@@ -219,7 +219,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
219 219
220 } 220 }
221 221
222 public Object[] GetSerializationData(LLUUID itemID) 222 public Object[] GetSerializationData(UUID itemID)
223 { 223 {
224 List<Object> data = new List<Object>(); 224 List<Object> data = new List<Object>();
225 225
@@ -250,7 +250,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
250 return data.ToArray(); 250 return data.ToArray();
251 } 251 }
252 252
253 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 253 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
254 Object[] data) 254 Object[] data)
255 { 255 {
256 int idx = 0; 256 int idx = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 93dfeea..b2be0df 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -32,9 +32,8 @@ using System.Runtime.Remoting.Lifetime;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using Nini.Config; 34using Nini.Config;
35using Axiom.Math; 35using OpenMetaverse;
36using libsecondlife; 36using OpenMetaverse.Packets;
37using libsecondlife.Packets;
38using OpenSim; 37using OpenSim;
39using OpenSim.Framework; 38using OpenSim.Framework;
40using OpenSim.Framework.Communications.Cache; 39using OpenSim.Framework.Communications.Cache;
@@ -63,13 +62,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
63 internal IScriptEngine m_ScriptEngine; 62 internal IScriptEngine m_ScriptEngine;
64 internal SceneObjectPart m_host; 63 internal SceneObjectPart m_host;
65 internal uint m_localID; 64 internal uint m_localID;
66 internal LLUUID m_itemID; 65 internal UUID m_itemID;
67 internal bool throwErrorOnNotImplemented = true; 66 internal bool throwErrorOnNotImplemented = true;
68 internal AsyncCommandManager AsyncCommands = null; 67 internal AsyncCommandManager AsyncCommands = null;
69 internal float m_ScriptDelayFactor = 1.0f; 68 internal float m_ScriptDelayFactor = 1.0f;
70 internal float m_ScriptDistanceFactor = 1.0f; 69 internal float m_ScriptDistanceFactor = 1.0f;
71 70
72 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 71 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
73 { 72 {
74 m_ScriptEngine = ScriptEngine; 73 m_ScriptEngine = ScriptEngine;
75 m_host = host; 74 m_host = host;
@@ -129,11 +128,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
129 return World.GetCommander(name); 128 return World.GetCommander(name);
130 } 129 }
131 130
132 private LLUUID InventorySelf() 131 private UUID InventorySelf()
133 { 132 {
134 LLUUID invItemID = new LLUUID(); 133 UUID invItemID = new UUID();
135 134
136 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 135 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
137 { 136 {
138 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID) 137 if (inv.Value.Type == 10 && inv.Value.ItemID == m_itemID)
139 { 138 {
@@ -145,54 +144,54 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
145 return invItemID; 144 return invItemID;
146 } 145 }
147 146
148 private LLUUID InventoryKey(string name, int type) 147 private UUID InventoryKey(string name, int type)
149 { 148 {
150 m_host.AddScriptLPS(1); 149 m_host.AddScriptLPS(1);
151 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 150 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
152 { 151 {
153 if (inv.Value.Name == name) 152 if (inv.Value.Name == name)
154 { 153 {
155 if (inv.Value.Type != type) 154 if (inv.Value.Type != type)
156 return LLUUID.Zero; 155 return UUID.Zero;
157 156
158 return inv.Value.AssetID.ToString(); 157 return inv.Value.AssetID.ToString();
159 } 158 }
160 } 159 }
161 return LLUUID.Zero; 160 return UUID.Zero;
162 } 161 }
163 162
164 private LLUUID InventoryKey(string name) 163 private UUID InventoryKey(string name)
165 { 164 {
166 m_host.AddScriptLPS(1); 165 m_host.AddScriptLPS(1);
167 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 166 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
168 { 167 {
169 if (inv.Value.Name == name) 168 if (inv.Value.Name == name)
170 { 169 {
171 return inv.Value.AssetID.ToString(); 170 return inv.Value.AssetID.ToString();
172 } 171 }
173 } 172 }
174 return LLUUID.Zero; 173 return UUID.Zero;
175 } 174 }
176 175
177 176
178 /// <summary> 177 /// <summary>
179 /// accepts a valid LLUUID, -or- a name of an inventory item. 178 /// accepts a valid UUID, -or- a name of an inventory item.
180 /// Returns a valid LLUUID or LLUUID.Zero if key invalid and item not found 179 /// Returns a valid UUID or UUID.Zero if key invalid and item not found
181 /// in prim inventory. 180 /// in prim inventory.
182 /// </summary> 181 /// </summary>
183 /// <param name="k"></param> 182 /// <param name="k"></param>
184 /// <returns></returns> 183 /// <returns></returns>
185 private LLUUID KeyOrName(string k) 184 private UUID KeyOrName(string k)
186 { 185 {
187 LLUUID key = LLUUID.Zero; 186 UUID key = UUID.Zero;
188 187
189 // if we can parse the string as a key, use it. 188 // if we can parse the string as a key, use it.
190 if (LLUUID.TryParse(k, out key)) 189 if (UUID.TryParse(k, out key))
191 { 190 {
192 return key; 191 return key;
193 } 192 }
194 // else try to locate the name in inventory of object. found returns key, 193 // else try to locate the name in inventory of object. found returns key,
195 // not found returns LLUUID.Zero which will translate to the default particle texture 194 // not found returns UUID.Zero which will translate to the default particle texture
196 else 195 else
197 { 196 {
198 return InventoryKey(k); 197 return InventoryKey(k);
@@ -551,7 +550,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
551 if (text.Length > 1023) 550 if (text.Length > 1023)
552 text = text.Substring(0, 1023); 551 text = text.Substring(0, 1023);
553 552
554 World.SimChat(Helpers.StringToField(text), 553 World.SimChat(Utils.StringToBytes(text),
555 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 554 ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
556 555
557 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 556 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -565,7 +564,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
565 if (text.Length > 1023) 564 if (text.Length > 1023)
566 text = text.Substring(0, 1023); 565 text = text.Substring(0, 1023);
567 566
568 World.SimChat(Helpers.StringToField(text), 567 World.SimChat(Utils.StringToBytes(text),
569 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 568 ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
570 569
571 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 570 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -579,7 +578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
579 if (text.Length > 1023) 578 if (text.Length > 1023)
580 text = text.Substring(0, 1023); 579 text = text.Substring(0, 1023);
581 580
582 World.SimChat(Helpers.StringToField(text), 581 World.SimChat(Utils.StringToBytes(text),
583 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true); 582 ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true);
584 583
585 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 584 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -606,8 +605,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
606 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 605 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg)
607 { 606 {
608 m_host.AddScriptLPS(1); 607 m_host.AddScriptLPS(1);
609 LLUUID keyID; 608 UUID keyID;
610 LLUUID.TryParse(ID, out keyID); 609 UUID.TryParse(ID, out keyID);
611 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 610 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
612 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg); 611 return wComm.Listen(m_localID, m_itemID, m_host.UUID, channelID, name, keyID, msg);
613 } 612 }
@@ -629,8 +628,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
629 public void llSensor(string name, string id, int type, double range, double arc) 628 public void llSensor(string name, string id, int type, double range, double arc)
630 { 629 {
631 m_host.AddScriptLPS(1); 630 m_host.AddScriptLPS(1);
632 LLUUID keyID = LLUUID.Zero; 631 UUID keyID = UUID.Zero;
633 LLUUID.TryParse(id, out keyID); 632 UUID.TryParse(id, out keyID);
634 633
635 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host); 634 AsyncCommands.SensorRepeatPlugin.SenseOnce(m_localID, m_itemID, name, keyID, type, range, arc, m_host);
636 } 635 }
@@ -638,8 +637,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
638 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 637 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
639 { 638 {
640 m_host.AddScriptLPS(1); 639 m_host.AddScriptLPS(1);
641 LLUUID keyID = LLUUID.Zero; 640 UUID keyID = UUID.Zero;
642 LLUUID.TryParse(id, out keyID); 641 UUID.TryParse(id, out keyID);
643 642
644 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host); 643 AsyncCommands.SensorRepeatPlugin.SetSenseRepeatEvent(m_localID, m_itemID, name, keyID, type, range, arc, rate, m_host);
645 } 644 }
@@ -650,7 +649,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
650 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_localID, m_itemID); 649 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_localID, m_itemID);
651 } 650 }
652 651
653 public string resolveName(LLUUID objecUUID) 652 public string resolveName(UUID objecUUID)
654 { 653 {
655 // try avatar username surname 654 // try avatar username surname
656 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID); 655 CachedUserInfo profile = World.CommsManager.UserProfileCacheService.GetUserDetails(objecUUID);
@@ -841,7 +840,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
841 840
842 if ((status & ScriptBaseClass.STATUS_CAST_SHADOWS) == ScriptBaseClass.STATUS_CAST_SHADOWS) 841 if ((status & ScriptBaseClass.STATUS_CAST_SHADOWS) == ScriptBaseClass.STATUS_CAST_SHADOWS)
843 { 842 {
844 m_host.AddFlag(LLObject.ObjectFlags.CastShadows); 843 m_host.AddFlag(PrimFlags.CastShadows);
845 } 844 }
846 845
847 if ((status & ScriptBaseClass.STATUS_ROTATE_X) == ScriptBaseClass.STATUS_ROTATE_X) 846 if ((status & ScriptBaseClass.STATUS_ROTATE_X) == ScriptBaseClass.STATUS_ROTATE_X)
@@ -891,25 +890,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
891 public LSL_Types.LSLInteger llGetStatus(int status) 890 public LSL_Types.LSLInteger llGetStatus(int status)
892 { 891 {
893 m_host.AddScriptLPS(1); 892 m_host.AddScriptLPS(1);
894 // Console.WriteLine(m_host.UUID.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 893 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
895 switch (status) 894 switch (status)
896 { 895 {
897 case ScriptBaseClass.STATUS_PHYSICS: 896 case ScriptBaseClass.STATUS_PHYSICS:
898 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == (uint)LLObject.ObjectFlags.Physics) 897 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == (uint)PrimFlags.Physics)
899 { 898 {
900 return 1; 899 return 1;
901 } 900 }
902 return 0; 901 return 0;
903 902
904 case ScriptBaseClass.STATUS_PHANTOM: 903 case ScriptBaseClass.STATUS_PHANTOM:
905 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) == (uint)LLObject.ObjectFlags.Phantom) 904 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) == (uint)PrimFlags.Phantom)
906 { 905 {
907 return 1; 906 return 1;
908 } 907 }
909 return 0; 908 return 0;
910 909
911 case ScriptBaseClass.STATUS_CAST_SHADOWS: 910 case ScriptBaseClass.STATUS_CAST_SHADOWS:
912 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.CastShadows) == (uint)LLObject.ObjectFlags.CastShadows) 911 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.CastShadows) == (uint)PrimFlags.CastShadows)
913 { 912 {
914 return 1; 913 return 1;
915 } 914 }
@@ -976,7 +975,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
976 scale.y = World.m_maxNonphys; 975 scale.y = World.m_maxNonphys;
977 if (scale.z > World.m_maxNonphys) 976 if (scale.z > World.m_maxNonphys)
978 scale.z = World.m_maxNonphys; 977 scale.z = World.m_maxNonphys;
979 LLVector3 tmp = part.Scale; 978 Vector3 tmp = part.Scale;
980 tmp.X = (float)scale.x; 979 tmp.X = (float)scale.x;
981 tmp.Y = (float)scale.y; 980 tmp.Y = (float)scale.y;
982 tmp.Z = (float)scale.z; 981 tmp.Z = (float)scale.z;
@@ -999,8 +998,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
999 998
1000 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 999 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face)
1001 { 1000 {
1002 LLObject.TextureEntry tex = part.Shape.Textures; 1001 Primitive.TextureEntry tex = part.Shape.Textures;
1003 LLColor texcolor; 1002 Color4 texcolor;
1004 if (face > -1) 1003 if (face > -1)
1005 { 1004 {
1006 texcolor = tex.CreateFace((uint)face).RGBA; 1005 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1036,7 +1035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1036 1035
1037 public void SetGlow(SceneObjectPart part, int face, float glow) 1036 public void SetGlow(SceneObjectPart part, int face, float glow)
1038 { 1037 {
1039 LLObject.TextureEntry tex = part.Shape.Textures; 1038 Primitive.TextureEntry tex = part.Shape.Textures;
1040 if (face > -1) 1039 if (face > -1)
1041 { 1040 {
1042 tex.CreateFace((uint) face); 1041 tex.CreateFace((uint) face);
@@ -1083,7 +1082,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1083 break; 1082 break;
1084 } 1083 }
1085 1084
1086 LLObject.TextureEntry tex = part.Shape.Textures; 1085 Primitive.TextureEntry tex = part.Shape.Textures;
1087 if (face > -1) 1086 if (face > -1)
1088 { 1087 {
1089 tex.CreateFace((uint) face); 1088 tex.CreateFace((uint) face);
@@ -1111,7 +1110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1111 1110
1112 public void SetFullBright(SceneObjectPart part, int face, bool bright) 1111 public void SetFullBright(SceneObjectPart part, int face, bool bright)
1113 { 1112 {
1114 LLObject.TextureEntry tex = part.Shape.Textures; 1113 Primitive.TextureEntry tex = part.Shape.Textures;
1115 if (face > -1) 1114 if (face > -1)
1116 { 1115 {
1117 tex.CreateFace((uint) face); 1116 tex.CreateFace((uint) face);
@@ -1137,7 +1136,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1137 public double llGetAlpha(int face) 1136 public double llGetAlpha(int face)
1138 { 1137 {
1139 m_host.AddScriptLPS(1); 1138 m_host.AddScriptLPS(1);
1140 LLObject.TextureEntry tex = m_host.Shape.Textures; 1139 Primitive.TextureEntry tex = m_host.Shape.Textures;
1141 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1140 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1142 { 1141 {
1143 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255); 1142 return (double)((tex.DefaultTexture.RGBA.A * 255) / 255);
@@ -1158,8 +1157,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1158 1157
1159 private void SetAlpha(SceneObjectPart part, double alpha, int face) 1158 private void SetAlpha(SceneObjectPart part, double alpha, int face)
1160 { 1159 {
1161 LLObject.TextureEntry tex = part.Shape.Textures; 1160 Primitive.TextureEntry tex = part.Shape.Textures;
1162 LLColor texcolor; 1161 Color4 texcolor;
1163 if (face > -1) 1162 if (face > -1)
1164 { 1163 {
1165 texcolor = tex.CreateFace((uint)face).RGBA; 1164 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -1286,8 +1285,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1286 public LSL_Types.Vector3 llGetColor(int face) 1285 public LSL_Types.Vector3 llGetColor(int face)
1287 { 1286 {
1288 m_host.AddScriptLPS(1); 1287 m_host.AddScriptLPS(1);
1289 LLObject.TextureEntry tex = m_host.Shape.Textures; 1288 Primitive.TextureEntry tex = m_host.Shape.Textures;
1290 LLColor texcolor; 1289 Color4 texcolor;
1291 LSL_Types.Vector3 rgb; 1290 LSL_Types.Vector3 rgb;
1292 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 1291 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
1293 { 1292 {
@@ -1320,21 +1319,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1320 1319
1321 private void SetTexture(SceneObjectPart part, string texture, int face) 1320 private void SetTexture(SceneObjectPart part, string texture, int face)
1322 { 1321 {
1323 LLUUID textureID=new LLUUID(); 1322 UUID textureID=new UUID();
1324 1323
1325 if (!LLUUID.TryParse(texture, out textureID)) 1324 if (!UUID.TryParse(texture, out textureID))
1326 { 1325 {
1327 textureID=InventoryKey(texture, (int)AssetType.Texture); 1326 textureID=InventoryKey(texture, (int)AssetType.Texture);
1328 } 1327 }
1329 1328
1330 if (textureID == LLUUID.Zero) 1329 if (textureID == UUID.Zero)
1331 return; 1330 return;
1332 1331
1333 LLObject.TextureEntry tex = part.Shape.Textures; 1332 Primitive.TextureEntry tex = part.Shape.Textures;
1334 1333
1335 if (face > -1) 1334 if (face > -1)
1336 { 1335 {
1337 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1336 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1338 texface.TextureID = textureID; 1337 texface.TextureID = textureID;
1339 tex.FaceTextures[face] = texface; 1338 tex.FaceTextures[face] = texface;
1340 part.UpdateTexture(tex); 1339 part.UpdateTexture(tex);
@@ -1365,10 +1364,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1365 1364
1366 private void ScaleTexture(SceneObjectPart part, double u, double v, int face) 1365 private void ScaleTexture(SceneObjectPart part, double u, double v, int face)
1367 { 1366 {
1368 LLObject.TextureEntry tex = part.Shape.Textures; 1367 Primitive.TextureEntry tex = part.Shape.Textures;
1369 if (face > -1) 1368 if (face > -1)
1370 { 1369 {
1371 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1370 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1372 texface.RepeatU = (float)u; 1371 texface.RepeatU = (float)u;
1373 texface.RepeatV = (float)v; 1372 texface.RepeatV = (float)v;
1374 tex.FaceTextures[face] = texface; 1373 tex.FaceTextures[face] = texface;
@@ -1401,10 +1400,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1401 1400
1402 private void OffsetTexture(SceneObjectPart part, double u, double v, int face) 1401 private void OffsetTexture(SceneObjectPart part, double u, double v, int face)
1403 { 1402 {
1404 LLObject.TextureEntry tex = part.Shape.Textures; 1403 Primitive.TextureEntry tex = part.Shape.Textures;
1405 if (face > -1) 1404 if (face > -1)
1406 { 1405 {
1407 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1406 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1408 texface.OffsetU = (float)u; 1407 texface.OffsetU = (float)u;
1409 texface.OffsetV = (float)v; 1408 texface.OffsetV = (float)v;
1410 tex.FaceTextures[face] = texface; 1409 tex.FaceTextures[face] = texface;
@@ -1437,10 +1436,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1437 1436
1438 private void RotateTexture(SceneObjectPart part, double rotation, int face) 1437 private void RotateTexture(SceneObjectPart part, double rotation, int face)
1439 { 1438 {
1440 LLObject.TextureEntry tex = part.Shape.Textures; 1439 Primitive.TextureEntry tex = part.Shape.Textures;
1441 if (face > -1) 1440 if (face > -1)
1442 { 1441 {
1443 LLObject.TextureEntryFace texface = tex.CreateFace((uint)face); 1442 Primitive.TextureEntryFace texface = tex.CreateFace((uint)face);
1444 texface.Rotation = (float)rotation; 1443 texface.Rotation = (float)rotation;
1445 tex.FaceTextures[face] = texface; 1444 tex.FaceTextures[face] = texface;
1446 part.UpdateTexture(tex); 1445 part.UpdateTexture(tex);
@@ -1464,14 +1463,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1464 public string llGetTexture(int face) 1463 public string llGetTexture(int face)
1465 { 1464 {
1466 m_host.AddScriptLPS(1); 1465 m_host.AddScriptLPS(1);
1467 LLObject.TextureEntry tex = m_host.Shape.Textures; 1466 Primitive.TextureEntry tex = m_host.Shape.Textures;
1468 if (face == -1) 1467 if (face == -1)
1469 { 1468 {
1470 face = 0; 1469 face = 0;
1471 } 1470 }
1472 if (face > -1) 1471 if (face > -1)
1473 { 1472 {
1474 LLObject.TextureEntryFace texface; 1473 Primitive.TextureEntryFace texface;
1475 texface = tex.GetFace((uint)face); 1474 texface = tex.GetFace((uint)face);
1476 return texface.TextureID.ToString(); 1475 return texface.TextureID.ToString();
1477 } 1476 }
@@ -1501,11 +1500,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1501 1500
1502 if (part.ParentID != 0) 1501 if (part.ParentID != 0)
1503 { 1502 {
1504 part.UpdateOffSet(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1503 part.UpdateOffSet(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1505 } 1504 }
1506 else 1505 else
1507 { 1506 {
1508 part.UpdateGroupPosition(new LLVector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z)); 1507 part.UpdateGroupPosition(new Vector3((float)targetPos.x, (float)targetPos.y, (float)targetPos.z));
1509 } 1508 }
1510 } 1509 }
1511 1510
@@ -1545,7 +1544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1545 1544
1546 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1545 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot)
1547 { 1546 {
1548 part.UpdateRotation(new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1547 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1549 // Update rotation does not move the object in the physics scene if it's a linkset. 1548 // Update rotation does not move the object in the physics scene if it's a linkset.
1550 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1549 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1551 } 1550 }
@@ -1553,7 +1552,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1553 public LSL_Types.Quaternion llGetRot() 1552 public LSL_Types.Quaternion llGetRot()
1554 { 1553 {
1555 m_host.AddScriptLPS(1); 1554 m_host.AddScriptLPS(1);
1556 LLQuaternion q = m_host.RotationOffset; 1555 Quaternion q = m_host.RotationOffset;
1557 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1556 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
1558 } 1557 }
1559 1558
@@ -1605,7 +1604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1605 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1604 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range)
1606 { 1605 {
1607 m_host.AddScriptLPS(1); 1606 m_host.AddScriptLPS(1);
1608 return m_host.registerTargetWaypoint(new LLVector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1607 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
1609 1608
1610 } 1609 }
1611 1610
@@ -1631,7 +1630,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1631 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1630 public void llMoveToTarget(LSL_Types.Vector3 target, double tau)
1632 { 1631 {
1633 m_host.AddScriptLPS(1); 1632 m_host.AddScriptLPS(1);
1634 m_host.MoveToTarget(new LLVector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1633 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
1635 } 1634 }
1636 1635
1637 public void llStopMoveToTarget() 1636 public void llStopMoveToTarget()
@@ -1652,7 +1651,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1652 if (force.z > 20000) 1651 if (force.z > 20000)
1653 force.z = 20000; 1652 force.z = 20000;
1654 1653
1655 m_host.ApplyImpulse(new LLVector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1654 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1656 } 1655 }
1657 1656
1658 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1657 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local)
@@ -1761,7 +1760,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1761 { 1760 {
1762 m_host.AddScriptLPS(1); 1761 m_host.AddScriptLPS(1);
1763 1762
1764 if (m_host.Sound != LLUUID.Zero) 1763 if (m_host.Sound != UUID.Zero)
1765 llStopSound(); 1764 llStopSound();
1766 1765
1767 m_host.Sound = KeyOrName(sound); 1766 m_host.Sound = KeyOrName(sound);
@@ -1803,7 +1802,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1803 { 1802 {
1804 m_host.AddScriptLPS(1); 1803 m_host.AddScriptLPS(1);
1805 1804
1806 m_host.Sound = LLUUID.Zero; 1805 m_host.Sound = UUID.Zero;
1807 m_host.SoundGain = 0; 1806 m_host.SoundGain = 0;
1808 m_host.SoundFlags = 0; 1807 m_host.SoundFlags = 0;
1809 m_host.SoundRadius = 0; 1808 m_host.SoundRadius = 0;
@@ -1811,7 +1810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1811 m_host.ScheduleFullUpdate(); 1810 m_host.ScheduleFullUpdate();
1812 m_host.SendFullUpdateToAllClients(); 1811 m_host.SendFullUpdateToAllClients();
1813 1812
1814 // m_host.SendSound(LLUUID.Zero.ToString(), 1.0, false, 2); 1813 // m_host.SendSound(UUID.Zero.ToString(), 1.0, false, 2);
1815 } 1814 }
1816 1815
1817 public void llPreloadSound(string sound) 1816 public void llPreloadSound(string sound)
@@ -2059,13 +2058,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2059 2058
2060 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2059 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount)
2061 { 2060 {
2062 LLUUID invItemID=InventorySelf(); 2061 UUID invItemID=InventorySelf();
2063 if (invItemID == LLUUID.Zero) 2062 if (invItemID == UUID.Zero)
2064 return 0; 2063 return 0;
2065 2064
2066 m_host.AddScriptLPS(1); 2065 m_host.AddScriptLPS(1);
2067 2066
2068 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2067 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2069 return 0; 2068 return 0;
2070 2069
2071 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0) 2070 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_DEBIT) == 0)
@@ -2074,9 +2073,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2074 return 0; 2073 return 0;
2075 } 2074 }
2076 2075
2077 LLUUID toID=new LLUUID(); 2076 UUID toID=new UUID();
2078 2077
2079 if (!LLUUID.TryParse(destination, out toID)) 2078 if (!UUID.TryParse(destination, out toID))
2080 { 2079 {
2081 LSLError("Bad key in llGiveMoney"); 2080 LSLError("Bad key in llGiveMoney");
2082 return 0; 2081 return 0;
@@ -2140,7 +2139,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2140 // it's possible to have two items with the same task inventory name. 2139 // it's possible to have two items with the same task inventory name.
2141 // this is an easter egg of sorts. 2140 // this is an easter egg of sorts.
2142 2141
2143 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2142 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2144 { 2143 {
2145 if (inv.Value.Name == inventory) 2144 if (inv.Value.Name == inventory)
2146 { 2145 {
@@ -2151,18 +2150,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2151 continue; 2150 continue;
2152 } 2151 }
2153 2152
2154 LLVector3 llpos = new LLVector3((float)pos.x, (float)pos.y, (float)pos.z); 2153 Vector3 llpos = new Vector3((float)pos.x, (float)pos.y, (float)pos.z);
2155 2154
2156 // test if we're further away then 10m 2155 // test if we're further away then 10m
2157 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10) 2156 if (Util.GetDistanceTo(llpos, m_host.AbsolutePosition) > 10)
2158 return; // wiki says, if it's further away then 10m, silently fail. 2157 return; // wiki says, if it's further away then 10m, silently fail.
2159 2158
2160 LLVector3 llvel = new LLVector3((float)vel.x, (float)vel.y, (float)vel.z); 2159 Vector3 llvel = new Vector3((float)vel.x, (float)vel.y, (float)vel.z);
2161 2160
2162 // need the magnitude later 2161 // need the magnitude later
2163 float velmag = (float)Util.GetMagnitude(llvel); 2162 float velmag = (float)Util.GetMagnitude(llvel);
2164 2163
2165 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param); 2164 SceneObjectGroup new_group = World.RezObject(m_host, inv.Value, llpos, new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), llvel, param);
2166 2165
2167 // If either of these are null, then there was an unknown error. 2166 // If either of these are null, then there was an unknown error.
2168 if (new_group == null) 2167 if (new_group == null)
@@ -2176,7 +2175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2176 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2175 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2177 "object_rez", new Object[] { 2176 "object_rez", new Object[] {
2178 new LSL_Types.LSLString( 2177 new LSL_Types.LSLString(
2179 new_group.RootPart.UUID.ToString()) }, 2178 new_group.RootPart.ToString()) },
2180 new DetectParams[0])); 2179 new DetectParams[0]));
2181 2180
2182 float groupmass = new_group.GetMass(); 2181 float groupmass = new_group.GetMass();
@@ -2243,7 +2242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2243 return; 2242 return;
2244 } 2243 }
2245 2244
2246 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2245 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2247 { 2246 {
2248 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2247 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2249 2248
@@ -2270,7 +2269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2270 return; 2269 return;
2271 } 2270 }
2272 2271
2273 if (m_host.TaskInventory[InventorySelf()].PermsGranter != LLUUID.Zero) 2272 if (m_host.TaskInventory[InventorySelf()].PermsGranter != UUID.Zero)
2274 { 2273 {
2275 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter); 2274 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[InventorySelf()].PermsGranter);
2276 2275
@@ -2331,14 +2330,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2331 2330
2332 // TODO: figure out values for client, fromSession, and imSessionID 2331 // TODO: figure out values for client, fromSession, and imSessionID
2333 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch()); 2332 // client.SendInstantMessage(m_host.UUID, fromSession, message, user, imSessionID, m_host.Name, AgentManager.InstantMessageDialog.MessageFromAgent, (uint)Util.UnixTimeSinceEpoch());
2334 LLUUID friendTransactionID = LLUUID.Random(); 2333 UUID friendTransactionID = UUID.Random();
2335 2334
2336 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 2335 //m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
2337 2336
2338 GridInstantMessage msg = new GridInstantMessage(); 2337 GridInstantMessage msg = new GridInstantMessage();
2339 msg.fromAgentID = new Guid(m_host.UUID.ToString()); // fromAgentID.UUID; 2338 msg.fromAgentID = new Guid(m_host.ToString()); // fromAgentID.Guid;
2340 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID; 2339 msg.fromAgentSession = new Guid(friendTransactionID.ToString());// fromAgentSession.UUID;
2341 msg.toAgentID = new Guid(user); // toAgentID.UUID; 2340 msg.toAgentID = new Guid(user); // toAgentID.Guid;
2342 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here 2341 msg.imSessionID = new Guid(friendTransactionID.ToString()); // This is the item we're mucking with here
2343// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message); 2342// Console.WriteLine("[Scripting IM]: From:" + msg.fromAgentID.ToString() + " To: " + msg.toAgentID.ToString() + " Session:" + msg.imSessionID.ToString() + " Message:" + message);
2344// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString()); 2343// Console.WriteLine("[Scripting IM]: Filling Session: " + msg.imSessionID.ToString());
@@ -2356,8 +2355,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2356 msg.fromGroup = false;// fromGroup; 2355 msg.fromGroup = false;// fromGroup;
2357 msg.offline = (byte)0; //offline; 2356 msg.offline = (byte)0; //offline;
2358 msg.ParentEstateID = 0; //ParentEstateID; 2357 msg.ParentEstateID = 0; //ParentEstateID;
2359 msg.Position = new sLLVector3();// new sLLVector3(m_host.AbsolutePosition); 2358 msg.Position = Vector3.Zero;// new Vector3(m_host.AbsolutePosition);
2360 msg.RegionID = World.RegionInfo.RegionID.UUID;//RegionID.UUID; 2359 msg.RegionID = World.RegionInfo.RegionID.Guid;//RegionID.Guid;
2361 msg.binaryBucket = new byte[0];// binaryBucket; 2360 msg.binaryBucket = new byte[0];// binaryBucket;
2362 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2361 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2363 // ScriptSleep(2000); 2362 // ScriptSleep(2000);
@@ -2404,7 +2403,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2404 public string llGetKey() 2403 public string llGetKey()
2405 { 2404 {
2406 m_host.AddScriptLPS(1); 2405 m_host.AddScriptLPS(1);
2407 return m_host.UUID.ToString(); 2406 return m_host.ToString();
2408 } 2407 }
2409 2408
2410 public void llSetBuoyancy(double buoyancy) 2409 public void llSetBuoyancy(double buoyancy)
@@ -2468,11 +2467,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2468 { 2467 {
2469 m_host.AddScriptLPS(1); 2468 m_host.AddScriptLPS(1);
2470 2469
2471 LLUUID invItemID=InventorySelf(); 2470 UUID invItemID=InventorySelf();
2472 if (invItemID == LLUUID.Zero) 2471 if (invItemID == UUID.Zero)
2473 return; 2472 return;
2474 2473
2475 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2474 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2476 return; 2475 return;
2477 2476
2478 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2477 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
@@ -2481,9 +2480,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2481 2480
2482 if (presence != null) 2481 if (presence != null)
2483 { 2482 {
2484 // Do NOT try to parse LLUUID, animations cannot be triggered by ID 2483 // Do NOT try to parse UUID, animations cannot be triggered by ID
2485 LLUUID animID=InventoryKey(anim, (int)AssetType.Animation); 2484 UUID animID=InventoryKey(anim, (int)AssetType.Animation);
2486 if (animID == LLUUID.Zero) 2485 if (animID == UUID.Zero)
2487 presence.AddAnimation(anim); 2486 presence.AddAnimation(anim);
2488 else 2487 else
2489 presence.AddAnimation(animID); 2488 presence.AddAnimation(animID);
@@ -2495,30 +2494,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2495 { 2494 {
2496 m_host.AddScriptLPS(1); 2495 m_host.AddScriptLPS(1);
2497 2496
2498 LLUUID invItemID=InventorySelf(); 2497 UUID invItemID=InventorySelf();
2499 if (invItemID == LLUUID.Zero) 2498 if (invItemID == UUID.Zero)
2500 return; 2499 return;
2501 2500
2502 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 2501 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
2503 return; 2502 return;
2504 2503
2505 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0) 2504 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION) != 0)
2506 { 2505 {
2507 LLUUID animID = new LLUUID(); 2506 UUID animID = new UUID();
2508 2507
2509 if (!LLUUID.TryParse(anim, out animID)) 2508 if (!UUID.TryParse(anim, out animID))
2510 { 2509 {
2511 animID=InventoryKey(anim); 2510 animID=InventoryKey(anim);
2512 } 2511 }
2513 2512
2514 if (animID == LLUUID.Zero) 2513 if (animID == UUID.Zero)
2515 return; 2514 return;
2516 2515
2517 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter); 2516 ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
2518 2517
2519 if (presence != null) 2518 if (presence != null)
2520 { 2519 {
2521 if (animID == LLUUID.Zero) 2520 if (animID == UUID.Zero)
2522 presence.RemoveAnimation(anim); 2521 presence.RemoveAnimation(anim);
2523 else 2522 else
2524 presence.RemoveAnimation(animID); 2523 presence.RemoveAnimation(animID);
@@ -2541,8 +2540,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2541 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2540 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain)
2542 { 2541 {
2543 m_host.AddScriptLPS(1); 2542 m_host.AddScriptLPS(1);
2544 m_host.RotationalVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2543 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2545 m_host.AngularVelocity = new LLVector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2544 m_host.AngularVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
2546 m_host.ScheduleTerseUpdate(); 2545 m_host.ScheduleTerseUpdate();
2547 m_host.SendTerseUpdateToAllClients(); 2546 m_host.SendTerseUpdateToAllClients();
2548 } 2547 }
@@ -2561,19 +2560,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2561 2560
2562 public void llRequestPermissions(string agent, int perm) 2561 public void llRequestPermissions(string agent, int perm)
2563 { 2562 {
2564 LLUUID agentID=new LLUUID(); 2563 UUID agentID=new UUID();
2565 2564
2566 if (!LLUUID.TryParse(agent, out agentID)) 2565 if (!UUID.TryParse(agent, out agentID))
2567 return; 2566 return;
2568 2567
2569 LLUUID invItemID=InventorySelf(); 2568 UUID invItemID=InventorySelf();
2570 2569
2571 if (invItemID == LLUUID.Zero) 2570 if (invItemID == UUID.Zero)
2572 return; // Not in a prim? How?? 2571 return; // Not in a prim? How??
2573 2572
2574 if (agentID == LLUUID.Zero || perm == 0) // Releasing permissions 2573 if (agentID == UUID.Zero || perm == 0) // Releasing permissions
2575 { 2574 {
2576 m_host.TaskInventory[invItemID].PermsGranter=LLUUID.Zero; 2575 m_host.TaskInventory[invItemID].PermsGranter=UUID.Zero;
2577 m_host.TaskInventory[invItemID].PermsMask=0; 2576 m_host.TaskInventory[invItemID].PermsMask=0;
2578 2577
2579 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2578 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
@@ -2655,14 +2654,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2655 new DetectParams[0])); 2654 new DetectParams[0]));
2656 } 2655 }
2657 2656
2658 void handleScriptAnswer(IClientAPI client, LLUUID taskID, LLUUID itemID, int answer) 2657 void handleScriptAnswer(IClientAPI client, UUID taskID, UUID itemID, int answer)
2659 { 2658 {
2660 if (taskID != m_host.UUID) 2659 if (taskID != m_host.UUID)
2661 return; 2660 return;
2662 2661
2663 LLUUID invItemID=InventorySelf(); 2662 UUID invItemID=InventorySelf();
2664 2663
2665 if (invItemID == LLUUID.Zero) 2664 if (invItemID == UUID.Zero)
2666 return; 2665 return;
2667 2666
2668 client.OnScriptAnswer-=handleScriptAnswer; 2667 client.OnScriptAnswer-=handleScriptAnswer;
@@ -2687,7 +2686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2687 } 2686 }
2688 } 2687 }
2689 2688
2690 return LLUUID.Zero.ToString(); 2689 return UUID.Zero.ToString();
2691 } 2690 }
2692 2691
2693 public LSL_Types.LSLInteger llGetPermissions() 2692 public LSL_Types.LSLInteger llGetPermissions()
@@ -2725,8 +2724,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2725 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2724 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2726 if (linknumber > -1) 2725 if (linknumber > -1)
2727 { 2726 {
2728 LLObject.TextureEntry tex = part.Shape.Textures; 2727 Primitive.TextureEntry tex = part.Shape.Textures;
2729 LLColor texcolor; 2728 Color4 texcolor;
2730 if (face > -1) 2729 if (face > -1)
2731 { 2730 {
2732 texcolor = tex.CreateFace((uint)face).RGBA; 2731 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2772,8 +2771,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2772 { 2771 {
2773 linknumber = w; 2772 linknumber = w;
2774 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 2773 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
2775 LLObject.TextureEntry tex = part.Shape.Textures; 2774 Primitive.TextureEntry tex = part.Shape.Textures;
2776 LLColor texcolor; 2775 Color4 texcolor;
2777 if (face > -1) 2776 if (face > -1)
2778 { 2777 {
2779 texcolor = tex.CreateFace((uint)face).RGBA; 2778 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -2816,7 +2815,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2816 public void llCreateLink(string target, int parent) 2815 public void llCreateLink(string target, int parent)
2817 { 2816 {
2818 m_host.AddScriptLPS(1); 2817 m_host.AddScriptLPS(1);
2819 LLUUID invItemID = InventorySelf(); 2818 UUID invItemID = InventorySelf();
2820 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0) { 2819 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0) {
2821 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!"); 2820 ShoutError("Script trying to link but PERMISSION_CHANGE_LINKS permission not set!");
2822 return; 2821 return;
@@ -2841,7 +2840,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2841 childPrim.RootPart.UpdateFlag = uf; 2840 childPrim.RootPart.UpdateFlag = uf;
2842 } 2841 }
2843 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 2842 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
2844 parentPrim.RootPart.AddFlag(LLObject.ObjectFlags.CreateSelected); 2843 parentPrim.RootPart.AddFlag(PrimFlags.CreateSelected);
2845 parentPrim.GetProperties(client); 2844 parentPrim.GetProperties(client);
2846 2845
2847 ScriptSleep(1000); 2846 ScriptSleep(1000);
@@ -2865,11 +2864,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2865 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 2864 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
2866 if (part != null) 2865 if (part != null)
2867 { 2866 {
2868 return part.UUID.ToString(); 2867 return part.ToString();
2869 } 2868 }
2870 else 2869 else
2871 { 2870 {
2872 return LLUUID.Zero.ToString(); 2871 return UUID.Zero.ToString();
2873 } 2872 }
2874 } 2873 }
2875 2874
@@ -2891,7 +2890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2891 { 2890 {
2892 m_host.AddScriptLPS(1); 2891 m_host.AddScriptLPS(1);
2893 int count = 0; 2892 int count = 0;
2894 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2893 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2895 { 2894 {
2896 if (inv.Value.Type == type || type == -1) 2895 if (inv.Value.Type == type || type == -1)
2897 { 2896 {
@@ -2905,7 +2904,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2905 { 2904 {
2906 m_host.AddScriptLPS(1); 2905 m_host.AddScriptLPS(1);
2907 ArrayList keys = new ArrayList(); 2906 ArrayList keys = new ArrayList();
2908 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2907 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2909 { 2908 {
2910 if (inv.Value.Type == type || type == -1) 2909 if (inv.Value.Type == type || type == -1)
2911 { 2910 {
@@ -2926,14 +2925,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2926 2925
2927 public void llSetScriptState(string name, int run) 2926 public void llSetScriptState(string name, int run)
2928 { 2927 {
2929 LLUUID item; 2928 UUID item;
2930 2929
2931 m_host.AddScriptLPS(1); 2930 m_host.AddScriptLPS(1);
2932 2931
2933 // These functions are supposed to be robust, 2932 // These functions are supposed to be robust,
2934 // so get the state one step at a time. 2933 // so get the state one step at a time.
2935 2934
2936 if ((item = ScriptByName(name)) != LLUUID.Zero) 2935 if ((item = ScriptByName(name)) != UUID.Zero)
2937 { 2936 {
2938 m_ScriptEngine.SetScriptState(item, run == 0 ? false : true); 2937 m_ScriptEngine.SetScriptState(item, run == 0 ? false : true);
2939 } 2938 }
@@ -2954,17 +2953,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2954 { 2953 {
2955 m_host.AddScriptLPS(1); 2954 m_host.AddScriptLPS(1);
2956 bool found = false; 2955 bool found = false;
2957 LLUUID destId = LLUUID.Zero; 2956 UUID destId = UUID.Zero;
2958 LLUUID objId = LLUUID.Zero; 2957 UUID objId = UUID.Zero;
2959 2958
2960 if (!LLUUID.TryParse(destination, out destId)) 2959 if (!UUID.TryParse(destination, out destId))
2961 { 2960 {
2962 llSay(0, "Could not parse key " + destination); 2961 llSay(0, "Could not parse key " + destination);
2963 return; 2962 return;
2964 } 2963 }
2965 2964
2966 // move the first object found with this inventory name 2965 // move the first object found with this inventory name
2967 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 2966 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
2968 { 2967 {
2969 if (inv.Value.Name == inventory) 2968 if (inv.Value.Name == inventory)
2970 { 2969 {
@@ -3037,7 +3036,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3037 World.CommsManager.UserService.GetAgentByUUID(id); 3036 World.CommsManager.UserService.GetAgentByUUID(id);
3038 3037
3039 if (userProfile == null || userAgent == null) 3038 if (userProfile == null || userAgent == null)
3040 return LLUUID.Zero.ToString(); 3039 return UUID.Zero.ToString();
3041 3040
3042 string reply = String.Empty; 3041 string reply = String.Empty;
3043 3042
@@ -3065,12 +3064,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3065 reply = "0"; 3064 reply = "0";
3066 break; 3065 break;
3067 default: 3066 default:
3068 return LLUUID.Zero.ToString(); // Raise no event 3067 return UUID.Zero.ToString(); // Raise no event
3069 } 3068 }
3070 3069
3071 LLUUID rq = LLUUID.Random(); 3070 UUID rq = UUID.Random();
3072 3071
3073 LLUUID tid = AsyncCommands. 3072 UUID tid = AsyncCommands.
3074 DataserverPlugin.RegisterRequest(m_localID, 3073 DataserverPlugin.RegisterRequest(m_localID,
3075 m_itemID, rq.ToString()); 3074 m_itemID, rq.ToString());
3076 3075
@@ -3089,23 +3088,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3089 { 3088 {
3090 if (item.Type == 3 && item.Name == name) 3089 if (item.Type == 3 && item.Name == name)
3091 { 3090 {
3092 LLUUID tid = AsyncCommands. 3091 UUID tid = AsyncCommands.
3093 DataserverPlugin.RegisterRequest(m_localID, 3092 DataserverPlugin.RegisterRequest(m_localID,
3094 m_itemID, item.AssetID.ToString()); 3093 m_itemID, item.AssetID.ToString());
3095 3094
3096 LLVector3 region = new LLVector3( 3095 Vector3 region = new Vector3(
3097 World.RegionInfo.RegionLocX * Constants.RegionSize, 3096 World.RegionInfo.RegionLocX * Constants.RegionSize,
3098 World.RegionInfo.RegionLocY * Constants.RegionSize, 3097 World.RegionInfo.RegionLocY * Constants.RegionSize,
3099 0); 3098 0);
3100 3099
3101 World.AssetCache.GetAsset(item.AssetID, 3100 World.AssetCache.GetAsset(item.AssetID,
3102 delegate(LLUUID i, AssetBase a) 3101 delegate(UUID i, AssetBase a)
3103 { 3102 {
3104 AssetLandmark lm = new AssetLandmark(a); 3103 AssetLandmark lm = new AssetLandmark(a);
3105 3104
3106 float rx = (uint)(lm.RegionHandle >> 32); 3105 float rx = (uint)(lm.RegionHandle >> 32);
3107 float ry = (uint)lm.RegionHandle; 3106 float ry = (uint)lm.RegionHandle;
3108 region = lm.Position + new LLVector3(rx, ry, 0) - region; 3107 region = lm.Position + new Vector3(rx, ry, 0) - region;
3109 3108
3110 string reply = region.ToString(); 3109 string reply = region.ToString();
3111 AsyncCommands. 3110 AsyncCommands.
@@ -3130,8 +3129,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3130 public void llTeleportAgentHome(string agent) 3129 public void llTeleportAgentHome(string agent)
3131 { 3130 {
3132 m_host.AddScriptLPS(1); 3131 m_host.AddScriptLPS(1);
3133 LLUUID agentId = new LLUUID(); 3132 UUID agentId = new UUID();
3134 if (LLUUID.TryParse(agent, out agentId)) 3133 if (UUID.TryParse(agent, out agentId))
3135 { 3134 {
3136 ScenePresence presence = World.GetScenePresence(agentId); 3135 ScenePresence presence = World.GetScenePresence(agentId);
3137 if (presence != null) 3136 if (presence != null)
@@ -3147,7 +3146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3147 public void llModifyLand(int action, int brush) 3146 public void llModifyLand(int action, int brush)
3148 { 3147 {
3149 m_host.AddScriptLPS(1); 3148 m_host.AddScriptLPS(1);
3150 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0)); 3149 World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y, 0));
3151 } 3150 }
3152 3151
3153 public void llCollisionSound(string impact_sound, double impact_volume) 3152 public void llCollisionSound(string impact_sound, double impact_volume)
@@ -3182,7 +3181,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3182 m_host.AddScriptLPS(1); 3181 m_host.AddScriptLPS(1);
3183 3182
3184 // uint partLocalID; 3183 // uint partLocalID;
3185 LLUUID partItemID; 3184 UUID partItemID;
3186 3185
3187 switch ((int)linknum) 3186 switch ((int)linknum)
3188 { 3187 {
@@ -3357,7 +3356,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3357 SceneObjectPart targ = World.GetSceneObjectPart(target); 3356 SceneObjectPart targ = World.GetSceneObjectPart(target);
3358 if (targ == null) 3357 if (targ == null)
3359 return; 3358 return;
3360 targ.ApplyImpulse(new LLVector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0); 3359 targ.ApplyImpulse(new Vector3((float)impulse.x, (float)impulse.y, (float)impulse.z), local != 0);
3361 } 3360 }
3362 3361
3363 public void llPassCollisions(int pass) 3362 public void llPassCollisions(int pass)
@@ -3636,7 +3635,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3636 public string llGetInventoryKey(string name) 3635 public string llGetInventoryKey(string name)
3637 { 3636 {
3638 m_host.AddScriptLPS(1); 3637 m_host.AddScriptLPS(1);
3639 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 3638 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
3640 { 3639 {
3641 if (inv.Value.Name == name) 3640 if (inv.Value.Name == name)
3642 { 3641 {
@@ -3646,11 +3645,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3646 } 3645 }
3647 else 3646 else
3648 { 3647 {
3649 return LLUUID.Zero.ToString(); 3648 return UUID.Zero.ToString();
3650 } 3649 }
3651 } 3650 }
3652 } 3651 }
3653 return LLUUID.Zero.ToString(); 3652 return UUID.Zero.ToString();
3654 } 3653 }
3655 3654
3656 public void llAllowInventoryDrop(int add) 3655 public void llAllowInventoryDrop(int add)
@@ -3668,10 +3667,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3668 m_host.AddScriptLPS(1); 3667 m_host.AddScriptLPS(1);
3669 3668
3670 LSL_Types.Vector3 SunDoubleVector3; 3669 LSL_Types.Vector3 SunDoubleVector3;
3671 LLVector3 SunFloatVector3; 3670 Vector3 SunFloatVector3;
3672 3671
3673 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3672 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3674 // have to convert from LLVector3 (float) to LSL_Types.Vector3 (double) 3673 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double)
3675 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3674 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3676 SunDoubleVector3.x = (double)SunFloatVector3.X; 3675 SunDoubleVector3.x = (double)SunFloatVector3.X;
3677 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3676 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3683,7 +3682,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3683 public LSL_Types.Vector3 llGetTextureOffset(int face) 3682 public LSL_Types.Vector3 llGetTextureOffset(int face)
3684 { 3683 {
3685 m_host.AddScriptLPS(1); 3684 m_host.AddScriptLPS(1);
3686 LLObject.TextureEntry tex = m_host.Shape.Textures; 3685 Primitive.TextureEntry tex = m_host.Shape.Textures;
3687 LSL_Types.Vector3 offset; 3686 LSL_Types.Vector3 offset;
3688 if (face == -1) 3687 if (face == -1)
3689 { 3688 {
@@ -3698,7 +3697,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3698 public LSL_Types.Vector3 llGetTextureScale(int side) 3697 public LSL_Types.Vector3 llGetTextureScale(int side)
3699 { 3698 {
3700 m_host.AddScriptLPS(1); 3699 m_host.AddScriptLPS(1);
3701 LLObject.TextureEntry tex = m_host.Shape.Textures; 3700 Primitive.TextureEntry tex = m_host.Shape.Textures;
3702 LSL_Types.Vector3 scale; 3701 LSL_Types.Vector3 scale;
3703 if (side == -1) 3702 if (side == -1)
3704 { 3703 {
@@ -3713,7 +3712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3713 public double llGetTextureRot(int face) 3712 public double llGetTextureRot(int face)
3714 { 3713 {
3715 m_host.AddScriptLPS(1); 3714 m_host.AddScriptLPS(1);
3716 LLObject.TextureEntry tex = m_host.Shape.Textures; 3715 Primitive.TextureEntry tex = m_host.Shape.Textures;
3717 if (face == -1) 3716 if (face == -1)
3718 { 3717 {
3719 face = 0; 3718 face = 0;
@@ -3730,14 +3729,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3730 public string llGetOwnerKey(string id) 3729 public string llGetOwnerKey(string id)
3731 { 3730 {
3732 m_host.AddScriptLPS(1); 3731 m_host.AddScriptLPS(1);
3733 LLUUID key = new LLUUID(); 3732 UUID key = new UUID();
3734 if (LLUUID.TryParse(id, out key)) 3733 if (UUID.TryParse(id, out key))
3735 { 3734 {
3736 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString(); 3735 return World.GetSceneObjectPart(World.Entities[key].LocalId).OwnerID.ToString();
3737 } 3736 }
3738 else 3737 else
3739 { 3738 {
3740 return LLUUID.Zero.ToString(); 3739 return UUID.Zero.ToString();
3741 } 3740 }
3742 } 3741 }
3743 3742
@@ -3946,8 +3945,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3946 return 2; 3945 return 2;
3947 if (src.Data[index] is String) 3946 if (src.Data[index] is String)
3948 { 3947 {
3949 LLUUID tuuid; 3948 UUID tuuid;
3950 if (LLUUID.TryParse(src.Data[index].ToString(), out tuuid)) 3949 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
3951 { 3950 {
3952 return 3; 3951 return 3;
3953 } 3952 }
@@ -4359,8 +4358,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4359 public string llKey2Name(string id) 4358 public string llKey2Name(string id)
4360 { 4359 {
4361 m_host.AddScriptLPS(1); 4360 m_host.AddScriptLPS(1);
4362 LLUUID key = new LLUUID(); 4361 UUID key = new UUID();
4363 if (LLUUID.TryParse(id,out key)) 4362 if (UUID.TryParse(id,out key))
4364 { 4363 {
4365 ScenePresence presence = World.GetScenePresence(key); 4364 ScenePresence presence = World.GetScenePresence(key);
4366 4365
@@ -4384,7 +4383,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4384 { 4383 {
4385 m_host.AddScriptLPS(1); 4384 m_host.AddScriptLPS(1);
4386 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation(); 4385 Primitive.TextureAnimation pTexAnim = new Primitive.TextureAnimation();
4387 pTexAnim.Flags =(uint) mode; 4386 pTexAnim.Flags = (Primitive.TextureAnimMode)mode;
4388 4387
4389 //ALL_SIDES 4388 //ALL_SIDES
4390 if (face == -1) 4389 if (face == -1)
@@ -4473,8 +4472,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4473 public LSL_Types.LSLInteger llOverMyLand(string id) 4472 public LSL_Types.LSLInteger llOverMyLand(string id)
4474 { 4473 {
4475 m_host.AddScriptLPS(1); 4474 m_host.AddScriptLPS(1);
4476 LLUUID key = new LLUUID(); 4475 UUID key = new UUID();
4477 if (LLUUID.TryParse(id,out key)) 4476 if (UUID.TryParse(id,out key))
4478 { 4477 {
4479 ScenePresence presence = World.GetScenePresence(key); 4478 ScenePresence presence = World.GetScenePresence(key);
4480 if (presence != null) // object is an avatar 4479 if (presence != null) // object is an avatar
@@ -4517,8 +4516,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4517 { 4516 {
4518 m_host.AddScriptLPS(1); 4517 m_host.AddScriptLPS(1);
4519 4518
4520 LLUUID key = new LLUUID(); 4519 UUID key = new UUID();
4521 if (LLUUID.TryParse(id, out key)) 4520 if (UUID.TryParse(id, out key))
4522 { 4521 {
4523 ScenePresence av = World.GetScenePresence(key); 4522 ScenePresence av = World.GetScenePresence(key);
4524 4523
@@ -4656,8 +4655,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4656 Primitive.ParticleSystem ps = new Primitive.ParticleSystem(); 4655 Primitive.ParticleSystem ps = new Primitive.ParticleSystem();
4657 4656
4658 // TODO find out about the other defaults and add them here 4657 // TODO find out about the other defaults and add them here
4659 ps.PartStartColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4658 ps.PartStartColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4660 ps.PartEndColor = new LLColor(1.0f, 1.0f, 1.0f, 1.0f); 4659 ps.PartEndColor = new Color4(1.0f, 1.0f, 1.0f, 1.0f);
4661 ps.PartStartScaleX = 1.0f; 4660 ps.PartStartScaleX = 1.0f;
4662 ps.PartStartScaleY = 1.0f; 4661 ps.PartStartScaleY = 1.0f;
4663 ps.PartEndScaleX = 1.0f; 4662 ps.PartEndScaleX = 1.0f;
@@ -4705,7 +4704,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4705 4704
4706 case (int)ScriptBaseClass.PSYS_PART_END_COLOR: 4705 case (int)ScriptBaseClass.PSYS_PART_END_COLOR:
4707 tempv = (LSL_Types.Vector3)rules.Data[i + 1]; 4706 tempv = (LSL_Types.Vector3)rules.Data[i + 1];
4708 //prules.PartEndColor = new LLColor(tempv.x,tempv.y,tempv.z,1); 4707 //prules.PartEndColor = new Color4(tempv.x,tempv.y,tempv.z,1);
4709 4708
4710 prules.PartEndColor.R = (float)tempv.x; 4709 prules.PartEndColor.R = (float)tempv.x;
4711 prules.PartEndColor.G = (float)tempv.y; 4710 prules.PartEndColor.G = (float)tempv.y;
@@ -4784,8 +4783,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4784 break; 4783 break;
4785 4784
4786 case (int)ScriptBaseClass.PSYS_SRC_TARGET_KEY: 4785 case (int)ScriptBaseClass.PSYS_SRC_TARGET_KEY:
4787 LLUUID key = LLUUID.Zero; 4786 UUID key = UUID.Zero;
4788 if (LLUUID.TryParse(rules.Data[i + 1].ToString(), out key)) 4787 if (UUID.TryParse(rules.Data[i + 1].ToString(), out key))
4789 { 4788 {
4790 prules.Target = key; 4789 prules.Target = key;
4791 } 4790 }
@@ -4829,37 +4828,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4829 NotImplemented("llGroundRepel"); 4828 NotImplemented("llGroundRepel");
4830 } 4829 }
4831 4830
4832 private LLUUID GetTaskInventoryItem(string name) 4831 private UUID GetTaskInventoryItem(string name)
4833 { 4832 {
4834 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 4833 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
4835 { 4834 {
4836 if (inv.Value.Name == name) 4835 if (inv.Value.Name == name)
4837 return inv.Key; 4836 return inv.Key;
4838 } 4837 }
4839 return LLUUID.Zero; 4838 return UUID.Zero;
4840 } 4839 }
4841 4840
4842 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4841 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4843 { 4842 {
4844 m_host.AddScriptLPS(1); 4843 m_host.AddScriptLPS(1);
4845 4844
4846 LLUUID destID; 4845 UUID destID;
4847 if (!LLUUID.TryParse(destination, out destID)) 4846 if (!UUID.TryParse(destination, out destID))
4848 return; 4847 return;
4849 4848
4850 List<LLUUID> itemList = new List<LLUUID>(); 4849 List<UUID> itemList = new List<UUID>();
4851 4850
4852 foreach (Object item in inventory.Data) 4851 foreach (Object item in inventory.Data)
4853 { 4852 {
4854 LLUUID itemID; 4853 UUID itemID;
4855 if (LLUUID.TryParse(item.ToString(), out itemID)) 4854 if (UUID.TryParse(item.ToString(), out itemID))
4856 { 4855 {
4857 itemList.Add(itemID); 4856 itemList.Add(itemID);
4858 } 4857 }
4859 else 4858 else
4860 { 4859 {
4861 itemID = GetTaskInventoryItem(item.ToString()); 4860 itemID = GetTaskInventoryItem(item.ToString());
4862 if (itemID != LLUUID.Zero) 4861 if (itemID != UUID.Zero)
4863 itemList.Add(itemID); 4862 itemList.Add(itemID);
4864 } 4863 }
4865 } 4864 }
@@ -4920,7 +4919,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4920 rot.z = 1; // ZERO_ROTATION = 0,0,0,1 4919 rot.z = 1; // ZERO_ROTATION = 0,0,0,1
4921 4920
4922 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z); 4921 m_host.SitTargetPosition = new Vector3((float)offset.x, (float)offset.y, (float)offset.z);
4923 m_host.SitTargetOrientation = new Quaternion((float)rot.s, (float)rot.x, (float)rot.y, (float)rot.z); 4922 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
4924 } 4923 }
4925 4924
4926 public string llAvatarOnSitTarget() 4925 public string llAvatarOnSitTarget()
@@ -4932,12 +4931,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4932 public void llAddToLandPassList(string avatar, double hours) 4931 public void llAddToLandPassList(string avatar, double hours)
4933 { 4932 {
4934 m_host.AddScriptLPS(1); 4933 m_host.AddScriptLPS(1);
4935 LLUUID key; 4934 UUID key;
4936 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 4935 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
4937 if (land.OwnerID == m_host.OwnerID) 4936 if (land.OwnerID == m_host.OwnerID)
4938 { 4937 {
4939 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 4938 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
4940 if (LLUUID.TryParse(avatar, out key)) 4939 if (UUID.TryParse(avatar, out key))
4941 { 4940 {
4942 entry.AgentID = key; 4941 entry.AgentID = key;
4943 entry.Flags = ParcelManager.AccessList.Access; 4942 entry.Flags = ParcelManager.AccessList.Access;
@@ -4963,13 +4962,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4963 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 4962 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset)
4964 { 4963 {
4965 m_host.AddScriptLPS(1); 4964 m_host.AddScriptLPS(1);
4966 m_host.SetCameraEyeOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 4965 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
4967 } 4966 }
4968 4967
4969 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 4968 public void llSetCameraAtOffset(LSL_Types.Vector3 offset)
4970 { 4969 {
4971 m_host.AddScriptLPS(1); 4970 m_host.AddScriptLPS(1);
4972 m_host.SetCameraAtOffset(new LLVector3((float)offset.x, (float)offset.y, (float)offset.z)); 4971 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
4973 } 4972 }
4974 4973
4975 public string llDumpList2String(LSL_Types.list src, string seperator) 4974 public string llDumpList2String(LSL_Types.list src, string seperator)
@@ -4991,7 +4990,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4991 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 4990 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos)
4992 { 4991 {
4993 m_host.AddScriptLPS(1); 4992 m_host.AddScriptLPS(1);
4994 bool result = World.scriptDanger(m_host.LocalId, new LLVector3((float)pos.x, (float)pos.y, (float)pos.z)); 4993 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
4995 if (result) 4994 if (result)
4996 { 4995 {
4997 return 1; 4996 return 1;
@@ -5006,8 +5005,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5006 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5005 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel)
5007 { 5006 {
5008 m_host.AddScriptLPS(1); 5007 m_host.AddScriptLPS(1);
5009 LLUUID av = new LLUUID(); 5008 UUID av = new UUID();
5010 if (!LLUUID.TryParse(avatar,out av)) 5009 if (!UUID.TryParse(avatar,out av))
5011 { 5010 {
5012 LSLError("First parameter to llDialog needs to be a key"); 5011 LSLError("First parameter to llDialog needs to be a key");
5013 return; 5012 return;
@@ -5032,7 +5031,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5032 } 5031 }
5033 buts[i] = buttons.Data[i].ToString(); 5032 buts[i] = buttons.Data[i].ToString();
5034 } 5033 }
5035 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new LLUUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 5034 World.SendDialogToUser(av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
5036 // ScriptSleep(1000); 5035 // ScriptSleep(1000);
5037 } 5036 }
5038 5037
@@ -5049,11 +5048,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5049 5048
5050 public void llResetOtherScript(string name) 5049 public void llResetOtherScript(string name)
5051 { 5050 {
5052 LLUUID item; 5051 UUID item;
5053 5052
5054 m_host.AddScriptLPS(1); 5053 m_host.AddScriptLPS(1);
5055 5054
5056 if ((item = ScriptByName(name)) != LLUUID.Zero) 5055 if ((item = ScriptByName(name)) != UUID.Zero)
5057 m_ScriptEngine.ResetScript(item); 5056 m_ScriptEngine.ResetScript(item);
5058 else 5057 else
5059 ShoutError("llResetOtherScript: script "+name+" not found"); 5058 ShoutError("llResetOtherScript: script "+name+" not found");
@@ -5061,11 +5060,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5061 5060
5062 public LSL_Types.LSLInteger llGetScriptState(string name) 5061 public LSL_Types.LSLInteger llGetScriptState(string name)
5063 { 5062 {
5064 LLUUID item; 5063 UUID item;
5065 5064
5066 m_host.AddScriptLPS(1); 5065 m_host.AddScriptLPS(1);
5067 5066
5068 if ((item = ScriptByName(name)) != LLUUID.Zero) 5067 if ((item = ScriptByName(name)) != UUID.Zero)
5069 { 5068 {
5070 return m_ScriptEngine.GetScriptState(item) ?1:0; 5069 return m_ScriptEngine.GetScriptState(item) ?1:0;
5071 } 5070 }
@@ -5095,10 +5094,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5095 { 5094 {
5096 m_host.AddScriptLPS(1); 5095 m_host.AddScriptLPS(1);
5097 bool found = false; 5096 bool found = false;
5098 LLUUID destId = LLUUID.Zero; 5097 UUID destId = UUID.Zero;
5099 LLUUID srcId = LLUUID.Zero; 5098 UUID srcId = UUID.Zero;
5100 5099
5101 if (!LLUUID.TryParse(target, out destId)) 5100 if (!UUID.TryParse(target, out destId))
5102 { 5101 {
5103 llSay(0, "Could not parse key " + target); 5102 llSay(0, "Could not parse key " + target);
5104 return; 5103 return;
@@ -5111,7 +5110,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5111 } 5110 }
5112 5111
5113 // copy the first script found with this inventory name 5112 // copy the first script found with this inventory name
5114 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 5113 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
5115 { 5114 {
5116 if (inv.Value.Name == name) 5115 if (inv.Value.Name == name)
5117 { 5116 {
@@ -5143,8 +5142,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5143 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5142 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
5144 if (xmlrpcMod.IsEnabled()) 5143 if (xmlrpcMod.IsEnabled())
5145 { 5144 {
5146 LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, LLUUID.Zero); 5145 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5147 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(LLUUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5146 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) };
5148 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 5147 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
5149 "remote_data", resobj, 5148 "remote_data", resobj,
5150 new DetectParams[0])); 5149 new DetectParams[0]));
@@ -5464,9 +5463,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5464 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) 5463 private void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type)
5465 { 5464 {
5466 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5465 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5467 LLUUID sculptId; 5466 UUID sculptId;
5468 5467
5469 if (!LLUUID.TryParse(map, out sculptId)) 5468 if (!UUID.TryParse(map, out sculptId))
5470 { 5469 {
5471 llSay(0, "Could not parse key " + map); 5470 llSay(0, "Could not parse key " + map);
5472 return; 5471 return;
@@ -5896,9 +5895,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5896 ScenePresence av = World.GetScenePresence(id); 5895 ScenePresence av = World.GetScenePresence(id);
5897 if (av == null) 5896 if (av == null)
5898 return l; 5897 return l;
5899 LLUUID[] anims; 5898 UUID[] anims;
5900 anims = av.GetAnimationArray(); 5899 anims = av.GetAnimationArray();
5901 foreach (LLUUID foo in anims) 5900 foreach (UUID foo in anims)
5902 l.Add(foo.ToString()); 5901 l.Add(foo.ToString());
5903 return l; 5902 return l;
5904 } 5903 }
@@ -5906,8 +5905,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5906 public void llSetParcelMusicURL(string url) 5905 public void llSetParcelMusicURL(string url)
5907 { 5906 {
5908 m_host.AddScriptLPS(1); 5907 m_host.AddScriptLPS(1);
5909 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 5908 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
5910 if (landowner == LLUUID.Zero) 5909 if (landowner == UUID.Zero)
5911 { 5910 {
5912 return; 5911 return;
5913 } 5912 }
@@ -5922,9 +5921,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5922 public void osSetParcelMediaURL(string url) 5921 public void osSetParcelMediaURL(string url)
5923 { 5922 {
5924 m_host.AddScriptLPS(1); 5923 m_host.AddScriptLPS(1);
5925 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 5924 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
5926 5925
5927 if (landowner == LLUUID.Zero) 5926 if (landowner == UUID.Zero)
5928 { 5927 {
5929 return; 5928 return;
5930 } 5929 }
@@ -5978,8 +5977,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5978 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber); 5977 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknumber);
5979 if (linknumber > -1) 5978 if (linknumber > -1)
5980 { 5979 {
5981 LLObject.TextureEntry tex = part.Shape.Textures; 5980 Primitive.TextureEntry tex = part.Shape.Textures;
5982 LLColor texcolor; 5981 Color4 texcolor;
5983 if (face > -1) 5982 if (face > -1)
5984 { 5983 {
5985 texcolor = tex.CreateFace((uint)face).RGBA; 5984 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6017,8 +6016,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6017 { 6016 {
6018 linknumber = w; 6017 linknumber = w;
6019 part = m_host.ParentGroup.GetLinkNumPart(linknumber); 6018 part = m_host.ParentGroup.GetLinkNumPart(linknumber);
6020 LLObject.TextureEntry tex = part.Shape.Textures; 6019 Primitive.TextureEntry tex = part.Shape.Textures;
6021 LLColor texcolor; 6020 Color4 texcolor;
6022 if (face > -1) 6021 if (face > -1)
6023 { 6022 {
6024 texcolor = tex.CreateFace((uint)face).RGBA; 6023 texcolor = tex.CreateFace((uint)face).RGBA;
@@ -6086,21 +6085,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6086 break; 6085 break;
6087 6086
6088 case (int)ScriptBaseClass.PRIM_PHYSICS: 6087 case (int)ScriptBaseClass.PRIM_PHYSICS:
6089 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) != 0) 6088 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6090 res.Add(new LSL_Types.LSLInteger(1)); 6089 res.Add(new LSL_Types.LSLInteger(1));
6091 else 6090 else
6092 res.Add(new LSL_Types.LSLInteger(0)); 6091 res.Add(new LSL_Types.LSLInteger(0));
6093 break; 6092 break;
6094 6093
6095 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 6094 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
6096 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) != 0) 6095 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6097 res.Add(new LSL_Types.LSLInteger(1)); 6096 res.Add(new LSL_Types.LSLInteger(1));
6098 else 6097 else
6099 res.Add(new LSL_Types.LSLInteger(0)); 6098 res.Add(new LSL_Types.LSLInteger(0));
6100 break; 6099 break;
6101 6100
6102 case (int)ScriptBaseClass.PRIM_PHANTOM: 6101 case (int)ScriptBaseClass.PRIM_PHANTOM:
6103 if ((m_host.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Phantom) != 0) 6102 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6104 res.Add(new LSL_Types.LSLInteger(1)); 6103 res.Add(new LSL_Types.LSLInteger(1));
6105 else 6104 else
6106 res.Add(new LSL_Types.LSLInteger(0)); 6105 res.Add(new LSL_Types.LSLInteger(0));
@@ -6205,8 +6204,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6205 if (face == -1) 6204 if (face == -1)
6206 face = 0; 6205 face = 0;
6207 6206
6208 LLObject.TextureEntry tex = m_host.Shape.Textures; 6207 Primitive.TextureEntry tex = m_host.Shape.Textures;
6209 LLObject.TextureEntryFace texface = tex.GetFace((uint)face); 6208 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6210 6209
6211 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6210 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString()));
6212 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6211 res.Add(new LSL_Types.Vector3(texface.RepeatU,
@@ -6225,7 +6224,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6225 face=Convert.ToInt32(rules.Data[idx++].ToString()); 6224 face=Convert.ToInt32(rules.Data[idx++].ToString());
6226 6225
6227 tex = m_host.Shape.Textures; 6226 tex = m_host.Shape.Textures;
6228 LLColor texcolor; 6227 Color4 texcolor;
6229 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color 6228 if (face == -1) // TMP: Until we can determine number of sides, ALL_SIDES (-1) will return default color
6230 texcolor = tex.DefaultTexture.RGBA; 6229 texcolor = tex.DefaultTexture.RGBA;
6231 else 6230 else
@@ -6579,7 +6578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6579 public void llSetLocalRot(LSL_Types.Quaternion rot) 6578 public void llSetLocalRot(LSL_Types.Quaternion rot)
6580 { 6579 {
6581 m_host.AddScriptLPS(1); 6580 m_host.AddScriptLPS(1);
6582 m_host.RotationOffset = new LLQuaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 6581 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
6583 // ScriptSleep(200); 6582 // ScriptSleep(200);
6584 } 6583 }
6585 6584
@@ -6835,7 +6834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6835 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 6834 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask)
6836 { 6835 {
6837 m_host.AddScriptLPS(1); 6836 m_host.AddScriptLPS(1);
6838 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6837 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6839 { 6838 {
6840 if (inv.Value.Name == item) 6839 if (inv.Value.Name == item)
6841 { 6840 {
@@ -6866,7 +6865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6866 public string llGetInventoryCreator(string item) 6865 public string llGetInventoryCreator(string item)
6867 { 6866 {
6868 m_host.AddScriptLPS(1); 6867 m_host.AddScriptLPS(1);
6869 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 6868 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
6870 { 6869 {
6871 if (inv.Value.Name == item) 6870 if (inv.Value.Name == item)
6872 { 6871 {
@@ -6881,7 +6880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6881 { 6880 {
6882 m_host.AddScriptLPS(1); 6881 m_host.AddScriptLPS(1);
6883 6882
6884 World.SimChatBroadcast(Helpers.StringToField(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 6883 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
6885// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 6884// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
6886// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 6885// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
6887 } 6886 }
@@ -6902,7 +6901,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6902 if (info == null) 6901 if (info == null)
6903 { 6902 {
6904 // ScriptSleep(1000); 6903 // ScriptSleep(1000);
6905 return LLUUID.Zero.ToString(); 6904 return UUID.Zero.ToString();
6906 } 6905 }
6907 reply = new LSL_Types.Vector3( 6906 reply = new LSL_Types.Vector3(
6908 info.RegionLocX * Constants.RegionSize, 6907 info.RegionLocX * Constants.RegionSize,
@@ -6919,7 +6918,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6919 if (info == null) 6918 if (info == null)
6920 { 6919 {
6921 // ScriptSleep(1000); 6920 // ScriptSleep(1000);
6922 return LLUUID.Zero.ToString(); 6921 return UUID.Zero.ToString();
6923 } 6922 }
6924 int access = info.RegionSettings.Maturity; 6923 int access = info.RegionSettings.Maturity;
6925 if (access == 0) 6924 if (access == 0)
@@ -6934,11 +6933,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6934 break; 6933 break;
6935 default: 6934 default:
6936 // ScriptSleep(1000); 6935 // ScriptSleep(1000);
6937 return LLUUID.Zero.ToString(); // Raise no event 6936 return UUID.Zero.ToString(); // Raise no event
6938 } 6937 }
6939 LLUUID rq = LLUUID.Random(); 6938 UUID rq = UUID.Random();
6940 6939
6941 LLUUID tid = AsyncCommands. 6940 UUID tid = AsyncCommands.
6942 DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString()); 6941 DataserverPlugin.RegisterRequest(m_localID, m_itemID, rq.ToString());
6943 6942
6944 AsyncCommands. 6943 AsyncCommands.
@@ -6950,7 +6949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6950 catch(Exception e) 6949 catch(Exception e)
6951 { 6950 {
6952 Console.WriteLine(e.ToString()); 6951 Console.WriteLine(e.ToString());
6953 return LLUUID.Zero.ToString(); 6952 return UUID.Zero.ToString();
6954 } 6953 }
6955 } 6954 }
6956 6955
@@ -6963,8 +6962,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6963 public double llGetObjectMass(string id) 6962 public double llGetObjectMass(string id)
6964 { 6963 {
6965 m_host.AddScriptLPS(1); 6964 m_host.AddScriptLPS(1);
6966 LLUUID key = new LLUUID(); 6965 UUID key = new UUID();
6967 if (LLUUID.TryParse(id,out key)) 6966 if (UUID.TryParse(id,out key))
6968 { 6967 {
6969 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass(); 6968 return (double)World.GetSceneObjectPart(World.Entities[key].LocalId).GetMass();
6970 } 6969 }
@@ -7056,7 +7055,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7056 public void llLoadURL(string avatar_id, string message, string url) 7055 public void llLoadURL(string avatar_id, string message, string url)
7057 { 7056 {
7058 m_host.AddScriptLPS(1); 7057 m_host.AddScriptLPS(1);
7059 LLUUID avatarId = new LLUUID(avatar_id); 7058 UUID avatarId = new UUID(avatar_id);
7060 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, 7059 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message,
7061 url); 7060 url);
7062 // ScriptSleep(10000); 7061 // ScriptSleep(10000);
@@ -7202,7 +7201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7202 public LSL_Types.LSLInteger llGetInventoryType(string name) 7201 public LSL_Types.LSLInteger llGetInventoryType(string name)
7203 { 7202 {
7204 m_host.AddScriptLPS(1); 7203 m_host.AddScriptLPS(1);
7205 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory) 7204 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
7206 { 7205 {
7207 if (inv.Value.Name == name) 7206 if (inv.Value.Name == name)
7208 { 7207 {
@@ -7231,10 +7230,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7231 public LSL_Types.Vector3 llGetCameraPos() 7230 public LSL_Types.Vector3 llGetCameraPos()
7232 { 7231 {
7233 m_host.AddScriptLPS(1); 7232 m_host.AddScriptLPS(1);
7234 LLUUID invItemID=InventorySelf(); 7233 UUID invItemID=InventorySelf();
7235 if (invItemID == LLUUID.Zero) 7234 if (invItemID == UUID.Zero)
7236 return new LSL_Types.Vector3(); 7235 return new LSL_Types.Vector3();
7237 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) 7236 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7238 return new LSL_Types.Vector3(); 7237 return new LSL_Types.Vector3();
7239 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) 7238 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
7240 { 7239 {
@@ -7244,7 +7243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7244 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7243 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7245 if (presence != null) 7244 if (presence != null)
7246 { 7245 {
7247 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); 7246 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z);
7248 return pos; 7247 return pos;
7249 } 7248 }
7250 return new LSL_Types.Vector3(); 7249 return new LSL_Types.Vector3();
@@ -7307,12 +7306,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7307 public void llAddToLandBanList(string avatar, double hours) 7306 public void llAddToLandBanList(string avatar, double hours)
7308 { 7307 {
7309 m_host.AddScriptLPS(1); 7308 m_host.AddScriptLPS(1);
7310 LLUUID key; 7309 UUID key;
7311 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7310 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7312 if (land.OwnerID == m_host.OwnerID) 7311 if (land.OwnerID == m_host.OwnerID)
7313 { 7312 {
7314 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 7313 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
7315 if (LLUUID.TryParse(avatar, out key)) 7314 if (UUID.TryParse(avatar, out key))
7316 { 7315 {
7317 entry.AgentID = key; 7316 entry.AgentID = key;
7318 entry.Flags = ParcelManager.AccessList.Ban; 7317 entry.Flags = ParcelManager.AccessList.Ban;
@@ -7326,11 +7325,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7326 public void llRemoveFromLandPassList(string avatar) 7325 public void llRemoveFromLandPassList(string avatar)
7327 { 7326 {
7328 m_host.AddScriptLPS(1); 7327 m_host.AddScriptLPS(1);
7329 LLUUID key; 7328 UUID key;
7330 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7329 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7331 if (land.OwnerID == m_host.OwnerID) 7330 if (land.OwnerID == m_host.OwnerID)
7332 { 7331 {
7333 if (LLUUID.TryParse(avatar, out key)) 7332 if (UUID.TryParse(avatar, out key))
7334 { 7333 {
7335 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7334 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7336 { 7335 {
@@ -7348,11 +7347,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7348 public void llRemoveFromLandBanList(string avatar) 7347 public void llRemoveFromLandBanList(string avatar)
7349 { 7348 {
7350 m_host.AddScriptLPS(1); 7349 m_host.AddScriptLPS(1);
7351 LLUUID key; 7350 UUID key;
7352 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData; 7351 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).landData;
7353 if (land.OwnerID == m_host.OwnerID) 7352 if (land.OwnerID == m_host.OwnerID)
7354 { 7353 {
7355 if (LLUUID.TryParse(avatar, out key)) 7354 if (UUID.TryParse(avatar, out key))
7356 { 7355 {
7357 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList) 7356 foreach (ParcelManager.ParcelAccessEntry entry in land.ParcelAccessList)
7358 { 7357 {
@@ -7372,16 +7371,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7372 m_host.AddScriptLPS(1); 7371 m_host.AddScriptLPS(1);
7373 7372
7374 // our key in the object we are in 7373 // our key in the object we are in
7375 LLUUID invItemID=InventorySelf(); 7374 UUID invItemID=InventorySelf();
7376 if (invItemID == LLUUID.Zero) return; 7375 if (invItemID == UUID.Zero) return;
7377 7376
7378 // the object we are in 7377 // the object we are in
7379 LLUUID objectID = m_host.ParentUUID; 7378 UUID objectID = m_host.ParentUUID;
7380 if (objectID == LLUUID.Zero) return; 7379 if(objectID == UUID.Zero) return;
7381 7380
7382 // we need the permission first, to know which avatar we want to set the camera for 7381 // we need the permission first, to know which avatar we want to set the camera for
7383 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7382 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7384 if (agentID == LLUUID.Zero) return; 7383 if (agentID == UUID.Zero) return;
7385 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7384 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7386 7385
7387 ScenePresence presence = World.GetScenePresence(agentID); 7386 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7423,16 +7422,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7423 m_host.AddScriptLPS(1); 7422 m_host.AddScriptLPS(1);
7424 7423
7425 // our key in the object we are in 7424 // our key in the object we are in
7426 LLUUID invItemID=InventorySelf(); 7425 UUID invItemID=InventorySelf();
7427 if (invItemID == LLUUID.Zero) return; 7426 if (invItemID == UUID.Zero) return;
7428 7427
7429 // the object we are in 7428 // the object we are in
7430 LLUUID objectID = m_host.ParentUUID; 7429 UUID objectID = m_host.ParentUUID;
7431 if (objectID == LLUUID.Zero) return; 7430 if(objectID == UUID.Zero) return;
7432 7431
7433 // we need the permission first, to know which avatar we want to clear the camera for 7432 // we need the permission first, to know which avatar we want to clear the camera for
7434 LLUUID agentID = m_host.TaskInventory[invItemID].PermsGranter; 7433 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
7435 if (agentID == LLUUID.Zero) return; 7434 if (agentID == UUID.Zero) return;
7436 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return; 7435 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_CONTROL_CAMERA) == 0) return;
7437 7436
7438 ScenePresence presence = World.GetScenePresence(agentID); 7437 ScenePresence presence = World.GetScenePresence(agentID);
@@ -7531,9 +7530,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7531 param.Add(o.ToString()); 7530 param.Add(o.ToString());
7532 } 7531 }
7533 7532
7534 LLVector3 position = m_host.AbsolutePosition; 7533 Vector3 position = m_host.AbsolutePosition;
7535 LLVector3 velocity = m_host.Velocity; 7534 Vector3 velocity = m_host.Velocity;
7536 LLQuaternion rotation = m_host.RotationOffset; 7535 Quaternion rotation = m_host.RotationOffset;
7537 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); 7536 ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner);
7538 RegionInfo regionInfo = World.RegionInfo; 7537 RegionInfo regionInfo = World.RegionInfo;
7539 7538
@@ -7549,10 +7548,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7549 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; 7548 httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name;
7550 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); 7549 httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString();
7551 7550
7552 LLUUID reqID = httpScriptMod. 7551 UUID reqID = httpScriptMod.
7553 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body); 7552 StartHttpRequest(m_localID, m_itemID, url, param, httpHeaders, body);
7554 7553
7555 if (reqID != LLUUID.Zero) 7554 if (reqID != UUID.Zero)
7556 return reqID.ToString(); 7555 return reqID.ToString();
7557 else 7556 else
7558 return null; 7557 return null;
@@ -7662,7 +7661,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7662 LSL_Types.list ret = new LSL_Types.list(); 7661 LSL_Types.list ret = new LSL_Types.list();
7663 if (land != null) 7662 if (land != null)
7664 { 7663 {
7665 foreach (KeyValuePair<LLUUID, int> d in land.getLandObjectOwners()) 7664 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
7666 { 7665 {
7667 ret.Add(d.Key.ToString()); 7666 ret.Add(d.Key.ToString());
7668 ret.Add(d.Value); 7667 ret.Add(d.Value);
@@ -7675,7 +7674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7675 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 7674 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id)
7676 { 7675 {
7677 m_host.AddScriptLPS(1); 7676 m_host.AddScriptLPS(1);
7678 SceneObjectPart part = World.GetSceneObjectPart(new LLUUID(object_id)); 7677 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
7679 if (part == null) 7678 if (part == null)
7680 { 7679 {
7681 return 0; 7680 return 0;
@@ -7781,8 +7780,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7781 { 7780 {
7782 m_host.AddScriptLPS(1); 7781 m_host.AddScriptLPS(1);
7783 LSL_Types.list ret = new LSL_Types.list(); 7782 LSL_Types.list ret = new LSL_Types.list();
7784 LLUUID key = new LLUUID(); 7783 UUID key = new UUID();
7785 if (LLUUID.TryParse(id, out key)) 7784 if (UUID.TryParse(id, out key))
7786 { 7785 {
7787 ScenePresence av = World.GetScenePresence(key); 7786 ScenePresence av = World.GetScenePresence(key);
7788 7787
@@ -7802,19 +7801,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7802 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 7801 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
7803 break; 7802 break;
7804 case "4": 7803 case "4":
7805 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.x, (double)av.Rotation.y, (double)av.Rotation.z, (double)av.Rotation.w)); 7804 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
7806 break; 7805 break;
7807 case "5": 7806 case "5":
7808 ret.Add(new LSL_Types.Vector3(av.Velocity.X,av.Velocity.Y,av.Velocity.Z)); 7807 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
7809 break; 7808 break;
7810 case "6": 7809 case "6":
7811 ret.Add(id); 7810 ret.Add(id);
7812 break; 7811 break;
7813 case "7": 7812 case "7":
7814 ret.Add(LLUUID.Zero.ToString()); 7813 ret.Add(UUID.Zero.ToString());
7815 break; 7814 break;
7816 case "8": 7815 case "8":
7817 ret.Add(LLUUID.Zero.ToString()); 7816 ret.Add(UUID.Zero.ToString());
7818 break; 7817 break;
7819 } 7818 }
7820 } 7819 }
@@ -7834,7 +7833,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7834 ret.Add(obj.Description); 7833 ret.Add(obj.Description);
7835 break; 7834 break;
7836 case "3": 7835 case "3":
7837 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X,obj.AbsolutePosition.Y,obj.AbsolutePosition.Z)); 7836 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
7838 break; 7837 break;
7839 case "4": 7838 case "4":
7840 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 7839 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
@@ -7860,14 +7859,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7860 } 7859 }
7861 7860
7862 7861
7863 internal LLUUID ScriptByName(string name) 7862 internal UUID ScriptByName(string name)
7864 { 7863 {
7865 foreach (TaskInventoryItem item in m_host.TaskInventory.Values) 7864 foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
7866 { 7865 {
7867 if (item.Type == 10 && item.Name == name) 7866 if (item.Type == 10 && item.Name == name)
7868 return item.ItemID; 7867 return item.ItemID;
7869 } 7868 }
7870 return LLUUID.Zero; 7869 return UUID.Zero;
7871 } 7870 }
7872 7871
7873 internal void ShoutError(string msg) 7872 internal void ShoutError(string msg)
@@ -7893,10 +7892,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7893 throw new Exception("LSL Runtime Error: " + msg); 7892 throw new Exception("LSL Runtime Error: " + msg);
7894 } 7893 }
7895 7894
7896 public delegate void AssetRequestCallback(LLUUID assetID, AssetBase asset); 7895 public delegate void AssetRequestCallback(UUID assetID, AssetBase asset);
7897 private void WithNotecard(LLUUID assetID, AssetRequestCallback cb) 7896 private void WithNotecard(UUID assetID, AssetRequestCallback cb)
7898 { 7897 {
7899 World.AssetCache.GetAsset(assetID, delegate(LLUUID i, AssetBase a) { cb(i, a); }, false); 7898 World.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
7900 } 7899 }
7901 7900
7902 public string llGetNumberOfNotecardLines(string name) 7901 public string llGetNumberOfNotecardLines(string name)
@@ -7907,7 +7906,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7907 { 7906 {
7908 if (item.Type == 7 && item.Name == name) 7907 if (item.Type == 7 && item.Name == name)
7909 { 7908 {
7910 LLUUID tid = AsyncCommands. 7909 UUID tid = AsyncCommands.
7911 DataserverPlugin.RegisterRequest(m_localID, 7910 DataserverPlugin.RegisterRequest(m_localID,
7912 m_itemID, item.AssetID.ToString()); 7911 m_itemID, item.AssetID.ToString());
7913 if (NotecardCache.IsCached(item.AssetID)) 7912 if (NotecardCache.IsCached(item.AssetID))
@@ -7918,7 +7917,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7918 // ScriptSleep(100); 7917 // ScriptSleep(100);
7919 return tid.ToString(); 7918 return tid.ToString();
7920 } 7919 }
7921 WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) 7920 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
7922 { 7921 {
7923 System.Text.ASCIIEncoding enc = 7922 System.Text.ASCIIEncoding enc =
7924 new System.Text.ASCIIEncoding(); 7923 new System.Text.ASCIIEncoding();
@@ -7934,7 +7933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7934 } 7933 }
7935 } 7934 }
7936 // ScriptSleep(100); 7935 // ScriptSleep(100);
7937 return LLUUID.Zero.ToString(); 7936 return UUID.Zero.ToString();
7938 } 7937 }
7939 7938
7940 public string llGetNotecardLine(string name, int line) 7939 public string llGetNotecardLine(string name, int line)
@@ -7945,7 +7944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7945 { 7944 {
7946 if (item.Type == 7 && item.Name == name) 7945 if (item.Type == 7 && item.Name == name)
7947 { 7946 {
7948 LLUUID tid = AsyncCommands. 7947 UUID tid = AsyncCommands.
7949 DataserverPlugin.RegisterRequest(m_localID, 7948 DataserverPlugin.RegisterRequest(m_localID,
7950 m_itemID, item.AssetID.ToString()); 7949 m_itemID, item.AssetID.ToString());
7951 if (NotecardCache.IsCached(item.AssetID)) 7950 if (NotecardCache.IsCached(item.AssetID))
@@ -7956,7 +7955,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7956 // ScriptSleep(100); 7955 // ScriptSleep(100);
7957 return tid.ToString(); 7956 return tid.ToString();
7958 } 7957 }
7959 WithNotecard(item.AssetID, delegate (LLUUID id, AssetBase a) 7958 WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
7960 { 7959 {
7961 System.Text.ASCIIEncoding enc = 7960 System.Text.ASCIIEncoding enc =
7962 new System.Text.ASCIIEncoding(); 7961 new System.Text.ASCIIEncoding();
@@ -7987,10 +7986,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7987 public DateTime lastRef; 7986 public DateTime lastRef;
7988 } 7987 }
7989 7988
7990 private static Dictionary<LLUUID, Notecard> m_Notecards = 7989 private static Dictionary<UUID, Notecard> m_Notecards =
7991 new Dictionary<LLUUID, Notecard>(); 7990 new Dictionary<UUID, Notecard>();
7992 7991
7993 public static void Cache(LLUUID assetID, string text) 7992 public static void Cache(UUID assetID, string text)
7994 { 7993 {
7995 CacheCheck(); 7994 CacheCheck();
7996 7995
@@ -8081,7 +8080,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8081 return output.ToArray(); 8080 return output.ToArray();
8082 } 8081 }
8083 8082
8084 public static bool IsCached(LLUUID assetID) 8083 public static bool IsCached(UUID assetID)
8085 { 8084 {
8086 lock (m_Notecards) 8085 lock (m_Notecards)
8087 { 8086 {
@@ -8089,7 +8088,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8089 } 8088 }
8090 } 8089 }
8091 8090
8092 public static int GetLines(LLUUID assetID) 8091 public static int GetLines(UUID assetID)
8093 { 8092 {
8094 if (!IsCached(assetID)) 8093 if (!IsCached(assetID))
8095 return -1; 8094 return -1;
@@ -8101,7 +8100,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8101 } 8100 }
8102 } 8101 }
8103 8102
8104 public static string GetLine(LLUUID assetID, int line) 8103 public static string GetLine(UUID assetID, int line)
8105 { 8104 {
8106 if (line < 0) 8105 if (line < 0)
8107 return ""; 8106 return "";
@@ -8128,7 +8127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8128 8127
8129 public static void CacheCheck() 8128 public static void CacheCheck()
8130 { 8129 {
8131 foreach (LLUUID key in new List<LLUUID>(m_Notecards.Keys)) 8130 foreach (UUID key in new List<UUID>(m_Notecards.Keys))
8132 { 8131 {
8133 Notecard nc = m_Notecards[key]; 8132 Notecard nc = m_Notecards[key];
8134 if (nc.lastRef.AddSeconds(30) < DateTime.Now) 8133 if (nc.lastRef.AddSeconds(30) < DateTime.Now)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 257b17b..0f598ea 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -26,8 +26,7 @@
26 */ 26 */
27using System; 27using System;
28using System.Runtime.Remoting.Lifetime; 28using System.Runtime.Remoting.Lifetime;
29using Axiom.Math; 29using OpenMetaverse;
30using libsecondlife;
31using Nini.Config; 30using Nini.Config;
32using OpenSim.Framework.Console; 31using OpenSim.Framework.Console;
33using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
@@ -46,9 +45,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
46 internal IScriptEngine m_ScriptEngine; 45 internal IScriptEngine m_ScriptEngine;
47 internal SceneObjectPart m_host; 46 internal SceneObjectPart m_host;
48 internal uint m_localID; 47 internal uint m_localID;
49 internal LLUUID m_itemID; 48 internal UUID m_itemID;
50 49
51 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, LLUUID itemID) 50 public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
52 { 51 {
53 m_ScriptEngine = ScriptEngine; 52 m_ScriptEngine = ScriptEngine;
54 m_host = host; 53 m_host = host;
@@ -86,7 +85,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
86 if (x > 255 || x < 0 || y > 255 || y < 0) 85 if (x > 255 || x < 0 || y > 255 || y < 0)
87 OSSLError("osTerrainSetHeight: Coordinate out of bounds"); 86 OSSLError("osTerrainSetHeight: Coordinate out of bounds");
88 87
89 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new LLVector3(x, y, 0))) 88 if (World.ExternalChecks.ExternalChecksCanTerraformLand(m_host.OwnerID, new Vector3(x, y, 0)))
90 { 89 {
91 World.Heightmap[x, y] = val; 90 World.Heightmap[x, y] = val;
92 return 1; 91 return 1;
@@ -144,7 +143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
144 World.SendGeneralAlert(msg); 143 World.SendGeneralAlert(msg);
145 } 144 }
146 145
147 public void osSetRot(LLUUID target, Quaternion rotation) 146 public void osSetRot(UUID target, Quaternion rotation)
148 { 147 {
149 if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false)) 148 if (!m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
150 { 149 {
@@ -176,7 +175,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
176 if (dynamicID == String.Empty) 175 if (dynamicID == String.Empty)
177 { 176 {
178 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 177 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
179 LLUUID createdTexture = 178 UUID createdTexture =
180 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 179 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
181 extraParams, timer); 180 extraParams, timer);
182 return createdTexture.ToString(); 181 return createdTexture.ToString();
@@ -186,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
186 //TODO update existing dynamic textures 185 //TODO update existing dynamic textures
187 } 186 }
188 187
189 return LLUUID.Zero.ToString(); 188 return UUID.Zero.ToString();
190 } 189 }
191 190
192 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, 191 public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
@@ -202,7 +201,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
202 if (dynamicID == String.Empty) 201 if (dynamicID == String.Empty)
203 { 202 {
204 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 203 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
205 LLUUID createdTexture = 204 UUID createdTexture =
206 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, 205 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
207 extraParams, timer, true, (byte) alpha); 206 extraParams, timer, true, (byte) alpha);
208 return createdTexture.ToString(); 207 return createdTexture.ToString();
@@ -212,7 +211,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
212 //TODO update existing dynamic textures 211 //TODO update existing dynamic textures
213 } 212 }
214 213
215 return LLUUID.Zero.ToString(); 214 return UUID.Zero.ToString();
216 } 215 }
217 216
218 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, 217 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
@@ -230,7 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
230 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 229 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
231 if (textureManager != null) 230 if (textureManager != null)
232 { 231 {
233 LLUUID createdTexture = 232 UUID createdTexture =
234 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 233 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
235 extraParams, timer); 234 extraParams, timer);
236 return createdTexture.ToString(); 235 return createdTexture.ToString();
@@ -241,7 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
241 //TODO update existing dynamic textures 240 //TODO update existing dynamic textures
242 } 241 }
243 242
244 return LLUUID.Zero.ToString(); 243 return UUID.Zero.ToString();
245 } 244 }
246 245
247 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, 246 public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
@@ -259,7 +258,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
259 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); 258 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
260 if (textureManager != null) 259 if (textureManager != null)
261 { 260 {
262 LLUUID createdTexture = 261 UUID createdTexture =
263 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, 262 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
264 extraParams, timer, true, (byte) alpha); 263 extraParams, timer, true, (byte) alpha);
265 return createdTexture.ToString(); 264 return createdTexture.ToString();
@@ -270,7 +269,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
270 //TODO update existing dynamic textures 269 //TODO update existing dynamic textures
271 } 270 }
272 271
273 return LLUUID.Zero.ToString(); 272 return UUID.Zero.ToString();
274 } 273 }
275 274
276 public bool osConsoleCommand(string command) 275 public bool osConsoleCommand(string command)
@@ -539,9 +538,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
539 } 538 }
540 539
541 m_host.AddScriptLPS(1); 540 m_host.AddScriptLPS(1);
542 LLUUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y); 541 UUID landowner = World.GetLandOwner(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y);
543 542
544 if (landowner == LLUUID.Zero) 543 if (landowner == UUID.Zero)
545 { 544 {
546 return; 545 return;
547 } 546 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
index 52d277e..7300f10 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Dataserver.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Region.ScriptEngine.Shared; 32using OpenSim.Region.ScriptEngine.Shared;
33using OpenSim.Region.ScriptEngine.Shared.Api; 33using OpenSim.Region.ScriptEngine.Shared.Api;
34 34
@@ -49,28 +49,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
49 private class DataserverRequest 49 private class DataserverRequest
50 { 50 {
51 public uint localID; 51 public uint localID;
52 public LLUUID itemID; 52 public UUID itemID;
53 53
54 public LLUUID ID; 54 public UUID ID;
55 public string handle; 55 public string handle;
56 56
57 public DateTime startTime; 57 public DateTime startTime;
58 } 58 }
59 59
60 public LLUUID RegisterRequest(uint localID, LLUUID itemID, 60 public UUID RegisterRequest(uint localID, UUID itemID,
61 string identifier) 61 string identifier)
62 { 62 {
63 lock (DataserverRequests) 63 lock (DataserverRequests)
64 { 64 {
65 if (DataserverRequests.ContainsKey(identifier)) 65 if (DataserverRequests.ContainsKey(identifier))
66 return LLUUID.Zero; 66 return UUID.Zero;
67 67
68 DataserverRequest ds = new DataserverRequest(); 68 DataserverRequest ds = new DataserverRequest();
69 69
70 ds.localID = localID; 70 ds.localID = localID;
71 ds.itemID = itemID; 71 ds.itemID = itemID;
72 72
73 ds.ID = LLUUID.Random(); 73 ds.ID = UUID.Random();
74 ds.handle = identifier; 74 ds.handle = identifier;
75 75
76 ds.startTime = DateTime.Now; 76 ds.startTime = DateTime.Now;
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
101 new DetectParams[0])); 101 new DetectParams[0]));
102 } 102 }
103 103
104 public void RemoveEvents(uint localID, LLUUID itemID) 104 public void RemoveEvents(uint localID, UUID itemID)
105 { 105 {
106 lock (DataserverRequests) 106 lock (DataserverRequests)
107 { 107 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
index 11b45b1..b353cba 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Listener.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29using libsecondlife; 29using OpenMetaverse;
30using OpenSim.Region.Environment.Interfaces; 30using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Modules.Scripting.WorldComm; 31using OpenSim.Region.Environment.Modules.Scripting.WorldComm;
32using OpenSim.Region.ScriptEngine.Shared; 32using OpenSim.Region.ScriptEngine.Shared;
@@ -74,14 +74,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
74 } 74 }
75 } 75 }
76 76
77 public Object[] GetSerializationData(LLUUID itemID) 77 public Object[] GetSerializationData(UUID itemID)
78 { 78 {
79 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 79 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
80 80
81 return comms.GetSerializationData(itemID); 81 return comms.GetSerializationData(itemID);
82 } 82 }
83 83
84 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 84 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
85 Object[] data) 85 Object[] data)
86 { 86 {
87 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 87 IWorldComm comms = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index eaf4bd0..d1e3921 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
@@ -45,8 +45,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
45 m_CmdManager = CmdManager; 45 m_CmdManager = CmdManager;
46 } 46 }
47 47
48 public Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>> SenseEvents = 48 public Dictionary<uint, Dictionary<UUID, LSL_Types.list>> SenseEvents =
49 new Dictionary<uint, Dictionary<LLUUID, LSL_Types.list>>(); 49 new Dictionary<uint, Dictionary<UUID, LSL_Types.list>>();
50 private Object SenseLock = new Object(); 50 private Object SenseLock = new Object();
51 51
52 // 52 //
@@ -55,12 +55,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
55 private class SenseRepeatClass 55 private class SenseRepeatClass
56 { 56 {
57 public uint localID; 57 public uint localID;
58 public LLUUID itemID; 58 public UUID itemID;
59 public double interval; 59 public double interval;
60 public DateTime next; 60 public DateTime next;
61 61
62 public string name; 62 public string name;
63 public LLUUID keyID; 63 public UUID keyID;
64 public int type; 64 public int type;
65 public double range; 65 public double range;
66 public double arc; 66 public double arc;
@@ -70,8 +70,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
70 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>(); 70 private List<SenseRepeatClass> SenseRepeaters = new List<SenseRepeatClass>();
71 private object SenseRepeatListLock = new object(); 71 private object SenseRepeatListLock = new object();
72 72
73 public void SetSenseRepeatEvent(uint m_localID, LLUUID m_itemID, 73 public void SetSenseRepeatEvent(uint m_localID, UUID m_itemID,
74 string name, LLUUID keyID, int type, double range, 74 string name, UUID keyID, int type, double range,
75 double arc, double sec, SceneObjectPart host) 75 double arc, double sec, SceneObjectPart host)
76 { 76 {
77 // Always remove first, in case this is a re-set 77 // Always remove first, in case this is a re-set
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
98 } 98 }
99 } 99 }
100 100
101 public void UnSetSenseRepeaterEvents(uint m_localID, LLUUID m_itemID) 101 public void UnSetSenseRepeaterEvents(uint m_localID, UUID m_itemID)
102 { 102 {
103 // Remove from timer 103 // Remove from timer
104 lock (SenseRepeatListLock) 104 lock (SenseRepeatListLock)
@@ -138,8 +138,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
138 } // lock 138 } // lock
139 } 139 }
140 140
141 public void SenseOnce(uint m_localID, LLUUID m_itemID, 141 public void SenseOnce(uint m_localID, UUID m_itemID,
142 string name, LLUUID keyID, int type, 142 string name, UUID keyID, int type,
143 double range, double arc, SceneObjectPart host) 143 double range, double arc, SceneObjectPart host)
144 { 144 {
145 // Add to timer 145 // Add to timer
@@ -156,11 +156,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
156 SensorSweep(ts); 156 SensorSweep(ts);
157 } 157 }
158 158
159 public LSL_Types.list GetSensorList(uint m_localID, LLUUID m_itemID) 159 public LSL_Types.list GetSensorList(uint m_localID, UUID m_itemID)
160 { 160 {
161 lock (SenseLock) 161 lock (SenseLock)
162 { 162 {
163 Dictionary<LLUUID, LSL_Types.list> Obj = null; 163 Dictionary<UUID, LSL_Types.list> Obj = null;
164 if (!SenseEvents.TryGetValue(m_localID, out Obj)) 164 if (!SenseEvents.TryGetValue(m_localID, out Obj))
165 { 165 {
166 return null; 166 return null;
@@ -187,11 +187,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
187 return; 187 return;
188 } 188 }
189 189
190 LLVector3 sensorPos = SensePoint.AbsolutePosition; 190 Vector3 sensorPos = SensePoint.AbsolutePosition;
191 LLVector3 regionPos = new LLVector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 191 Vector3 regionPos = new Vector3(m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocX * Constants.RegionSize, m_CmdManager.m_ScriptEngine.World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
192 LLVector3 fromRegionPos = sensorPos + regionPos; 192 Vector3 fromRegionPos = sensorPos + regionPos;
193 193
194 LLQuaternion q = SensePoint.RotationOffset; 194 Quaternion q = SensePoint.RotationOffset;
195 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 195 LSL_Types.Quaternion r = new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W);
196 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r); 196 LSL_Types.Vector3 forward_dir = (new LSL_Types.Vector3(1, 0, 0) * r);
197 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir); 197 double mag_fwd = LSL_Types.Vector3.Mag(forward_dir);
@@ -203,7 +203,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
203 203
204 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values) 204 foreach (EntityBase ent in m_CmdManager.m_ScriptEngine.World.Entities.Values)
205 { 205 {
206 LLVector3 toRegionPos = ent.AbsolutePosition + regionPos; 206 Vector3 toRegionPos = ent.AbsolutePosition + regionPos;
207 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos)); 207 double dis = Math.Abs((double)Util.GetDistanceTo(toRegionPos, fromRegionPos));
208 if (dis <= ts.range) 208 if (dis <= ts.range)
209 { 209 {
@@ -239,7 +239,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
239 double ang_obj = 0; 239 double ang_obj = 0;
240 try 240 try
241 { 241 {
242 LLVector3 diff = toRegionPos - fromRegionPos; 242 Vector3 diff = toRegionPos - fromRegionPos;
243 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z); 243 LSL_Types.Vector3 obj_dir = new LSL_Types.Vector3(diff.X, diff.Y, diff.Z);
244 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir); 244 double dot = LSL_Types.Vector3.Dot(forward_dir, obj_dir);
245 double mag_obj = LSL_Types.Vector3.Mag(obj_dir); 245 double mag_obj = LSL_Types.Vector3.Mag(obj_dir);
@@ -252,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
252 if (ang_obj > ts.arc) keep = false; 252 if (ang_obj > ts.arc) keep = false;
253 } 253 }
254 254
255 if (keep && (ts.keyID != LLUUID.Zero) && (ts.keyID != ent.UUID)) 255 if (keep && (ts.keyID != UUID.Zero) && (ts.keyID != ent.UUID))
256 { 256 {
257 keep = false; 257 keep = false;
258 } 258 }
@@ -292,10 +292,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
292 // Create object if it doesn't exist 292 // Create object if it doesn't exist
293 if (SenseEvents.ContainsKey(ts.localID) == false) 293 if (SenseEvents.ContainsKey(ts.localID) == false)
294 { 294 {
295 SenseEvents.Add(ts.localID, new Dictionary<LLUUID, LSL_Types.list>()); 295 SenseEvents.Add(ts.localID, new Dictionary<UUID, LSL_Types.list>());
296 } 296 }
297 // clear if previous traces exist 297 // clear if previous traces exist
298 Dictionary<LLUUID, LSL_Types.list> Obj; 298 Dictionary<UUID, LSL_Types.list> Obj;
299 SenseEvents.TryGetValue(ts.localID, out Obj); 299 SenseEvents.TryGetValue(ts.localID, out Obj);
300 if (Obj.ContainsKey(ts.itemID) == true) 300 if (Obj.ContainsKey(ts.itemID) == true)
301 Obj.Remove(ts.itemID); 301 Obj.Remove(ts.itemID);
@@ -320,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
320 for (idx = 0; idx < SensedObjects.Length; idx++) 320 for (idx = 0; idx < SensedObjects.Length; idx++)
321 { 321 {
322 detect[idx] = new DetectParams(); 322 detect[idx] = new DetectParams();
323 detect[idx].Key=(LLUUID)(SensedObjects.Data[idx]); 323 detect[idx].Key=(UUID)(SensedObjects.Data[idx]);
324 detect[idx].Populate(m_CmdManager.m_ScriptEngine.World); 324 detect[idx].Populate(m_CmdManager.m_ScriptEngine.World);
325 } 325 }
326 326
@@ -333,7 +333,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
333 } 333 }
334 } 334 }
335 335
336 public Object[] GetSerializationData(LLUUID itemID) 336 public Object[] GetSerializationData(UUID itemID)
337 { 337 {
338 List<Object> data = new List<Object>(); 338 List<Object> data = new List<Object>();
339 339
@@ -352,7 +352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
352 return data.ToArray(); 352 return data.ToArray();
353 } 353 }
354 354
355 public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, 355 public void CreateFromData(uint localID, UUID itemID, UUID objectID,
356 Object[] data) 356 Object[] data)
357 { 357 {
358 SceneObjectPart part = 358 SceneObjectPart part =
@@ -373,7 +373,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
373 373
374 ts.interval = (double)data[idx]; 374 ts.interval = (double)data[idx];
375 ts.name = (string)data[idx+1]; 375 ts.name = (string)data[idx+1];
376 ts.keyID = (LLUUID)data[idx+2]; 376 ts.keyID = (UUID)data[idx+2];
377 ts.type = (int)data[idx+3]; 377 ts.type = (int)data[idx+3];
378 ts.range = (double)data[idx+4]; 378 ts.range = (double)data[idx+4];
379 ts.arc = (double)data[idx+5]; 379 ts.arc = (double)data[idx+5];
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
index 36e992b..ec7cd35 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/Timer.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Region.ScriptEngine.Shared.Api; 32using OpenSim.Region.ScriptEngine.Shared.Api;
33 33
34namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins 34namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
@@ -48,7 +48,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
48 private class TimerClass 48 private class TimerClass
49 { 49 {
50 public uint localID; 50 public uint localID;
51 public LLUUID itemID; 51 public UUID itemID;
52 //public double interval; 52 //public double interval;
53 public long interval; 53 public long interval;
54 //public DateTime next; 54 //public DateTime next;
@@ -58,7 +58,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
58 private List<TimerClass> Timers = new List<TimerClass>(); 58 private List<TimerClass> Timers = new List<TimerClass>();
59 private object TimerListLock = new object(); 59 private object TimerListLock = new object();
60 60
61 public void SetTimerEvent(uint m_localID, LLUUID m_itemID, double sec) 61 public void SetTimerEvent(uint m_localID, UUID m_itemID, double sec)
62 { 62 {
63 // Always remove first, in case this is a re-set 63 // Always remove first, in case this is a re-set
64 UnSetTimerEvents(m_localID, m_itemID); 64 UnSetTimerEvents(m_localID, m_itemID);
@@ -81,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
81 } 81 }
82 } 82 }
83 83
84 public void UnSetTimerEvents(uint m_localID, LLUUID m_itemID) 84 public void UnSetTimerEvents(uint m_localID, UUID m_itemID)
85 { 85 {
86 // Remove from timer 86 // Remove from timer
87 lock (TimerListLock) 87 lock (TimerListLock)
@@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
122 } 122 }
123 } 123 }
124 124
125 public Object[] GetSerializationData(LLUUID itemID) 125 public Object[] GetSerializationData(UUID itemID)
126 { 126 {
127 List<Object> data = new List<Object>(); 127 List<Object> data = new List<Object>();
128 128
@@ -140,7 +140,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
140 return data.ToArray(); 140 return data.ToArray();
141 } 141 }
142 142
143 public void CreateFromData(uint localID, LLUUID itemID, LLUUID objectID, 143 public void CreateFromData(uint localID, UUID itemID, UUID objectID,
144 Object[] data) 144 Object[] data)
145 { 145 {
146 int idx = 0; 146 int idx = 0;
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
index 45f92e3..57efb2e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSConverter.cs
@@ -118,7 +118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
118 //System.Console.WriteLine("SCRIPT:" + checkscript); 118 //System.Console.WriteLine("SCRIPT:" + checkscript);
119 119
120 // checks for alpha.alpha way of referring to objects in C# 120 // checks for alpha.alpha way of referring to objects in C#
121 // ignores alpha.x alpha.y, alpha.z for refering to vector components 121 // ignores alpha.X alpha.Y, alpha.Z for refering to vector components
122 Match SecurityM; 122 Match SecurityM;
123 123
124 // BROKEN: this check is very wrong. It block's any url in strings. 124 // BROKEN: this check is very wrong. It block's any url in strings.
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
index d3222e7..8599e06 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs
@@ -31,7 +31,7 @@ using System.Threading;
31using System.Collections; 31using System.Collections;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Runtime.Serialization; 33using System.Runtime.Serialization;
34using libsecondlife; 34using OpenMetaverse;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment; 36using OpenSim.Region.Environment;
37using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
@@ -70,24 +70,24 @@ namespace OpenSim.Region.ScriptEngine.Shared
70 { 70 {
71 public DetectParams() 71 public DetectParams()
72 { 72 {
73 Key = LLUUID.Zero; 73 Key = UUID.Zero;
74 OffsetPos = new LSL_Types.Vector3(); 74 OffsetPos = new LSL_Types.Vector3();
75 LinkNum = 0; 75 LinkNum = 0;
76 Group = LLUUID.Zero; 76 Group = UUID.Zero;
77 Name = String.Empty; 77 Name = String.Empty;
78 Owner = LLUUID.Zero; 78 Owner = UUID.Zero;
79 Position = new LSL_Types.Vector3(); 79 Position = new LSL_Types.Vector3();
80 Rotation = new LSL_Types.Quaternion(); 80 Rotation = new LSL_Types.Quaternion();
81 Type = 0; 81 Type = 0;
82 Velocity = new LSL_Types.Vector3(); 82 Velocity = new LSL_Types.Vector3();
83 } 83 }
84 84
85 public LLUUID Key; 85 public UUID Key;
86 public LSL_Types.Vector3 OffsetPos; 86 public LSL_Types.Vector3 OffsetPos;
87 public int LinkNum; 87 public int LinkNum;
88 public LLUUID Group; 88 public UUID Group;
89 public string Name; 89 public string Name;
90 public LLUUID Owner; 90 public UUID Owner;
91 public LSL_Types.Vector3 Position; 91 public LSL_Types.Vector3 Position;
92 public LSL_Types.Quaternion Rotation; 92 public LSL_Types.Quaternion Rotation;
93 public int Type; 93 public int Type;
@@ -109,17 +109,17 @@ namespace OpenSim.Region.ScriptEngine.Shared
109 presence.AbsolutePosition.Y, 109 presence.AbsolutePosition.Y,
110 presence.AbsolutePosition.Z); 110 presence.AbsolutePosition.Z);
111 Rotation = new LSL_Types.Quaternion( 111 Rotation = new LSL_Types.Quaternion(
112 presence.Rotation.x, 112 presence.Rotation.X,
113 presence.Rotation.y, 113 presence.Rotation.Y,
114 presence.Rotation.z, 114 presence.Rotation.Z,
115 presence.Rotation.w); 115 presence.Rotation.W);
116 Velocity = new LSL_Types.Vector3( 116 Velocity = new LSL_Types.Vector3(
117 presence.Velocity.X, 117 presence.Velocity.X,
118 presence.Velocity.Y, 118 presence.Velocity.Y,
119 presence.Velocity.Z); 119 presence.Velocity.Z);
120 120
121 Type = 0x01; // Avatar 121 Type = 0x01; // Avatar
122 if (presence.Velocity != LLVector3.Zero) 122 if (presence.Velocity != Vector3.Zero)
123 Type |= 0x02; // Active 123 Type |= 0x02; // Active
124 124
125 Group = presence.ControllingClient.ActiveGroupId; 125 Group = presence.ControllingClient.ActiveGroupId;
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
134 Group = part.GroupID; 134 Group = part.GroupID;
135 Name = part.Name; 135 Name = part.Name;
136 Owner = part.OwnerID; 136 Owner = part.OwnerID;
137 if (part.Velocity == LLVector3.Zero) 137 if (part.Velocity == Vector3.Zero)
138 Type = 0x04; // Passive 138 Type = 0x04; // Passive
139 else 139 else
140 Type = 0x02; // Passive 140 Type = 0x02; // Passive
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
152 part.AbsolutePosition.Y, 152 part.AbsolutePosition.Y,
153 part.AbsolutePosition.Z); 153 part.AbsolutePosition.Z);
154 154
155 LLQuaternion wr = part.GetWorldRotation(); 155 Quaternion wr = part.GetWorldRotation();
156 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W); 156 Rotation = new LSL_Types.Quaternion(wr.X, wr.Y, wr.Z, wr.W);
157 157
158 Velocity = new LSL_Types.Vector3(part.Velocity.X, 158 Velocity = new LSL_Types.Vector3(part.Velocity.X,
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index e3dd9e9..d35bfa8 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -56,12 +56,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
56 private IScriptWorkItem m_CurrentResult=null; 56 private IScriptWorkItem m_CurrentResult=null;
57 private Queue m_EventQueue = new Queue(32); 57 private Queue m_EventQueue = new Queue(32);
58 private bool m_RunEvents = false; 58 private bool m_RunEvents = false;
59 private LLUUID m_ItemID; 59 private UUID m_ItemID;
60 private uint m_LocalID; 60 private uint m_LocalID;
61 private LLUUID m_ObjectID; 61 private UUID m_ObjectID;
62 private LLUUID m_AssetID; 62 private UUID m_AssetID;
63 private IScript m_Script; 63 private IScript m_Script;
64 private LLUUID m_AppDomain; 64 private UUID m_AppDomain;
65 private DetectParams[] m_DetectParams; 65 private DetectParams[] m_DetectParams;
66 private bool m_TimerQueued; 66 private bool m_TimerQueued;
67 private DateTime m_EventStart; 67 private DateTime m_EventStart;
@@ -98,7 +98,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
98 get { return m_Engine; } 98 get { return m_Engine; }
99 } 99 }
100 100
101 public LLUUID AppDomain 101 public UUID AppDomain
102 { 102 {
103 get { return m_AppDomain; } 103 get { return m_AppDomain; }
104 set { m_AppDomain = value; } 104 set { m_AppDomain = value; }
@@ -114,12 +114,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
114 get { return m_ScriptName; } 114 get { return m_ScriptName; }
115 } 115 }
116 116
117 public LLUUID ItemID 117 public UUID ItemID
118 { 118 {
119 get { return m_ItemID; } 119 get { return m_ItemID; }
120 } 120 }
121 121
122 public LLUUID ObjectID 122 public UUID ObjectID
123 { 123 {
124 get { return m_ObjectID; } 124 get { return m_ObjectID; }
125 } 125 }
@@ -129,7 +129,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
129 get { return m_LocalID; } 129 get { return m_LocalID; }
130 } 130 }
131 131
132 public LLUUID AssetID 132 public UUID AssetID
133 { 133 {
134 get { return m_AssetID; } 134 get { return m_AssetID; }
135 } 135 }
@@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
152 } 152 }
153 153
154 public ScriptInstance(IScriptEngine engine, uint localID, 154 public ScriptInstance(IScriptEngine engine, uint localID,
155 LLUUID objectID, LLUUID itemID, LLUUID assetID, string assembly, 155 UUID objectID, UUID itemID, UUID assetID, string assembly,
156 AppDomain dom, string primName, string scriptName, 156 AppDomain dom, string primName, string scriptName,
157 int startParam, bool postOnRez, StateSource stateSource, 157 int startParam, bool postOnRez, StateSource stateSource,
158 int maxScriptQueue) 158 int maxScriptQueue)
@@ -520,7 +520,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
520 string text = "Runtime error:\n" + e.InnerException.ToString(); 520 string text = "Runtime error:\n" + e.InnerException.ToString();
521 if (text.Length > 1000) 521 if (text.Length > 1000)
522 text = text.Substring(0, 1000); 522 text = text.Substring(0, 1000);
523 m_Engine.World.SimChat(Helpers.StringToField(text), 523 m_Engine.World.SimChat(Utils.StringToBytes(text),
524 ChatTypeEnum.DebugChannel, 2147483647, 524 ChatTypeEnum.DebugChannel, 2147483647,
525 part.AbsolutePosition, 525 part.AbsolutePosition,
526 part.Name, part.UUID, false); 526 part.Name, part.UUID, false);
@@ -581,7 +581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
581 Stop(0); 581 Stop(0);
582 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 582 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
583 part.GetInventoryItem(m_ItemID).PermsMask = 0; 583 part.GetInventoryItem(m_ItemID).PermsMask = 0;
584 part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; 584 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
585 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 585 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
586 async.RemoveScript(m_LocalID, m_ItemID); 586 async.RemoveScript(m_LocalID, m_ItemID);
587 m_EventQueue.Clear(); 587 m_EventQueue.Clear();
@@ -602,7 +602,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
602 m_Script.ResetVars(); 602 m_Script.ResetVars();
603 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID); 603 SceneObjectPart part=m_Engine.World.GetSceneObjectPart(m_LocalID);
604 part.GetInventoryItem(m_ItemID).PermsMask = 0; 604 part.GetInventoryItem(m_ItemID).PermsMask = 0;
605 part.GetInventoryItem(m_ItemID).PermsGranter = LLUUID.Zero; 605 part.GetInventoryItem(m_ItemID).PermsGranter = UUID.Zero;
606 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands; 606 AsyncCommandManager async = (AsyncCommandManager)m_Engine.AsyncCommands;
607 async.RemoveScript(m_LocalID, m_ItemID); 607 async.RemoveScript(m_LocalID, m_ItemID);
608 if (m_CurrentEvent != "state_entry") 608 if (m_CurrentEvent != "state_entry")
@@ -630,10 +630,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
630 return m_DetectParams[idx]; 630 return m_DetectParams[idx];
631 } 631 }
632 632
633 public LLUUID GetDetectID(int idx) 633 public UUID GetDetectID(int idx)
634 { 634 {
635 if (idx < 0 || idx >= m_DetectParams.Length) 635 if (idx < 0 || idx >= m_DetectParams.Length)
636 return LLUUID.Zero; 636 return UUID.Zero;
637 637
638 return m_DetectParams[idx].Key; 638 return m_DetectParams[idx].Key;
639 } 639 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
index ba003c5..bc9b174 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptSerializer.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -264,9 +264,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
264 new LSL_Types.Vector3(vect); 264 new LSL_Types.Vector3(vect);
265 265
266 int d_linkNum=0; 266 int d_linkNum=0;
267 LLUUID d_group = LLUUID.Zero; 267 UUID d_group = UUID.Zero;
268 string d_name = String.Empty; 268 string d_name = String.Empty;
269 LLUUID d_owner = LLUUID.Zero; 269 UUID d_owner = UUID.Zero;
270 LSL_Types.Vector3 d_position = 270 LSL_Types.Vector3 d_position =
271 new LSL_Types.Vector3(); 271 new LSL_Types.Vector3();
272 LSL_Types.Quaternion d_rotation = 272 LSL_Types.Quaternion d_rotation =
@@ -285,14 +285,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
285 285
286 tmp = det.Attributes.GetNamedItem( 286 tmp = det.Attributes.GetNamedItem(
287 "group").Value; 287 "group").Value;
288 LLUUID.TryParse(tmp, out d_group); 288 UUID.TryParse(tmp, out d_group);
289 289
290 d_name = det.Attributes.GetNamedItem( 290 d_name = det.Attributes.GetNamedItem(
291 "name").Value; 291 "name").Value;
292 292
293 tmp = det.Attributes.GetNamedItem( 293 tmp = det.Attributes.GetNamedItem(
294 "owner").Value; 294 "owner").Value;
295 LLUUID.TryParse(tmp, out d_owner); 295 UUID.TryParse(tmp, out d_owner);
296 296
297 tmp = det.Attributes.GetNamedItem( 297 tmp = det.Attributes.GetNamedItem(
298 "position").Value; 298 "position").Value;
@@ -318,8 +318,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
318 { 318 {
319 } 319 }
320 320
321 LLUUID uuid = new LLUUID(); 321 UUID uuid = new UUID();
322 LLUUID.TryParse(det.InnerText, 322 UUID.TryParse(det.InnerText,
323 out uuid); 323 out uuid);
324 324
325 DetectParams d = new DetectParams(); 325 DetectParams d = new DetectParams();
@@ -427,10 +427,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
427 if (itemType == "list") 427 if (itemType == "list")
428 return ReadList(tag); 428 return ReadList(tag);
429 429
430 if (itemType == "libsecondlife.LLUUID") 430 if (itemType == "libsecondlife.UUID")
431 { 431 {
432 LLUUID val = new LLUUID(); 432 UUID val = new UUID();
433 LLUUID.TryParse(tag.InnerText, out val); 433 UUID.TryParse(tag.InnerText, out val);
434 434
435 return val; 435 return val;
436 } 436 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
index 4713283..3820dae 100644
--- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -123,7 +123,7 @@ namespace OpenSim.Region.ScriptEngine.Shared
123 123
124 Vector3 vector = (Vector3)o; 124 Vector3 vector = (Vector3)o;
125 125
126 return (x == vector.x && x == vector.x && z == vector.z); 126 return (x == vector.x && y == vector.y && z == vector.z);
127 } 127 }
128 128
129 public static Vector3 operator -(Vector3 vector) 129 public static Vector3 operator -(Vector3 vector)
diff --git a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
index d431286..22abd79 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/EventManager.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney; 33using OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney;
34using OpenSim.Region.Interfaces; 34using OpenSim.Region.Interfaces;
@@ -36,7 +36,6 @@ using OpenSim.Region.Environment.Scenes;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.ScriptEngine.Shared; 37using OpenSim.Region.ScriptEngine.Shared;
38using OpenSim.Region.ScriptEngine.Interfaces; 38using OpenSim.Region.ScriptEngine.Interfaces;
39using Axiom.Math;
40 39
41namespace OpenSim.Region.ScriptEngine.XEngine 40namespace OpenSim.Region.ScriptEngine.XEngine
42{ 41{
@@ -68,7 +67,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
68 } 67 }
69 } 68 }
70 69
71 private void HandleObjectPaid(LLUUID objectID, LLUUID agentID, 70 private void HandleObjectPaid(UUID objectID, UUID agentID,
72 int amount) 71 int amount)
73 { 72 {
74 SceneObjectPart part = 73 SceneObjectPart part =
@@ -80,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
80 } 79 }
81 } 80 }
82 81
83 public void touch_start(uint localID, uint originalID, LLVector3 offsetPos, 82 public void touch_start(uint localID, uint originalID, Vector3 offsetPos,
84 IClientAPI remoteClient) 83 IClientAPI remoteClient)
85 { 84 {
86 // Add to queue for all scripts in ObjectID object 85 // Add to queue for all scripts in ObjectID object
@@ -108,7 +107,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
108 det)); 107 det));
109 } 108 }
110 109
111 public void touch(uint localID, uint originalID, LLVector3 offsetPos, 110 public void touch(uint localID, uint originalID, Vector3 offsetPos,
112 IClientAPI remoteClient) 111 IClientAPI remoteClient)
113 { 112 {
114 // Add to queue for all scripts in ObjectID object 113 // Add to queue for all scripts in ObjectID object
@@ -177,7 +176,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
177 // state_entry: not processed here 176 // state_entry: not processed here
178 // state_exit: not processed here 177 // state_exit: not processed here
179 178
180 public void money(uint localID, LLUUID agentID, int amount) 179 public void money(uint localID, UUID agentID, int amount)
181 { 180 {
182 myScriptEngine.PostObjectEvent(localID, new EventParams( 181 myScriptEngine.PostObjectEvent(localID, new EventParams(
183 "money", new object[] { 182 "money", new object[] {
@@ -242,7 +241,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
242 det.ToArray())); 241 det.ToArray()));
243 } 242 }
244 243
245 public void land_collision_start(uint localID, LLUUID itemID) 244 public void land_collision_start(uint localID, UUID itemID)
246 { 245 {
247 myScriptEngine.PostObjectEvent(localID, new EventParams( 246 myScriptEngine.PostObjectEvent(localID, new EventParams(
248 "land_collision_start", 247 "land_collision_start",
@@ -250,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
250 new DetectParams[0])); 249 new DetectParams[0]));
251 } 250 }
252 251
253 public void land_collision(uint localID, LLUUID itemID) 252 public void land_collision(uint localID, UUID itemID)
254 { 253 {
255 myScriptEngine.PostObjectEvent(localID, new EventParams( 254 myScriptEngine.PostObjectEvent(localID, new EventParams(
256 "land_collision", 255 "land_collision",
@@ -258,7 +257,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
258 new DetectParams[0])); 257 new DetectParams[0]));
259 } 258 }
260 259
261 public void land_collision_end(uint localID, LLUUID itemID) 260 public void land_collision_end(uint localID, UUID itemID)
262 { 261 {
263 myScriptEngine.PostObjectEvent(localID, new EventParams( 262 myScriptEngine.PostObjectEvent(localID, new EventParams(
264 "land_collision_end", 263 "land_collision_end",
@@ -269,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
269 // timer: not handled here 268 // timer: not handled here
270 // listen: not handled here 269 // listen: not handled here
271 270
272 public void control(uint localID, LLUUID itemID, LLUUID agentID, uint held, uint change) 271 public void control(uint localID, UUID itemID, UUID agentID, uint held, uint change)
273 { 272 {
274 myScriptEngine.PostObjectEvent(localID, new EventParams( 273 myScriptEngine.PostObjectEvent(localID, new EventParams(
275 "control",new object[] { 274 "control",new object[] {
@@ -279,7 +278,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
279 new DetectParams[0])); 278 new DetectParams[0]));
280 } 279 }
281 280
282 public void email(uint localID, LLUUID itemID, string timeSent, 281 public void email(uint localID, UUID itemID, string timeSent,
283 string address, string subject, string message, int numLeft) 282 string address, string subject, string message, int numLeft)
284 { 283 {
285 myScriptEngine.PostObjectEvent(localID, new EventParams( 284 myScriptEngine.PostObjectEvent(localID, new EventParams(
@@ -292,8 +291,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
292 new DetectParams[0])); 291 new DetectParams[0]));
293 } 292 }
294 293
295 public void at_target(uint localID, uint handle, LLVector3 targetpos, 294 public void at_target(uint localID, uint handle, Vector3 targetpos,
296 LLVector3 atpos) 295 Vector3 atpos)
297 { 296 {
298 myScriptEngine.PostObjectEvent(localID, new EventParams( 297 myScriptEngine.PostObjectEvent(localID, new EventParams(
299 "at_target", new object[] { 298 "at_target", new object[] {
@@ -310,14 +309,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
310 new DetectParams[0])); 309 new DetectParams[0]));
311 } 310 }
312 311
313 public void at_rot_target(uint localID, LLUUID itemID) 312 public void at_rot_target(uint localID, UUID itemID)
314 { 313 {
315 myScriptEngine.PostObjectEvent(localID, new EventParams( 314 myScriptEngine.PostObjectEvent(localID, new EventParams(
316 "at_rot_target",new object[0], 315 "at_rot_target",new object[0],
317 new DetectParams[0])); 316 new DetectParams[0]));
318 } 317 }
319 318
320 public void not_at_rot_target(uint localID, LLUUID itemID) 319 public void not_at_rot_target(uint localID, UUID itemID)
321 { 320 {
322 myScriptEngine.PostObjectEvent(localID, new EventParams( 321 myScriptEngine.PostObjectEvent(localID, new EventParams(
323 "not_at_rot_target",new object[0], 322 "not_at_rot_target",new object[0],
@@ -326,7 +325,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
326 325
327 // run_time_permissions: not handled here 326 // run_time_permissions: not handled here
328 327
329 public void attach(uint localID, LLUUID itemID, LLUUID avatar) 328 public void attach(uint localID, UUID itemID, UUID avatar)
330 { 329 {
331 myScriptEngine.PostObjectEvent(localID, new EventParams( 330 myScriptEngine.PostObjectEvent(localID, new EventParams(
332 "attach",new object[] { 331 "attach",new object[] {
@@ -337,14 +336,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine
337 // dataserver: not handled here 336 // dataserver: not handled here
338 // link_message: not handled here 337 // link_message: not handled here
339 338
340 public void moving_start(uint localID, LLUUID itemID) 339 public void moving_start(uint localID, UUID itemID)
341 { 340 {
342 myScriptEngine.PostObjectEvent(localID, new EventParams( 341 myScriptEngine.PostObjectEvent(localID, new EventParams(
343 "moving_start",new object[0], 342 "moving_start",new object[0],
344 new DetectParams[0])); 343 new DetectParams[0]));
345 } 344 }
346 345
347 public void moving_end(uint localID, LLUUID itemID) 346 public void moving_end(uint localID, UUID itemID)
348 { 347 {
349 myScriptEngine.PostObjectEvent(localID, new EventParams( 348 myScriptEngine.PostObjectEvent(localID, new EventParams(
350 "moving_end",new object[0], 349 "moving_end",new object[0],
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index 8ad8110..485531d 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -34,7 +34,7 @@ using System.Security.Policy;
34using System.Reflection; 34using System.Reflection;
35using System.Globalization; 35using System.Globalization;
36using System.Xml; 36using System.Xml;
37using libsecondlife; 37using OpenMetaverse;
38using log4net; 38using log4net;
39using Nini.Config; 39using Nini.Config;
40using Amib.Threading; 40using Amib.Threading;
@@ -76,28 +76,28 @@ namespace OpenSim.Region.ScriptEngine.XEngine
76 76
77 // Maps the local id to the script inventory items in it 77 // Maps the local id to the script inventory items in it
78 78
79 private Dictionary<uint, List<LLUUID> > m_PrimObjects = 79 private Dictionary<uint, List<UUID> > m_PrimObjects =
80 new Dictionary<uint, List<LLUUID> >(); 80 new Dictionary<uint, List<UUID> >();
81 81
82 // Maps the LLUUID above to the script instance 82 // Maps the UUID above to the script instance
83 83
84 private Dictionary<LLUUID, IScriptInstance> m_Scripts = 84 private Dictionary<UUID, IScriptInstance> m_Scripts =
85 new Dictionary<LLUUID, IScriptInstance>(); 85 new Dictionary<UUID, IScriptInstance>();
86 86
87 // Maps the asset ID to the assembly 87 // Maps the asset ID to the assembly
88 88
89 private Dictionary<LLUUID, string> m_Assemblies = 89 private Dictionary<UUID, string> m_Assemblies =
90 new Dictionary<LLUUID, string>(); 90 new Dictionary<UUID, string>();
91 91
92 // This will list AppDomains by script asset 92 // This will list AppDomains by script asset
93 93
94 private Dictionary<LLUUID, AppDomain> m_AppDomains = 94 private Dictionary<UUID, AppDomain> m_AppDomains =
95 new Dictionary<LLUUID, AppDomain>(); 95 new Dictionary<UUID, AppDomain>();
96 96
97 // List the scripts running in each appdomain 97 // List the scripts running in each appdomain
98 98
99 private Dictionary<LLUUID, List<LLUUID> > m_DomainScripts = 99 private Dictionary<UUID, List<UUID> > m_DomainScripts =
100 new Dictionary<LLUUID, List<LLUUID> >(); 100 new Dictionary<UUID, List<UUID> >();
101 101
102 private Queue m_CompileQueue = new Queue(100); 102 private Queue m_CompileQueue = new Queue(100);
103 IWorkItemResult m_CurrentCompile = null; 103 IWorkItemResult m_CurrentCompile = null;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
125 // private struct RezScriptParms 125 // private struct RezScriptParms
126 // { 126 // {
127 // uint LocalID; 127 // uint LocalID;
128 // LLUUID ItemID; 128 // UUID ItemID;
129 // string Script; 129 // string Script;
130 // } 130 // }
131 131
@@ -314,7 +314,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
314 get { return false; } 314 get { return false; }
315 } 315 }
316 316
317 public void OnRezScript(uint localID, LLUUID itemID, string script, int startParam, bool postOnRez) 317 public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez)
318 { 318 {
319 Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez}; 319 Object[] parms = new Object[]{localID, itemID, script, startParam, postOnRez};
320 320
@@ -395,7 +395,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
395 { 395 {
396 Object[] p = (Object[])parm; 396 Object[] p = (Object[])parm;
397 uint localID = (uint)p[0]; 397 uint localID = (uint)p[0];
398 LLUUID itemID = (LLUUID)p[1]; 398 UUID itemID = (UUID)p[1];
399 string script =(string)p[2]; 399 string script =(string)p[2];
400 int startParam = (int)p[3]; 400 int startParam = (int)p[3];
401 bool postOnRez = (bool)p[4]; 401 bool postOnRez = (bool)p[4];
@@ -411,7 +411,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
411 if (item == null) 411 if (item == null)
412 return false; 412 return false;
413 413
414 LLUUID assetID = item.AssetID; 414 UUID assetID = item.AssetID;
415 415
416// m_log.DebugFormat("[XEngine] Compiling script {0} ({1})", 416// m_log.DebugFormat("[XEngine] Compiling script {0} ({1})",
417// item.Name, itemID.ToString()); 417// item.Name, itemID.ToString());
@@ -430,7 +430,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
430 string text = "Error compiling script:\r\n" + e.Message.ToString(); 430 string text = "Error compiling script:\r\n" + e.Message.ToString();
431 if (text.Length > 1000) 431 if (text.Length > 1000)
432 text = text.Substring(0, 1000); 432 text = text.Substring(0, 1000);
433 World.SimChat(Helpers.StringToField(text), 433 World.SimChat(Utils.StringToBytes(text),
434 ChatTypeEnum.DebugChannel, 2147483647, 434 ChatTypeEnum.DebugChannel, 2147483647,
435 part.AbsolutePosition, 435 part.AbsolutePosition,
436 part.Name, part.UUID, false); 436 part.Name, part.UUID, false);
@@ -455,7 +455,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
455 if ((!m_Scripts.ContainsKey(itemID)) || 455 if ((!m_Scripts.ContainsKey(itemID)) ||
456 (m_Scripts[itemID].AssetID != assetID)) 456 (m_Scripts[itemID].AssetID != assetID))
457 { 457 {
458 LLUUID appDomain = assetID; 458 UUID appDomain = assetID;
459 459
460 if (part.ParentGroup.RootPart.IsAttachment) 460 if (part.ParentGroup.RootPart.IsAttachment)
461 appDomain = part.ParentGroup.RootPart.UUID; 461 appDomain = part.ParentGroup.RootPart.UUID;
@@ -480,7 +480,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
480 m_AppDomains[appDomain].AssemblyResolve += 480 m_AppDomains[appDomain].AssemblyResolve +=
481 new ResolveEventHandler( 481 new ResolveEventHandler(
482 AssemblyResolver.OnAssemblyResolve); 482 AssemblyResolver.OnAssemblyResolve);
483 m_DomainScripts[appDomain] = new List<LLUUID>(); 483 m_DomainScripts[appDomain] = new List<UUID>();
484 } 484 }
485 catch (Exception e) 485 catch (Exception e)
486 { 486 {
@@ -507,7 +507,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
507 } 507 }
508 508
509 if (!m_PrimObjects.ContainsKey(localID)) 509 if (!m_PrimObjects.ContainsKey(localID))
510 m_PrimObjects[localID] = new List<LLUUID>(); 510 m_PrimObjects[localID] = new List<UUID>();
511 511
512 if (!m_PrimObjects[localID].Contains(itemID)) 512 if (!m_PrimObjects[localID].Contains(itemID))
513 m_PrimObjects[localID].Add(itemID); 513 m_PrimObjects[localID].Add(itemID);
@@ -518,7 +518,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
518 return true; 518 return true;
519 } 519 }
520 520
521 public void OnRemoveScript(uint localID, LLUUID itemID) 521 public void OnRemoveScript(uint localID, UUID itemID)
522 { 522 {
523 lock (m_Scripts) 523 lock (m_Scripts)
524 { 524 {
@@ -569,24 +569,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine
569 } 569 }
570 } 570 }
571 571
572 public void OnScriptReset(uint localID, LLUUID itemID) 572 public void OnScriptReset(uint localID, UUID itemID)
573 { 573 {
574 ResetScript(itemID); 574 ResetScript(itemID);
575 } 575 }
576 576
577 public void OnStartScript(uint localID, LLUUID itemID) 577 public void OnStartScript(uint localID, UUID itemID)
578 { 578 {
579 StartScript(itemID); 579 StartScript(itemID);
580 } 580 }
581 581
582 public void OnStopScript(uint localID, LLUUID itemID) 582 public void OnStopScript(uint localID, UUID itemID)
583 { 583 {
584 StopScript(itemID); 584 StopScript(itemID);
585 } 585 }
586 586
587 private void CleanAssemblies() 587 private void CleanAssemblies()
588 { 588 {
589 List<LLUUID> assetIDList = new List<LLUUID>(m_Assemblies.Keys); 589 List<UUID> assetIDList = new List<UUID>(m_Assemblies.Keys);
590 590
591 foreach (IScriptInstance i in m_Scripts.Values) 591 foreach (IScriptInstance i in m_Scripts.Values)
592 { 592 {
@@ -594,7 +594,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
594 assetIDList.Remove(i.AssetID); 594 assetIDList.Remove(i.AssetID);
595 } 595 }
596 596
597 foreach (LLUUID assetID in assetIDList) 597 foreach (UUID assetID in assetIDList)
598 { 598 {
599// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]); 599// m_log.DebugFormat("[XEngine] Removing unreferenced assembly {0}", m_Assemblies[assetID]);
600 try 600 try
@@ -615,7 +615,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
615 } 615 }
616 } 616 }
617 617
618 private void UnloadAppDomain(LLUUID id) 618 private void UnloadAppDomain(UUID id)
619 { 619 {
620 if (m_AppDomains.ContainsKey(id)) 620 if (m_AppDomains.ContainsKey(id))
621 { 621 {
@@ -681,7 +681,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
681 if (!m_PrimObjects.ContainsKey(localID)) 681 if (!m_PrimObjects.ContainsKey(localID))
682 return false; 682 return false;
683 683
684 foreach (LLUUID itemID in m_PrimObjects[localID]) 684 foreach (UUID itemID in m_PrimObjects[localID])
685 { 685 {
686 if (m_Scripts.ContainsKey(itemID)) 686 if (m_Scripts.ContainsKey(itemID))
687 { 687 {
@@ -699,7 +699,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
699 // 699 //
700 // Post an event to a single script 700 // Post an event to a single script
701 // 701 //
702 public bool PostScriptEvent(LLUUID itemID, EventParams p) 702 public bool PostScriptEvent(UUID itemID, EventParams p)
703 { 703 {
704 if (m_Scripts.ContainsKey(itemID)) 704 if (m_Scripts.ContainsKey(itemID))
705 { 705 {
@@ -737,7 +737,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
737 return null; 737 return null;
738 } 738 }
739 739
740 private IScriptInstance GetInstance(LLUUID itemID) 740 private IScriptInstance GetInstance(UUID itemID)
741 { 741 {
742 IScriptInstance instance; 742 IScriptInstance instance;
743 lock (m_Scripts) 743 lock (m_Scripts)
@@ -749,7 +749,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
749 return instance; 749 return instance;
750 } 750 }
751 751
752 public void SetScriptState(LLUUID itemID, bool running) 752 public void SetScriptState(UUID itemID, bool running)
753 { 753 {
754 IScriptInstance instance = GetInstance(itemID); 754 IScriptInstance instance = GetInstance(itemID);
755 if (instance != null) 755 if (instance != null)
@@ -761,7 +761,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
761 } 761 }
762 } 762 }
763 763
764 public bool GetScriptState(LLUUID itemID) 764 public bool GetScriptState(UUID itemID)
765 { 765 {
766 IScriptInstance instance = GetInstance(itemID); 766 IScriptInstance instance = GetInstance(itemID);
767 if (instance != null) 767 if (instance != null)
@@ -769,35 +769,35 @@ namespace OpenSim.Region.ScriptEngine.XEngine
769 return false; 769 return false;
770 } 770 }
771 771
772 public void ApiResetScript(LLUUID itemID) 772 public void ApiResetScript(UUID itemID)
773 { 773 {
774 IScriptInstance instance = GetInstance(itemID); 774 IScriptInstance instance = GetInstance(itemID);
775 if (instance != null) 775 if (instance != null)
776 instance.ApiResetScript(); 776 instance.ApiResetScript();
777 } 777 }
778 778
779 public void ResetScript(LLUUID itemID) 779 public void ResetScript(UUID itemID)
780 { 780 {
781 IScriptInstance instance = GetInstance(itemID); 781 IScriptInstance instance = GetInstance(itemID);
782 if (instance != null) 782 if (instance != null)
783 instance.ResetScript(); 783 instance.ResetScript();
784 } 784 }
785 785
786 public void StartScript(LLUUID itemID) 786 public void StartScript(UUID itemID)
787 { 787 {
788 IScriptInstance instance = GetInstance(itemID); 788 IScriptInstance instance = GetInstance(itemID);
789 if (instance != null) 789 if (instance != null)
790 instance.Start(); 790 instance.Start();
791 } 791 }
792 792
793 public void StopScript(LLUUID itemID) 793 public void StopScript(UUID itemID)
794 { 794 {
795 IScriptInstance instance = GetInstance(itemID); 795 IScriptInstance instance = GetInstance(itemID);
796 if (instance != null) 796 if (instance != null)
797 instance.Stop(0); 797 instance.Stop(0);
798 } 798 }
799 799
800 public DetectParams GetDetectParams(LLUUID itemID, int idx) 800 public DetectParams GetDetectParams(UUID itemID, int idx)
801 { 801 {
802 IScriptInstance instance = GetInstance(itemID); 802 IScriptInstance instance = GetInstance(itemID);
803 if (instance != null) 803 if (instance != null)
@@ -805,22 +805,22 @@ namespace OpenSim.Region.ScriptEngine.XEngine
805 return null; 805 return null;
806 } 806 }
807 807
808 public LLUUID GetDetectID(LLUUID itemID, int idx) 808 public UUID GetDetectID(UUID itemID, int idx)
809 { 809 {
810 IScriptInstance instance = GetInstance(itemID); 810 IScriptInstance instance = GetInstance(itemID);
811 if (instance != null) 811 if (instance != null)
812 return instance.GetDetectID(idx); 812 return instance.GetDetectID(idx);
813 return LLUUID.Zero; 813 return UUID.Zero;
814 } 814 }
815 815
816 public void SetState(LLUUID itemID, string newState) 816 public void SetState(UUID itemID, string newState)
817 { 817 {
818 IScriptInstance instance = GetInstance(itemID); 818 IScriptInstance instance = GetInstance(itemID);
819 if (instance == null) 819 if (instance == null)
820 return; 820 return;
821 instance.SetState(newState); 821 instance.SetState(newState);
822 } 822 }
823 public string GetState(LLUUID itemID) 823 public string GetState(UUID itemID)
824 { 824 {
825 IScriptInstance instance = GetInstance(itemID); 825 IScriptInstance instance = GetInstance(itemID);
826 if (instance == null) 826 if (instance == null)
@@ -828,7 +828,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
828 return instance.State; 828 return instance.State;
829 } 829 }
830 830
831 public int GetStartParameter(LLUUID itemID) 831 public int GetStartParameter(UUID itemID)
832 { 832 {
833 IScriptInstance instance = GetInstance(itemID); 833 IScriptInstance instance = GetInstance(itemID);
834 if (instance == null) 834 if (instance == null)
@@ -836,7 +836,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
836 return instance.StartParam; 836 return instance.StartParam;
837 } 837 }
838 838
839 public bool GetScriptRunning(LLUUID objectID, LLUUID itemID) 839 public bool GetScriptRunning(UUID objectID, UUID itemID)
840 { 840 {
841 return GetScriptState(itemID); 841 return GetScriptState(itemID);
842 } 842 }