Beispiel #1
0
        public static void Execute(World.Network.WorldClient client, string command)
        {
            var console = new ConsoleAPI(client);
            var api = Interop.PythonScripting.ScriptManager.GetConsoleAPI();
            api.Scope.SetVariable("self", client);
            api.Scope.SetVariable("console", console);

            api.DoMethod(command);

            api.Scope.RemoveVariable("console");
            api.Scope.RemoveVariable("self");
        }
Beispiel #2
0
        public static void Execute(World.Network.WorldClient client, string command)
        {
            var console = new ConsoleAPI(client);
            var api     = Interop.PythonScripting.ScriptManager.GetConsoleAPI();

            api.Scope.SetVariable("self", client);
            api.Scope.SetVariable("console", console);

            api.DoMethod(command);

            api.Scope.RemoveVariable("console");
            api.Scope.RemoveVariable("self");
        }