the initial commit to the repo.

This commit is contained in:
NukedBart 2025-10-25 01:27:14 +08:00
parent 025c032b8c
commit 1b757591b9
264 changed files with 21882 additions and 0 deletions

View file

@ -0,0 +1,30 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
//Credits myshmeh
namespace EscapeFromTarkovCheat.Utils
{
public static class AllocConsoleHandler
{
[DllImport("Kernel32.dll")]
private static extern bool AllocConsole();
[DllImport("msvcrt.dll")]
public static extern int system(string cmd);
public static void Open()
{
AllocConsole();
Console.SetOut(new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = true });
Application.logMessageReceivedThreaded += (condition, stackTrace, type) => Console.WriteLine(condition + " " + stackTrace);
}
public static void ClearAllocConsole()
{
system("CLS");
}
}
}

View file

@ -0,0 +1,165 @@
using EscapeFromTarkovCheat.Utils;
using System;
using System.Linq;
using UnityEngine;
namespace EscapeFromTarkovCheat.Utils
{
public enum BoneType
{
Empty = 0,
IKController,
Mesh,
Vest_0,
Vest_1,
backpack,
backpack_0,
backpack_1,
backpack_2,
razgruz,
razgruz_0,
razgruz_1,
razgruz_2,
Root_Joint,
HumanPelvis,
HumanLThigh1,
HumanLThigh2,
HumanLCalf,
HumanLFoot,
HumanLToe,
HumanRThigh1,
HumanRThigh2,
HumanRCalf,
HumanRFoot,
HumanRToe,
Bear_Feet,
USEC_Feet,
BEAR_feet_1,
weapon_holster_pistol,
HumanSpine1,
HumanGear1,
HumanGear2,
HumanGear3,
HumanGear4,
HumanGear4_1,
HumanGear5,
HumanSpine2,
HumanSpine3,
IK_S_LForearm1,
IK_S_LForearm2,
IK_S_LForearm3,
IK_S_LPalm,
IK_S_LDigit11,
IK_S_LDigit12,
IK_S_LDigit13,
IK_S_LDigit21,
IK_S_LDigit22,
IK_S_LDigit23,
IK_S_LDigit31,
IK_S_LDigit32,
IK_S_LDigit33,
IK_S_LDigit41,
IK_S_LDigit42,
IK_S_LDigit43,
IK_S_LDigit51,
IK_S_LDigit52,
IK_S_LDigit53,
XYZ,
LCollarbone_anim,
RCollarbone_anim,
RCollarbone_anim_XYZ,
Weapon_root_3rd_anim,
Weapon_root_3rd_anim_XYZ_1,
Bend_Goal_Left,
Bend_Goal_Right,
Bend_Goal_Right_XYZ_1,
HumanRibcage,
IK_LForearm1,
IK_LForearm2,
IK_LForearm3,
IK_LPalm,
IK_LDigit11,
IK_LDigit12,
IK_LDigit13,
IK_LDigit21,
IK_LDigit22,
IK_LDigit23,
IK_LDigit31,
IK_LDigit32,
IK_LDigit33,
IK_LDigit41,
IK_LDigit42,
IK_LDigit43,
IK_LDigit51,
IK_LDigit52,
IK_LDigit53,
Camera_animated,
CameraContainer,
Cam,
HumanLCollarbone,
HumanLUpperarm,
HumanLForearm1,
HumanLForearm2,
HumanLForearm3,
HumanLPalm,
HumanLDigit11,
HumanLDigit12,
HumanLDigit13,
HumanLDigit21,
HumanLDigit22,
HumanLDigit23,
HumanLDigit31,
HumanLDigit32,
HumanLDigit33,
HumanLDigit41,
HumanLDigit42,
HumanLDigit43,
HumanLDigit51,
HumanLDigit52,
HumanLDigit53,
HumanRCollarbone,
HumanRUpperarm,
HumanRForearm1,
HumanRForearm2,
HumanRForearm3,
HumanRPalm,
HumanRDigit11,
HumanRDigit12,
HumanRDigit13,
HumanRDigit21,
HumanRDigit22,
HumanRDigit23,
HumanRDigit31,
HumanRDigit32,
HumanRDigit33,
HumanRDigit41,
HumanRDigit42,
HumanRDigit43,
HumanRDigit51,
HumanRDigit52,
HumanRDigit53,
Weapon_root,
HumanNeck,
HumanHead,
HumanBackpack,
weapon_holster,
weapon_holster1,
Camera_animated_3rd
}
public static class BonesType
{
public static Vector3 GetBonePosition(BoneType boneType)
{
var player = Main.LocalPlayer;
if (player == null || player.PlayerBody == null || player.PlayerBody.SkeletonRootJoint == null)
return Vector3.zero;
var bone = player.PlayerBody.SkeletonRootJoint.Bones.ElementAtOrDefault((int)boneType).Value;
if (bone == null)
return Vector3.zero;
return GameUtils.WorldPointToScreenPoint(bone.position);
}
}
}

