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,121 @@
using System;
using EFT;
using EFT.InventoryLogic;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
using UnityEngine;
using static Systems.Effects.Effects;
namespace EscapeFromTarkovCheat.Feauters
{
class Aimbot : MonoBehaviour
{
public void Update()
{
if (Settings.NoRecoil)
NoRecoil();
if (Main.GameWorld != null && Settings.Aimbot && Input.GetKey(Settings.AimbotKey))
this.Aim();
}
private void Aim()
{
Vector3 target = Vector3.zero;
float distanceOfTarget = 9999f;
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (gamePlayer == null)
// 未开局 : Not loaded
continue;
if (Main.LocalPlayer.HandsController == null)
// 卡手 : Invalid hand
continue;
Weapon weapon = Main.LocalPlayer.HandsController.Item as Weapon;
if (weapon == null)
// 无武器 : No weapon
continue;
AmmoTemplate currentAmmoTemplate = weapon.CurrentAmmoTemplate;
if (currentAmmoTemplate == null)
// 无弹药 : Out of ammo
continue;
Vector3 destination = GameUtils.GetBonePosByEID(gamePlayer.Player, BoneType.HumanHead);
float distance = Vector3.Distance(Main.MainCamera.transform.position, gamePlayer.Player.Transform.position);
if (distance > Settings.AimbotRange)
// 大于瞄准范围 : Too far
continue;
if (destination == Vector3.zero)
// 无法找到头部 : Head not found
continue;
if (Aimbot.CalculateInFov(destination) > Settings.AimbotFOV)
// 不在瞄准圈内 : Not in fov
continue;
if (Settings.VisibleOnly && !GameUtils.IsPlayerVisible(gamePlayer.Player))
// 开启仅瞄准可见时不可见 : Not visible while Visible Only is toggled on
continue;
if (distanceOfTarget > distance) // 寻找最近 : Aim at the nearest
{
distanceOfTarget = distance;
float timeToHit = distance / currentAmmoTemplate.InitialSpeed; // 子弹飞行时间 : Time to hit the target
destination.x += gamePlayer.Player.Velocity.x * timeToHit; // 速度时间预判,下同 : Add some drifts to the target for hitting moving targets
destination.y += gamePlayer.Player.Velocity.y * timeToHit;
target = destination; // 建立瞄准点 : Construct the final aiming point
}
}
if (target != Vector3.zero)
{
Aimbot.AimAtPos(target);
}
}
private void NoRecoil()
{
if (Main.LocalPlayer == null)
return;
if (Main.LocalPlayer.ProceduralWeaponAnimation == null)
return;
var effect = Main.LocalPlayer.ProceduralWeaponAnimation.Shootingg?.CurrentRecoilEffect;
if (effect == null)
return;
effect.CameraRotationRecoilEffect.Intensity = 0f;
effect.HandPositionRecoilEffect.Intensity = 0f;
effect.HandRotationRecoilEffect.Intensity = 0f;
}
public void OnGUI()
{
if (Settings.AimbotDrawFOV)
{
Render.DrawCircle(new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f), Screen.width * Settings.AimbotFOV / 75, 64, Color.red, true, 1);
}
}
public static float CalculateInFov(Vector3 position1)
{
Vector3 position2 = Main.MainCamera.transform.position;
Vector3 forward = Main.MainCamera.transform.forward;
Vector3 normalized = (position1 - position2).normalized;
return Mathf.Acos(Mathf.Clamp(Vector3.Dot(forward, normalized), -1f, 1f)) * 57.29578f;
}
public static void AimAtPos(Vector3 position)
{
if (Settings.SilentAim)
{
Main.LocalPlayer.ProceduralWeaponAnimation.ShotNeedsFovAdjustments = false;
Vector3 normalizedPosition = (position - Main.LocalPlayer.Fireport.position).normalized;
Vector3 shotDirection = Main.LocalPlayer.Fireport.InverseTransformVector(normalizedPosition);
Main.LocalPlayer.ProceduralWeaponAnimation._shotDirection = shotDirection;
}
else
{
Vector3 b = Main.LocalPlayer.Fireport.position - Main.LocalPlayer.Fireport.up * 1f;
Vector3 eulerAngles = Quaternion.LookRotation((position - b).normalized).eulerAngles;
if (eulerAngles.x > 180f)
{
eulerAngles.x -= 360f;
}
Main.LocalPlayer.MovementContext.Rotation = new Vector2(eulerAngles.y, eulerAngles.x);
}
}
}
}

View file

