feat: Initial commit of all the files

This commit is contained in:
ALittlePatate
2021-11-01 21:12:28 +01:00
commit 57a2f4f2d0
14 changed files with 1241 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProjectGuid>{87349803-31DC-462A-87A3-677CD23AFBA7}</ProjectGuid>
<OutputType>Library</OutputType>
<RootNamespace>DevourClient</RootNamespace>
<AssemblyName>DevourClient</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<PlatformTarget>x64</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="bolt, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\bolt.dll</HintPath>
</Reference>
<Reference Include="bolt.user, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\bolt.user.dll</HintPath>
</Reference>
<Reference Include="Il2Cppmscorlib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
</Reference>
<Reference Include="MelonLoader">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\MelonLoader.dll</HintPath>
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="UnhollowerBaseLib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppAssemblyUnhollower\UnhollowerBaseLib.dll</HintPath>
</Reference>
<Reference Include="UnhollowerRuntimeLib">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppAssemblyUnhollower\UnhollowerRuntimeLib.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputModule">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.InputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<Compile Include="Hacks\Misc.cs" />
<Compile Include="Hacks\Unlock.cs" />
<Compile Include="Helpers\GUIHelper.cs" />
<Compile Include="Helpers\StateHelper.cs" />
<Compile Include="MelonMain.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Settings\Settings.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,93 @@
using UnityEngine;
using MelonLoader;
using UnityEngine.UI;
namespace DevourClient.Hacks
{
public class Misc
{
public static void BigFlashlight(bool reset)
{
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
Light flashlightSpot = Nolan.flashlightSpot;
if (reset)
{
flashlightSpot.intensity = 1.5f;
flashlightSpot.range = 9f;
}
else
{
flashlightSpot.intensity = 1.5f;
flashlightSpot.range = 200f;
}
}
public static void FlashlightColor(Color color)
{
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
Light flashlightSpot = Nolan.flashlightSpot;
flashlightSpot.color = color;
}
public static void TPKeys()
{
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
foreach (KeyBehaviour keyBehaviour in UnityEngine.Object.FindObjectsOfType<KeyBehaviour>())
{
bool flag = keyBehaviour == null;
if (flag)
{
return;
}
keyBehaviour.transform.position = Nolan.transform.position + Nolan.transform.forward * 1.5f;
}
}
public static void MaxRank()
{
NolanRankController NolanRank = UnityEngine.Object.FindObjectOfType<NolanRankController>();
NolanRank.SetRank(70);
}
public static void MessageSpam(string message)
{
if (Helpers.Player.IsInGame())
{
GameUI game_ui_class = UnityEngine.Object.FindObjectOfType<GameUI>();
game_ui_class.textChatInput.text = message;
game_ui_class.OnChatMessageSubmit();
}
else
{
Horror.Menu menu_class = UnityEngine.Object.FindObjectOfType<Horror.Menu>();
menu_class.textChatInput.text = message;
menu_class.OnChatMessageSubmit();
}
}
public static void InstantWin()
{
Survival survival_class = UnityEngine.Object.FindObjectOfType<Survival>();
try
{
survival_class.PlayWinEnding("InnWin");
}
catch
{
try
{
survival_class.PlayWinEnding("AsylumWin");
}
catch
{
survival_class.PlayWinEnding("Win");
}
}
}
}
}

View File

