29 using System.Runtime.Remoting.Lifetime;
30 using System.Threading;
31 using System.Reflection;
32 using System.Collections;
33 using System.Collections.Generic;
34 using OpenSim.Framework;
35 using OpenSim.Region.Framework.Interfaces;
36 using OpenSim.Region.ScriptEngine.Interfaces;
37 using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
48 namespace OpenSim.
Region.ScriptEngine.Shared.ScriptBase
50 public partial class ScriptBaseClass : MarshalByRefObject
59 m_OSSL_Functions = (IOSSL_Api)api;
66 m_OSSL_Functions.osSetRegionWaterHeight(height);
71 m_OSSL_Functions.osSetRegionSunSettings(useEstateSun, sunFixed, sunHour);
76 m_OSSL_Functions.osSetEstateSunSettings(sunFixed, sunHour);
81 return m_OSSL_Functions.osGetCurrentSunHour();
86 return m_OSSL_Functions.osGetSunParam(param);
91 return m_OSSL_Functions.osSunGetParam(param);
96 m_OSSL_Functions.osSetSunParam(param, value);
101 m_OSSL_Functions.osSunSetParam(param, value);
106 return m_OSSL_Functions.osWindActiveModelPluginName();
111 m_OSSL_Functions.osSetWindParam(plugin, param, value);
116 return m_OSSL_Functions.osGetWindParam(plugin, param);
121 m_OSSL_Functions.osParcelJoin(pos1,pos2);
126 m_OSSL_Functions.osParcelSubdivide(pos1, pos2);
131 m_OSSL_Functions.osSetParcelDetails(pos, rules);
136 m_OSSL_Functions.osParcelSetDetails(pos,rules);
141 return m_OSSL_Functions.osList2Double(src, index);
147 return m_OSSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
153 return m_OSSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
157 int timer,
int alpha)
159 return m_OSSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
163 int timer,
int alpha)
165 return m_OSSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
169 bool blend,
int disp,
int timer,
int alpha,
int face)
171 return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
172 blend, disp, timer, alpha, face);
176 bool blend,
int disp,
int timer,
int alpha,
int face)
178 return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
179 blend, disp, timer, alpha, face);
184 return m_OSSL_Functions.osGetTerrainHeight(x, y);
189 return m_OSSL_Functions.osTerrainGetHeight(x, y);
194 return m_OSSL_Functions.osSetTerrainHeight(x, y, val);
199 return m_OSSL_Functions.osTerrainSetHeight(x, y, val);
204 m_OSSL_Functions.osTerrainFlush();
209 return m_OSSL_Functions.osRegionRestart(seconds);
214 m_OSSL_Functions.osRegionNotice(msg);
219 return m_OSSL_Functions.osConsoleCommand(Command);
224 m_OSSL_Functions.osSetParcelMediaURL(url);
229 m_OSSL_Functions.osSetParcelSIPAddress(SIPAddress);
234 m_OSSL_Functions.osSetPrimFloatOnWater(floatYN);
241 m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);
246 m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat);
251 m_OSSL_Functions.osTeleportAgent(agent, position, lookat);
256 m_OSSL_Functions.osTeleportOwner(regionName, position, lookat);
261 m_OSSL_Functions.osTeleportOwner(regionX, regionY, position, lookat);
266 m_OSSL_Functions.osTeleportOwner(position, lookat);
272 return m_OSSL_Functions.osGetAgentIP(agent);
277 return m_OSSL_Functions.osGetAgents();
284 m_OSSL_Functions.osAvatarPlayAnimation(avatar, animation);
289 m_OSSL_Functions.osAvatarStopAnimation(avatar, animation);
292 #region Attachment commands
296 m_OSSL_Functions.osForceAttachToAvatar(attachmentPoint);
301 m_OSSL_Functions.osForceAttachToAvatarFromInventory(itemName, attachmentPoint);
306 m_OSSL_Functions.osForceAttachToOtherAvatarFromInventory(rawAvatarId, itemName, attachmentPoint);
311 m_OSSL_Functions.osForceDetachFromAvatar();
316 return m_OSSL_Functions.osGetNumberOfAttachments(avatar, attachmentPoints);
321 m_OSSL_Functions.osMessageAttachments(avatar, message, attachmentPoints, flags);
330 return m_OSSL_Functions.osMovePen(drawList, x, y);
333 public string osDrawLine(
string drawList,
int startX,
int startY,
int endX,
int endY)
335 return m_OSSL_Functions.osDrawLine(drawList, startX, startY, endX, endY);
338 public string osDrawLine(
string drawList,
int endX,
int endY)
340 return m_OSSL_Functions.osDrawLine(drawList, endX, endY);
345 return m_OSSL_Functions.osDrawText(drawList, text);
350 return m_OSSL_Functions.osDrawEllipse(drawList, width, height);
355 return m_OSSL_Functions.osDrawRectangle(drawList, width, height);
360 return m_OSSL_Functions.osDrawFilledRectangle(drawList, width, height);
365 return m_OSSL_Functions.osDrawPolygon(drawList, x, y);
370 return m_OSSL_Functions.osDrawFilledPolygon(drawList, x, y);
375 return m_OSSL_Functions.osSetFontSize(drawList, fontSize);
380 return m_OSSL_Functions.osSetFontName(drawList, fontName);
385 return m_OSSL_Functions.osSetPenSize(drawList, penSize);
388 public string osSetPenCap(
string drawList,
string direction,
string type)
390 return m_OSSL_Functions.osSetPenCap(drawList, direction, type);
395 return m_OSSL_Functions.osSetPenColor(drawList, color);
400 return m_OSSL_Functions.osSetPenColour(drawList, colour);
403 public string osDrawImage(
string drawList,
int width,
int height,
string imageUrl)
405 return m_OSSL_Functions.osDrawImage(drawList, width, height, imageUrl);
410 return m_OSSL_Functions.osGetDrawStringSize(contentType, text, fontName, fontSize);
415 m_OSSL_Functions.osSetStateEvents(events);
420 return m_OSSL_Functions.osGetScriptEngineName();
425 return m_OSSL_Functions.osCheckODE();
430 return m_OSSL_Functions.osGetPhysicsEngineType();
435 return m_OSSL_Functions.osGetSimulatorVersion();
440 return m_OSSL_Functions.osParseJSON(JSON);
445 return m_OSSL_Functions.osParseJSONNew(JSON);
450 m_OSSL_Functions.osMessageObject(objectUUID,message);
455 m_OSSL_Functions.osMakeNotecard(notecardName, contents);
460 return m_OSSL_Functions.osGetNotecardLine(name, line);
465 return m_OSSL_Functions.osGetNotecard(name);
470 return m_OSSL_Functions.osGetNumberOfNotecardLines(name);
475 return m_OSSL_Functions.osAvatarName2Key(firstname, lastname);
480 return m_OSSL_Functions.osKey2Name(id);
485 return m_OSSL_Functions.osGetGridNick();
490 return m_OSSL_Functions.osGetGridName();
495 return m_OSSL_Functions.osGetGridLoginURI();
500 return m_OSSL_Functions.osGetGridHomeURI();
505 return m_OSSL_Functions.osGetGridGatekeeperURI();
510 return m_OSSL_Functions.osGetGridCustom(
key);
515 return m_OSSL_Functions.osGetAvatarHomeURI(uuid);
520 return m_OSSL_Functions.osFormatString(str, strings);
525 return m_OSSL_Functions.osMatchString(src, pattern, start);
530 return m_OSSL_Functions.osReplaceString(src,pattern,replace,count,start);
537 return m_OSSL_Functions.osLoadedCreationDate();
542 return m_OSSL_Functions.osLoadedCreationTime();
547 return m_OSSL_Functions.osLoadedCreationID();
552 return m_OSSL_Functions.osGetLinkPrimitiveParams(linknumber, rules);
557 m_OSSL_Functions.osForceCreateLink(target, parent);
562 m_OSSL_Functions.osForceBreakLink(linknum);
567 m_OSSL_Functions.osForceBreakAllLinks();
572 return m_OSSL_Functions.osIsNpc(npc);
577 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom);
582 return m_OSSL_Functions.osNpcCreate(user, name, position, cloneFrom,
options);
587 return m_OSSL_Functions.osNpcSaveAppearance(npc, notecard);
592 m_OSSL_Functions.osNpcLoadAppearance(npc, notecard);
597 return m_OSSL_Functions.osNpcGetOwner(npc);
602 return m_OSSL_Functions.osNpcGetPos(npc);
607 m_OSSL_Functions.osNpcMoveTo(npc, position);
612 m_OSSL_Functions.osNpcMoveToTarget(npc, target,
options);
617 return m_OSSL_Functions.osNpcGetRot(npc);
622 m_OSSL_Functions.osNpcSetRot(npc, rot);
627 m_OSSL_Functions.osNpcStopMoveToTarget(npc);
632 m_OSSL_Functions.osNpcSay(npc, message);
637 m_OSSL_Functions.osNpcSay(npc, channel, message);
643 m_OSSL_Functions.osNpcShout(npc, channel, message);
648 m_OSSL_Functions.osNpcSit(npc, target,
options);
653 m_OSSL_Functions.osNpcStand(npc);
658 m_OSSL_Functions.osNpcRemove(npc);
663 m_OSSL_Functions.osNpcPlayAnimation(npc, animation);
668 m_OSSL_Functions.osNpcStopAnimation(npc, animation);
673 m_OSSL_Functions.osNpcWhisper(npc, channel, message);
678 m_OSSL_Functions.osNpcTouch(npcLSL_Key, object_key, link_num);
683 return m_OSSL_Functions.osOwnerSaveAppearance(notecard);
688 return m_OSSL_Functions.osAgentSaveAppearance(agentId, notecard);
709 get {
return _text; }
713 OSSL.llSetText(_text.Text, _text.color, _text.alpha);
754 Position.z = Constants.RegionHeight;
880 return m_OSSL_Functions.osGetGender(rawAvatarId);
885 return m_OSSL_Functions.osGetMapTexture();
890 return m_OSSL_Functions.osGetRegionMapTexture(regionName);
895 return m_OSSL_Functions.osGetRegionStats();
900 return m_OSSL_Functions.osGetRegionSize();
910 return m_OSSL_Functions.osGetSimulatorMemory();
915 m_OSSL_Functions.osKickAvatar(FirstName, SurName, alert);
920 m_OSSL_Functions.osSetSpeed(UUID, SpeedModifier);
925 return m_OSSL_Functions.osGetHealth(avatar);
930 m_OSSL_Functions.osCauseDamage(avatar, damage);
935 m_OSSL_Functions.osCauseHealing(avatar, healing);
940 m_OSSL_Functions.osForceOtherSit(avatar);
945 m_OSSL_Functions.osForceOtherSit(avatar, target);
950 return m_OSSL_Functions.osGetPrimitiveParams(prim, rules);
955 m_OSSL_Functions.osSetPrimitiveParams(prim, rules);
960 m_OSSL_Functions.osSetProjectionParams(projection, texture, fov, focus, amb);
965 m_OSSL_Functions.osSetProjectionParams(prim, projection, texture, fov, focus, amb);
970 return m_OSSL_Functions.osGetAvatarList();
975 return m_OSSL_Functions.osUnixTimeToTimestamp(time);
980 return m_OSSL_Functions.osGetInventoryDesc(item);
985 return m_OSSL_Functions.osInviteToGroup(agentId);
990 return m_OSSL_Functions.osEjectFromGroup(agentId);
995 m_OSSL_Functions.osSetTerrainTexture(level, texture);
1000 m_OSSL_Functions.osSetTerrainTextureHeight(corner, low, high);
1005 return m_OSSL_Functions.osIsUUID(thing);
1010 return m_OSSL_Functions.osMin(a, b);
1015 return m_OSSL_Functions.osMax(a, b);
1020 return m_OSSL_Functions.osGetRezzingObject();
1025 m_OSSL_Functions.osSetContentType(id,type);
1030 m_OSSL_Functions.osDropAttachment();
1035 m_OSSL_Functions.osForceDropAttachment();
1040 m_OSSL_Functions.osDropAttachmentAt(pos, rot);
1045 m_OSSL_Functions.osForceDropAttachmentAt(pos, rot);
1050 return m_OSSL_Functions.osListenRegex(channelID, name, ID, msg, regexBitfield);
1055 return m_OSSL_Functions.osRegexIsMatch(input, pattern);
1060 return m_OSSL_Functions.osRequestURL(
options);
1065 return m_OSSL_Functions.osRequestSecureURL(
options);
void osMessageAttachments(LSL_Key avatar, string message, LSL_List attachmentPoints, int flags)
int osRegionRestart(double seconds)
void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour)
string osDrawLine(string drawList, int startX, int startY, int endX, int endY)
void osNpcPlayAnimation(LSL_Key npc, string animation)
OSSLPrim_Rotation(OSSLPrim _prim)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat LSL_Float
string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, int timer, int alpha)
LSL_Float osGetHealth(string avatar)
void osNpcWhisper(key npc, int channel, string message)
string osSetPenCap(string drawList, string direction, string type)
key osNpcSaveAppearance(key npc, string notecard)
LSL_List osGetAvatarList()
string osGetPhysicsEngineType()
IOSSL_Api m_OSSL_Functions
string osGetGridHomeURI()
LSL_String osUnixTimeToTimestamp(long time)
string osAvatarName2Key(string firstname, string lastname)
string osLoadedCreationID()
OpenSim.Region.ScriptEngine.Shared.LSL_Types.list LSL_List
void osForceOtherSit(string avatar)
string osDrawLine(string drawList, int endX, int endY)
void osKickAvatar(string FirstName, string SurName, string alert)
string osMovePen(string drawList, int x, int y)
void osSetTerrainTexture(int level, LSL_Key texture)
void osForceBreakLink(int linknum)
LSL_Key osOwnerSaveAppearance(string notecard)
LSL_Key osNpcGetOwner(LSL_Key npc)
Object osParseJSONNew(string JSON)
string osGetGridLoginURI()
LSL_String osRequestURL(LSL_List options)
void osSetWindParam(string plugin, string param, LSL_Float value)
string osGetAvatarHomeURI(string uuid)
string osWindActiveModelPluginName()
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger integer
LSL_String osFormatString(string str, LSL_List strings)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_Key
vector osNpcGetPos(LSL_Key npc)
string osKey2Name(string id)
LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
string osLoadedCreationDate()
string osDrawRectangle(string drawList, int width, int height)
void osParcelSubdivide(vector pos1, vector pos2)
void osTeleportOwner(string regionName, vector position, vector lookat)
string osGetGridCustom(string key)
void osSetTerrainTextureHeight(int corner, double low, double high)
void osSetContentType(LSL_Key id, string type)
LSL_Float osTerrainGetHeight(int x, int y)
void osNpcSay(key npc, string message)
OSSLPrim(ScriptBaseClass bc)
LSL_List osGetNumberOfAttachments(LSL_Key avatar, LSL_List attachmentPoints)
void osAvatarPlayAnimation(string avatar, string animation)
key osNpcCreate(string user, string name, vector position, key cloneFrom)
LSL_Key osAgentSaveAppearance(LSL_Key agentId, string notecard)
void osForceCreateLink(string target, int parent)
string osGetGender(LSL_Key rawAvatarId)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
void osNpcRemove(key npc)
void osForceDetachFromAvatar()
void osSetSpeed(string UUID, LSL_Float SpeedModifier)
LSL_List osMatchString(string src, string pattern, int start)
void osMakeNotecard(string notecardName, LSL_Types.list contents)
OSSLPrim_Rotation Rotation
void osForceBreakAllLinks()
void osNpcSetRot(key npc, rotation rot)
string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y)
void osForceDropAttachment()
LSL_String osGetInventoryDesc(string item)
string osSetPenColor(string drawList, string color)
void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
LSL_String osReplaceString(string src, string pattern, string replace, int count, int start)
void osSetEstateSunSettings(bool sunFixed, double sunHour)
LSL_String osRequestSecureURL(LSL_List options)
void osTeleportAgent(string agent, vector position, vector lookat)
string osDrawFilledRectangle(string drawList, int width, int height)
string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, bool blend, int disp, int timer, int alpha, int face)
LSL_Float osGetWindParam(string plugin, string param)
LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
string osDrawPolygon(string drawList, LSL_List x, LSL_List y)
string osSetFontSize(string drawList, int fontSize)
void osForceAttachToOtherAvatarFromInventory(string rawAvatarId, string itemName, int attachmentPoint)
void osSetParcelSIPAddress(string SIPAddress)
string osGetScriptEngineName()
void osNpcMoveTo(key npc, vector position)
void osSetParcelDetails(vector pos, LSL_List rules)
void ApiTypeOSSL(IScriptApi api)
double osList2Double(LSL_Types.list src, int index)
LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules)
void osNpcShout(key npc, int channel, string message)
LSL_Integer osInviteToGroup(LSL_Key agentId)
double osGetSunParam(string param)
void osDropAttachmentAt(vector pos, rotation rot)
key osNpcCreate(string user, string name, vector position, key cloneFrom, int options)
void osSetRegionWaterHeight(double height)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion rotation
void osSetSunParam(string param, double value)
string osSetFontName(string drawList, string fontName)
void osNpcStand(LSL_Key npc)
key osGetRegionMapTexture(string regionName)
void osNpcSay(key npc, int channel, string message)
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, bool blend, int disp, int timer, int alpha, int face)
void osCauseHealing(string avatar, double healing)
LSL_Float osMin(double a, double b)
double osSunGetParam(string param)
string osSetPenSize(string drawList, int penSize)
int osGetNumberOfNotecardLines(string name)
void osParcelJoin(vector pos1, vector pos2)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSL_Integer
rotation osNpcGetRot(key npc)
void osSetProjectionParams(LSL_Key prim, bool projection, LSL_Key texture, double fov, double focus, double amb)
Hashtable osParseJSON(string JSON)
LSL_Integer osRegexIsMatch(string input, string pattern)
LSL_Integer osIsNpc(LSL_Key npc)
void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num)
string osGetSimulatorVersion()
LSL_Float osGetTerrainHeight(int x, int y)
string osGetAgentIP(string agent)
LSL_Integer osSetTerrainHeight(int x, int y, double val)
double osGetCurrentSunHour()
void osCauseDamage(string avatar, double damage)
void osNpcStopMoveToTarget(LSL_Key npc)
void osForceAttachToAvatar(int attachmentPoint)
bool osConsoleCommand(string Command)
LSL_Key osGetRezzingObject()
void osNpcMoveToTarget(key npc, vector target, int options)
void osForceAttachToAvatarFromInventory(string itemName, int attachmentPoint)
string osSetPenColour(string drawList, string colour)
LSL_Integer osTerrainSetHeight(int x, int y, double val)
string osLoadedCreationTime()
string osGetNotecardLine(string name, int line)
string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer)
string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, int timer, int alpha)
LSL_Integer osGetSimulatorMemory()
Returns the amount of memory in use by the Simulator Daemon. Amount in bytes - if >= 4GB...
void osSetStateEvents(int events)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger LSLInteger
void osSunSetParam(string param, double value)
string osDrawImage(string drawList, int width, int height, string imageUrl)
vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize)
void osSetProjectionParams(bool projection, LSL_Key texture, double fov, double focus, double amb)
void osForceDropAttachmentAt(vector pos, rotation rot)
void osAvatarStopAnimation(string avatar, string animation)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString LSL_String
LSL_Integer osIsUUID(string thing)
void osNpcStopAnimation(LSL_Key npc, string animation)
void osNpcLoadAppearance(key npc, string notecard)
string osGetGridGatekeeperURI()
string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer)
string osGetNotecard(string name)
LSL_List osGetRegionStats()
OSSLPrim_Position Position
void osMessageObject(key objectUUID, string message)
void osParcelSetDetails(vector pos, LSL_List rules)
void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
void osRegionNotice(string msg)
OSSLPrim_Position(OSSLPrim _prim)
void osForceOtherSit(string avatar, string target)
LSL_Integer osEjectFromGroup(LSL_Key agentId)
void osTeleportOwner(int regionX, int regionY, vector position, vector lookat)
void osSetPrimFloatOnWater(int floatYN)
LSL_Float osMax(double a, double b)
void osSetParcelMediaURL(string url)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3 vector
void osNpcSit(LSL_Key npc, LSL_Key target, int options)
string osDrawText(string drawList, string text)
void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat)
string osDrawEllipse(string drawList, int width, int height)
void osTeleportOwner(vector position, vector lookat)