The Town Update !
This commit is contained in:
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
#Visual studio stuff
|
||||
.vs
|
||||
DevourClient/bin
|
||||
DevourClient/obj
|
||||
@@ -31,49 +31,60 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony, Version=2.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Assembly-CSharp">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\Assembly-CSharp.dll</HintPath>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\Il2Cppmscorlib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\MelonLoader.dll</HintPath>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Opsive.UltimateCharacterController, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\Opsive.UltimateCharacterController.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="UnhollowerBaseLib">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Dependencies\Il2CppAssemblyGenerator\Il2CppAssemblyUnhollower\UnhollowerBaseLib.dll</HintPath>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.HotReloadModule">
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.HotReloadModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.IMGUIModule">
|
||||
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.IMGUIModule.dll</HintPath>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\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>
|
||||
<HintPath>D:\Jeux\steamapps\common\Devour\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
</ItemGroup>
|
||||
@@ -85,6 +96,7 @@
|
||||
<Compile Include="Hacks\Unlock.cs" />
|
||||
<Compile Include="Helpers\GUIHelper.cs" />
|
||||
<Compile Include="Helpers\StateHelper.cs" />
|
||||
<Compile Include="Hooks\Hooks.cs" />
|
||||
<Compile Include="MelonMain.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings\Settings.cs" />
|
||||
|
||||
@@ -1,26 +1,81 @@
|
||||
using UnityEngine;
|
||||
using MelonLoader;
|
||||
using UnityEngine.UI;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace DevourClient.Hacks
|
||||
{
|
||||
public class Misc
|
||||
{
|
||||
public static void Fly(float speed) //normal speed 0.5f
|
||||
{
|
||||
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
|
||||
Vector3 PlayerAngles = Nolan.transform.position;
|
||||
|
||||
if (Input.GetKey(KeyCode.Space))
|
||||
{
|
||||
PlayerAngles.y += speed;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.LeftShift))
|
||||
{
|
||||
PlayerAngles.y -= speed;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.LeftArrow))
|
||||
{
|
||||
PlayerAngles.x -= speed;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.RightArrow))
|
||||
{
|
||||
PlayerAngles.x += speed;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.UpArrow))
|
||||
{
|
||||
PlayerAngles.z += speed;
|
||||
}
|
||||
if (Input.GetKey(KeyCode.DownArrow))
|
||||
{
|
||||
PlayerAngles.z -= speed;
|
||||
}
|
||||
|
||||
Nolan.locomotion.SetPosition(PlayerAngles, false);
|
||||
}
|
||||
public static void SetSteamName(string name)
|
||||
{
|
||||
Horror.Menu Menu_ = UnityEngine.Object.FindObjectOfType<Horror.Menu>();
|
||||
Menu_.steamName = name;
|
||||
}
|
||||
public static void SetServerName(string name)
|
||||
{
|
||||
Horror.Menu Menu_ = UnityEngine.Object.FindObjectOfType<Horror.Menu>();
|
||||
Menu_.serverNameText.text = name;
|
||||
}
|
||||
|
||||
public static void BigFlashlight(bool reset)
|
||||
{
|
||||
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
|
||||
Light flashlightSpot = Nolan.flashlightSpot;
|
||||
//Ohhhh yes, that's some great code, don't you like try and catches ?
|
||||
//it's for fixing a glitch that activates the big flashlight during the loading of a map
|
||||
//so the things are not loaded and it throws a shit ton of errors in the console
|
||||
try
|
||||
{
|
||||
NolanBehaviour Nolan = UnityEngine.Object.FindObjectOfType<NolanBehaviour>();
|
||||
Light flashlightSpot = Nolan.flashlightSpot;
|
||||
|
||||
if (reset)
|
||||
{
|
||||
flashlightSpot.intensity = 1.5f;
|
||||
flashlightSpot.range = 9f;
|
||||
if (reset)
|
||||
{
|
||||
flashlightSpot.intensity = 1.5f;
|
||||
flashlightSpot.range = 9f;
|
||||
}
|
||||
else
|
||||
{
|
||||
flashlightSpot.intensity = 1.5f;
|
||||
flashlightSpot.range = 200f;
|
||||
}
|
||||
}
|
||||
else
|
||||
catch
|
||||
{
|
||||
flashlightSpot.intensity = 1.5f;
|
||||
flashlightSpot.range = 200f;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
public static void FlashlightColor(Color color)
|
||||
@@ -46,11 +101,11 @@ namespace DevourClient.Hacks
|
||||
}
|
||||
}
|
||||
|
||||
public static void MaxRank()
|
||||
public static void SetRank(int rank)
|
||||
{
|
||||
NolanRankController NolanRank = UnityEngine.Object.FindObjectOfType<NolanRankController>();
|
||||
|
||||
NolanRank.SetRank(70);
|
||||
NolanRank.SetRank(rank);
|
||||
}
|
||||
|
||||
public static void MessageSpam(string message)
|
||||
@@ -69,7 +124,6 @@ namespace DevourClient.Hacks
|
||||
menu_class.OnChatMessageSubmit();
|
||||
}
|
||||
}
|
||||
|
||||
public static void InstantWin()
|
||||
{
|
||||
Survival survival_class = UnityEngine.Object.FindObjectOfType<Survival>();
|
||||
@@ -85,7 +139,14 @@ namespace DevourClient.Hacks
|
||||
}
|
||||
catch
|
||||
{
|
||||
survival_class.PlayWinEnding("Win");
|
||||
try
|
||||
{
|
||||
survival_class.PlayWinEnding("TownWin");
|
||||
}
|
||||
catch
|
||||
{
|
||||
survival_class.PlayWinEnding("Win");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{
|
||||
AchievementHelpers ah = UnityEngine.Object.FindObjectOfType<AchievementHelpers>();
|
||||
|
||||
/*
|
||||
/*
|
||||
string[] names = { "hasAchievedFusesUsed", "hasAchievedGasolineUsed", "hasAchievedNoKnockout", "hasCollectedAllPatches", "hasCollectedAllRoses",
|
||||
"hasCompletedHardAsylumGame", "hasCompletedHardGame", "hasCompletedNightmareAsylumGame", "hasCompletedNightmareGame", "hasCompletedNormalGame",
|
||||
"hasCompletedHardInnGamehasCompletedNightmareInnGame", "hasCollectedAllCherryBlossom", "hasAchievedEggsDestroyed", "hasCollectedAllPumpkins",
|
||||
@@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
|
||||
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",
|
||||
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",
|
||||
|
||||
36
DevourClient/Hooks/Hooks.cs
Normal file
36
DevourClient/Hooks/Hooks.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using HarmonyLib;
|
||||
|
||||
namespace DevourClient.Hooks
|
||||
{
|
||||
public class Hooks
|
||||
{
|
||||
/*
|
||||
[HarmonyPatch(typeof(UIPerkSelectionType))]
|
||||
[HarmonyPatch(nameof(UIPerkSelectionType.SetLocked))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
|
||||
static class UIPerkSelectionType_SetLocked_Patch
|
||||
{
|
||||
static void Prefix(ref bool locked, ref int cost)
|
||||
{
|
||||
MelonLoader.MelonLogger.Msg("cost : "+cost);
|
||||
MelonLoader.MelonLogger.Msg("locked : " + locked);
|
||||
|
||||
locked = false;
|
||||
cost = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
[HarmonyPatch(typeof(NolanBehaviour))]
|
||||
[HarmonyPatch(nameof(NolanBehaviour.SetIsBeingKnockedOut))] //annotation boiler plate to tell Harmony what to patch. Refer to docs.
|
||||
static class NolanBehaviour_SetIsBeingKnockedOut_Patch
|
||||
{
|
||||
static void Prefix(ref bool enable)
|
||||
{
|
||||
MelonLoader.MelonLogger.Msg("called ! : " + enable);
|
||||
enable = false;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,8 +8,13 @@ namespace DevourClient
|
||||
public class Load : MelonMod
|
||||
{
|
||||
bool flashlight_toggle = false;
|
||||
bool flashlight_reset = false;
|
||||
bool flashlight_colorpick = false;
|
||||
bool level_70 = false;
|
||||
bool level_666 = false;
|
||||
bool change_server_name = false;
|
||||
bool change_steam_name = false;
|
||||
bool fly = false;
|
||||
float fly_speed = 0.5f;
|
||||
|
||||
bool spam_message = false;
|
||||
|
||||
@@ -26,23 +31,46 @@ namespace DevourClient
|
||||
Settings.Settings.menu_enable = !Settings.Settings.menu_enable;
|
||||
}
|
||||
|
||||
if (this.flashlight_toggle && !flashlight_reset && Player.IsInGame())
|
||||
if (this.flashlight_toggle && Player.IsInGame())
|
||||
{
|
||||
flashlight_reset = true;
|
||||
Hacks.Misc.BigFlashlight(false);
|
||||
MelonLogger.Msg("Big Flashlight enabled !");
|
||||
}
|
||||
else if (!this.flashlight_toggle && flashlight_reset && Player.IsInGame())
|
||||
else if (!this.flashlight_toggle && 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);
|
||||
}
|
||||
|
||||
if (this.level_70 != this.level_666 && !Player.IsInGame())
|
||||
{
|
||||
if (this.level_70)
|
||||
{
|
||||
Hacks.Misc.SetRank(70);
|
||||
}
|
||||
else
|
||||
{
|
||||
Hacks.Misc.SetRank(666);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.change_server_name && !Player.IsInGame())
|
||||
{
|
||||
Hacks.Misc.SetServerName("patate on top !");
|
||||
}
|
||||
|
||||
if (this.change_steam_name && !Player.IsInGame())
|
||||
{
|
||||
Hacks.Misc.SetSteamName("patate");
|
||||
}
|
||||
|
||||
if (this.fly && Player.IsInGame())
|
||||
{
|
||||
Hacks.Misc.Fly(this.fly_speed);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnGUI()
|
||||
@@ -51,7 +79,14 @@ namespace DevourClient
|
||||
{
|
||||
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
|
||||
this.spam_message = GUI.Toggle(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 250, 150, 20), this.spam_message, "Chat Spam"); //Checkbox Chat Spam
|
||||
this.level_70 = GUI.Toggle(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 190, 150, 20), this.level_70, "Level 70"); //Checkbox lvl 70
|
||||
this.level_666 = GUI.Toggle(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 220, 150, 20), this.level_666, "Level 666"); //Checkbox lvl 70
|
||||
this.change_server_name = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 40, 150, 20), this.change_server_name, "Change server name"); //Checkbox servername
|
||||
this.change_steam_name = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 70, 150, 20), this.change_steam_name, "Change steam name"); //Checkbox servername
|
||||
this.fly = GUI.Toggle(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 100, 150, 20), this.fly, "Fly"); //Checkbox fly
|
||||
this.fly_speed = GUI.HorizontalSlider(new Rect(Settings.Settings.x + 200, Settings.Settings.y + 130, 100, 10), this.fly_speed, 0f, 1f); //Slider for the fly speed
|
||||
GUI.Label(new Rect(Settings.Settings.x + 310, Settings.Settings.y + 125, 100, 30), this.fly_speed.ToString()); //Prints the value of the slider
|
||||
|
||||
if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 40, 150, 20), "Unlock Achievements"))
|
||||
{
|
||||
@@ -93,13 +128,7 @@ namespace DevourClient
|
||||
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())
|
||||
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");
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user