@ -0,0 +1,100 @@
using System.Collections.Generic;
using Comfort.Common;
using EFT;
using EFT.Interactive;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
using JsonType;
using UnityEngine;
namespace EscapeFromTarkovCheat.Feauters.ESP
{
public class ExfiltrationPointsESP : MonoBehaviour
{
private List<GameExfiltrationPoint> _gameExfiltrationPoints= new List<GameExfiltrationPoint>();
private static readonly float CacheExfiltrationPointInterval = 5f;
private float _nextLootItemCacheTime;
private static readonly Color ExfiltrationPointColour = Color.green;
private static readonly Color ClosedExfiltrationPointColour = Color.yellow;
public void Update()
{
if (!Settings.DrawExfiltrationPoints)
return;
if (Time.time >= _nextLootItemCacheTime)
{
if ((Main.GameWorld != null) && (Main.GameWorld.ExfiltrationController.ExfiltrationPoints != null))
{
_gameExfiltrationPoints.Clear();
foreach (var exfiltrationPoint in Main.GameWorld.ExfiltrationController.EligiblePoints(Main.LocalPlayer.Profile))
{
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint))
continue;
_gameExfiltrationPoints.Add(new GameExfiltrationPoint(exfiltrationPoint, true));
}
foreach (var exfiltrationPoint in Main.GameWorld.ExfiltrationController.ExfiltrationPoints)
{
bool trig = false;
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint))
continue;
foreach (var ep in _gameExfiltrationPoints)
{
if (ep.Name == exfiltrationPoint.Settings.Name.Localized())
trig = !trig;
continue;
}
if (trig)
continue;
_gameExfiltrationPoints.Add(new GameExfiltrationPoint(exfiltrationPoint, false));
}
_nextLootItemCacheTime = (Time.time + CacheExfiltrationPointInterval);
}
}
foreach (GameExfiltrationPoint gameExfiltrationPoint in _gameExfiltrationPoints)
gameExfiltrationPoint.RecalculateDynamics();
}
private static string GetName(ExfiltrationPoint point, bool isEligible)
{
var localizedName = point.Settings.Name.Localized();
return !isEligible ? localizedName : $"{localizedName} ({GetStatus(point.Status)})";
}
public static string GetStatus(EExfiltrationStatus status)
{
return status switch
{
EExfiltrationStatus.AwaitsManualActivation => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_ACTIVE),
EExfiltrationStatus.Countdown => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_TIMER),
EExfiltrationStatus.NotPresent => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_CLOSED),
EExfiltrationStatus.Pending => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_PENDING),
EExfiltrationStatus.RegularMode => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_OPEN),
EExfiltrationStatus.UncompleteRequirements => LocalisationManager.GetString(Settings.Language, StringKey.DATA_EP_REQUIREMENT),
_ => string.Empty
};
}
private void OnGUI()
{
if (Settings.DrawExfiltrationPoints)
{
foreach (var exfiltrationPoint in _gameExfiltrationPoints)
{
if (!GameUtils.IsExfiltrationPointValid(exfiltrationPoint.ExfiltrationPoint) || !exfiltrationPoint.IsOnScreen)
continue;
string exfiltrationPointText = $"{GetName(exfiltrationPoint.ExfiltrationPoint, exfiltrationPoint.Eligible)} [{exfiltrationPoint.FormattedDistance}]";
Render.DrawString(new Vector2(exfiltrationPoint.ScreenPosition.x - 50f, exfiltrationPoint.ScreenPosition.y), exfiltrationPointText, exfiltrationPoint.Eligible ? ExfiltrationPointColour : ClosedExfiltrationPointColour);
}
}
}
}
}

View file

@ -0,0 +1,81 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using Comfort.Common;
using EFT;
using EFT.Interactive;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
using JsonType;
using UnityEngine;
namespace EscapeFromTarkovCheat.Feauters.ESP
{
public class ItemESP : MonoBehaviour
{
private static readonly float CacheLootItemsInterval = 4f;
private float _nextLootItemCacheTime;
//private static readonly Color SpecialColor = new Color(1f, 0.2f, 0.09f);
private static readonly Color QuestColor = Color.yellow;
private static readonly Color CommonColor = Color.white;
private static readonly Color RareColor = new Color(0.38f, 0.43f, 1f);
private static readonly Color SuperRareColor = new Color(1f, 0.29f, 0.36f);
private List<GameLootItem> _gameLootItems = new List<GameLootItem>();
private Stopwatch _stopwatch = new Stopwatch();
public void Update()
{
if (!Settings.DrawLootItems)
return;
if (Time.time >= _nextLootItemCacheTime)
{
if ((Main.GameWorld != null) && (Main.GameWorld.LootItems != null))
{
_gameLootItems.Clear();
for (int i = 0; i < Main.GameWorld.LootItems.Count; i++)
{
LootItem lootItem = Main.GameWorld.LootItems.GetByIndex(i);
if (!GameUtils.IsLootItemValid(lootItem) || (Vector3.Distance(Main.MainCamera.transform.position, lootItem.transform.position) > Settings.DrawLootItemsDistance))
continue;
_gameLootItems.Add(new GameLootItem(lootItem));
}
_nextLootItemCacheTime = (Time.time + CacheLootItemsInterval);
}
}
foreach (GameLootItem gameLootItem in _gameLootItems)
gameLootItem.RecalculateDynamics();
}
private void OnGUI()
{
if (Settings.DrawLootItems)
{
foreach (var gameLootItem in _gameLootItems)
{
if (!GameUtils.IsLootItemValid(gameLootItem.LootItem) || !gameLootItem.IsOnScreen || gameLootItem.Distance > Settings.DrawLootItemsDistance)
continue;
string lootItemName = $"{gameLootItem.LootItem.Item.ShortName.Localized()} [{gameLootItem.FormattedDistance}]";
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Common)
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, CommonColor);
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Rare)
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, RareColor);
if (gameLootItem.LootItem.Item.Template.Rarity == ELootRarity.Superrare)
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, SuperRareColor);
if (gameLootItem.LootItem.Item.Template.QuestItem)
Render.DrawString(new Vector2(gameLootItem.ScreenPosition.x - 50f, gameLootItem.ScreenPosition.y), lootItemName, QuestColor);
}
}
}
}
}

View file

