From 0f05ceb5b8c225f5730e0c10f519e8b784f9b55f Mon Sep 17 00:00:00 2001 From: ALittlePatate Date: Sun, 28 Aug 2022 18:57:21 +0200 Subject: [PATCH] Added an iten ESP --- DevourClient/Hacks/Misc.cs | 4 +-- DevourClient/Helpers/Render.cs | 4 +-- DevourClient/MelonMain.cs | 59 ++++++++++++++++++++++++++++++++++ README.md | 1 + 4 files changed, 64 insertions(+), 4 deletions(-) diff --git a/DevourClient/Hacks/Misc.cs b/DevourClient/Hacks/Misc.cs index ee387e3..75ce353 100644 --- a/DevourClient/Hacks/Misc.cs +++ b/DevourClient/Hacks/Misc.cs @@ -44,7 +44,7 @@ namespace DevourClient.Hacks } - public static void AutoRespawn() + public static void AutoRespawn() { NolanBehaviour nb = Player.GetPlayer(); @@ -52,7 +52,7 @@ namespace DevourClient.Hacks nb.locomotion.SetPosition(setNewPosition); } - public static void TPItems() + public static void TPItems() { try { diff --git a/DevourClient/Helpers/Render.cs b/DevourClient/Helpers/Render.cs index 624ad75..4b2db07 100644 --- a/DevourClient/Helpers/Render.cs +++ b/DevourClient/Helpers/Render.cs @@ -54,13 +54,13 @@ namespace DevourClient.Render DrawLine(new Vector2(x, y + h), new Vector2(x + w, y + h), color, thickness); } - public static void DrawBoxESP(Vector3 footpos, Vector3 headpos, Color color, string playername = "", bool snapline = false, bool esp = true) + public static void DrawBoxESP(Vector3 footpos, Vector3 headpos, Color color, string playername = "", bool snapline = false, bool esp = true, bool only_name = false) { float height = headpos.y - footpos.y; float widthOffset = 2f; float width = height / widthOffset; - if (playername != "" && esp) + if (playername != "" && esp || playername != "" && only_name) { Render.DrawString(new Vector2((footpos.x - (width / 2)) + 25, (float)Screen.height - footpos.y - height), playername, false); } diff --git a/DevourClient/MelonMain.cs b/DevourClient/MelonMain.cs index 366d377..b93c136 100644 --- a/DevourClient/MelonMain.cs +++ b/DevourClient/MelonMain.cs @@ -25,6 +25,7 @@ namespace DevourClient bool azazel_esp = false; bool azazel_snapline = false; bool spam_message = false; + bool item_esp = false; public override void OnApplicationStart() { @@ -53,6 +54,26 @@ namespace DevourClient Settings.Settings.menu_enable = !Settings.Settings.menu_enable; } + if (Input.GetKeyDown(KeyCode.Keypad1)) + { + MelonLoader.MelonLogger.Msg("First aid outline on"); + FirstAidOutline[] array = Object.FindObjectsOfType(); + for (int i = 0; i < array.Length; i++) + { + array[i].SetCrawlOutline(); + } + } + + if (Input.GetKeyDown(KeyCode.Keypad2)) + { + MelonLoader.MelonLogger.Msg("First aid outline off"); + FirstAidOutline[] array = Object.FindObjectsOfType(); + for (int i = 0; i < array.Length; i++) + { + array[i].SetNormalOutline(); + } + } + if (this.flashlight_toggle && Player.IsInGame()) { Hacks.Misc.BigFlashlight(false); @@ -139,6 +160,42 @@ namespace DevourClient } } + if (this.item_esp) + { + foreach (SurvivalInteractable obj in UnityEngine.Object.FindObjectsOfType() as UnhollowerBaseLib.Il2CppReferenceArray) + { + if (obj != null) + { + + + Vector3 pivotPos = obj.transform.position; //Pivot point NOT at the origin, at the center + Vector3 playerFootPos; playerFootPos.x = pivotPos.x; playerFootPos.z = pivotPos.z; playerFootPos.y = pivotPos.y - 2f; //At the feet + Vector3 playerHeadPos; + playerHeadPos.x = pivotPos.x; + playerHeadPos.z = pivotPos.z; + playerHeadPos.y = pivotPos.y + 0.3f; //At the middle + + if (Camera.main == null) + { + continue; + } + + Vector3 w2s_footpos = Camera.main.WorldToScreenPoint(playerFootPos); + Vector3 w2s_headpos = Camera.main.WorldToScreenPoint(playerHeadPos); + + if (w2s_footpos.z > 0f) + { + //string playername = player.field_Private_PhotonView_0.field_Private_ObjectPublicObInBoStBoHaStObInHaUnique_0.field_Private_String_0;//player.photonView._Controller_k__BackingField.NickName; + + + + Render.Render.DrawBoxESP(w2s_footpos, w2s_headpos, new Color(), obj.prefabName.Replace("Survival", ""), false, false, true); + } + + } + } + } + if (this.azazel_esp || this.azazel_snapline) { SurvivalAzazelBehaviour survivalAzazel = UnityEngine.Object.FindObjectOfType(); @@ -187,6 +244,8 @@ namespace DevourClient this.azazel_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 190, 150, 20), this.azazel_esp, "Azazel ESP"); this.azazel_snapline = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 220, 150, 20), this.azazel_snapline, "Azazel Snapline"); + this.item_esp = GUI.Toggle(new Rect(Settings.Settings.x + 390, Settings.Settings.y + 280, 150, 20), this.item_esp, "Item ESP"); + if (GUI.Button(new Rect(Settings.Settings.x + 10, Settings.Settings.y + 40, 150, 20), "Unlock Achievements")) { Thread AchievementsThread = new Thread( diff --git a/README.md b/README.md index 5a421ad..83e87da 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Everything about spoofing ehre (steam name, server name, level...) will persist * Player snaplines (with a home made color picker) * Azazel ESP (with a home made color picker) * Azazel snapline (with a home made color picker) +* Item ESP * TP all the items to your position ! (thanks to [@jadis0x](https://github.com/jadis0x)) ## Installation