aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-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
14 files changed, 450 insertions, 427 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)