@ -0,0 +1,70 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Comfort.Common;
using EFT;
using EFT.Interactive;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
using JsonType;
using UnityEngine;
namespace EscapeFromTarkovCheat.Feauters.ESP
{
public class LootableContainerESP : MonoBehaviour
{
private static readonly float CacheLootItemsInterval = 100;
private float _nextLootContainerCacheTime;
private List<GameLootContainer> _gameLootContainers;
private static readonly Color LootableContainerColor = new Color(1f, 0.2f, 0.09f);
public void Start()
{
_gameLootContainers = new List<GameLootContainer>();
}
public void Update()
{
if (!Settings.DrawLootableContainers)
return;
if (Time.time >= _nextLootContainerCacheTime)
{
if ((Main.GameWorld != null) && (Main.GameWorld.LootItems != null))
{
_gameLootContainers.Clear();
foreach (LootableContainer lootableContainer in FindObjectsOfType<LootableContainer>())
{
if (!GameUtils.IsLootableContainerValid(lootableContainer) || (Vector3.Distance(Main.MainCamera.transform.position, lootableContainer.transform.position) > Settings.DrawLootableContainersDistance))
continue;
_gameLootContainers.Add(new GameLootContainer(lootableContainer));
}
_nextLootContainerCacheTime = (Time.time + CacheLootItemsInterval);
}
}
foreach (GameLootContainer gameLootContainer in _gameLootContainers)
gameLootContainer.RecalculateDynamics();
}
public void OnGUI()
{
if (!Settings.DrawLootableContainers)
return;
foreach (var gameLootContainer in _gameLootContainers)
{
if (!GameUtils.IsLootableContainerValid(gameLootContainer.LootableContainer) || !gameLootContainer.IsOnScreen || gameLootContainer.Distance > Settings.DrawLootableContainersDistance)
continue;
//EFT.InventoryLogic.Item rootItem = gameLootContainer.LootableContainer.ItemOwner.RootItem;
//rootItem.Template.Name.Localized();
string lootItemName = $"{gameLootContainer.LootableContainer.name} [{gameLootContainer.FormattedDistance}]";
Render.DrawString(new Vector2(gameLootContainer.ScreenPosition.x - 50f, gameLootContainer.ScreenPosition.y), lootItemName, LootableContainerColor);
}
}
}
}

View file

@ -0,0 +1,191 @@
using EFT;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace EscapeFromTarkovCheat.Feauters.ESP
{
public class PlayerESP : MonoBehaviour
{
private static readonly Color _playerColor = Color.cyan;
private static readonly Color _botColor = Color.yellow;
private static readonly Color _healthColor = Color.green;
private static readonly Color _bossColor = Color.red;
private static readonly Color _cultistLeader = Color.red;
private static readonly Color _cultistGuard = Color.red;
private static readonly Color _guardColor = Color.red;
private static readonly Color _skeletonColor = Color.cyan;
private static readonly HashSet<string> BossNames = new HashSet<string>
{
"Killa",
"Reshala",
"Sanitar",
"Glukhar",
"Shturman",
"Tagilla",
"Knight",
"BirdEye",
"Zryachiy",
"Big Pipe",
"Kaban"
};
// Token: 0x0200001D RID: 29
public enum PlayerType
{
SCAV,
PLAYERSCAV,
PLAYER,
TEAMMATE,
FOLLOWER,
BOSS
}
public static bool IsBossByName(string playerName)
{
return PlayerESP.BossNames.Contains(playerName);
}
public static string PlayerName(Player player, ref PlayerESP.PlayerType playerType)
{
if (player.Profile.Info.RegistrationDate > 0)
{
if (player.Profile.Info.Side == EPlayerSide.Savage)
{
playerType = PlayerESP.PlayerType.PLAYERSCAV;
return "player";
}
playerType = PlayerESP.PlayerType.PLAYER;
return player.Profile.Info.Side.ToString() + " [" + player.Profile.Info.Level.ToString() + "]";
}
if (player.Profile.Info.Settings.Role.ToString().IndexOf("boss") != -1)
{
playerType = PlayerESP.PlayerType.BOSS;
return "BOSS";
}
if (player.Profile.Info.Settings.Role.ToString().IndexOf("follower") != -1)
{
playerType = PlayerESP.PlayerType.FOLLOWER;
return "Follower";
}
if (player.Profile.Info.Settings.Role.ToString().ToLower().IndexOf("pmcbot") != -1)
{
playerType = PlayerESP.PlayerType.SCAV;
return "Raider";
}
playerType = PlayerESP.PlayerType.SCAV;
return "";
}
private void DrawPlayerName(GamePlayer gamePlayer, ref Color color)
{
string text = "";
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
if (gamePlayer.IsAI)
{
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BOT)} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._botColor;
}
else
{
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._playerColor;
}
if (gamePlayer.Player.Profile.Info.Settings.IsFollower())
{
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_GUARD)}-{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._guardColor;
}
if (gamePlayer.Player.Profile.Info.Settings.IsBoss())
{
switch (role)
{
case WildSpawnType.sectantPriest:
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._cultistLeader;
break;
case WildSpawnType.sectantWarrior:
text = $"{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._cultistGuard;
break;
case WildSpawnType.pmcBEAR:
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BEAR)} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._playerColor;
break;
case WildSpawnType.pmcUSEC:
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_USEC)} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._playerColor;
break;
case WildSpawnType.pmcBot:
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_PMC)} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._playerColor;
break;
default:
text = $"{LocalisationManager.GetString(Settings.Language, StringKey.DATA_PLAYERTYPE_BOSS)}-{gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.FormattedDistance}]";
color = PlayerESP._bossColor;
break;
}
}
Vector2 vector = GUI.skin.GetStyle(text).CalcSize(new GUIContent(text));
Render.DrawString(new Vector2(gamePlayer.ScreenPosition.x - vector.x / 2f, gamePlayer.HeadScreenPosition.y - 20f), text, color, true);
}
private void DrawPlayerHealth(GamePlayer gamePlayer, float boxPositionY, float boxHeight, float boxWidth)
{
if (!gamePlayer.Player.HealthController.IsAlive)
return;
float current = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common, false).Current;
float maximum = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common, false).Maximum;
float healthBarHeight = GameUtils.Map(current, 0f, maximum, 0f, boxHeight);
Render.DrawLine(new Vector2(gamePlayer.ScreenPosition.x - boxWidth / 2f - 3f, boxPositionY + boxHeight - healthBarHeight),
new Vector2(gamePlayer.ScreenPosition.x - boxWidth / 2f - 3f, boxPositionY + boxHeight), 3f, PlayerESP._healthColor);
}
public void OnGUI()
{
if (!Settings.DrawPlayers)
return;
if (Main.notReady())
return;
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (!gamePlayer.IsOnScreen)
continue;
if (gamePlayer.Distance > Settings.DrawPlayersDistance)
continue;
if (gamePlayer.Player == Main.LocalPlayer)
continue;
Color color = gamePlayer.IsAI ? PlayerESP._botColor : PlayerESP._playerColor;
float boxPositionY = (gamePlayer.HeadScreenPosition.y - 10f);
float boxHeight = (Math.Abs(gamePlayer.HeadScreenPosition.y - gamePlayer.ScreenPosition.y) + 10f);
float boxWidth = (boxHeight * 0.65f);
if (Settings.DrawPlayerBox)
Render.DrawBox(gamePlayer.ScreenPosition.x - boxWidth / 2f, boxPositionY, boxWidth, boxHeight, color);
if (Settings.DrawPlayerSkeletons)
PlayerSkeletons.DrawSkeleton(new GamePlayer(gamePlayer.Player), _skeletonColor);
if (Settings.DrawPlayerHealth)
DrawPlayerHealth(gamePlayer, boxPositionY, boxHeight, boxWidth);
if (Settings.DrawPlayerName)
DrawPlayerName(gamePlayer, ref color);
if (Settings.DrawPlayerLine)
Render.DrawLine(new Vector2((float)(Screen.width / 2), (float)Screen.height),
new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y),
1.5f, Color.red);
}
}
}
}