View file

@ -0,0 +1,161 @@
using System;
using System.Linq;
using Diz.Skinning;
using EFT;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.UI;
using UnityEngine;
namespace EscapeFromTarkovCheat.Utils
{
public static class GameUtils
{
public static float Map(float value, float sourceFrom, float sourceTo, float destinationFrom, float destinationTo)
{
return (value - sourceFrom) / (sourceTo - sourceFrom) * (destinationTo - destinationFrom) + destinationFrom;
}
public static bool IsPlayerValid(Player player)
{
return player != null && player.Transform != null && player.PlayerBones != null && player.PlayerBones.transform != null;
}
public static bool IsExfiltrationPointValid(ExfiltrationPoint lootItem)
{
return lootItem != null;
}
public static bool IsLootItemValid(LootItem lootItem)
{
return lootItem != null && lootItem.Item != null && lootItem.Item.Template != null;
}
public static bool IsLootableContainerValid(LootableContainer lootableContainer)
{
return lootableContainer != null && lootableContainer.Template != null;
}
public static bool IsPlayerAlive(Player player)
{
if (!IsPlayerValid(player))
return false;
if (player.HealthController == null)
return false;
return player.HealthController.IsAlive;
}
public static bool IsPlayerVisible(Player player)
{
if (player == null || Camera.main == null)
return false;
// 可视检查部位
BifacialTransform[] pointsToCheck = {
player.PlayerBones.Head,
player.PlayerBones.Spine3,
player.PlayerBones.Pelvis
};
foreach (BifacialTransform point in pointsToCheck)
{
if (point == null)
continue;
// 射线方向
Vector3 direction = point.position - Camera.main.transform.position;
// 射线检测
if (!Physics.Raycast(Camera.main.transform.position, direction, out RaycastHit hit, direction.magnitude))
{
continue;
}
// 射线命中
if (hit.collider.gameObject == player.gameObject)
{
return true;
}
}
return false;
}
public static Vector3 WorldPointToScreenPoint(Vector3 worldPoint)
{
Vector3 screenPoint = Main.MainCamera.WorldToScreenPoint(worldPoint);
screenPoint.y = Screen.height - screenPoint.y;
return screenPoint;
}
public static bool IsScreenPointVisible(Vector3 screenPoint)
{
return screenPoint.z > 0.01f && screenPoint.x > -5f && screenPoint.y > -5f && screenPoint.x < Screen.width && screenPoint.y < Screen.height;
}
public static Vector3 GetBonePosByID(Player player, int id)
{
Vector3 result;
try
{
result = SkeletonBonePos(player.PlayerBones.AnimatedTransform.Original.gameObject.GetComponent<PlayerBody>().SkeletonRootJoint, id);
}
catch (Exception)
{
result = Vector3.zero;
}
return result;
}
public static Vector3 GetBonePosByEID(Player player, BoneType eid)
{
Vector3 result;
try
{
result = SkeletonBonePos(player.PlayerBones.AnimatedTransform.Original.gameObject.GetComponent<PlayerBody>().SkeletonRootJoint, (int)eid);
}
catch (Exception)
{
result = Vector3.zero;
}
return result;
}
public static Vector3 SkeletonBonePos(Skeleton skeleton, int id)
{
return skeleton.Bones.ElementAt(id).Value.position;
}
public static void AddConsoleLog(string log)
{
if (PreloaderUI.Instantiated)
ConsoleScreen.Log(log);
}
public static Vector3 GetTargetPosition()
{
var centerPosition = Main.LocalPlayer.Transform.position;
if (Main.LocalPlayer.HandsController is Player.FirearmController firearmController)
{
if (Physics.Raycast(new Ray(firearmController.Fireport.position, firearmController.WeaponDirection), out RaycastHit hit, float.MaxValue))
{
centerPosition = hit.point;
}
}
return centerPosition;
}
public static bool IsGroundLoot(LootItem lootItem)
{
return lootItem.GetComponent<Corpse>() == null;
}
public static bool IsInteractableLoot(LootItem lootItem)
{
var collider = lootItem.GetComponent<Collider>();
return collider != null && collider.enabled;
}
public static bool IsInventoryItemValid(Item item)
{
return item != null && item.Template != null;
}
}
}