@@ -0,0 +1,46 @@
namespace DevourClient.Hacks
{
public class Unlock
{
public static void Achievements()
{
AchievementHelpers ah = UnityEngine.Object.FindObjectOfType<AchievementHelpers>();
/*
string[] names = { "hasAchievedFusesUsed", "hasAchievedGasolineUsed", "hasAchievedNoKnockout", "hasCollectedAllPatches", "hasCollectedAllRoses",
"hasCompletedHardAsylumGame", "hasCompletedHardGame", "hasCompletedNightmareAsylumGame", "hasCompletedNightmareGame", "hasCompletedNormalGame",
"hasCompletedHardInnGamehasCompletedNightmareInnGame", "hasCollectedAllCherryBlossom", "hasAchievedEggsDestroyed", "hasCollectedAllPumpkins",
"isStatsValid", "isStatsFetched" };
for (int i = 0; i < names.Length; i++)
{
ah.GetType().GetField(names[i], System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(ah, true); //Causing a crash.
}
*/
string[] achievments = { "ACH_WON_INN_NIGHTMARE", "ACH_WON_INN_NIGHTMARE_SP", "ACH_WON_INN_HARD", "ACH_WON_INN_HARD_SP", "ACH_WON_INN_COOP", "ACH_ALL_ROSES", "ACH_BURNT_GOAT",
"ACH_ALL_CHERRY_BLOSSOM", "ACH_100_EGGS_DESTROYED", "ACH_WON_INN_SP", "ACH_SURVIVED_TO_3_GOATS", "ACH_SURVIVED_TO_5_GOATS", "ACH_SURVIVED_TO_7_GOATS", "ACH_WON_SP", "ACH_WON_COOP",
"ACH_LOST", "ACH_LURED_20_GOATS", "ACH_REVIVED_20_PLAYERS", "ACH_ALL_NOTES_READ", "ACH_KNOCKED_OUT_BY_ANNA", "ACH_KNOCKOUT_OUT_BY_DEMON", "ACH_KNOCKED_OUT_20_TIMES",
"ACH_NEVER_KNOCKED_OUT", "ACH_ONLY_ONE_KNOCKED_OUT", "ACH_UNLOCKED_CAGE", "ACH_UNLOCKED_ATTIC_CAGE", "ACH_BEAT_GAME_5_TIMES", "ACH_100_GASOLINE_USED",
"ACH_FRIED_20_DEMONS", "ACH_STAGGERED_ANNA_20_TIMES", "ACH_CALMED_ANNA_10_TIMES", "ACH_CALMED_ANNA", "ACH_WIN_NIGHTMARE", "ACH_BEAT_GAME_5_TIMES_IN_NIGHTMARE_MODE",
"ACH_WON_NO_KNOCKOUT_COOP", "ACH_WIN_NIGHTMARE_SP", "ACH_WON_HARD", "ACH_WON_HARD_SP", "ACH_100_FUSES_USED", "ACH_ALL_CLIPBOARDS_READ", "ACH_ALL_PATCHES",
"ACH_FRIED_RAT", "ACH_FRIED_100_INMATES", "ACH_LURED_20_RATS", "ACH_STAGGERED_MOLLY_20_TIMES", "ACH_WON_MOLLY_SP", "ACH_WON_MOLLY_HARD_SP", "ACH_WON_MOLLY_NIGHTMARE_SP",
"ACH_WON_MOLLY_COOP", "ACH_WON_MOLLY_HARD", "ACH_WON_MOLLY_NIGHTMARE", "ACH_20_TRASH_CANS_KICKED", "ACH_CALM_MOLLY_10_TIMES" };
for (int i = 0; i < achievments.Length; i++)
{
ah.Unlock(achievments[i]);
}
}
public static void Doors()
{
//Pour chaques portes, on les ouvre
foreach (Horror.DoorBehaviour doorBehaviour in UnityEngine.Object.FindObjectsOfType<Horror.DoorBehaviour>())
{
doorBehaviour.Unlock();
}
}
}
}

View File

@@ -0,0 +1,37 @@
using UnityEngine;
namespace DevourClient.Helpers
{
class GUIHelper
{
private static float R;
private static float G;
private static float B;
public static Color ColorPick(string title, Color color)
{
GUI.Label(new Rect(Screen.width - 120, 65, 100, 30), title);
R = GUI.VerticalSlider(new Rect(Screen.width - 100, 90, 30, 100), color.r, 0f, 1f);
G = GUI.VerticalSlider(new Rect(Screen.width - 70, 90, 30, 100), color.g, 0f, 1f);
B = GUI.VerticalSlider(new Rect(Screen.width - 40, 90, 30, 100), color.b, 0f, 1f);
GUI.Label(new Rect(Screen.width - 100, 190, 30, 30), "R");
GUI.Label(new Rect(Screen.width - 70, 190, 30, 30), "G");
GUI.Label(new Rect(Screen.width - 39, 190, 30, 30), "B");
color = new Color(R, G, B, 1);
GUI.color = color;
void DrawPreview(Rect position, Color color_to_draw)
{
Texture2D texture = new Texture2D(1, 1);
texture.SetPixel(0, 0, color);
texture.Apply();
GUI.skin.box.normal.background = texture;
GUI.Box(position, GUIContent.none);
}
DrawPreview(new Rect(Screen.width - 130, 90, 20, 100), color);
return color;
}
}
}

