state("PaintTheTownRed") { byte BeneathLoads: "UnityPlayer.dll", 0x1A46258, 0xDA8, 0x18, 0xA8, 0x0; } startup { Assembly.Load(File.ReadAllBytes("Components/asl-help")).CreateInstance("Unity"); vars.Helper.GameName = "Paint the Town Red"; vars.Helper.LoadSceneManager = true; vars.Helper.AlertLoadless(); } init { vars.Helper.TryLoad = (Func)(mono => { var ls = mono["LoadingScreen"]; vars.Helper["Loads"] = ls.Make("Instance"); var gm = mono["GameManager"]; vars.Helper["LevelComplete"] = gm.Make("HasWon"); vars.Helper["HasNotFinishedLoadingNewLevel"] = gm.Make("HasNotFinishedLoadingNewLevel"); vars.Helper["isBeneath"] = gm.Make("IsBeneath"); return true; }); } start { return !current.Loads && old.Loads; } update { if(current.Loads != old.Loads) { print("Loading: " + old.Loads + " -> " + current.Loads); } } isLoading { return current.Loads || current.BeneathLoads == 1 && current.isBeneath; } split { return current.LevelComplete && !old.LevelComplete; } exit { timer.IsGameTimePaused = true; }