View file

@ -0,0 +1,158 @@
/**
* Render class Credit to ZAT from Unknowncheats
* https://www.unknowncheats.me/forum/members/562321.html
*/
using System.Collections.Generic;
using UnityEngine;
namespace EscapeFromTarkovCheat.Utils
{
public static class Render
{
public static Material DrawMaterial = new Material(Shader.Find("Hidden/Internal-Colored"));
public static GUIStyle StringStyle { get; set; } = new GUIStyle(GUI.skin.label);
private class RingArray
{
public Vector2[] Positions { get; private set; }
public RingArray(int numSegments)
{
Positions = new Vector2[numSegments];
var stepSize = 360f / numSegments;
for (int i = 0; i < numSegments; i++)
{
var rad = Mathf.Deg2Rad * stepSize * i;
Positions[i] = new Vector2(Mathf.Sin(rad), Mathf.Cos(rad));
}
}
}
private static Dictionary<int, RingArray> ringDict = new Dictionary<int, RingArray>();
public static Color Color
{
get { return GUI.color; }
set { GUI.color = value; }
}
public static void DrawLine(Vector2 from, Vector2 to, float thickness, Color color)
{
Color = color;
DrawLine(from, to, thickness);
}
public static void DrawLine(Vector2 from, Vector2 to, float thickness)
{
var delta = (to - from).normalized;
var angle = Mathf.Atan2(delta.y, delta.x) * Mathf.Rad2Deg;
GUIUtility.RotateAroundPivot(angle, from);
DrawBox(from, Vector2.right * (from - to).magnitude, thickness, false);
GUIUtility.RotateAroundPivot(-angle, from);
}
public static void DrawBox(float x, float y, float w, float h, Color color)
{
DrawLine(new Vector2(x, y), new Vector2(x + w, y), 1f, color);
DrawLine(new Vector2(x, y), new Vector2(x, y + h), 1f,color);
DrawLine(new Vector2(x + w, y), new Vector2(x + w, y + h), 1f, color);
DrawLine(new Vector2(x, y + h), new Vector2(x + w, y + h), 1f, color);
}
public static void DrawBox(Vector2 position, Vector2 size, float thickness, Color color, bool centered = true)
{
Color = color;
DrawBox(position, size, thickness, centered);
}
public static void DrawBox(Vector2 position, Vector2 size, float thickness, bool centered = true)
{
var upperLeft = centered ? position - size / 2f : position;
GUI.DrawTexture(new Rect(position.x, position.y, size.x, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(position.x, position.y, thickness, size.y), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(position.x + size.x, position.y, thickness, size.y), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(position.x, position.y + size.y, size.x + thickness, thickness), Texture2D.whiteTexture);
}
public static void DrawCross(Vector2 position, Vector2 size, float thickness, Color color)
{
Color = color;
DrawCross(position, size, thickness);
}
public static void DrawCross(Vector2 position, Vector2 size, float thickness)
{
GUI.DrawTexture(new Rect(position.x - size.x / 2f, position.y, size.x, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(position.x, position.y - size.y / 2f, thickness, size.y), Texture2D.whiteTexture);
}
public static void DrawDot(Vector2 position, Color color)
{
Color = color;
DrawDot(position);
}
public static void DrawDot(Vector2 position)
{
DrawBox(position - Vector2.one, Vector2.one * 2f, 1f);
}
public static void DrawString(Vector2 position, string label, Color color, bool centered = true)
{
Color = color;
DrawString(position, label, centered);
}
public static void DrawString(Vector2 position, string label, bool centered = true)
{
var content = new GUIContent(label);
var size = StringStyle.CalcSize(content);
var upperLeft = centered ? position - size / 2f : position;
GUI.Label(new Rect(upperLeft, size), content);
}
public static void DrawCircle(Vector2 position, float radius, int numSides, bool centered = true, float thickness = 1f)
{
DrawCircle(position, radius, numSides, Color.white, centered, thickness);
}
public static void DrawCircle(Vector2 position, float radius, int numSides, Color color, bool centered = true, float thickness = 1f)
{
RingArray arr;
if (ringDict.ContainsKey(numSides))
arr = ringDict[numSides];
else
arr = ringDict[numSides] = new RingArray(numSides);
var center = centered ? position : position + Vector2.one * radius;
for (int i = 0; i < numSides - 1; i++)
DrawLine(center + arr.Positions[i] * radius, center + arr.Positions[i + 1] * radius, thickness, color);
DrawLine(center + arr.Positions[0] * radius, center + arr.Positions[arr.Positions.Length - 1] * radius, thickness, color);
}
public static void DrawSnapline(Vector3 worldpos, Color color)
{
Vector3 pos = Main.MainCamera.WorldToScreenPoint(worldpos);
pos.y = Screen.height - pos.y;
GL.PushMatrix();
GL.Begin(1);
DrawMaterial.SetPass(0);
GL.Color(color);
GL.Vertex3(Screen.width / 2, Screen.height, 0f);
GL.Vertex3(pos.x, pos.y, 0f);
GL.End();
GL.PopMatrix();
}
public static void DrawBoneLine(Vector2 from, Vector2 to, float thickness, Color color)
{
Color = color;
DrawBoneLine(from, to, thickness);
}
public static void DrawBoneLine(Vector2 from, Vector2 to, float thickness)
{
var delta = (to - from).normalized;
var angle = Mathf.Atan2(delta.y, delta.x) * Mathf.Rad2Deg;
GUIUtility.RotateAroundPivot(angle, from);
DrawBox(from, Vector2.right * (from - to).magnitude, thickness, false);
GUIUtility.RotateAroundPivot(-angle, from);
}
}
}

View file

@ -0,0 +1,68 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EFT.Visual;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Feauters;
using UnityEngine;
namespace EscapeFromTarkovCheat.Utils
{
class Settings
{
// Locales
internal static Locale Language = Locale.ENGLISH;
// ESP
// Players
internal static bool DrawPlayers = true;
internal static bool DrawPlayerName = true;
internal static bool DrawPlayerHealth = false;
internal static bool DrawPlayerBox = true;
internal static bool DrawPlayerLine = true;
internal static bool DrawPlayerSkeletons = true;
internal static float DrawPlayersDistance = 200f;
// Loot
internal static bool DrawLootItems = false;
internal static float DrawLootItemsDistance = 300f;
internal static bool DrawLootableContainers = false;
internal static float DrawLootableContainersDistance = 10f;
internal static bool DrawExfiltrationPoints = true;
// Aimbot
internal static bool Aimbot = true;
internal static bool VisibleOnly = false;
internal static bool SilentAim = false;
internal static float AimbotSmooth = 50f;
internal static bool AimbotDrawFOV = true;
internal static float AimbotFOV = 10f;
internal static float AimbotRange = 200f;
internal static bool NoRecoil = true;
// Miscellaneous
internal static bool GodMode = true;
internal static bool Stamina = true;
internal static bool SpeedHack = false;
internal static float SpeedAddition = 2.5f;
internal static float ExperienceAmount = 10000f;
// Items
internal static float dupeStackCount = 2;
// Key Bindings
internal static KeyCode InstaHeal = KeyCode.Keypad1;
internal static KeyCode KillSwitch = KeyCode.Keypad2;
internal static KeyCode TpLoots = KeyCode.Keypad3;
internal static KeyCode UnlockDoors = KeyCode.Keypad4;
internal static KeyCode IncreaseTraderStandingKey = KeyCode.Keypad5;
internal static KeyCode CallAirdrop = KeyCode.Keypad6;
internal static KeyCode TpEnemies = KeyCode.Keypad7;
internal static KeyCode AimbotKey = KeyCode.Mouse1;
// Switches
internal static bool debug = true;
}
}