public void PauseThread(ScriptThread thread) { ScriptThread actionThread = ((NativeObject)thread.GetObjectParameter(0)).Object as ScriptThread; if (actionThread == null) { DebugLogger.WriteLog((thread.Process.Url != null && thread.Process.Url != "" ? thread.Process.Url : "A script") + " called PauseThread with an invalid object.", LogAlertLevel.Error); return; } actionThread.Pause(thread.GetIntegerParameter(0)); }
public void LoadMapB(ScriptThread thread) { Engine.GlobalInstance.LoadMap(thread.GetStringParameter(0), ""); thread.Pause(0); // We just want to stop running until the map is loaded - This is a hackish way of doing that. }
public void Sleep(ScriptThread thread) { thread.Pause(thread.GetIntegerParameter(0)); }