本文整理汇总了C#中Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的典型用法代码示例。如果您正苦于以下问题:C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的具体用法?C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString怎么用?C# Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类属于命名空间,在下文中一共展示了Universe.ScriptEngine.VirtualScript.LSL_Types.LSLString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: aaUpdateDatabase
public void aaUpdateDatabase (LSL_String key, LSL_String value, LSL_String token)
{
if (!ScriptProtection.CheckThreatLevel (ThreatLevel.Moderate, "aaUpdateDatabase", m_host, "AA", m_itemID))
return;
AssetConnector.UpdateLSLData (token.m_string, key.m_string, value.m_string);
}
示例2: osSetTerrainTexture
/// <summary>
/// Sets terrain estate texture
/// </summary>
/// <param name="level"></param>
/// <param name="texture"></param>
/// <returns></returns>
public void osSetTerrainTexture(int level, LSL_Key texture)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetParcelDetails", m_host, "OSSL", m_itemID))
return;
//Check to make sure that the script's owner is the estate manager/master
//World.Permissions.GenericEstatePermission(
if (World.Permissions.IsGod(m_host.OwnerID))
{
if (level < 0 || level > 3)
return;
UUID textureID = new UUID();
if (!UUID.TryParse(texture, out textureID))
return;
// estate module is required
IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
if (estate != null)
estate.setEstateTerrainBaseTexture(level, textureID);
}
}
示例3: osNpcStopAnimation
public void osNpcStopAnimation(LSL_Key npc, string animation)
{
if (!ScriptProtection.CheckThreatLevel (ThreatLevel.High, "osNpcStopAnimation", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse (npc.m_string, out npcId))
{
if (manager.CheckPermission (npcId, m_host.OwnerID))
osAvatarStopAnimation (npcId.ToString (), animation);
}
}
}
示例4: osNpcSit
public void osNpcSit(LSL_Key npc, LSL_Key target, int options)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcSit", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse (npc.m_string, out npcId))
{
if (!manager.CheckPermission (npcId, m_host.OwnerID))
return;
IScenePresence sp = World.GetScenePresence (npcId);
if (sp == null)
return;
var sitObjectID = UUID.Parse (target.m_string);
ISceneChildEntity child = World.GetSceneObjectPart (sitObjectID);
if (child == null)
//throw new Exception("Failed to find entity to sit on");
return;
sp.HandleAgentRequestSit (sp.ControllingClient, sitObjectID, new Vector3 (0,0,0));
}
}
}
示例5: osNpcSay
public void osNpcSay(LSL_Key npc, string message)
{
osNpcSay(npc, 0, message);
}
示例6: osNpcStopMoveToTarget
public void osNpcStopMoveToTarget(LSL_Key npc)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
//manager.StopMoveToTarget(npcId, World, m_host.OwnerID);
manager.StopMoving (npcId, m_host.OwnerID);
}
}
示例7: osNpcMoveTo
public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo", m_host, "OSSL", m_itemID))
return;
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (!UUID.TryParse(npc.m_string, out npcId))
return;
manager.WalkTo(npcId, pos.ToVector3(), m_host.OwnerID);
}
}
示例8: osNpcGetOwner
public LSL_Key osNpcGetOwner(LSL_Key npc)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osNpcGetOwner", m_host, "OSSL", m_itemID))
return "";
IBotManager manager = World.RequestModuleInterface<IBotManager>();
if (manager != null)
{
UUID npcId;
if (UUID.TryParse(npc.m_string, out npcId))
{
UUID owner = manager.GetOwner(npcId);
if (owner != UUID.Zero)
return new LSL_Key(owner.ToString());
return npc;
}
}
return new LSL_Key(UUID.Zero.ToString());
}
示例9: osSetPrimitiveParams
public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osSetPrimitiveParams", m_host, "OSSL", m_itemID))
return;
InitLSL();
m_LSL_Api.SetPrimitiveParamsEx(prim, rules);
}
示例10: osGetPrimitiveParams
public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osGetPrimitiveParams", m_host, "OSSL", m_itemID))
return new LSL_List();
InitLSL();
return m_LSL_Api.GetLinkPrimitiveParamsEx(prim, rules);
}
示例11: osKickAvatar
public void osKickAvatar(LSL_String FirstName, LSL_String SurName, LSL_String alert)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar", m_host, "OSSL", m_itemID))
return;
World.ForEachScenePresence(delegate(IScenePresence sp)
{
if (!sp.IsChildAgent &&
sp.Name == FirstName + " " + SurName)
{
// kick client...
sp.ControllingClient.Kick(alert);
// ...and close on our side
IEntityTransferModule transferModule =
sp.Scene.RequestModuleInterface<IEntityTransferModule>();
if (transferModule != null)
transferModule.IncomingCloseAgent(sp.Scene, sp.UUID);
}
});
}
示例12: osSetSpeed
public void osSetSpeed(LSL_Key UUID, LSL_Float SpeedModifier)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed", m_host, "OSSL", m_itemID))
return;
IScenePresence avatar = World.GetScenePresence(UUID);
if (avatar != null)
{
if (avatar.UUID != m_host.OwnerID)
{
//We need to make sure that they can do this then
if (!World.Permissions.IsGod(m_host.OwnerID))
return;
}
avatar.SpeedModifier = (float) SpeedModifier;
}
}
示例13: SaveAppearanceToNotecard
protected LSL_Key SaveAppearanceToNotecard(LSL_Key rawAvatarId, string notecard)
{
UUID avatarId;
if (!UUID.TryParse(rawAvatarId, out avatarId))
return new LSL_Key(UUID.Zero.ToString());
return SaveAppearanceToNotecard(avatarId, notecard);
}
示例14: osAgentSaveAppearance
public LSL_Key osAgentSaveAppearance(LSL_Key avatarId, string notecard)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.High, "osAgentSaveAppearance", m_host, "OSSL", m_itemID))
return new LSL_Key();
return SaveAppearanceToNotecard(avatarId, notecard);
}
示例15: osMessageObject
// send a message to to object identified by the given UUID, a script in the object must implement the dataserver function
// the dataserver function is passed the ID of the calling function and a string message
public void osMessageObject(LSL_Key objectUUID, string message)
{
if (!ScriptProtection.CheckThreatLevel(ThreatLevel.Low, "osMessageObject", m_host, "OSSL", m_itemID))
return;
object[] resobj = new object[] {new LSL_Key(m_host.UUID.ToString()), new LSL_Key(message)};
ISceneChildEntity sceneOP = World.GetSceneObjectPart(objectUUID);
m_ScriptEngine.PostObjectEvent(sceneOP.UUID, "dataserver", resobj);
}