View File

@@ -0,0 +1,22 @@
namespace DevourClient.Helpers
{
public class Player
{
public static bool IsInGame()
{
//Code pas très beau ici
//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<Horror.Menu>();
return menu_class.gameStarted;
}
catch
{
return true;
}
}
}
}

111
DevourClient/MelonMain.cs Normal file
View File

@@ -0,0 +1,111 @@
using UnityEngine;
using MelonLoader;
using System.Threading;
using DevourClient.Helpers;
namespace DevourClient
{
public class Load : MelonMod
{
bool flashlight_toggle = false;
bool flashlight_reset = false;
bool flashlight_colorpick = false;
bool spam_message = false;
public override void OnApplicationStart()
{
}
public override void OnUpdate()
{
if (Input.GetKeyDown(KeyCode.Insert))
{
Settings.Settings.menu_enable = !Settings.Settings.menu_enable;
}
if (this.flashlight_toggle && !flashlight_reset && Player.IsInGame())
{
flashlight_reset = true;
Hacks.Misc.BigFlashlight(false);
MelonLogger.Msg("Big Flashlight enabled !");
}
else if (!this.flashlight_toggle && flashlight_reset && Player.IsInGame())
{
flashlight_reset = false;
Hacks.Misc.BigFlashlight(true);
MelonLogger.Msg("Big Flashlight disabled !");
}
if (this.spam_message)
{
Hacks.Misc.MessageSpam(Settings.Settings.message_to_spam);
}
}
public override void OnGUI()
{
if (Settings.Settings.menu_enable) //Si on appuie sur INSERT
{
GUI.Label(new Rect(300, Settings.Settings.y, 100, 30), "Devour Client"); //Titre du menu
this.flashlight_toggle = GUI.Toggle(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 100, 150, 20), this.flashlight_toggle, "Big Flashlight"); //Checkbox Flashlight
this.spam_message = GUI.Toggle(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 220, 150, 20), this.spam_message, "Chat Spam"); //Checkbox Chat Spam
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 40, 150, 20), "Unlock Achievements"))
{
Thread AchievementsThread = new Thread(
new ThreadStart(Hacks.Unlock.Achievements));
AchievementsThread.Start();
MelonLogger.Msg("Achievements Unlocked !");
}
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 70, 150, 20), "Unlock Doors") && Player.IsInGame())
{
Hacks.Unlock.Doors();
MelonLogger.Msg("Doors Unlocked !");
}
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 130, 150, 20), "Flashlight Color"))
{
flashlight_colorpick = !flashlight_colorpick;
MelonLogger.Msg("Flashlight color picker : "+ flashlight_colorpick.ToString());
}
if (flashlight_colorpick)
{
Color flashlight_color_input = DevourClient.Helpers.GUIHelper.ColorPick("Flashlight Color", Settings.Settings.flashlight_color);
Settings.Settings.flashlight_color = flashlight_color_input;
if (Player.IsInGame())
{
Hacks.Misc.FlashlightColor(flashlight_color_input);
}
}
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 160, 150, 20), "TP Keys") && Player.IsInGame())
{
Hacks.Misc.TPKeys();
MelonLogger.Msg("Here are your keys !");
}
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 190, 150, 20), "Rank 70"))
{
Hacks.Misc.MaxRank();
MelonLogger.Msg("EZ LV 70");
}
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 250, 150, 20), "Instant WIn") && Player.IsInGame())
{
Hacks.Misc.InstantWin();
MelonLogger.Msg("EZ Win");
}
}
}
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using MelonLoader;
[assembly: MelonInfo(typeof(DevourClient.Load), "DevourClient", "1.0", "ALittlePatate")]
[assembly: MelonGame(null, null)]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyCompany("DevourClient")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("DevourClient")]
[assembly: AssemblyTitle("DevourClient")]

View File

@@ -0,0 +1,16 @@
using UnityEngine;
namespace DevourClient.Settings
{
public class Settings
{
public static bool menu_enable = false;
public static float width = Screen.width / 2f;
public static float height = Screen.height / 2f;
public static float x = 0;
public static float y = 0;
public static Color flashlight_color = new Color(1.00f, 1.00f, 1.00f, 1);
public static float speed = 1f;
public const string message_to_spam = "Deez Nutz";
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]