View file

@ -0,0 +1,82 @@
using UnityEngine;
using EscapeFromTarkovCheat.Data;
using EscapeFromTarkovCheat.Utils;
namespace EscapeFromTarkovCheat.Feauters.ESP
{
public static class PlayerSkeletons
{
public static void DrawSkeleton(GamePlayer gamePlayer, Color skeletonColor)
{
if (GameUtils.IsPlayerValid(gamePlayer.Player))
{
// 可视检查 : Visible
// Color skeletonColor = GameUtils.IsPlayerVisible(gamePlayer.Player) ? Color.green : Color.red;
// 头胸腹 : head, neck, chest, stomach
Vector3 headPos = gamePlayer.GetBonePosition(BoneType.HumanHead);
Vector3 neckPos = gamePlayer.GetBonePosition(BoneType.HumanNeck);
Vector3 spinePos = gamePlayer.GetBonePosition(BoneType.HumanSpine3);
Vector3 pelvisPos = gamePlayer.GetBonePosition(BoneType.HumanPelvis);
// 左右手臂 : left arm, right arm
Vector3 leftShoulderPos = gamePlayer.GetBonePosition(BoneType.HumanLCollarbone);
Vector3 leftUpperArmPos = gamePlayer.GetBonePosition(BoneType.HumanLUpperarm);
Vector3 leftElbowPos = gamePlayer.GetBonePosition(BoneType.HumanLForearm1);
Vector3 leftForearmPos = gamePlayer.GetBonePosition(BoneType.HumanLForearm2);
Vector3 leftHandPos = gamePlayer.GetBonePosition(BoneType.HumanLPalm);
Vector3 rightShoulderPos = gamePlayer.GetBonePosition(BoneType.HumanRCollarbone);
Vector3 rightUpperArmPos = gamePlayer.GetBonePosition(BoneType.HumanRUpperarm);
Vector3 rightElbowPos = gamePlayer.GetBonePosition(BoneType.HumanRForearm1);
Vector3 rightForearmPos = gamePlayer.GetBonePosition(BoneType.HumanRForearm2);
Vector3 rightHandPos = gamePlayer.GetBonePosition(BoneType.HumanRPalm);
// 左右腿足 : left leg, right leg
Vector3 leftHipPos = gamePlayer.GetBonePosition(BoneType.HumanLThigh1);
Vector3 leftThigh2Pos = gamePlayer.GetBonePosition(BoneType.HumanLThigh2);
Vector3 leftKneePos = gamePlayer.GetBonePosition(BoneType.HumanLCalf);
Vector3 leftCalfPos = gamePlayer.GetBonePosition(BoneType.HumanLCalf);
Vector3 leftFootPos = gamePlayer.GetBonePosition(BoneType.HumanLFoot);
Vector3 rightHipPos = gamePlayer.GetBonePosition(BoneType.HumanRThigh1);
Vector3 rightThigh2Pos = gamePlayer.GetBonePosition(BoneType.HumanRThigh2);
Vector3 rightKneePos = gamePlayer.GetBonePosition(BoneType.HumanRCalf);
Vector3 rightCalfPos = gamePlayer.GetBonePosition(BoneType.HumanRCalf);
Vector3 rightFootPos = gamePlayer.GetBonePosition(BoneType.HumanRFoot);
// 绘制 : rendering
// 头脖胸 : head, neck, chest
Render.DrawBoneLine(headPos, neckPos, 1.5f, skeletonColor);
Render.DrawBoneLine(neckPos, spinePos, 1.5f, skeletonColor);
Render.DrawBoneLine(spinePos, pelvisPos, 1.5f, skeletonColor);
// 左右手臂 : left arm, right arm
Render.DrawBoneLine(neckPos, leftShoulderPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftShoulderPos, leftUpperArmPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftUpperArmPos, leftElbowPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftElbowPos, leftForearmPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftForearmPos, leftHandPos, 1.5f, skeletonColor);
Render.DrawBoneLine(neckPos, rightShoulderPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightShoulderPos, rightUpperArmPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightUpperArmPos, rightElbowPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightElbowPos, rightForearmPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightForearmPos, rightHandPos, 1.5f, skeletonColor);
// 左右腿足 : left leg, right leg
Render.DrawBoneLine(pelvisPos, leftHipPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftHipPos, leftThigh2Pos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftThigh2Pos, leftKneePos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftKneePos, leftCalfPos, 1.5f, skeletonColor);
Render.DrawBoneLine(leftCalfPos, leftFootPos, 1.5f, skeletonColor);
Render.DrawBoneLine(pelvisPos, rightHipPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightHipPos, rightThigh2Pos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightThigh2Pos, rightKneePos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightKneePos, rightCalfPos, 1.5f, skeletonColor);
Render.DrawBoneLine(rightCalfPos, rightFootPos, 1.5f, skeletonColor);
}
}
}
}

