diff --git a/DevourClient/Hacks/Misc.cs b/DevourClient/Hacks/Misc.cs index d56f489..95d94c1 100644 --- a/DevourClient/Hacks/Misc.cs +++ b/DevourClient/Hacks/Misc.cs @@ -124,6 +124,54 @@ namespace DevourClient.Hacks menu_class.OnChatMessageSubmit(); } } + public static void PlaySound() + { + /* + public PlayRandomAudioClip yesClips; + public PlayRandomAudioClip noClips; + public PlayRandomAudioClip beckonClips; + public PlayRandomAudioClip showOffClips; + public PlayRandomAudioClip screamClips; + public PlayRandomAudioClip pickupClips; + public PlayRandomAudioClip burnGoatClips; + public PlayRandomAudioClip laughClips; + */ + PlayRandomAudioClip playRandomAudioClip = UnityEngine.Object.FindObjectOfType(); + NolanVoiceOvers nolanVoiceOvers = UnityEngine.Object.FindObjectOfType(); + + playRandomAudioClip.delay = 0f; + + int num = Random.RandomRangeInt(0, 8); + switch (num) + { + case 0: + nolanVoiceOvers.yesClips.Play(); + return; + case 1: + nolanVoiceOvers.noClips.Play(); + return; + case 2: + nolanVoiceOvers.beckonClips.Play(); + return; + case 3: + nolanVoiceOvers.showOffClips.Play(); + return; + case 4: + nolanVoiceOvers.screamClips.Play(); + return; + case 5: + nolanVoiceOvers.pickupClips.Play(); + return; + case 6: + nolanVoiceOvers.burnGoatClips.Play(); + return; + case 7: + nolanVoiceOvers.laughClips.Play(); + return; + default: + return; + } + } public static void InstantWin() { Survival survival_class = UnityEngine.Object.FindObjectOfType(); diff --git a/DevourClient/Helpers/StateHelper.cs b/DevourClient/Helpers/StateHelper.cs index 88226d7..dfa7329 100644 --- a/DevourClient/Helpers/StateHelper.cs +++ b/DevourClient/Helpers/StateHelper.cs @@ -8,6 +8,7 @@ //La variable gameStarted dans la classe Horror.Menu n'existe plus quand on lance une game //Donc si elle existe on retourne sa valeur (qui est false) //Et si elle existe pas (donc si on est ingame) on retourne true + try { Horror.Menu menu_class = UnityEngine.ScriptableObject.FindObjectOfType(); diff --git a/DevourClient/MelonMain.cs b/DevourClient/MelonMain.cs index 8038934..2815696 100644 --- a/DevourClient/MelonMain.cs +++ b/DevourClient/MelonMain.cs @@ -128,12 +128,17 @@ namespace DevourClient MelonLogger.Msg("Here are your keys !"); } - if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 280, 150, 20), "Instant WIn") && Player.IsInGame()) + if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 280, 150, 20), "Instant Win") && Player.IsInGame()) { Hacks.Misc.InstantWin(); MelonLogger.Msg("EZ Win"); } + if (GUI.Button(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 160, 150, 20), "Random sound")) + { + Hacks.Misc.PlaySound(); + } + } } }