diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 25ec92d18c..02d15118f7 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs @@ -76,6 +76,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces void SetScriptState(UUID itemID, bool state); bool GetScriptState(UUID itemID); + void SetState(UUID itemID, string newState); void ApiResetScript(UUID itemID); void ResetScript(UUID itemID); IConfig Config { get; } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index ac3dc13fff..83768467fd 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -1264,6 +1264,14 @@ namespace OpenSim.Region.ScriptEngine.XEngine return UUID.Zero; } + public void SetState(UUID itemID, string newState) + { + IScriptInstance instance = GetInstance(itemID); + if (instance == null) + return; + instance.SetState(newState); + } + public int GetStartParameter(UUID itemID) { IScriptInstance instance = GetInstance(itemID);