View file

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT;
using EFT.Counters;
using UnityEngine;
namespace EscapeFromTarkovCheat.Features
{
public static class ExperienceManager
{
public static long current = 0;
public static void SetExperience(Player player, float experience)
{
if (player != null && player.Profile != null)
{
current = Get(player);
player.Profile.EftStats.SessionCounters.SetLong((long)experience, CounterTag.Exp);
current = (long)experience;
Debug.Log(string.Format("Experience set to {0}", experience));
}
}
public static void AddExperience(Player player, float experience)
{
if (player != null && player.Profile != null)
{
current = Get(player);
SetExperience(player, current + experience);
}
}
public static int Get(Player player)
{
if (player != null && player.Profile != null)
{
return player.Profile.EftStats.SessionCounters.GetInt(CounterTag.Exp);
}
return 0;
}
}
}

View file

@ -0,0 +1,226 @@
using EFT;
using EFT.InventoryLogic;
using EscapeFromTarkovCheat.Utils;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
namespace EscapeFromTarkovCheat
{
// Token: 0x02000006 RID: 6
public static class ItemFeatures
{
public static List<Item> collectedItems = new List<Item>();
public static string _searchQuery = "";
public static string _itemStringText = "";
public static string _id = "";
private static int id = 0;
public static string _width = "";
private static int width = 0;
public static string _height = "";
private static int height = 0;
private static float _logTime = Time.time;
public static string ItemStringText
{
get
{
return _itemStringText;
}
}
public static string Id
{
get
{
return _id;
}
}
public static string Width
{
get
{
return _width;
}
}
public static string Height
{
get
{
return _height;
}
}
public static string GetSearchQuery() => _searchQuery;
public static void GetItemsInInventory()
{
GameUtils.AddConsoleLog("GetItemsInInventory called");
collectedItems.Clear();
List<string> itemStrings = new List<string>();
EquipmentSlot[] slots = { EquipmentSlot.Backpack };
if (Main.notReady())
{
GameUtils.AddConsoleLog("You are not in raid.");
return;
}
if (Main.LocalPlayer.Profile == null)
{
GameUtils.AddConsoleLog("The current raid is in the state of loading.");
return;
}
if (Main.LocalPlayer.Profile.Inventory == null)
{
GameUtils.AddConsoleLog("Your Inventory class currently has no instance.");
return;
}
IEnumerable<Item> items = Main.LocalPlayer.Profile.Inventory.GetItemsInSlots(slots);
if (items == null || items.Count() == 0)
{
GameUtils.AddConsoleLog("Your inventory is either empty or not loaded.");
return;
}
GameUtils.AddConsoleLog($"Found {items.Count()} items in backpack");
foreach (Item item in items)
{
if (!GameUtils.IsInventoryItemValid(item))
continue;
if (!item.Name.Localized().ToLower().Contains(_searchQuery.ToLower()))
continue;
itemStrings.Add(item.Name.Localized());
collectedItems.Add(item);
GameUtils.AddConsoleLog($"Added item: {item.Name.Localized()}");
}
_itemStringText = string.Join("\n", itemStrings);
}
public static void Commit()
{
GameUtils.AddConsoleLog("SetItemsInInventory called");
if (collectedItems.Count <= 0)
{
GameUtils.AddConsoleLog("No items in collectedItems");
return;
}
foreach (Item item in collectedItems)
{
if (!item.Name.ToLower().Contains(_searchQuery.ToLower()))
continue;
item.Template._id = _id;
GameUtils.AddConsoleLog($"Set {item.Name} _id to {_id}");
if (int.TryParse(_width, out width)) // 字符串转整数 : Casting string to int
{
item.Template.Width = width;
GameUtils.AddConsoleLog($"Set {item.Name.Localized()} Width to {width}");
}
if (int.TryParse(_height, out height))
{
item.Template.Height = height;
GameUtils.AddConsoleLog($"Set {item.Name.Localized()} Height to {height}");
}
}
}
public static void ResetItemsInInventory()
{
GameUtils.AddConsoleLog("ResetItemsInInventory called");
DupeItemsInInventory(1);
}
public static void DupeItemsInInventory(int count)
{
GameUtils.AddConsoleLog($"DupeItemsInInventory with argument {count} called");
if (collectedItems.Count <= 0)
{
GameUtils.AddConsoleLog("No items in collectedItems");
return;
}
foreach (Item item in collectedItems)
{
item.StackObjectsCount = count;
GameUtils.AddConsoleLog($"Duped {item.Name.Localized()} stack to {count}");
}
}
public static void DupeDollarsEuros()
{
DupeItemsInInventory(50000);
}
public static void DupeRubles()
{
DupeItemsInInventory(400000);
}
public static void SetInventoryFoundInRaid()
{
GameUtils.AddConsoleLog("FoundInRaidInventory called");
if (Main.notReady())
{
GameUtils.AddConsoleLog("You are not in raid.");
return;
}
if (Main.LocalPlayer.Profile == null)
{
GameUtils.AddConsoleLog("The current raid is in the state of loading.");
return;
}
if (Main.LocalPlayer.Profile.Inventory == null)
{
GameUtils.AddConsoleLog("Your Inventory class currently has no instance.");
return;
}
IEnumerable<Item> items = Main.LocalPlayer.Profile.Inventory.GetPlayerItems(EPlayerItems.All);
if (items == null || items.Count() == 0)
{
GameUtils.AddConsoleLog("Your inventory is either empty or not loaded.");
return;
}
GameUtils.AddConsoleLog($"Found {items.Count()} items in inventory");
foreach (Item item in items)
{
if (!GameUtils.IsInventoryItemValid(item))
continue;
item.SpawnedInSession = true;
GameUtils.AddConsoleLog($"Set {item.Name.Localized()} to SpawnedInSession");
}
}
public static void SetSearchQuery(string searchQuery)
{
_searchQuery = searchQuery;
if (Time.time > _logTime && Settings.debug)
{
GameUtils.AddConsoleLog($"Search query set to: {searchQuery}");
_logTime = Time.time + 1f;
}
}
public static void UpdateValues(string id, string width, string height)
{
_id = id;
_width = width;
_height = height;
if (Time.time > _logTime && Settings.debug)
{
GameUtils.AddConsoleLog($"New values set: {id}, {width}, {height}");
_logTime = Time.time + 1f;
}
}
}
}

View file

@ -0,0 +1,239 @@
using EFT.Interactive;
using UnityEngine.UI;
using UnityEngine;
namespace EscapeFromTarkovCheat.Features
{
public enum Skill {
STRENGTH,
STRESSRESISTANCE,
MAGDRILLS,
MELEE,
HIDEOUTMANAGEMENT,
CRAFTING,
HEAVYVESTS,
LIGHTVESTS,
LMG,
ASSAULT,
PISTOL,
PERCEPTION,
SNIPER,
SNIPING,
ENDURANCE,
THROWING,
CHARISMA,
HEALTH,
VITALITY,
METABOLISM,
IMMUNITY,
SURGERY,
INTELLECT,
ATTENTION,
REVOLVER,
SHOTGUN,
HMG,
DMR,
AIMDRILLS,
SEARCH,
WEAPONTREATMENT,
TROUBLESHOOTING,
COVERTMOVEMENT,
SMG
}
public class Skills
{
public void MaxAll()
{
if (Main.notReady())
return;
Main.LocalPlayer.Skills.Strength.SetLevel(51);
Main.LocalPlayer.Skills.StressResistance.SetLevel(51);
Main.LocalPlayer.Skills.MagDrills.SetLevel(51);
Main.LocalPlayer.Skills.Melee.SetLevel(51);
Main.LocalPlayer.Skills.HideoutManagement.SetLevel(51);
Main.LocalPlayer.Skills.Crafting.SetLevel(51);
Main.LocalPlayer.Skills.HeavyVests.SetLevel(51);
Main.LocalPlayer.Skills.LightVests.SetLevel(51);
Main.LocalPlayer.Skills.LMG.SetLevel(51);
Main.LocalPlayer.Skills.Assault.SetLevel(51);
Main.LocalPlayer.Skills.Pistol.SetLevel(51);
Main.LocalPlayer.Skills.Perception.SetLevel(51);
Main.LocalPlayer.Skills.Sniper.SetLevel(51);
Main.LocalPlayer.Skills.Sniping.SetLevel(51);
Main.LocalPlayer.Skills.Endurance.SetLevel(51);
Main.LocalPlayer.Skills.Throwing.SetLevel(51);
Main.LocalPlayer.Skills.Charisma.SetLevel(51);
Main.LocalPlayer.Skills.Health.SetLevel(51);
Main.LocalPlayer.Skills.Vitality.SetLevel(51);
Main.LocalPlayer.Skills.Metabolism.SetLevel(51);
Main.LocalPlayer.Skills.Immunity.SetLevel(51);
Main.LocalPlayer.Skills.Intellect.SetLevel(51);
Main.LocalPlayer.Skills.Attention.SetLevel(51);
Main.LocalPlayer.Skills.Revolver.SetLevel(51);
Main.LocalPlayer.Skills.Shotgun.SetLevel(51);
Main.LocalPlayer.Skills.HMG.SetLevel(51);
Main.LocalPlayer.Skills.DMR.SetLevel(51);
Main.LocalPlayer.Skills.AimDrills.SetLevel(51);
Main.LocalPlayer.Skills.Search.SetLevel(51);
Main.LocalPlayer.Skills.WeaponTreatment.SetLevel(51);
Main.LocalPlayer.Skills.TroubleShooting.SetLevel(51);
Main.LocalPlayer.Skills.CovertMovement.SetLevel(51);
Main.LocalPlayer.Skills.SMG.SetLevel(51);
Main.LocalPlayer.Skills.Surgery.SetLevel(51);
}
public int Get(Skill skill) {
if (Main.GameWorld == null) return 0;
switch (skill)
{
case Skill.STRENGTH:
return Main.LocalPlayer.Skills.Strength.Level;
case Skill.STRESSRESISTANCE:
return Main.LocalPlayer.Skills.StressResistance.Level;
case Skill.MAGDRILLS:
return Main.LocalPlayer.Skills.MagDrills.Level;
case Skill.MELEE:
return Main.LocalPlayer.Skills.Melee.Level;
case Skill.HIDEOUTMANAGEMENT:
return Main.LocalPlayer.Skills.HideoutManagement.Level;
case Skill.CRAFTING:
return Main.LocalPlayer.Skills.Crafting.Level;
case Skill.HEAVYVESTS:
return Main.LocalPlayer.Skills.HeavyVests.Level;
case Skill.LIGHTVESTS:
return Main.LocalPlayer.Skills.LightVests.Level;
case Skill.LMG:
return Main.LocalPlayer.Skills.LMG.Level;
case Skill.ASSAULT:
return Main.LocalPlayer.Skills.Assault.Level;
case Skill.PISTOL:
return Main.LocalPlayer.Skills.Pistol.Level;
case Skill.PERCEPTION:
return Main.LocalPlayer.Skills.Perception.Level;
case Skill.SNIPER:
return Main.LocalPlayer.Skills.Sniper.Level;
case Skill.SNIPING:
return Main.LocalPlayer.Skills.Sniping.Level;
case Skill.ENDURANCE:
return Main.LocalPlayer.Skills.Endurance.Level;
case Skill.THROWING:
return Main.LocalPlayer.Skills.Throwing.Level;
case Skill.CHARISMA:
return Main.LocalPlayer.Skills.Charisma.Level;
case Skill.HEALTH:
return Main.LocalPlayer.Skills.Health.Level;
case Skill.VITALITY:
return Main.LocalPlayer.Skills.Vitality.Level;
case Skill.METABOLISM:
return Main.LocalPlayer.Skills.Metabolism.Level;
case Skill.IMMUNITY:
return Main.LocalPlayer.Skills.Immunity.Level;
case Skill.COVERTMOVEMENT:
return Main.LocalPlayer.Skills.CovertMovement.Level;
case Skill.INTELLECT:
return Main.LocalPlayer.Skills.Intellect.Level;
case Skill.ATTENTION:
return Main.LocalPlayer.Skills.Attention.Level;
case Skill.REVOLVER:
return Main.LocalPlayer.Skills.Revolver.Level;
case Skill.SHOTGUN:
return Main.LocalPlayer.Skills.Shotgun.Level;
case Skill.HMG:
return Main.LocalPlayer.Skills.HMG.Level;
case Skill.DMR:
return Main.LocalPlayer.Skills.DMR.Level;
case Skill.AIMDRILLS:
return Main.LocalPlayer.Skills.AimDrills.Level;
case Skill.SEARCH:
return Main.LocalPlayer.Skills.Search.Level;
case Skill.WEAPONTREATMENT:
return Main.LocalPlayer.Skills.WeaponTreatment.Level;
case Skill.TROUBLESHOOTING:
return Main.LocalPlayer.Skills.TroubleShooting.Level;
case Skill.SURGERY:
return Main.LocalPlayer.Skills.Surgery.Level;
case Skill.SMG:
return Main.LocalPlayer.Skills.SMG.Level;
default:
return 0;
}
}
public void Commit(Skill skill, int level) {
if (Main.notReady()) return;
switch (skill)
{
case Skill.STRENGTH:
if (Main.LocalPlayer.Skills.Strength.Level != level) Main.LocalPlayer.Skills.Strength.SetLevel(level); break;
case Skill.STRESSRESISTANCE:
if (Main.LocalPlayer.Skills.StressResistance.Level != level) Main.LocalPlayer.Skills.StressResistance.SetLevel(level); break;
case Skill.MAGDRILLS:
if (Main.LocalPlayer.Skills.MagDrills.Level != level) Main.LocalPlayer.Skills.MagDrills.SetLevel(level); break;
case Skill.MELEE:
if (Main.LocalPlayer.Skills.Melee.Level != level) Main.LocalPlayer.Skills.Melee.SetLevel(level); break;
case Skill.HIDEOUTMANAGEMENT:
if (Main.LocalPlayer.Skills.HideoutManagement.Level != level) Main.LocalPlayer.Skills.HideoutManagement.SetLevel(level); break;
case Skill.CRAFTING:
if (Main.LocalPlayer.Skills.Crafting.Level != level) Main.LocalPlayer.Skills.Crafting.SetLevel(level); break;
case Skill.HEAVYVESTS:
if (Main.LocalPlayer.Skills.HeavyVests.Level != level) Main.LocalPlayer.Skills.HeavyVests.SetLevel(level); break;
case Skill.LIGHTVESTS:
if (Main.LocalPlayer.Skills.LightVests.Level != level) Main.LocalPlayer.Skills.LightVests.SetLevel(level); break;
case Skill.LMG:
if (Main.LocalPlayer.Skills.LMG.Level != level) Main.LocalPlayer.Skills.LMG.SetLevel(level); break;
case Skill.ASSAULT:
if (Main.LocalPlayer.Skills.Assault.Level != level) Main.LocalPlayer.Skills.Assault.SetLevel(level); break;
case Skill.PISTOL:
if (Main.LocalPlayer.Skills.Pistol.Level != level) Main.LocalPlayer.Skills.Pistol.SetLevel(level); break;
case Skill.PERCEPTION:
if (Main.LocalPlayer.Skills.Perception.Level != level) Main.LocalPlayer.Skills.Perception.SetLevel(level); break;
case Skill.SNIPER:
if (Main.LocalPlayer.Skills.Sniper.Level != level) Main.LocalPlayer.Skills.Sniper.SetLevel(level); break;
case Skill.SNIPING:
if (Main.LocalPlayer.Skills.Sniping.Level != level) Main.LocalPlayer.Skills.Sniping.SetLevel(level); break;
case Skill.ENDURANCE:
if (Main.LocalPlayer.Skills.Endurance.Level != level) Main.LocalPlayer.Skills.Endurance.SetLevel(level); break;
case Skill.THROWING:
if (Main.LocalPlayer.Skills.Throwing.Level != level) Main.LocalPlayer.Skills.Throwing.SetLevel(level); break;
case Skill.CHARISMA:
if (Main.LocalPlayer.Skills.Charisma.Level != level) Main.LocalPlayer.Skills.Charisma.SetLevel(level); break;
case Skill.HEALTH:
if (Main.LocalPlayer.Skills.Health.Level != level) Main.LocalPlayer.Skills.Health.SetLevel(level); break;
case Skill.VITALITY:
if (Main.LocalPlayer.Skills.Vitality.Level != level) Main.LocalPlayer.Skills.Vitality.SetLevel(level); break;
case Skill.METABOLISM:
if (Main.LocalPlayer.Skills.Metabolism.Level != level) Main.LocalPlayer.Skills.Metabolism.SetLevel(level); break;
case Skill.IMMUNITY:
if (Main.LocalPlayer.Skills.Immunity.Level != level) Main.LocalPlayer.Skills.Immunity.SetLevel(level); break;
case Skill.COVERTMOVEMENT:
if (Main.LocalPlayer.Skills.CovertMovement.Level != level) Main.LocalPlayer.Skills.CovertMovement.SetLevel(level); break;
case Skill.INTELLECT:
if (Main.LocalPlayer.Skills.Intellect.Level != level) Main.LocalPlayer.Skills.Intellect.SetLevel(level); break;
case Skill.ATTENTION:
if (Main.LocalPlayer.Skills.Attention.Level != level) Main.LocalPlayer.Skills.Attention.SetLevel(level); break;
case Skill.REVOLVER:
if (Main.LocalPlayer.Skills.Revolver.Level != level) Main.LocalPlayer.Skills.Revolver.SetLevel(level); break;
case Skill.SHOTGUN:
if (Main.LocalPlayer.Skills.Shotgun.Level != level) Main.LocalPlayer.Skills.Shotgun.SetLevel(level); break;
case Skill.HMG:
if (Main.LocalPlayer.Skills.HMG.Level != level) Main.LocalPlayer.Skills.HMG.SetLevel(level); break;
case Skill.DMR:
if (Main.LocalPlayer.Skills.DMR.Level != level) Main.LocalPlayer.Skills.DMR.SetLevel(level); break;
case Skill.AIMDRILLS:
if (Main.LocalPlayer.Skills.AimDrills.Level != level) Main.LocalPlayer.Skills.AimDrills.SetLevel(level); break;
case Skill.SEARCH:
if (Main.LocalPlayer.Skills.Search.Level != level) Main.LocalPlayer.Skills.Search.SetLevel(level); break;
case Skill.WEAPONTREATMENT:
if (Main.LocalPlayer.Skills.WeaponTreatment.Level != level) Main.LocalPlayer.Skills.WeaponTreatment.SetLevel(level); break;
case Skill.TROUBLESHOOTING:
if (Main.LocalPlayer.Skills.TroubleShooting.Level != level) Main.LocalPlayer.Skills.TroubleShooting.SetLevel(level); break;
case Skill.SURGERY:
if (Main.LocalPlayer.Skills.Surgery.Level != level) Main.LocalPlayer.Skills.Surgery.SetLevel(level); break;
case Skill.SMG:
if (Main.LocalPlayer.Skills.SMG.Level != level) Main.LocalPlayer.Skills.SMG.SetLevel(level); break;
default:
break;
}
}
}
}

View file

@ -0,0 +1,29 @@
using System;
using EscapeFromTarkovCheat.Utils;
using UnityEngine;
namespace EscapeFromTarkovCheat.Features.Misc
{
public class SpeedHack : MonoBehaviour
{
public void Update()
{
if (Main.GameWorld != null && Settings.SpeedHack)
{
this.Enable();
}
}
private void Enable()
{
if (Main.LocalPlayer == null && Main.MainCamera == null)
{
return;
}
if (Input.GetKey(KeyCode.LeftShift))
{
Main.LocalPlayer.Transform.position += Settings.SpeedAddition * Time.deltaTime * Main.MainCamera.transform.forward;
}
}
}
}