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

42
stoopid.raw/Draggable.cs Normal file
View file

@ -0,0 +1,42 @@
using UnityEngine;
using UnityEngine.EventSystems;
public class Draggable : MonoBehaviour, IPointerDownHandler, IEventSystemHandler, IDragHandler
{
private RectTransform rectTransform;
private CanvasGroup canvasGroup;
private Vector2 offset;
private void Awake()
{
rectTransform = GetComponent<RectTransform>();
canvasGroup = GetComponent<CanvasGroup>();
}
public void OnPointerDown(PointerEventData eventData)
{
RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform, eventData.position, eventData.pressEventCamera, out offset);
}
public void OnDrag(PointerEventData eventData)
{
if (canvasGroup != null)
{
canvasGroup.blocksRaycasts = false;
}
if (RectTransformUtility.ScreenPointToLocalPointInRectangle(rectTransform, eventData.position, eventData.pressEventCamera, out var localPoint))
{
rectTransform.anchoredPosition += localPoint - offset;
}
}
public void OnEndDrag(PointerEventData eventData)
{
if (canvasGroup != null)
{
canvasGroup.blocksRaycasts = true;
}
}
}

150
stoopid.raw/GrenadeESP.cs Normal file
View file

@ -0,0 +1,150 @@
using System.Collections.Generic;
using EFT.SynchronizableObjects;
using EFT.UI;
using stupid.solutions;
using stupid.solutions.Utils;
using UnityEngine;
public class GrenadeESP : MonoBehaviour
{
public Color grenadeColor = Color.red;
private List<Throwable> grenades = new List<Throwable>();
private HashSet<int> processedGrenades = new HashSet<int>();
private HashSet<int> processedTripwires = new HashSet<int>();
private Dictionary<Renderer, Shader> originalGrenadeShaders = new Dictionary<Renderer, Shader>();
public static bool IsGrenadeValid(Throwable grenade)
{
return grenade != null;
}
public void Update()
{
if (Main.GameWorld == null || Main.GameWorld.Grenades == null || !Settings.grenadeesp)
{
return;
}
grenades.Clear();
for (int i = 0; i < Main.GameWorld.Grenades.Count; i++)
{
Throwable byIndex = Main.GameWorld.Grenades.GetByIndex(i);
if (IsGrenadeValid(byIndex))
{
grenades.Add(byIndex);
}
}
if ((Main.GameWorld == null && processedTripwires != null) || processedGrenades != null)
{
processedTripwires.Clear();
processedGrenades.Clear();
}
}
private void OnGUI()
{
if (Settings.grenadeesp && Main.GameWorld != null)
{
foreach (Throwable grenade in grenades)
{
float num = Vector3.Distance(Main.MainCamera.transform.position, grenade.transform.position);
if (!(num > Settings.DrawPlayersDistance))
{
Vector3 vector = Camera.main.WorldToScreenPoint(grenade.transform.position);
if (vector.z > 0f)
{
vector.y = (float)Screen.height - vector.y;
Color color = ((num <= 10f) ? Color.red : new Color(1f, 0.65f, 0f));
Render.DrawString(new Vector2(vector.x, vector.y + 15f), "! Grenade !", color);
Render.DrawString(new Vector2(vector.x, vector.y + 30f), $"{num:F1}m", color);
}
}
}
}
if (Main.GameWorld != null && Main.ActiveCamera != null)
{
ApplyGrenadeChams();
}
if (!Settings.tripwire || !(Main.GameWorld != null))
{
return;
}
foreach (SynchronizableObject synchronizableObject in Main.GameWorld.SynchronizableObjectLogicProcessor.GetSynchronizableObjects())
{
if (Settings.Chams)
{
ApplyTripwireChams(synchronizableObject);
}
if (synchronizableObject.Type != SynchronizableObjectType.Tripwire)
{
continue;
}
float num2 = Vector3.Distance(Main.MainCamera.transform.position, ((Component)(object)synchronizableObject).transform.position);
if (!(num2 > Settings.DrawPlayersDistance))
{
Vector3 vector2 = Camera.main.WorldToScreenPoint(((Component)(object)synchronizableObject).transform.position);
if (vector2.z > 0f)
{
vector2.y = (float)Screen.height - vector2.y;
Color color2 = ((num2 <= 5f) ? Color.red : new Color(1f, 0.65f, 0f));
Render.DrawString(new Vector2(vector2.x, vector2.y + 15f), " ! Trip Wire !", color2);
Render.DrawString(new Vector2(vector2.x, vector2.y + 30f), $"{num2:F1}m", color2);
}
}
}
}
private void ApplyGrenadeChams()
{
if (!Settings.Chams || !Settings.grenadeesp)
{
return;
}
foreach (Throwable grenade in grenades)
{
if (!processedGrenades.Contains(grenade.GetInstanceID()))
{
ApplyChams(grenade.gameObject, processedGrenades, Settings.GrenadeVisible, Settings.GrenadeHidden);
}
}
}
private void ApplyTripwireChams(SynchronizableObject tripwire)
{
if (Settings.Chams && Settings.tripwire && !processedTripwires.Contains(((Object)(object)tripwire).GetInstanceID()))
{
ApplyChams(((Component)(object)tripwire).gameObject, processedTripwires, Settings.TripwireVisible, Settings.TripwireVisible);
}
}
private void ApplyChams(GameObject targetObject, HashSet<int> processedEntities, Color visible, Color hidden)
{
Renderer[] componentsInChildren = targetObject.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer in componentsInChildren)
{
if (!(renderer == null) && !(renderer.material == null))
{
if (!originalGrenadeShaders.ContainsKey(renderer))
{
originalGrenadeShaders[renderer] = renderer.material.shader;
}
Shader shader = Main.bundle.LoadAsset<Shader>("Chams.shader");
if (shader == null)
{
ConsoleScreen.Log("Failed to load Chams.shader from AssetBundle!");
continue;
}
renderer.material.shader = shader;
renderer.material.SetColor("_ColorVisible", visible);
renderer.material.SetColor("_ColorBehind", hidden);
renderer.allowOcclusionWhenDynamic = false;
renderer.forceRenderingOff = false;
renderer.enabled = true;
}
}
processedEntities.Add(targetObject.GetInstanceID());
}
}

132
stoopid.raw/Gridmanager.cs Normal file
View file

@ -0,0 +1,132 @@
using System;
using System.Reflection;
using EFT.InventoryLogic;
using EFT.UI;
public class Gridmanager
{
private static Type _ued1aType;
private static ConstructorInfo _ued1aConstructor;
static Gridmanager()
{
LoadUed1aType();
}
private static void LoadUed1aType()
{
try
{
Type[] types = Assembly.Load("Assembly-CSharp").GetTypes();
foreach (Type type in types)
{
if (type.Name == "\ued6f")
{
_ued1aType = type;
ConsoleScreen.Log("Found type: \ued6f");
break;
}
}
if (_ued1aType != null)
{
ConstructorInfo[] constructors = _ued1aType.GetConstructors(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
foreach (ConstructorInfo constructorInfo in constructors)
{
ParameterInfo[] parameters = constructorInfo.GetParameters();
ConsoleScreen.Log($"Constructor found with {parameters.Length} parameters:");
for (int j = 0; j < parameters.Length; j++)
{
ParameterInfo parameterInfo = parameters[j];
ConsoleScreen.Log($"Param {j + 1}: {parameterInfo.ParameterType.FullName} ({parameterInfo.Name})");
}
if (parameters.Length == 8 && parameters[0].ParameterType == typeof(string) && parameters[1].ParameterType == typeof(int) && parameters[2].ParameterType == typeof(int) && parameters[3].ParameterType == typeof(bool) && parameters[4].ParameterType == typeof(bool) && parameters[5].ParameterType.IsArray && parameters[6].ParameterType.Name.Contains("CompoundItem") && parameters[7].ParameterType == typeof(int))
{
_ued1aConstructor = constructorInfo;
ConsoleScreen.Log("Located the obfuscated constructor successfully.");
break;
}
}
if (_ued1aConstructor == null)
{
ConsoleScreen.Log("Failed to locate \ued6f constructor by matching parameter types.");
}
}
else
{
ConsoleScreen.Log("Failed to find \ued6f type.");
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Error during LoadUed1aType: " + ex.Message);
}
}
public static dynamic CreateGrid(string id, int gridWidth, int gridHeight, bool canStretchVertically, bool canStretchHorizontally, CompoundItem parentItem)
{
try
{
if (_ued1aConstructor != null)
{
ItemFilter[] array = new ItemFilter[0];
ConsoleScreen.Log($"Attempting to create new grid with ID: {id}, Width: {gridWidth}, Height: {gridHeight}");
return _ued1aConstructor.Invoke(new object[8] { id, gridWidth, gridHeight, canStretchVertically, canStretchHorizontally, array, parentItem, -1 });
}
ConsoleScreen.Log("Failed to create new grid. Constructor is null.");
return null;
}
catch (Exception ex)
{
ConsoleScreen.Log("Error creating grid: " + ex.Message);
return null;
}
}
public async void ReplaceGrid(dynamic item, int newGridWidth, int newGridHeight, string newGridID = null)
{
try
{
ConsoleScreen.Log("Starting grid replacement process...");
dynamic val = new ItemFactory().CreateItem("5c0a794586f77461c458f892");
if (val == null)
{
ConsoleScreen.Log("Failed to create boss container.");
return;
}
ConsoleScreen.Log("Boss container created successfully.");
dynamic val2 = val.Grids.FirstOrDefault();
if (val2 == null)
{
ConsoleScreen.Log("Failed to retrieve the boss container's grid.");
return;
}
ConsoleScreen.Log($"Boss container grid found. Grid ID: {(object)val2.ID}");
if (!(item.Grids[0]?.ParentItem is CompoundItem compoundItem))
{
ConsoleScreen.Log("Failed to retrieve the original parent item.");
return;
}
ConsoleScreen.Log("Original parent item retrieved successfully.");
if (item.Grids != null && item.Grids.Length > 0)
{
dynamic val3 = item.Grids[0];
ConsoleScreen.Log("Original grid found.");
string text = val3.ID;
string text2 = (string.IsNullOrEmpty(newGridID) ? text : newGridID);
ConsoleScreen.Log("Replacing original grid with Boss container grid. Final Grid ID: " + text2);
val2.ParentItem = compoundItem;
item.Grids[0] = val2;
ConsoleScreen.Log("Successfully replaced the grid with the boss container's grid.");
}
else
{
ConsoleScreen.Log("Item does not have any grids to replace.");
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Error replacing grid: " + ex.Message + "\n" + ex.StackTrace);
}
}
}

20
stoopid.raw/ItemData.cs Normal file
View file

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
[Serializable]
public class ItemData
{
public string Id { get; set; }
public string ShortName { get; set; }
public string Name { get; set; }
public string NormalizedName { get; set; }
public List<string> Types { get; set; }
public int BasePrice { get; set; }
public int? avg24hPrice { get; set; }
}

258
stoopid.raw/ItemFactory.cs Normal file
View file

@ -0,0 +1,258 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Comfort.Common;
using EFT;
using EFT.InventoryLogic;
using UnityEngine;
public class ItemFactory
{
public class ContainerCollection
{
private static Type _containerCollectionType;
private static PropertyInfo _containersProperty;
private static MethodInfo _getContainerMethod;
private static MethodInfo _tryFindItemMethod;
public IEnumerable<IContainer> Containers
{
get
{
if (_containersProperty != null)
{
return (IEnumerable<IContainer>)_containersProperty.GetValue(this);
}
return null;
}
}
static ContainerCollection()
{
LoadContainerCollectionType();
}
private static void LoadContainerCollectionType()
{
Assembly assembly = Assembly.Load("Assembly-CSharp");
if (assembly == null)
{
Log("Log: Failed to load Assembly-CSharp.");
return;
}
Type[] types = assembly.GetTypes();
foreach (Type type in types)
{
if (type.Name == "\uecea")
{
_containerCollectionType = type;
break;
}
}
if (!(_containerCollectionType == null))
{
_containersProperty = _containerCollectionType.GetProperty("Containers", BindingFlags.Instance | BindingFlags.Public);
_getContainerMethod = _containerCollectionType.GetMethod("GetContainer", BindingFlags.Instance | BindingFlags.Public);
_tryFindItemMethod = _containerCollectionType.GetMethod("TryFindItem", BindingFlags.Instance | BindingFlags.Public);
}
}
public IContainer GetContainer(string containerId)
{
if (_getContainerMethod != null)
{
return (IContainer)_getContainerMethod.Invoke(this, new object[1] { containerId });
}
return null;
}
public bool TryFindItem(string itemId, out Item item)
{
item = null;
if (_tryFindItemMethod != null)
{
object[] array = new object[2] { itemId, null };
bool result = (bool)_tryFindItemMethod.Invoke(this, array);
item = (Item)array[1];
return result;
}
return false;
}
public static void Log(string message)
{
using StreamWriter streamWriter = new StreamWriter(Path.Combine(Application.persistentDataPath, "log.txt"), append: true);
streamWriter.WriteLine($"{DateTime.Now}: {message}");
}
}
public class GridHelper
{
public LocationInGrid FindFreeSpace(Item item, dynamic grid)
{
_E374 obj = item.CalculateCellSize();
int x = obj.X;
int y = obj.Y;
int num = grid.GridWidth;
int num2 = grid.GridHeight;
dynamic val = grid.ItemCollection;
dynamic occupiedSpaces = GetOccupiedSpaces(val);
LocationInGrid locationInGrid = TryFindLocation(x, y, num, num2, occupiedSpaces);
if (locationInGrid == null && x != y)
{
locationInGrid = TryFindLocation(y, x, num, num2, occupiedSpaces);
}
if (locationInGrid == null)
{
locationInGrid = HandleStretching(x, y, grid, num, num2);
}
return locationInGrid;
}
private Dictionary<(int, int), bool> GetOccupiedSpaces(dynamic itemCollection)
{
Dictionary<(int, int), bool> dictionary = new Dictionary<(int, int), bool>();
foreach (dynamic item in itemCollection.Values)
{
dynamic val = item.Position;
dynamic val2 = item.CalculateCellSize();
int num = val2.X;
int num2 = val2.Y;
for (int i = val.X; i < val.X + num; i++)
{
for (int j = val.Y; j < val.Y + num2; j++)
{
dictionary[(i, j)] = true;
}
}
}
return dictionary;
}
private LocationInGrid TryFindLocation(int itemWidth, int itemHeight, int gridWidth, int gridHeight, Dictionary<(int, int), bool> occupiedSpaces)
{
for (int i = 0; i <= gridWidth - itemWidth; i++)
{
for (int j = 0; j <= gridHeight - itemHeight; j++)
{
if (IsSpaceAvailable(i, j, itemWidth, itemHeight, occupiedSpaces))
{
return new LocationInGrid(i, j, ItemRotation.Horizontal);
}
}
}
return null;
}
private bool IsSpaceAvailable(int startX, int startY, int itemWidth, int itemHeight, Dictionary<(int, int), bool> occupiedSpaces)
{
for (int i = startX; i < startX + itemWidth; i++)
{
for (int j = startY; j < startY + itemHeight; j++)
{
if (occupiedSpaces.ContainsKey((i, j)))
{
return false;
}
}
}
return true;
}
private LocationInGrid HandleStretching(int itemWidth, int itemHeight, dynamic grid, int gridWidth, int gridHeight)
{
if (grid.CanStretchHorizontally && gridHeight >= gridWidth + itemWidth)
{
return new LocationInGrid(gridWidth, 0, ItemRotation.Horizontal);
}
if (grid.CanStretchVertically && (itemWidth <= gridWidth || grid.CanStretchHorizontally))
{
return new LocationInGrid(0, gridHeight, ItemRotation.Vertical);
}
return null;
}
}
private static string _logFilePath;
private static Type _itemFactoryType;
private static MethodInfo _createItemMethod;
private static object _singletonInstance;
static ItemFactory()
{
LoadItemFactoryType();
}
private static void LoadItemFactoryType()
{
Assembly assembly = Assembly.Load("Assembly-CSharp");
if (assembly == null)
{
return;
}
Type[] types = assembly.GetTypes();
foreach (Type type in types)
{
_createItemMethod = type.GetMethod("CreateItem", BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
if (_createItemMethod != null)
{
_itemFactoryType = type;
break;
}
}
if (!(_itemFactoryType == null))
{
PropertyInfo property = typeof(Singleton<>).MakeGenericType(_itemFactoryType).GetProperty("Instance", BindingFlags.Static | BindingFlags.Public);
if (property != null)
{
_singletonInstance = property.GetValue(null);
}
}
}
public Item CreateItem(string id)
{
if (_createItemMethod == null || _singletonInstance == null)
{
return null;
}
string text = MongoID.Generate();
object[] parameters = new object[3] { text, id, null };
object obj = _createItemMethod.Invoke(_singletonInstance, parameters);
if (obj != null)
{
return (Item)obj;
}
return null;
}
public Item CreateItemWithParent(string itemId, string parentId)
{
if (_createItemMethod == null || _singletonInstance == null)
{
return null;
}
string text = ((!string.IsNullOrEmpty(parentId)) ? parentId : ((string)MongoID.Generate()));
object[] parameters = new object[3] { text, itemId, null };
object obj = _createItemMethod.Invoke(_singletonInstance, parameters);
if (obj != null)
{
return (Item)obj;
}
return null;
}
public static void Log(string message)
{
_logFilePath = Path.Combine(Application.persistentDataPath, "log.txt");
using StreamWriter streamWriter = new StreamWriter(_logFilePath, append: true);
streamWriter.WriteLine($"{DateTime.Now}: {message}");
}
}

51
stoopid.raw/Logger.cs Normal file
View file

@ -0,0 +1,51 @@
using System;
using System.IO;
using UnityEngine;
public static class Logger
{
public enum LogLevel
{
Info,
Warning,
Error
}
private static readonly string logFilePath = Path.Combine(Application.persistentDataPath, "log3.txt");
public static void Log(string message, LogLevel level = LogLevel.Info)
{
try
{
WriteLogToFile(FormatLogMessage(message, level));
}
catch (Exception ex)
{
Debug.LogError("Failed to log message: " + ex.Message);
}
}
private static string FormatLogMessage(string message, LogLevel level)
{
string arg = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
return $"{arg} [{level}] {message}";
}
private static void WriteLogToFile(string message)
{
using StreamWriter streamWriter = new StreamWriter(logFilePath, append: true);
streamWriter.WriteLine(message);
}
public static void ClearLog()
{
try
{
File.Delete(logFilePath);
}
catch (Exception ex)
{
Debug.LogError("Failed to clear log file: " + ex.Message);
}
}
}

6283
stoopid.raw/Menu2.cs Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
using UnityEngine;
public struct PointOfInterest
{
public string Name { get; set; }
public string Description { get; set; }
public Vector3 Position { get; set; }
public Color Color { get; set; }
public dynamic Quest { get; set; }
}

View file

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Comfort.Common;
using EFT.InventoryLogic;
public class PresetFactory
{
private static Type _presetFactoryType;
private static FieldInfo _itemPresetsField;
private static object _presetFactoryInstance;
static PresetFactory()
{
LoadPresetFactoryType();
}
private static void LoadPresetFactoryType()
{
Assembly assembly = Assembly.Load("Assembly-CSharp");
if (assembly == null)
{
ItemFactory.Log("Log: Failed to load Assembly-CSharp.");
return;
}
Type[] types = assembly.GetTypes();
foreach (Type type in types)
{
if (type.Name == "\uef57")
{
_presetFactoryType = type;
break;
}
}
if (_presetFactoryType == null)
{
ItemFactory.Log("Log: Failed to find PresetFactory type.");
return;
}
ItemFactory.Log("Log: Found PresetFactory type: " + _presetFactoryType.FullName);
PropertyInfo property = typeof(Singleton<>).MakeGenericType(_presetFactoryType).GetProperty("Instance", BindingFlags.Static | BindingFlags.Public);
if (property != null)
{
_presetFactoryInstance = property.GetValue(null);
}
_itemPresetsField = _presetFactoryType.GetField("ItemPresets", BindingFlags.Instance | BindingFlags.NonPublic);
if (_itemPresetsField == null)
{
ItemFactory.Log("Log: Failed to find ItemPresets field.");
}
}
public static Dictionary<string, object> GetItemPresets()
{
if (_presetFactoryInstance == null || _itemPresetsField == null)
{
ItemFactory.Log("Log: PresetFactory is not properly initialized.");
return null;
}
Dictionary<string, object> dictionary = _itemPresetsField.GetValue(_presetFactoryInstance) as Dictionary<string, object>;
if (dictionary != null)
{
ItemFactory.Log($"Log: Found {dictionary.Count} item presets.");
}
else
{
ItemFactory.Log("Log: ItemPresets is null.");
}
return dictionary;
}
public static Item SpawnPresetItem(string templateId)
{
Dictionary<string, object> itemPresets = GetItemPresets();
if (itemPresets == null || !itemPresets.ContainsKey(templateId))
{
ItemFactory.Log("Log: No preset found for the given templateId.");
return null;
}
object obj = itemPresets[templateId];
PropertyInfo property = obj.GetType().GetProperty("Item", BindingFlags.Instance | BindingFlags.Public);
if (property != null)
{
Item result = property.GetValue(obj) as Item;
ItemFactory.Log("Log: Spawned preset item with templateId: " + templateId);
return result;
}
ItemFactory.Log("Log: Failed to retrieve Item from the preset.");
return null;
}
}

View file

@ -0,0 +1,20 @@
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
[assembly: AssemblyTitle("StupidSolutions")]
[assembly: AssemblyDescription("Notatarkovcheat")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("StupidSolutions")]
[assembly: AssemblyCopyright("Copyright © BallsackSolutions 2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c1c426a1-efc3-4c83-972c-eca557571328")]
[assembly: AssemblyFileVersion("3.0.0.0")]
[assembly: AssemblyVersion("3.0.0.0")]
[module: RefSafetyRules(11)]

114
stoopid.raw/PullItemIDs.cs Normal file
View file

@ -0,0 +1,114 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using EFT.UI;
using Newtonsoft.Json;
using UnityEngine;
public class PullItemIDs : MonoBehaviour
{
public List<ItemData> itemList;
public bool isstarted;
public async void Start()
{
ConsoleScreen.Log("Fetching Item IDs");
await FetchAndSaveDataAsync();
ConsoleScreen.Log("Fetching Item IDs Completed");
LoadItemData();
}
private async Task FetchAndSaveDataAsync()
{
var value = new { new
{
query = "query Items {\n items(lang: en) {\n id\n shortName\n name\n normalizedName\n types\n basePrice\n avg24hPrice\n }\n }"
}.query };
string text = Path.Combine(Application.persistentDataPath);
Directory.CreateDirectory(text);
string filePath = Path.Combine(text, "ItemIDs.Json");
ConsoleScreen.Log("Fetching data from API.");
using HttpClient httpClient = new HttpClient();
_ = 1;
try
{
StringContent content = new StringContent(JsonConvert.SerializeObject(value), Encoding.UTF8, "application/json");
ConsoleScreen.Log("Sending request");
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync("https://api.tarkov.dev/graphql", content);
if (!httpResponseMessage.IsSuccessStatusCode)
{
ConsoleScreen.LogError($"API request failed with status code: {httpResponseMessage.StatusCode}");
return;
}
string value2 = await httpResponseMessage.Content.ReadAsStringAsync();
ConsoleScreen.Log("Response received");
dynamic val = JsonConvert.DeserializeObject<object>(value2);
dynamic val2 = val.data.items.ToString();
itemList = JsonConvert.DeserializeObject<List<ItemData>>(val2);
string contents = JsonConvert.SerializeObject(itemList, Formatting.Indented);
File.WriteAllText(filePath, contents);
ConsoleScreen.Log("Response written to: " + filePath);
}
catch (Exception ex)
{
ConsoleScreen.LogError("An error occurred: " + ex.Message);
}
}
private void LoadItemData()
{
try
{
string text = Path.Combine(Application.persistentDataPath, "ItemIDs.json");
string text2 = Path.Combine(Application.persistentDataPath, "dev_items.json");
ConsoleScreen.Log("Attempting to load item data from: " + text);
if (File.Exists(text))
{
string value = File.ReadAllText(text);
ConsoleScreen.Log("Successfully read JSON data from ItemIDs.json.");
List<ItemData> list = JsonConvert.DeserializeObject<List<ItemData>>(value);
if (list != null)
{
itemList = list;
ConsoleScreen.Log($"Main item data loaded successfully. Items count: {itemList.Count}");
}
else
{
ConsoleScreen.Log("Error: Deserialized main item list is null.");
}
}
else
{
ConsoleScreen.Log("Error: Main JSON file (ItemIDs.json) does not exist.");
}
ConsoleScreen.Log("Attempting to load dev item data from: " + text2);
if (File.Exists(text2))
{
string value2 = File.ReadAllText(text2);
ConsoleScreen.Log("Successfully read JSON data from dev_items.json.");
List<ItemData> list2 = JsonConvert.DeserializeObject<List<ItemData>>(value2);
if (list2 != null)
{
itemList.AddRange(list2);
ConsoleScreen.Log($"Dev item data loaded successfully. Total items count: {itemList.Count}");
}
else
{
ConsoleScreen.Log("Error: Deserialized dev item list is null.");
}
}
else
{
ConsoleScreen.Log("Error: Dev JSON file (dev_items.json) does not exist.");
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Error occurred while loading item data: " + ex.Message);
}
}
}

View file

@ -0,0 +1,50 @@
using System;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using EFT.UI;
using Newtonsoft.Json;
using UnityEngine;
public class PullQuestIDs : MonoBehaviour
{
private async void Start()
{
ConsoleScreen.Log("Fetching Quest IDs");
await FetchAndSaveDataAsync();
ConsoleScreen.Log("Fetching Quest IDs Completed");
}
private async Task FetchAndSaveDataAsync()
{
var value = new { new
{
query = "query Tasks \n {\n tasks(lang: en, gameMode: pve) \n {\n trader {\n name\n }\n name\n id\n experience\n factionName\n kappaRequired\n lightkeeperRequired\n minPlayerLevel\n objectives {\n type\n description\n }\n restartable\n }\n }"
}.query };
string text = Path.Combine(Application.persistentDataPath);
Directory.CreateDirectory(text);
string filePath = Path.Combine(text, "QuestIDs.Json");
ConsoleScreen.Log("Fetching data from API.");
using HttpClient httpClient = new HttpClient();
_ = 1;
try
{
StringContent content = new StringContent(JsonConvert.SerializeObject(value), Encoding.UTF8, "application/json");
ConsoleScreen.Log("Sending request");
HttpResponseMessage httpResponseMessage = await httpClient.PostAsync("https://api.tarkov.dev/graphql", content);
if (!httpResponseMessage.IsSuccessStatusCode)
{
ConsoleScreen.LogError($"API request failed with status code: {httpResponseMessage.StatusCode}");
return;
}
string contents = JsonConvert.SerializeObject(JsonConvert.DeserializeObject(await httpResponseMessage.Content.ReadAsStringAsync()), Formatting.Indented);
File.WriteAllText(filePath, contents);
ConsoleScreen.Log("Response written to: " + filePath);
}
catch (Exception ex)
{
ConsoleScreen.LogError("An error occurred: " + ex.Message);
}
}
}

593
stoopid.raw/QuestModule.cs Normal file
View file

@ -0,0 +1,593 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Comfort.Common;
using EFT;
using EFT.Quests;
using EFT.UI;
using Microsoft.CSharp.RuntimeBinder;
using stupid.solutions;
using stupid.solutions.Utils;
using UnityEngine;
public class QuestModule : MonoBehaviour
{
[CompilerGenerated]
private static class _003C_003Eo__4
{
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__0;
public static CallSite<Func<CallSite, object, object, object>> _003C_003Ep__1;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__2;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__3;
public static CallSite<Func<CallSite, object, EQuestStatus, object>> _003C_003Ep__4;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__5;
public static CallSite<Action<CallSite, object, object, bool>> _003C_003Ep__6;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__7;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__8;
public static CallSite<Func<CallSite, _EA29, object, bool, object>> _003C_003Ep__9;
public static CallSite<Action<CallSite, object, EQuestStatus, bool, bool>> _003C_003Ep__10;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__11;
public static CallSite<Func<CallSite, object, EQuestStatus, object>> _003C_003Ep__12;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__13;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__14;
public static CallSite<Func<CallSite, object, EQuestStatus, object>> _003C_003Ep__15;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__16;
public static CallSite<Func<CallSite, object, EQuestStatus, object>> _003C_003Ep__17;
public static CallSite<Func<CallSite, object, object, object>> _003C_003Ep__18;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__19;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__20;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__21;
public static CallSite<Func<CallSite, object, EQuestStatus, object>> _003C_003Ep__22;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__23;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__24;
public static CallSite<Func<CallSite, object, object, object>> _003C_003Ep__25;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__26;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__27;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__28;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__29;
public static CallSite<Func<CallSite, string, object, object>> _003C_003Ep__30;
public static CallSite<Func<CallSite, object, string, object>> _003C_003Ep__31;
public static CallSite<Action<CallSite, Type, object>> _003C_003Ep__32;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__33;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__34;
public static CallSite<Action<CallSite, object, object>> _003C_003Ep__35;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__36;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__37;
public static CallSite<Action<CallSite, object, object>> _003C_003Ep__38;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__39;
public static CallSite<Func<CallSite, object, IEnumerable>> _003C_003Ep__40;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__41;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__42;
public static CallSite<Func<CallSite, object, IEnumerable>> _003C_003Ep__43;
public static CallSite<Action<CallSite, object, EQuestStatus, bool, bool>> _003C_003Ep__44;
public static CallSite<Action<CallSite, object, EQuestStatus, bool, bool>> _003C_003Ep__45;
public static CallSite<Action<CallSite, object, object, bool>> _003C_003Ep__46;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__47;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__48;
public static CallSite<Func<CallSite, _EA29, object, bool, bool, object>> _003C_003Ep__49;
public static CallSite<Func<CallSite, object, IResult>> _003C_003Ep__50;
public static CallSite<Func<CallSite, object, IEnumerable>> _003C_003Ep__51;
}
[StructLayout(LayoutKind.Auto)]
[CompilerGenerated]
private struct _003CFinishQuests_003Ed__4 : IAsyncStateMachine
{
private static class _003C_003Eo__4
{
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__0;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__1;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__2;
public static CallSite<Action<CallSite, object>> _003C_003Ep__3;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__4;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__5;
public static CallSite<Func<CallSite, object, bool>> _003C_003Ep__6;
public static CallSite<Func<CallSite, object, object>> _003C_003Ep__7;
}
public int _003C_003E1__state;
public AsyncVoidMethodBuilder _003C_003Et__builder;
private _EA29 _003Csession_003E5__2;
private object _003CquestController_003E5__3;
private IEnumerator _003C_003E7__wrap3;
private object _003Cquest_003E5__5;
private object _003C_003Eu__1;
private int _003Ctries_003E5__6;
private Func<CallSite, object, IResult> _003C_003E7__wrap6;
private CallSite<Func<CallSite, object, IResult>> _003C_003E7__wrap7;
private TaskAwaiter _003C_003Eu__2;
private void MoveNext()
{
int num = _003C_003E1__state;
try
{
if ((uint)num <= 2u)
{
goto IL_0132;
}
Player localPlayer = Main.LocalPlayer;
if (!(localPlayer == null))
{
_tarkovApplication.GetClientBackEndSession();
_003Csession_003E5__2 = _tarkovApplication.GetClientBackEndSession();
if (_003Csession_003E5__2 != null)
{
FieldInfo fieldInfo = typeof(Player).GetRuntimeFields().FirstOrDefault((FieldInfo x) => x.Name == "_questController");
_003CquestController_003E5__3 = fieldInfo.GetValue(localPlayer);
dynamic val = ((dynamic)_003CquestController_003E5__3).Quests;
_003C_003E7__wrap3 = ((IEnumerable)val).GetEnumerator();
goto IL_0132;
}
ConsoleScreen.Log("Session is null");
}
goto end_IL_0007;
IL_0132:
try
{
TaskAwaiter awaiter;
dynamic val2;
switch (num)
{
case 0:
val2 = _003C_003Eu__1;
_003C_003Eu__1 = null;
num = (_003C_003E1__state = -1);
goto IL_05a0;
case 1:
try
{
if (num != 1)
{
_003Ctries_003E5__6 = 0;
goto IL_1185;
}
dynamic val3 = _003C_003Eu__1;
_003C_003Eu__1 = null;
num = (_003C_003E1__state = -1);
goto IL_157f;
IL_157f:
val2 = val3.GetResult();
IResult result = _003C_003E7__wrap6(_003C_003E7__wrap7, (object)val2);
_003C_003E7__wrap6 = null;
_003C_003E7__wrap7 = null;
if (!result.Succeed && _003Ctries_003E5__6 <= 15)
{
_003Ctries_003E5__6++;
Thread.Sleep(500);
}
goto IL_1185;
IL_1185:
((dynamic)_003Cquest_003E5__5).SetStatus(EQuestStatus.AvailableForFinish, true, true);
((dynamic)_003Cquest_003E5__5).SetStatus(EQuestStatus.Success, true, true);
ConsoleScreen.Log("Sending Network Request");
((dynamic)_003CquestController_003E5__3).FinishQuest((dynamic)_003Cquest_003E5__5, true);
if (QuestModule._003C_003Eo__4._003C_003Ep__50 == null)
{
QuestModule._003C_003Eo__4._003C_003Ep__50 = CallSite<Func<CallSite, object, IResult>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.None, typeof(IResult), typeof(QuestModule)));
}
_003C_003E7__wrap6 = QuestModule._003C_003Eo__4._003C_003Ep__50.Target;
_003C_003E7__wrap7 = QuestModule._003C_003Eo__4._003C_003Ep__50;
val3 = _003Csession_003E5__2.QuestComplete(((dynamic)_003Cquest_003E5__5).Template.Id, false, false).GetAwaiter();
if (!(bool)val3.IsCompleted)
{
num = (_003C_003E1__state = 1);
_003C_003Eu__1 = val3;
ICriticalNotifyCompletion awaiter2 = val3 as ICriticalNotifyCompletion;
if (awaiter2 == null)
{
INotifyCompletion awaiter3 = (INotifyCompletion)(object)val3;
_003C_003Et__builder.AwaitOnCompleted(ref awaiter3, ref this);
awaiter3 = null;
}
else
{
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter2, ref this);
}
awaiter2 = null;
return;
}
goto IL_157f;
}
catch (Exception ex)
{
ConsoleScreen.Log(ex.ToString());
}
awaiter = Task.Delay(2500).GetAwaiter();
if (!awaiter.IsCompleted)
{
num = (_003C_003E1__state = 2);
_003C_003Eu__2 = awaiter;
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter, ref this);
return;
}
goto IL_168e;
case 2:
awaiter = _003C_003Eu__2;
_003C_003Eu__2 = default(TaskAwaiter);
num = (_003C_003E1__state = -1);
goto IL_168e;
default:
{
while (_003C_003E7__wrap3.MoveNext())
{
_003Cquest_003E5__5 = _003C_003E7__wrap3.Current;
if ((dynamic)_003Cquest_003E5__5 == null)
{
continue;
}
goto IL_01fe;
}
break;
}
IL_05a0:
val2.GetResult();
((dynamic)_003Cquest_003E5__5).SetStatus(EQuestStatus.Started, true, true);
goto IL_0667;
IL_0667:
if (!((((dynamic)_003Cquest_003E5__5).QuestStatus == EQuestStatus.Success) ? true : false))
{
val2 = ((dynamic)_003Cquest_003E5__5).QuestStatus == EQuestStatus.Locked;
if (!(val2 ? true : false) && !((val2 | (((dynamic)_003Cquest_003E5__5).QuestStatus == EQuestStatus.AvailableForStart)) ? true : false) && !((((dynamic)_003Cquest_003E5__5).QuestStatus != EQuestStatus.Started) ? true : false) && !((((dynamic)_003Cquest_003E5__5).Template == null) ? true : false))
{
ConsoleScreen.Log($"Trying to finish quest: {(object)((dynamic)_003Cquest_003E5__5).Template.Name}");
IEnumerator enumerator = ((IEnumerable)((dynamic)_003Cquest_003E5__5).Template.Conditions).GetEnumerator();
try
{
while (enumerator.MoveNext())
{
dynamic current = enumerator.Current;
ConsoleScreen.Log("===== " + current.Key + " =====");
IEnumerator enumerator2 = ((IEnumerable)current.Value).GetEnumerator();
try
{
while (enumerator2.MoveNext())
{
dynamic current2 = enumerator2.Current;
((dynamic)_003Cquest_003E5__5).CompletedConditions.Add(current2.id);
if (!(current2 is ConditionCounterCreator conditionCounterCreator))
{
continue;
}
IEnumerator<Condition> enumerator3 = conditionCounterCreator.Conditions.GetEnumerator();
try
{
while (enumerator3.MoveNext())
{
_ = enumerator3.Current;
((dynamic)_003Cquest_003E5__5).CompletedConditions.Add(current2.id);
}
}
finally
{
if (num < 0)
{
enumerator3?.Dispose();
}
}
}
}
finally
{
if (num < 0 && enumerator2 is IDisposable disposable)
{
disposable.Dispose();
}
}
}
}
finally
{
if (num < 0 && enumerator is IDisposable disposable2)
{
disposable2.Dispose();
}
}
goto case 1;
}
}
goto default;
IL_01fe:
if (((dynamic)_003Cquest_003E5__5).QuestStatus == EQuestStatus.AvailableAfter)
{
((dynamic)_003CquestController_003E5__3).AcceptQuest((dynamic)_003Cquest_003E5__5, true);
val2 = _003Csession_003E5__2.QuestAccept(((dynamic)_003Cquest_003E5__5).Template.id, false).GetAwaiter();
if (!(bool)val2.IsCompleted)
{
num = (_003C_003E1__state = 0);
_003C_003Eu__1 = val2;
ICriticalNotifyCompletion awaiter2 = val2 as ICriticalNotifyCompletion;
if (awaiter2 == null)
{
INotifyCompletion awaiter3 = (INotifyCompletion)(object)val2;
_003C_003Et__builder.AwaitOnCompleted(ref awaiter3, ref this);
awaiter3 = null;
}
else
{
_003C_003Et__builder.AwaitUnsafeOnCompleted(ref awaiter2, ref this);
}
awaiter2 = null;
return;
}
goto IL_05a0;
}
goto IL_0667;
IL_168e:
awaiter.GetResult();
_003Cquest_003E5__5 = null;
goto default;
}
}
finally
{
if (num < 0 && _003C_003E7__wrap3 is IDisposable disposable3)
{
disposable3.Dispose();
}
}
_003C_003E7__wrap3 = null;
end_IL_0007:;
}
catch (Exception exception)
{
_003C_003E1__state = -2;
_003Csession_003E5__2 = null;
_003CquestController_003E5__3 = null;
_003C_003Et__builder.SetException(exception);
return;
}
_003C_003E1__state = -2;
_003Csession_003E5__2 = null;
_003CquestController_003E5__3 = null;
_003C_003Et__builder.SetResult();
}
void IAsyncStateMachine.MoveNext()
{
//ILSpy generated this explicit interface implementation from .override directive in MoveNext
this.MoveNext();
}
[DebuggerHidden]
private void SetStateMachine(IAsyncStateMachine stateMachine)
{
_003C_003Et__builder.SetStateMachine(stateMachine);
}
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine stateMachine)
{
//ILSpy generated this explicit interface implementation from .override directive in SetStateMachine
this.SetStateMachine(stateMachine);
}
}
public static TarkovApplication _tarkovApplication;
public bool finishquest;
public void Update()
{
if (finishquest)
{
FinishQuests();
finishquest = true;
}
if (_tarkovApplication == null)
{
_tarkovApplication = LocationsFixerV2._tarkovApplication;
}
if (!Settings.hidenick)
{
return;
}
_tarkovApplication.GetClientBackEndSession();
_EA29 clientBackEndSession = _tarkovApplication.GetClientBackEndSession();
if (!(_tarkovApplication == null) && clientBackEndSession != null && clientBackEndSession.Profile != null)
{
Profile profile = clientBackEndSession.Profile;
string text = "Empty";
if (profile.Nickname != text)
{
profile.Info.Nickname = text;
ConsoleScreen.Log("NickPatched :-)");
}
}
}
public unsafe async void FinishQuests()
{
Player localPlayer = Main.LocalPlayer;
if (localPlayer == null)
{
return;
}
_tarkovApplication.GetClientBackEndSession();
_EA29 session = _tarkovApplication.GetClientBackEndSession();
if (session == null)
{
ConsoleScreen.Log("Session is null");
return;
}
FieldInfo fieldInfo = typeof(Player).GetRuntimeFields().FirstOrDefault((FieldInfo x) => x.Name == "_questController");
dynamic questController = fieldInfo.GetValue(localPlayer);
dynamic val = questController.Quests;
AsyncVoidMethodBuilder asyncVoidMethodBuilder = default(AsyncVoidMethodBuilder);
foreach (dynamic quest in val)
{
if (quest == null)
{
continue;
}
dynamic awaiter;
if (quest.QuestStatus == EQuestStatus.AvailableAfter)
{
questController.AcceptQuest(quest, true);
awaiter = session.QuestAccept(quest.Template.id, false).GetAwaiter();
if (!(bool)awaiter.IsCompleted)
{
ICriticalNotifyCompletion awaiter2 = awaiter as ICriticalNotifyCompletion;
if (awaiter2 == null)
{
INotifyCompletion awaiter3 = (INotifyCompletion)(object)awaiter;
asyncVoidMethodBuilder.AwaitOnCompleted(ref awaiter3, ref *(_003CFinishQuests_003Ed__4*)/*Error near IL_0567: stateMachine*/);
}
else
{
asyncVoidMethodBuilder.AwaitUnsafeOnCompleted(ref awaiter2, ref *(_003CFinishQuests_003Ed__4*)/*Error near IL_057a: stateMachine*/);
}
/*Error near IL_0583: leave MoveNext - await not detected correctly*/;
}
awaiter.GetResult();
quest.SetStatus(EQuestStatus.Started, true, true);
}
if (quest.QuestStatus == EQuestStatus.Success)
{
continue;
}
awaiter = quest.QuestStatus == EQuestStatus.Locked;
if ((awaiter) || (awaiter | (quest.QuestStatus == EQuestStatus.AvailableForStart)) || (quest.QuestStatus != EQuestStatus.Started) || ((quest.Template == null) ? true : false))
{
continue;
}
ConsoleScreen.Log($"Trying to finish quest: {(object)quest.Template.Name}");
foreach (dynamic item in quest.Template.Conditions)
{
ConsoleScreen.Log("===== " + item.Key + " =====");
foreach (dynamic item2 in item.Value)
{
quest.CompletedConditions.Add(item2.id);
if (!(item2 is ConditionCounterCreator conditionCounterCreator))
{
continue;
}
foreach (Condition condition in conditionCounterCreator.Conditions)
{
_ = condition;
quest.CompletedConditions.Add(item2.id);
}
}
}
try
{
int tries = 0;
dynamic awaiter4;
while (true)
{
quest.SetStatus(EQuestStatus.AvailableForFinish, true, true);
quest.SetStatus(EQuestStatus.Success, true, true);
ConsoleScreen.Log("Sending Network Request");
questController.FinishQuest(quest, true);
if (_003C_003Eo__4._003C_003Ep__50 == null)
{
_003C_003Eo__4._003C_003Ep__50 = CallSite<Func<CallSite, object, IResult>>.Create(Microsoft.CSharp.RuntimeBinder.Binder.Convert(CSharpBinderFlags.None, typeof(IResult), typeof(QuestModule)));
}
Func<CallSite, object, IResult> target = _003C_003Eo__4._003C_003Ep__50.Target;
CallSite<Func<CallSite, object, IResult>> _003C_003Ep__ = _003C_003Eo__4._003C_003Ep__50;
awaiter4 = session.QuestComplete(quest.Template.Id, false, false).GetAwaiter();
if (!(bool)awaiter4.IsCompleted)
{
break;
}
awaiter = awaiter4.GetResult();
if (!target(_003C_003Ep__, (object)awaiter).Succeed && tries <= 15)
{
tries++;
Thread.Sleep(500);
}
}
ICriticalNotifyCompletion awaiter2 = awaiter4 as ICriticalNotifyCompletion;
if (awaiter2 == null)
{
INotifyCompletion awaiter3 = (INotifyCompletion)(object)awaiter4;
asyncVoidMethodBuilder.AwaitOnCompleted(ref awaiter3, ref *(_003CFinishQuests_003Ed__4*)/*Error near IL_1546: stateMachine*/);
}
else
{
asyncVoidMethodBuilder.AwaitUnsafeOnCompleted(ref awaiter2, ref *(_003CFinishQuests_003Ed__4*)/*Error near IL_1559: stateMachine*/);
}
/*Error near IL_1562: leave MoveNext - await not detected correctly*/;
}
catch (Exception ex)
{
ConsoleScreen.Log(ex.ToString());
}
await Task.Delay(2500);
}
}
}

55
stoopid.raw/RayCast.cs Normal file
View file

@ -0,0 +1,55 @@
using EFT;
using stupid.solutions.stupid.solutions.Data;
using UnityEngine;
internal class RayCast
{
private static readonly LayerMask LayerMask = -2142957568;
private static RaycastHit _raycastHit;
public static Vector3 BarrelRayCast(Player gamePlayer)
{
try
{
if (gamePlayer.Fireport == null)
{
return Vector3.zero;
}
Physics.Linecast(gamePlayer.Fireport.position, gamePlayer.Fireport.position - gamePlayer.Fireport.up * 1000f, out _raycastHit);
return _raycastHit.point;
}
catch
{
return Vector3.zero;
}
}
public static Vector3 BarrelRayCastO(OnlineGamePlayer gamePlayer)
{
try
{
_ = gamePlayer.Player.ObservedPlayerController.HandsController.CurrentFireport.position;
BifacialTransform currentFireport = gamePlayer.Player.ObservedPlayerController.HandsController.CurrentFireport;
Physics.Linecast(currentFireport.position, currentFireport.position - currentFireport.up * 1000f, out _raycastHit);
return _raycastHit.point;
}
catch
{
return Vector3.zero;
}
}
public static string BarrelRayCastTest(Player gamePlayer)
{
try
{
Physics.Linecast(gamePlayer.Fireport.position, gamePlayer.Fireport.position - gamePlayer.Fireport.up * 1000f, out _raycastHit);
return _raycastHit.transform.name;
}
catch
{
return "Unkown";
}
}
}

View file

@ -0,0 +1,104 @@
using System;
using System.Reflection;
using EFT;
using EFT.InventoryLogic;
using EFT.UI;
using stupid.solutions;
using stupid.solutions.Utils;
public class StatusManager
{
public class HookManager
{
public static bool CheckItemFilter_Hook(ItemFilter[] filters, Item item)
{
return true;
}
}
public static void Stop_Hook(object instance, string profileId, ExitStatus exitStatus, string exitName, float delay = 0f)
{
try
{
Main.alwayssurvivedhook.Unhook();
MethodInfo originalMethod = Main.alwayssurvivedhook.OriginalMethod;
if (originalMethod != null)
{
if (Settings.alwayssurvived)
{
ExitStatus exitStatus2 = ExitStatus.Survived;
originalMethod.Invoke(instance, new object[4] { profileId, exitStatus2, exitName, delay });
ConsoleScreen.Log("Setting Exit Status to Survived");
}
else
{
originalMethod.Invoke(instance, new object[4] { profileId, exitStatus, exitName, delay });
ConsoleScreen.Log("Always Survive is off, not doing anything");
}
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Exception in hook method:");
ConsoleScreen.Log($"Exception Type: {ex.GetType()}");
ConsoleScreen.Log("Exception Message: " + ex.Message);
ConsoleScreen.Log("Stack Trace: " + ex.StackTrace);
}
finally
{
Main.alwayssurvivedhook.Hook();
}
}
public static bool CheckItemFilter_Hook(object instance, Item item)
{
try
{
Main.checkItemFilterHook.Unhook();
MethodInfo originalMethod = Main.checkItemFilterHook.OriginalMethod;
if (originalMethod != null)
{
if (Settings.removefilters)
{
return true;
}
return (bool)originalMethod.Invoke(instance, new object[1] { item });
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Exception in CheckItemFilter_Hook: " + ex.Message);
}
finally
{
Main.checkItemFilterHook.Hook();
}
return false;
}
public static bool CheckItemExcludedFilter_Hook(object instance, Item item)
{
try
{
Main.checkItemExcludedFilterHook.Unhook();
MethodInfo originalMethod = Main.checkItemExcludedFilterHook.OriginalMethod;
if (originalMethod != null)
{
if (Settings.removefilters)
{
return true;
}
return (bool)originalMethod.Invoke(instance, new object[1] { item });
}
}
catch (Exception ex)
{
ConsoleScreen.Log("Exception in CheckItemExcludedFilter_Hook: " + ex.Message);
}
finally
{
Main.checkItemExcludedFilterHook.Hook();
}
return false;
}
}

View file

@ -0,0 +1,135 @@
using System.Collections.Generic;
namespace stupid.solutions.stupid.solutions.Data;
internal class AiNames
{
public static readonly HashSet<string> RogueNames = new HashSet<string>
{
"Afraid", "Aimbotkin", "Andresto", "Applejuice", "Arizona", "Auron", "Badboy", "Baddie", "Beard", "Beverly",
"Bison", "Blackbird", "Blade", "Blakemore", "Boatswain", "Boogerman", "Brockley", "Browski", "Bullet", "Bunny",
"Butcher", "Chester", "Churchill", "Cliffhanger", "Condor", "Cook", "Corsair", "Cougar", "Coyote", "Crooked",
"Cross", "Dakota", "Dawg", "Deceit", "Denver", "Diggi", "Donutop", "Duke", "Dustin", "Enzo",
"Esquilo", "Father", "Firion", "Floridaman", "Foxy", "Frenzy", "Garandthumb", "Goat", "Golden", "Grandpa",
"Greyzone", "Grim", "Grommet", "Gunporn", "Handsome", "Haunted", "Hellshrimp", "Honorable", "Hypno", "Instructor",
"Iowa", "Ironfists", "James", "Jeff", "Jersey", "John", "Juggernaut", "Justkilo", "Kanzas", "Kentucky",
"Kry", "Lancaster", "Lee", "Legia", "Litton", "Lost", "Lunar", "Madknight", "Mamba", "Marooner",
"Meldon", "Melo", "Michigan", "Mike", "Momma", "Mortal", "Nevada", "Nine-hole", "Noisy", "Nukem",
"Ocean", "Oklahoma", "OneEye", "Oskar", "Panther", "Philbo", "Quebec", "Raccoon", "Rage", "Rambo",
"Rassler", "Rib-eye", "Riot", "Rock", "Rocket", "Ronflex", "Ronny", "RoughDog", "Scar", "Scottsdale",
"Seafarer", "Shadow", "SharkBait", "Sharkkiller", "Sherifu", "Sherman", "Shifty", "Slayer", "Sly", "Snake",
"Sneaky", "Sniperlife", "Solem", "Solidus", "Spectator-6", "Spyke", "Stamper", "Striker", "Texas", "Three-Teeth",
"Trent", "Trickster", "Triggerhappy", "Two-Finger", "Vicious", "Victor", "Voodoo", "Voss", "Wadley", "Walker",
"Weasel", "Whale-Eye", "Whisky", "Whitemane", "Woodrow", "Wrath", "Zed", "Zero-zero"
};
private static readonly HashSet<string> RaiderNames = new HashSet<string>
{
"Акула", "Балу", "Барракуда", "Барс", "Беркут", "Дикобраз", "Гадюка", "Гепард", "Гриф", "Гризли",
"Гюрза", "Ирбис", "Ягуар", "Калан", "Каракурт", "Кайман", "Кобра", "Кондор", "Крачун", "Красный",
"Кречет", "Леопард", "Лев", "Лис", "Логгерхед", "Мангуст", "Мантис", "Манул", "Медведь", "Могильник",
"Носорог", "Орёл", "Орлан", "Падальщик", "Пантера", "Пчел", "Пиранья", "Питон", "Пума", "Росомаха",
"Рысь", "Сапсан", "Секач", "Шакал", "Скорпион", "Стервятник", "Тарантул", "Тайпан", "Тигр", "Варан",
"Вепрь", "Волк", "Ворон", "Ястреб", "Зубр"
};
private static readonly HashSet<string> CultistNames = new HashSet<string> { "Жрец", "Сектант", "Культист" };
private static readonly HashSet<string> GuardNames = new HashSet<string>
{
"Baklazhan", "Banovyy", "Barmaley", "Basmach", "Bazil", "Begezhan", "Belyash", "Bibop", "Borzyy", "Cheburek",
"Dihlofos", "Dunya", "Filya", "Flamberg", "Flint", "Giyom", "Gladius", "Gromila", "Hoptod", "Hvost",
"Kant", "Karabin", "Karas", "Karman", "Kartezhnik", "Katorzhnik", "Kleymor", "Kolt", "Kompot", "Kopchenyy",
"Kudeyar", "Kuzya", "Lupa", "Mauzer", "Mazevyy", "Medoed", "Miposhka", "Moshennik", "Moydodyr", "Myakish",
"Paromchik", "Pashtet", "Poker", "Pupa", "Rezanyy", "Shtempel", "Sifon", "Sohatyy", "Supermen", "Tulup",
"Valeryanovich", "Valter", "Varan", "Vegan", "Venik", "Arsenal", "Basyak", "Begemotik", "Chelovek", "Dezhurka",
"Furazhka", "Gibbon", "Glavdur", "Kozyrek", "Krot", "Kucha", "Mayor", "Nikolay", "Omon", "Peps",
"Serzhant", "Slonolyub", "Sluzhebka", "Starley", "Starshiy", "Strelok", "Tatyanka", "Uchik", "Vasya", "Visyak",
"Dimon Svetloozerskiy", "Enchik Svetloozerskiy", "Kachok Svetloozerskiy", "Krysa Svetloozerskiy", "Malchik Svetloozerskiy", "Marat Svetloozerskiy", "Mels Svetloozerskiy", "Motyl Svetloozerskiy", "PaShok Svetloozerskiy", "Pljazhnik Svetloozerskiy",
"Robinzon Svetloozerskiy", "Sanja Svetloozerskiy", "Shmyga Svetloozerskiy", "Toha Svetloozerskiy", "Ugrjum Svetloozerskiy", "Vovan Svetloozerskiy", "AkuSher", "Anesteziolog", "Dermatolog", "Farmacevt",
"FeldSher", "Fiziolog", "Glavvrach", "Gomeopat", "Hirurg", "Immunolog", "Kardiolog", "Laborant", "Lor", "Medbrat",
"Medsestra", "Nevrolog", "Okulist", "Paracetamol", "Pilyulya", "Proktolog", "Psihiatr", "Revmatolog", "Shpric", "Stomatolog",
"Terapevt", "Travmatolog", "Trupovoz", "Urolog", "Venerolog", "Zaveduyuschiy", "Zhgut", "Anton Zavodskoy", "Filja Zavodskoy", "Gena Zavodskoy",
"Grisha Zavodskoy", "Koljan Zavodskoy", "Kuling Zavodskoy", "Lesha Zavodskoy", "Sanja Zavodskoy", "Shtopor Zavodskoy", "Skif Zavodskoy", "Stas Zavodskoy", "Toha Zavodskoy", "Torpeda Zavodskoy",
"Vasja Zavodskoy", "Vitek Zavodskoy", "Zhora Zavodskoy", "Afganec", "Alfons", "Assa", "Baks", "Banschik", "Barguzin", "Basmach",
"Batya", "Belyy", "Bob", "Borec", "Byk", "BZT", "Chelovek", "Chempion", "Dnevalnyy", "Drossel",
"Dum", "Gepe", "Gorbatyy", "Grustnyy", "Irlandec", "Kadrovik", "Karabin", "Karaul", "Kastet", "Katok",
"Kocherga", "Kosoy", "Krot", "Kuling", "Kumulyativ", "Kuzya", "Letyoha", "Lis", "Lysyy", "Lyutyy",
"Maga", "Matros", "Mihalych", "Mysh", "Nakat", "Oficer", "Oreh", "Osechka", "Otbitiy", "Patron",
"Pluton", "Radar", "Rayan", "Rembo", "Ryaha", "Salobon", "Sapog", "Sekach", "Seryy", "Serzhant",
"Shapka", "Shustryy", "Sibiryak", "Signal", "Sobr", "Specnaz", "Strelok", "Stvol", "Svinec", "Sych",
"Tankist", "Tihohod", "Toropyga", "Trubochist", "Utyug", "Valet", "Vegan", "Veteran", "Vityok", "Voron",
"Zampolit", "Zarya", "Zh-12", "Zhirnyy", "Zimniy"
};
private static readonly HashSet<string> GuardNamesRussian = new HashSet<string>
{
"Баклажан", "Бановый", "Бармалей", "Басмач", "Базиль", "Бегежан", "Беляш", "Бибоп", "Борзый", "Чебурек",
"Дихлофос", "Дуня", "Филя", "Фламберг", "Флинт", "Гийом", "Гладиус", "Громила", "Хоптод", "Хвост",
"Кант", "Карабин", "Карась", "Карман", "Картежник", "Каторжник", "Клеймор", "Кольт", "Компот", "Копченый",
"Кудеяр", "Кузя", "Лупа", "Маузер", "Мазевый", "Медоед", "Мипошка", "Мошенник", "Мойдодыр", "Мякиш",
"Паромщик", "Паштет", "Покер", "Пупа", "Резаный", "Штемпель", "Сифон", "Сохатый", "Супермен", "Тулуп",
"Валерьянович", "Вальтер", "Варан", "Веган", "Веник", "Арсенал", "Басьяк", "Бегемотик", "Человек", "Дежурка",
"Фуражка", "Гиббон", "Главдур", "Козырек", "Крот", "Куча", "Майор", "Николай", "Омон", "Пепс",
"Сержант", "Слонолюб", "Служебка", "Старлей", "Старший", "Стрелок", "Татьянка", "Учич", "Вася", "Висяк",
"Димон Светлоозерский", "Энчик Светлоозерский", "Качок Светлоозерский", "Крыса Светлоозерский", "Мальчик Светлоозерский", "Марат Светлоозерский", "Мельс Светлоозерский", "Мотыль Светлоозерский", "Пашок Светлоозерский", "Пляжник Светлоозерский",
"Робинзон Светлоозерский", "Саня Светлоозерский", "Шмыга Светлоозерский", "Тоха Светлоозерский", "Угрюм Светлоозерский", "Вован Светлоозерский", "Акушер", "Анестезиолог", "Дерматолог", "Фармацевт",
"Фельдшер", "Физиолог", "Главврач", "Гомеопат", "Хирург", "Иммунолог", "Кардиолог", "Лаборант", "Лор", "Медбрат",
"Медсестра", "Невролог", "Окулист", "Парацетамол", "Пилюля", "Проктолог", "Психиатр", "Ревматолог", "Шприц", "Стоматолог",
"Терапевт", "Травматолог", "Труповоз", "Уролог", "Венеролог", "Заведующий", "Жгут", "Антон Заводской", "Филя Заводской", "Гена Заводской",
"Гриша Заводской", "Колян Заводской", "Кулинг Заводской", "Леша Заводской", "Саня Заводской", "Штопор Заводской", "Скиф Заводской", "Стас Заводской", "Тоха Заводской", "Торпеда Заводской",
"Вася Заводской", "Витек Заводской", "Жора Заводской", "Афганец", "Альфонс", "Асса", "Бакс", "Банщик", "Баргузин", "Басмач",
"Батя", "Белый", "Боб", "Борец", "Бык", "БЗТ", "Человек", "Чемпион", "Дневальный", "Дроссель",
"Дум", "Гэпе", "Горбатый", "Грустный", "Ирландец", "Кадровик", "Карабин", "Караул", "Кастет", "Каток",
"Кочерга", "Косой", "Крот", "Кулинг", "Кумулятив", "Кузя", "Летюха", "Лис", "Лысый", "Лютый",
"Мага", "Матрос", "Михалыч", "Мышь", "Накат", "Офицер", "Орех", "Осечка", "Отбитый", "Патрон",
"Плутон", "Радар", "Раян", "Рэмбо", "Ряха", "Салобон", "Сапог", "Секач", "Серый", "Сержант",
"Шапка", "Шустрый", "Сибиряк", "Сигнал", "Собр", "Спецназ", "Стрелок", "Ствол", "Свинец", "Сыч",
"Танкист", "Тихоход", "Торопыга", "Трубочист", "Утюг", "Валет", "Веган", "Ветеран", "Витек", "Ворон",
"Замполит", "Заря", "Ж-12", "Жирный", "Зимний"
};
public static bool IsRogue(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
return false;
}
return RogueNames.Contains(name);
}
public static bool IsRaider(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
return false;
}
return RaiderNames.Contains(name);
}
public static bool IsCultist(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
return false;
}
return CultistNames.Contains(name);
}
public static bool IsGuard(string name)
{
if (string.IsNullOrWhiteSpace(name))
{
return false;
}
if (GuardNames.Contains(name))
{
return true;
}
if (GuardNamesRussian.Contains(name))
{
return true;
}
return false;
}
}

View file

@ -0,0 +1,125 @@
using System;
using EFT.InventoryLogic;
using stupid.solutions;
using stupid.solutions.Data;
using stupid.solutions.Utils;
namespace stupid.solutions.stupid.solutions.Data;
public class ContainerItem
{
public Item Item { get; }
public string ItemID { get; private set; }
public string LocalizedName { get; private set; }
public string ShortName { get; private set; }
public ItemCategories Itemcat { get; private set; }
public int? itemprice { get; private set; }
public int Count { get; set; } = 1;
public ContainerItem(Item lootItem)
{
if (lootItem == null)
{
throw new ArgumentNullException("lootItem");
}
Item = lootItem;
LocalizedName = string.Empty;
ItemID = string.Empty;
ShortName = string.Empty;
Itemcat = ItemCategories.Uninitialized;
itemprice = null;
Count = 1;
}
public void CalculateItemPrice()
{
if (Item == null)
return;
if (Item.Template == null)
return;
itemprice = GameUtils.GetItemPriceBYID(Item.TemplateId) * Count;
}
public void SetItemCat()
{
if (Item == null)
return;
if (Item.Template == null)
return;
string text = Item.LocalizedName();
string item = Item.TemplateId;
if (QuestESP.QuestItemIds.Contains(text))
{
Itemcat = ItemCategories.Quest;
return;
}
if (Main.IsSuperrare(text))
{
Itemcat = ItemCategories.Superrare;
return;
}
if (Main.IsKappa(text))
{
Itemcat = ItemCategories.Kappa;
return;
}
if (Main.IsStim(text))
{
Itemcat = ItemCategories.Stim;
return;
}
if (Main.SearchedItem(text))
{
Itemcat = ItemCategories.Searched;
return;
}
if (Main.wishlistitemids.Contains(item))
{
Itemcat = ItemCategories.Wishlist;
return;
}
if (Main.hideoutitemids.Contains(item))
{
Itemcat = ItemCategories.Hideout;
return;
}
Itemcat = ItemCategories.Common;
}
public bool IsSameItem(ContainerItem other)
{
if (other == null)
return false;
return ItemID == other.ItemID;
}
public void RecalculateDynamics()
{
if (Item == null)
return;
if (Item.Template == null)
return;
if (string.IsNullOrEmpty(LocalizedName))
LocalizedName = Item.LocalizedName();
if (string.IsNullOrEmpty(ItemID))
ItemID = Item.TemplateId.ToString();
if (string.IsNullOrEmpty(ShortName))
ShortName = Item.ShortName.Localized();
}
}

View file

@ -0,0 +1,240 @@
using System;
using EFT.Interactive;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Data;
internal class GameExfiltrationPoint
{
private Vector3 screenPosition;
public ExfiltrationPoint ExfiltrationPoint { get; }
public Vector3 ScreenPosition => screenPosition;
public bool IsOnScreen { get; private set; }
public float Distance { get; private set; }
public string Name { get; set; }
public string status { get; set; }
public string FormattedDistance => $"{Math.Round(Distance)}m";
public GameExfiltrationPoint(ExfiltrationPoint exfiltrationPoint)
{
if (exfiltrationPoint == null)
{
throw new ArgumentNullException("exfiltrationPoint");
}
ExfiltrationPoint = exfiltrationPoint;
screenPosition = default(Vector3);
Distance = 0f;
Name = ExtractionNameToSimpleName(exfiltrationPoint.Settings.Name.Localized()) ?? "";
}
public void RecalculateDynamics()
{
if (!(ExfiltrationPoint == null) && GameUtils.IsExfiltrationPointValid(ExfiltrationPoint))
{
screenPosition = GameUtils.WorldPointToScreenPoint(ExfiltrationPoint.transform.position);
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, ExfiltrationPoint.transform.position);
if (ExfiltrationPoint.Status == EExfiltrationStatus.AwaitsManualActivation || ExfiltrationPoint.Status == EExfiltrationStatus.NotPresent)
{
status = "Closed";
}
else
{
status = "Open";
}
}
}
private string ExtractionNameToSimpleName(string extractionName)
{
if (extractionName.Contains("exit (3)"))
{
return "Cellars";
}
if (extractionName.Contains("exit (1)"))
{
return "Gate 3";
}
if (extractionName.Contains("exit (2)"))
{
return "Gate 0";
}
if (extractionName.Contains("exit_scav_gate3"))
{
return "Gate 3";
}
if (extractionName.Contains("exit_scav_camer"))
{
return "Blinking Light";
}
if (extractionName.Contains("exit_scav_office"))
{
return "Office";
}
if (extractionName.Contains("eastg"))
{
return "East Gate";
}
if (extractionName.Contains("scavh"))
{
return "House";
}
if (extractionName.Contains("deads"))
{
return "Dead Mans Place";
}
if (extractionName.Contains("var1_1_constant"))
{
return "Outskirts";
}
if (extractionName.Contains("scav_outskirts"))
{
return "Outskirts";
}
if (extractionName.Contains("water"))
{
return "Outskirts Water";
}
if (extractionName.Contains("boat"))
{
return "The Boat";
}
if (extractionName.Contains("mountain"))
{
return "Mountain Stash";
}
if (extractionName.Contains("oldstation"))
{
return "Old Station";
}
if (extractionName.Contains("UNroad"))
{
return "UN Road Block";
}
if (extractionName.Contains("var2_1_const"))
{
return "UN Road Block";
}
if (extractionName.Contains("gatetofactory"))
{
return "Gate to Factory";
}
if (extractionName.Contains("RUAF"))
{
return "RUAF Gate";
}
if (extractionName.Contains("roadtoc"))
{
return "Road to Customs";
}
if (extractionName.Contains("lighthouse"))
{
return "Lighthouse";
}
if (extractionName.Contains("tunnel"))
{
return "Tunnel";
}
if (extractionName.Contains("wreckedr"))
{
return "Wrecked Road";
}
if (extractionName.Contains("deadend"))
{
return "Dead End";
}
if (extractionName.Contains("housefence"))
{
return "Ruined House Fence";
}
if (extractionName.Contains("gyment"))
{
return "Gym Entrance";
}
if (extractionName.Contains("southfence"))
{
return "South Fence Passage";
}
if (extractionName.Contains("adm_base"))
{
return "Admin Basement";
}
if (extractionName.Contains("administrationg"))
{
return "Administration Gate";
}
if (extractionName.Contains("factoryfar"))
{
return "Factory Far Corner";
}
if (extractionName.Contains("oldazs"))
{
return "Old Gate";
}
if (extractionName.Contains("milkp_sh"))
{
return "Shack";
}
if (extractionName.Contains("beyondfuel"))
{
return "Beyond Fuel Tank";
}
if (extractionName.Contains("railroadtom"))
{
return "Railroad to Mil Base";
}
if (extractionName.Contains("_pay_car"))
{
return "V-Exit";
}
if (extractionName.Contains("oldroadgate"))
{
return "Old Road Gate";
}
if (extractionName.Contains("sniperroad"))
{
return "Sniper Road Block";
}
if (extractionName.Contains("warehouse17"))
{
return "Warehouse 17";
}
if (extractionName.Contains("factoryshacks"))
{
return "Factory Shacks";
}
if (extractionName.Contains("railroadtotarkov"))
{
return "Railroad to Tarkov";
}
if (extractionName.Contains("trailerpark"))
{
return "Trailer Park";
}
if (extractionName.Contains("crossroads"))
{
return "Crossroads";
}
if (extractionName.Contains("railroadtoport"))
{
return "Railroad to Port";
}
if (extractionName.Contains("NW_Exfil"))
{
return "North West Extract";
}
if (extractionName.Contains("SE_Exfil"))
{
return "Emmercom";
}
return extractionName;
}
}

View file

@ -0,0 +1,152 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT.Interactive;
using EFT.InventoryLogic;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Data;
public class GameLootContainer
{
private Vector3 screenPosition;
public LootableContainer LootableContainer { get; }
public List<ContainerItem> LootItems { get; private set; }
public bool ItemInit { get; private set; }
public Vector3 ScreenPosition => screenPosition;
public bool IsOnScreen { get; private set; }
public float Distance { get; private set; }
public string FormattedDistance => $"{Math.Round(Distance)}m";
public int? totalprice { get; private set; }
public int CachedItemCount { get; private set; }
public string ContainerName { get; set; }
public GameLootContainer(LootableContainer lootableContainer)
{
if (lootableContainer == null)
{
throw new ArgumentNullException("lootableContainer");
}
LootableContainer = lootableContainer;
screenPosition = default(Vector3);
Distance = 0f;
LootItems = new List<ContainerItem>();
ItemInit = false;
ContainerName = "Container";
totalprice = null;
CachedItemCount = 0;
}
public void RecalculateDynamics()
{
if (GameUtils.IsLootableContainerValid(LootableContainer))
{
screenPosition = GameUtils.WorldPointToScreenPoint(LootableContainer.transform.position);
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, LootableContainer.transform.position);
}
}
public void RefreshItems()
{
LootItems.Clear();
int num = 0;
foreach (Item allItem in LootableContainer.ItemOwner.RootItem.GetAllItems())
{
if (allItem == null)
{
continue;
}
if (IsContainerName(allItem.LocalizedName()))
{
ContainerName = allItem.LocalizedName();
continue;
}
num++;
ContainerItem lootItem = new ContainerItem(allItem);
if (lootItem.Item.StackObjectsCount > lootItem.Item.StackMaxSize || lootItem.Item.StackObjectsCount > 100)
{
continue;
}
lootItem.RecalculateDynamics();
lootItem.SetItemCat();
ContainerItem containerItem = LootItems.FirstOrDefault((ContainerItem i) => i.ItemID == lootItem.ItemID);
if (containerItem != null)
{
containerItem.Count += lootItem.Count + (lootItem.Item.StackObjectsCount - 1);
if (containerItem.Count > 1500)
{
containerItem.Count -= 1500;
}
if (containerItem.Count > 500)
{
containerItem.Count -= 500;
}
}
else
{
if (lootItem.Item.StackObjectsCount > 1)
{
lootItem.Count += lootItem.Item.StackObjectsCount - 1;
}
LootItems.Add(lootItem);
}
}
foreach (ContainerItem lootItem2 in LootItems)
{
lootItem2.CalculateItemPrice();
}
CachedItemCount = num;
totalprice = LootItems.Sum((ContainerItem item) => item.itemprice);
ItemInit = true;
}
public bool IsContainerName(string name)
{
switch (name)
{
case "Toolbox":
case "Duffle bag":
case "Wooden ammo box":
case "Grenade box":
case "Weapon box":
case "Wooden crate":
case "Plastic suitcase":
case "Dead Scav":
case "Ground cache":
case "Buried barrel cache":
case "PC block":
case "Jacket":
case "Drawer":
case "Cash register":
case "Medbag SMU06":
case "Medcase":
case "Safe":
case "Technical supply crate":
case "Ration supply crate":
case "Medical supply crate":
case "Civilian body":
case "PMC body":
case "Scav body":
case "Lab technician body":
case "Bank safe":
case "Bank cash register":
case "Shturman's Stash":
return true;
default:
return false;
}
}
}

View file

@ -0,0 +1,161 @@
using System;
using EFT.Interactive;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Data;
public class GameLootItem
{
private Vector3 screenPosition;
private Vector2 screenPositionFinal;
public LootItem LootItem { get; }
public Vector3 ScreenPosition => screenPosition;
public Vector2 ScreenPositionFinal => screenPositionFinal;
public bool IsOnScreen { get; private set; }
public float Distance { get; private set; }
public string FormattedDistance => $"{Math.Round(Distance)}m";
public string ItemID { get; private set; }
public string LocalizedName { get; private set; }
public string ShortName { get; private set; }
public ItemCategories Itemcat { get; private set; }
public int? itemprice { get; private set; }
public int? stackcount { get; private set; }
public GameLootItem(LootItem lootItem)
{
if (lootItem == null)
{
throw new ArgumentNullException("lootItem");
}
LootItem = lootItem;
screenPosition = default(Vector3);
screenPositionFinal = default(Vector2);
Distance = 0f;
LocalizedName = string.Empty;
ItemID = string.Empty;
ShortName = string.Empty;
Itemcat = ItemCategories.Uninitialized;
stackcount = null;
}
public void CalculateItemPrice()
{
if (!(LootItem == null) && GameUtils.IsLootItemValid(LootItem))
{
int? itemPriceBYID = GameUtils.GetItemPriceBYID(LootItem.TemplateId);
if (LootItem.Item.StackObjectsCount > 0)
{
itemprice = itemPriceBYID * LootItem.Item.StackObjectsCount;
stackcount = LootItem.Item.StackObjectsCount;
}
else
{
itemprice = itemPriceBYID;
}
}
}
public void SetItemCat()
{
if (!(LootItem == null) && GameUtils.IsLootItemValid(LootItem))
{
string text = LootItem.Item.LocalizedName();
string item = LootItem.Item.TemplateId;
if (QuestESP.QuestItemIds.Contains(text) || QuestESP.QuestItemIds.Contains(text.ToLower()))
{
Itemcat = ItemCategories.Quest;
}
else if (Main.IsSuperrare(text))
{
Itemcat = ItemCategories.Superrare;
}
else if (Main.IsKappa(text))
{
Itemcat = ItemCategories.Kappa;
}
else if (Main.IsStim(text))
{
Itemcat = ItemCategories.Stim;
}
else if (Main.SearchedItem(text))
{
Itemcat = ItemCategories.Searched;
}
else if (Main.wishlistitemids.Contains(item))
{
Itemcat = ItemCategories.Wishlist;
}
else if (Main.hideoutitemids.Contains(item))
{
Itemcat = ItemCategories.Hideout;
}
else if (LootItem.Item.LocalizedName() != "Default Inventory")
{
Itemcat = ItemCategories.Common;
}
else
{
Itemcat = ItemCategories.Invalid;
}
}
}
public void RecalculateDynamics()
{
if (GameUtils.IsLootItemValid(LootItem) && !(LootItem.transform == null))
{
_ = LootItem.transform.position;
if (Main.MainCamera != null)
{
screenPosition = GameUtils.WorldPointToScreenPoint(LootItem.transform.position);
}
screenPositionFinal = new Vector2(screenPosition.x - 50f, screenPosition.y);
if (screenPosition != Vector3.zero)
{
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
}
if ((Itemcat != ItemCategories.Quest || Itemcat != ItemCategories.Uninitialized) && QuestESP.QuestItemIds.Contains(LocalizedName) && QuestESP.QuestItemIds.Contains(LocalizedName.ToLower()))
{
Itemcat = ItemCategories.Quest;
}
if (Main.MainCamera != null)
{
Distance = Vector3.Distance(Main.MainCamera.transform.position, LootItem.transform.position);
}
if (string.IsNullOrEmpty(LocalizedName))
{
LocalizedName = LootItem.Item.LocalizedName();
}
if (string.IsNullOrEmpty(ItemID))
{
ItemID = LootItem.TemplateId.ToString();
}
if (string.IsNullOrEmpty(ShortName))
{
ShortName = LootItem.Item.ShortName.Localized();
}
if (LootItem.Item.StackObjectsCount > 0 && !stackcount.HasValue)
{
stackcount = LootItem.Item.StackObjectsCount;
}
else if (!stackcount.HasValue)
{
stackcount = 1;
}
}
}
}

View file

@ -0,0 +1,148 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT;
using EFT.InventoryLogic;
using EFT.UI;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Data;
public class GamePlayer
{
private Vector3 screenPosition;
private Vector3 headScreenPosition;
public Player Player { get; }
public Vector3 ScreenPosition => screenPosition;
public Vector3 HeadScreenPosition => headScreenPosition;
public bool IsOnScreen { get; private set; }
public bool IsVisible { get; private set; }
public float Distance { get; private set; }
public bool ItemInit { get; private set; }
public float DistanceFromCenter { get; set; }
public string FormattedDistance => $"{(int)Math.Round(Distance)}m";
public List<ContainerItem> LootItems { get; private set; }
public int? totalinventoryprice { get; private set; }
public bool isselected { get; set; }
public GamePlayer(Player player)
{
if (player == null)
{
throw new ArgumentNullException("player");
}
Player = player;
screenPosition = default(Vector3);
headScreenPosition = default(Vector3);
IsOnScreen = false;
Distance = 0f;
LootItems = new List<ContainerItem>();
ItemInit = false;
totalinventoryprice = null;
}
private void DoRefreshItems()
{
LootItems.Clear();
foreach (Item allItem in Player.Profile.Inventory.Equipment.GetAllItems())
{
if (allItem == null)
continue;
ContainerItem lootItem = new ContainerItem(allItem);
lootItem.RecalculateDynamics();
lootItem.SetItemCat();
ContainerItem containerItem = LootItems.FirstOrDefault((ContainerItem i) => i.ItemID == lootItem.ItemID);
if (containerItem != null)
{
if (lootItem.Item.StackObjectsCount <= lootItem.Item.StackMaxSize && 100 >= lootItem.Item.StackObjectsCount)
{
containerItem.Count += lootItem.Count + (lootItem.Item.StackObjectsCount - 1);
if (containerItem.Count > 1500)
{
containerItem.Count -= 1500;
}
if (containerItem.Count > 500)
{
containerItem.Count -= 500;
}
}
}
else if (lootItem.Item.StackObjectsCount <= lootItem.Item.StackMaxSize && 100 >= lootItem.Item.StackObjectsCount)
{
if (lootItem.Item.StackObjectsCount > 1)
{
lootItem.Count += lootItem.Item.StackObjectsCount - 1;
}
LootItems.Add(lootItem);
}
}
foreach (ContainerItem lootItem2 in LootItems)
{
lootItem2.CalculateItemPrice();
}
totalinventoryprice = LootItems.Sum((ContainerItem item) => item.itemprice);
ItemInit = true;
}
public void RefreshItems()
{
try
{
DoRefreshItems();
}
catch (Exception arg)
{
ConsoleScreen.Log($"Error whilst refreshing GamePlayers Inventory Items : {arg} ");
}
}
public void RecalculateDynamics()
{
try
{
if (!GameUtils.IsPlayerValid(Player))
{
return;
}
screenPosition = GameUtils.WorldPointToScreenPoint(Player.Transform.position);
if (Menu2.selectedEntity != null)
{
if (Player == Menu2.selectedEntity)
{
isselected = true;
}
else
{
isselected = false;
}
}
if (Player.PlayerBones != null)
{
headScreenPosition = GameUtils.WorldPointToScreenPoint(Player.PlayerBones.Head.position);
}
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, Player.Transform.position);
}
catch (Exception arg)
{
ConsoleScreen.Log($"Error whilst Recalculating Dynamics for GamePlayer Instance : {arg}");
}
}
}

View file

@ -0,0 +1,45 @@
using System;
using EFT.Interactive;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Data;
internal class GameTransitPoint
{
private Vector3 screenPosition;
public TransitPoint transitPoint { get; }
public Vector3 ScreenPosition => screenPosition;
public bool IsOnScreen { get; private set; }
public float Distance { get; private set; }
public string Name { get; set; }
public string FormattedDistance => $"{Math.Round(Distance)}m";
public GameTransitPoint(TransitPoint tPoint)
{
if (tPoint == null)
{
throw new ArgumentNullException("tPoint");
}
transitPoint = tPoint;
screenPosition = default(Vector3);
Distance = 0f;
Name = transitPoint.name ?? "";
}
public void RecalculateDynamics()
{
if (!(transitPoint == null) && GameUtils.IsTransitPointValid(transitPoint))
{
screenPosition = GameUtils.WorldPointToScreenPoint(transitPoint.transform.position);
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, transitPoint.transform.position);
}
}
}

View file

@ -0,0 +1,15 @@
namespace stupid.solutions.Data;
public enum ItemCategories
{
Uninitialized,
Superrare,
Kappa,
Quest,
Stim,
Searched,
Wishlist,
Hideout,
Common,
Invalid
}

View file

@ -0,0 +1,257 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT;
using EFT.InventoryLogic;
using EFT.NextObservedPlayer;
using stupid.solutions;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.stupid.solutions.Data;
public class OnlineGamePlayer
{
public enum PlayerType
{
Scav,
USEC,
BEAR,
Boss,
Zombie,
Teammate,
PlayerScav,
Cultist,
Rogue,
Raider,
Guard,
BTR,
undefined
}
public delegate void WildSpawnTypeDelegate(WildSpawnType role);
private WildSpawnTypeDelegate _originalWildSpawnType;
private Vector3 screenPosition;
private Vector3 headScreenPosition;
public ObservedPlayerView Player { get; }
public Vector3 ScreenPosition => screenPosition;
public Vector3 HeadScreenPosition => headScreenPosition;
public bool IsOnScreen { get; private set; }
public bool IsVisible { get; private set; }
public bool teamassigned { get; private set; }
public float Distance { get; private set; }
public bool IsAI { get; private set; }
public bool ItemInit { get; private set; }
public float DistanceFromCenter { get; set; }
public string FormattedDistance => $"{(int)Math.Round(Distance)}m";
public string profileid { get; set; }
public bool IsTeammate { get; set; }
public string team { get; set; }
public PlayerType role { get; set; }
private int teamcount { get; set; }
public List<ContainerItem> LootItems { get; private set; }
public int? totalinventoryprice { get; private set; }
public bool gotprofileinfo { get; private set; }
public int timeplayed { get; private set; }
public double kd { get; private set; }
public int level { get; private set; }
public int membertype { get; private set; }
public string NickName { get; private set; }
public WildSpawnType? wst { get; set; }
public bool gotwst { get; set; }
public OnlineGamePlayer(ObservedPlayerView player)
{
if (player == null)
{
throw new ArgumentNullException("player");
}
Player = player;
screenPosition = default;
headScreenPosition = default;
IsOnScreen = false;
Distance = 0f;
LootItems = new List<ContainerItem>();
ItemInit = false;
totalinventoryprice = null;
IsAI = false;
role = PlayerType.undefined;
IsTeammate = false;
gotprofileinfo = false;
teamassigned = false;
team = "";
timeplayed = 0;
kd = 0.0;
level = 0;
membertype = 0;
NickName = "Unknown Name";
wst = WildSpawnType.marksman;
gotwst = false;
}
public void RefreshItems()
{
LootItems.Clear();
foreach (Item allItem in Player.ObservedPlayerController.EquipmentViewController.Equipment.GetAllItems())
{
if (allItem == null)
{
continue;
}
ContainerItem lootItem = new ContainerItem(allItem);
lootItem.RecalculateDynamics();
lootItem.SetItemCat();
ContainerItem containerItem = LootItems.FirstOrDefault((i) => i.ItemID == lootItem.ItemID);
if (containerItem != null)
{
if (lootItem.Item.StackObjectsCount <= lootItem.Item.StackMaxSize && 100 >= lootItem.Item.StackObjectsCount)
{
containerItem.Count += lootItem.Count + (lootItem.Item.StackObjectsCount - 1);
}
}
else if (lootItem.Item.StackObjectsCount <= lootItem.Item.StackMaxSize && 100 >= lootItem.Item.StackObjectsCount)
{
if (lootItem.Item.StackObjectsCount > 1)
{
lootItem.Count += lootItem.Item.StackObjectsCount - 1;
}
LootItems.Add(lootItem);
}
}
foreach (ContainerItem lootItem2 in LootItems)
{
lootItem2.CalculateItemPrice();
}
totalinventoryprice = LootItems.Sum((item) => item.itemprice);
ItemInit = true;
}
public void RecalculateDynamics()
{
if (!GameUtils.IsOPlayerValid(Player))
{
return;
}
if (Main.LocalPlayer.TeamId != null && Player.TeamId == Main.LocalPlayer.TeamId)
{
IsTeammate = true;
}
if (Player.TeamId != null && !IsTeammate && team == "")
{
if (!teamassigned)
{
teamassigned = true;
if (!Main.teams.ContainsKey(Player.TeamId))
{
int value = !Main.teams.Values.Any() ? 1 : Main.teams.Values.Max() + 1;
Main.teams[Player.TeamId] = value;
Main.teamPlayerCount[Player.TeamId] = 1;
}
else
{
Main.teamPlayerCount[Player.TeamId]++;
}
}
int num = Main.teams[Player.TeamId];
team = $" Team : {num} ";
}
if (!gotprofileinfo && !Player.IsAI)
{
GetPlayerInfo();
}
screenPosition = GameUtils.WorldPointToScreenPoint(Player.Transform.position);
if (role == PlayerType.undefined && gotwst)
{
role = GetPlayerType(this);
}
if (Player.PlayerBones != null)
{
headScreenPosition = GameUtils.WorldPointToScreenPoint(Player.PlayerBones.Head.position);
}
IsAI = Player.IsAI;
IsOnScreen = GameUtils.IsScreenPointVisible(screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, Player.Transform.position);
}
private async void GetPlayerInfo()
{
gotprofileinfo = true;
}
private PlayerType GetPlayerType(OnlineGamePlayer gamePlayer)
{
EPlayerSide side = gamePlayer.Player.ObservedPlayerController.InfoContainer.Side;
if (gamePlayer.Player.IsAI)
{
bool flag = Main.IsBoss(wst);
if (flag)
{
return PlayerType.Boss;
}
if (wst == WildSpawnType.pmcBot)
{
return PlayerType.Raider;
}
if (!flag && wst.ToString().Contains("follower") || wst == WildSpawnType.bossBoarSniper)
{
return PlayerType.Guard;
}
if (wst == WildSpawnType.sectactPriestEvent || wst == WildSpawnType.sectantPriest || wst == WildSpawnType.sectantWarrior)
{
return PlayerType.Cultist;
}
if (wst == WildSpawnType.exUsec)
{
return PlayerType.Rogue;
}
if (gamePlayer.Player.UsedSimplifiedSkeleton)
{
return PlayerType.Zombie;
}
if (gamePlayer.Player.ObservedPlayerController.HandsController.ItemInHands.ShortName.Localized().Contains("PKTM"))
{
return PlayerType.BTR;
}
return PlayerType.Scav;
}
if (gamePlayer.IsTeammate)
{
return PlayerType.Teammate;
}
return side switch
{
EPlayerSide.Usec => PlayerType.USEC,
EPlayerSide.Savage => PlayerType.PlayerScav,
_ => PlayerType.BEAR,
};
}
}

View file

@ -0,0 +1,7 @@
using UnityEngine;
namespace stupid.solutions.Data;
public class OnlinePlayerInfo : MonoBehaviour
{
}

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using EFT;
using EFT.NextObservedPlayer;
using EFT.UI;
using stupid.solutions.stupid.solutions.Data;
using UnityEngine;
namespace stupid.solutions.Data;
public class WildSpawnTypeManager : MonoBehaviour
{
private static List<(ObservedPlayerView PlayerInstance, WildSpawnType Role)> unassignedRoles = new List<(ObservedPlayerView, WildSpawnType)>();
public void Start()
{
ConsoleScreen.Log("WST Manager initiated");
}
public static void WST_Postfix(ObservedPlayerView __instance, WildSpawnType role)
{
try
{
ConsoleScreen.Log("WST method_6 called for ObservedPlayerView.");
unassignedRoles.Add((__instance, role));
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
if (__instance.ProfileId == onlineGamePlayer.profileid)
{
onlineGamePlayer.wst = role;
onlineGamePlayer.gotwst = true;
}
}
ConsoleScreen.Log($"Temporary role assignment queued: PlayerPID={__instance.ProfileId}, Role={role}");
}
catch (Exception)
{
}
}
}

View file

@ -0,0 +1,243 @@
using System.Collections.Generic;
using System.Linq;
using EFT.Interactive;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
internal class CorpseEsp : MonoBehaviour
{
private Texture2D stex;
public static List<GameCorpse> Corpses = new List<GameCorpse>();
private float _nextBodyCacheTime;
private static readonly float CacheLootItemsInterval = 10f;
private int initialYOffset = Settings.initialYOffset;
private Dictionary<string, int?> lootItemPrices = new Dictionary<string, int?>();
private static readonly float ItemListCacheInterval = 30f;
private float _nextItemListCache;
private void Start()
{
stex = new Texture2D(1, 1);
stex.SetPixel(0, 0, Color.blue);
stex.Apply();
}
public void Update()
{
if (!Settings.BodyESP)
{
return;
}
if (Time.time >= _nextBodyCacheTime && Main.GameWorld != null && Main.GameWorld.ObservedPlayersCorpses != null)
{
Corpses.Clear();
Corpse[] array = Object.FindObjectsOfType<Corpse>();
foreach (Corpse corpse in array)
{
if (GameUtils.IsCorpseValid(corpse) && !(Vector3.Distance(Main.MainCamera.transform.position, corpse.transform.position) > Settings.DrawLootableContainersDistance))
{
Corpses.Add(new GameCorpse(corpse));
}
}
_nextBodyCacheTime = Time.time + CacheLootItemsInterval;
}
foreach (GameCorpse corpse2 in Corpses)
{
corpse2.RecalculateDynamics();
if (!(Time.time >= _nextItemListCache) || corpse2.Corpse.ItemOwner.RootItem.GetAllItems().Count() < 2)
{
continue;
}
int num = 1;
foreach (ContainerItem lootItem in corpse2.LootItems)
{
num += lootItem.Count * lootItem.Item.StackObjectsCount;
}
if (corpse2.Corpse.ItemOwner.RootItem.GetAllItems().Count() != num)
{
corpse2.RefreshItems();
}
_nextItemListCache = Time.time + ItemListCacheInterval;
}
if (Settings.playerWeapon)
{
initialYOffset = Settings.initialYOffset - 20;
}
if (!Input.GetKeyDown(KeyCode.Delete) || Settings.allinputdisabled)
{
return;
}
foreach (GameCorpse corpse3 in Corpses)
{
corpse3.RecalculateDynamics();
corpse3.RefreshItems();
}
}
private void OnGUI()
{
if (!Settings.BodyESP || Main.MainCamera == null || Main.GameWorld == null || Main.LocalPlayer == null)
{
return;
}
int xOffset = Settings.xOffset;
int num = Settings.initialYOffset;
int itemLineHeight = Settings.itemLineHeight;
int lineWidth = Settings.lineWidth;
int lineX = Settings.lineX;
GUIStyle style = new GUIStyle(GUI.skin.label)
{
alignment = TextAnchor.UpperLeft,
fontSize = 12,
font = Main.TXTFONT,
normal = new GUIStyleState
{
textColor = Color.cyan
}
};
GUIStyle gUIStyle = new GUIStyle(GUI.skin.label)
{
alignment = TextAnchor.UpperLeft,
fontSize = 12,
font = Main.TXTFONT
};
foreach (GameCorpse corpse in Corpses)
{
if (!corpse.IsOnScreen || corpse.Distance > Settings.DrawLootableContainersDistance)
{
continue;
}
Vector2 vector = new Vector2(corpse.ScreenPosition.x, corpse.ScreenPosition.y);
if (!corpse.ItemInit)
{
corpse.RefreshItems();
}
if (corpse.LootItems.Count <= 0)
{
continue;
}
Vector3 position = corpse.Corpse.transform.position;
bool flag = Aimbot.CaulculateInFov2(new Vector3(position.x, position.y, position.z)) <= Settings.SimpleStringsFOV;
if (Settings.DrawSimpleStrings)
{
string text = "";
string text2 = "";
string text3 = "";
foreach (ContainerItem lootItem in corpse.LootItems)
{
if (GameUtils.ShouldDisplayItem(lootItem))
{
switch (lootItem.Itemcat)
{
case ItemCategories.Kappa:
{
string text11 = ColorUtility.ToHtmlStringRGB(Settings.KappaColor);
text2 = text2 + "<color=#" + text11 + ">+</color>";
break;
}
case ItemCategories.Superrare:
{
string text10 = ColorUtility.ToHtmlStringRGB(Settings.SuperrareColor);
text2 = text2 + "<color=#" + text10 + ">+</color>";
break;
}
case ItemCategories.Stim:
{
string text9 = ColorUtility.ToHtmlStringRGB(Settings.StimItemColor);
text2 = text2 + "<color=#" + text9 + ">+</color>";
break;
}
case ItemCategories.Quest:
{
string text8 = ColorUtility.ToHtmlStringRGB(Settings.QuestItemColor);
text2 = text2 + "<color=#" + text8 + ">+</color>";
break;
}
case ItemCategories.Wishlist:
{
string text7 = ColorUtility.ToHtmlStringRGB(Settings.WishlistColor);
text2 = text2 + "<color=#" + text7 + ">+</color>";
break;
}
case ItemCategories.Hideout:
{
string text6 = ColorUtility.ToHtmlStringRGB(Settings.HideoutColor);
text2 = text2 + "<color=#" + text6 + ">+</color>";
break;
}
case ItemCategories.Searched:
{
string text5 = ColorUtility.ToHtmlStringRGB(Settings.SearchedColor);
text2 = text2 + "<color=#" + text5 + ">+</color>";
break;
}
case ItemCategories.Common:
{
string text4 = ColorUtility.ToHtmlStringRGB(Settings.CommonItemColor);
text2 = text2 + "<color=#" + text4 + ">+</color>";
break;
}
}
}
}
if (!string.IsNullOrEmpty(text2))
{
text += text2;
text3 = "<color=cyan>[</color>" + text + "<color=cyan>]</color>";
}
if (!flag)
{
GUI.Label(new Rect(vector.x - (float)lineX - (float)xOffset - 8f, vector.y - (float)num - (float)itemLineHeight + 3f, 200f, itemLineHeight), text3 ?? "", style);
}
}
if (!(!Settings.DrawSimpleStrings || flag) || 0 >= corpse.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item)))
{
continue;
}
int num2 = corpse.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item));
if (num2 <= 0)
{
break;
}
new GUIStyle();
Texture2D texture2D = new Texture2D(1, 1);
texture2D.SetPixel(0, 0, Color.yellow);
texture2D.Apply();
int? totalprice = corpse.totalprice;
GUI.DrawTexture(new Rect(vector.x - (float)lineX, vector.y - (float)num, lineWidth, num2 * itemLineHeight + itemLineHeight - 25), texture2D);
string text12 = ((totalprice.HasValue && Settings.drawvalue) ? $"Dead Body [{totalprice / 1000}K] - {corpse.FormattedDistance} " : ("Dead Body - " + corpse.FormattedDistance + " "));
GUI.Label(new Rect(vector.x - (float)lineX - (float)xOffset - 8f, vector.y - (float)num - (float)itemLineHeight + 3f, 200f, itemLineHeight), text12, style);
int num3 = num + itemLineHeight / 3;
foreach (ContainerItem lootItem2 in corpse.LootItems)
{
if (GameUtils.ShouldDisplayItem(lootItem2))
{
string shortName = lootItem2.ShortName;
int count = lootItem2.Count;
Color itemColor = GameUtils.GetItemColor(lootItem2.Itemcat);
string text13 = ((count > 1) ? $" ({count})" : "");
int? num4 = null;
if (Settings.drawvalue)
{
num4 = lootItem2.itemprice;
}
string text14 = ((num4.HasValue && Settings.drawvalue) ? $"{shortName} [{num4 / 1000}K]{text13}" : (shortName + text13));
gUIStyle.normal.textColor = itemColor;
GUI.Label(new Rect(vector.x - (float)lineX - (float)xOffset, vector.y - (float)(num3 - itemLineHeight) - 16f, 200f, itemLineHeight), text14, gUIStyle);
num3 -= itemLineHeight;
}
}
}
}
}

View file

@ -0,0 +1,401 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using EFT;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.enums;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class Crosshairetc : MonoBehaviour
{
public float lineLength = 20f;
public float lineThickness = 2f;
private Texture2D crosshairTexture;
public static float skeletonLineThickness = 1.7f;
public static float headCircleThickness = 1.7f;
private static Stopwatch memoryCheckTimer = Stopwatch.StartNew();
private static long lastLoggedMemory = 0L;
private static int logInterval = 5000;
private static Dictionary<Player, (Dictionary<HumanBones, Vector3> bones, float lastUpdateTime)> GamePlayerBoneCache = new Dictionary<Player, (Dictionary<HumanBones, Vector3>, float)>();
private static Dictionary<Player, (Dictionary<ZombieBones, Vector3> bones, float lastUpdateTime)> zombieBoneCache = new Dictionary<Player, (Dictionary<ZombieBones, Vector3>, float)>();
private bool clearcache;
private static float cacheExpirationInterval = Settings.cachedelayskelet;
private Color cachedcrosshaircolor;
private static readonly List<ZombieBones> NeededZombieBones = new List<ZombieBones>
{
ZombieBones.Base_HumanPelvis,
ZombieBones.Base_HumanLThigh1,
ZombieBones.Base_HumanLCalf,
ZombieBones.Base_HumanLFoot,
ZombieBones.Base_HumanRThigh1,
ZombieBones.Base_HumanRCalf,
ZombieBones.Base_HumanRFoot,
ZombieBones.Base_HumanSpine2,
ZombieBones.Base_HumanSpine3,
ZombieBones.Base_HumanNeck,
ZombieBones.Base_HumanHead,
ZombieBones.Base_HumanLCollarbone,
ZombieBones.Base_HumanLUpperarm,
ZombieBones.Base_HumanLForearm1,
ZombieBones.Base_HumanLForearm2,
ZombieBones.Base_HumanLPalm,
ZombieBones.Base_HumanRCollarbone,
ZombieBones.Base_HumanRUpperarm,
ZombieBones.Base_HumanRForearm1,
ZombieBones.Base_HumanRForearm2,
ZombieBones.Base_HumanRPalm
};
private static readonly List<HumanBones> NeededBones = new List<HumanBones>
{
HumanBones.HumanPelvis,
HumanBones.HumanLThigh1,
HumanBones.HumanLThigh2,
HumanBones.HumanLCalf,
HumanBones.HumanLFoot,
HumanBones.HumanLToe,
HumanBones.HumanPelvis,
HumanBones.HumanRThigh1,
HumanBones.HumanRThigh2,
HumanBones.HumanRCalf,
HumanBones.HumanRFoot,
HumanBones.HumanRToe,
HumanBones.HumanSpine1,
HumanBones.HumanSpine2,
HumanBones.HumanSpine3,
HumanBones.HumanNeck,
HumanBones.HumanHead,
HumanBones.HumanLCollarbone,
HumanBones.HumanLForearm1,
HumanBones.HumanLForearm2,
HumanBones.HumanLForearm3,
HumanBones.HumanLPalm,
HumanBones.HumanLDigit11,
HumanBones.HumanLDigit12,
HumanBones.HumanLDigit13,
HumanBones.HumanRCollarbone,
HumanBones.HumanRForearm1,
HumanBones.HumanRForearm2,
HumanBones.HumanRForearm3,
HumanBones.HumanRPalm,
HumanBones.HumanRDigit11,
HumanBones.HumanRDigit12,
HumanBones.HumanRDigit13
};
private void Update()
{
if (Main.GameWorld != null && Main.MainCamera != null)
{
clearcache = true;
}
if (Main.GameWorld == null && clearcache)
{
zombieBoneCache.Clear();
GamePlayerBoneCache.Clear();
}
if (cachedcrosshaircolor != Settings.CrosshairColor)
{
ReapplyCrosshairColour();
}
}
private void LogMemoryUsage()
{
long totalMemory = GC.GetTotalMemory(forceFullCollection: false);
long num = totalMemory - lastLoggedMemory;
ConsoleScreen.Log($"Memory Usage: {totalMemory / 1048576} MB (+{num / 1048576} MB since last log)");
if (Main.GameWorld != null)
{
ConsoleScreen.Log($"Registered Players: {Main.GameWorld.RegisteredPlayers.Count}");
ConsoleScreen.Log($"Loot Items: {Main.GameWorld.LootItems.Count}");
}
lastLoggedMemory = totalMemory;
}
private void Start()
{
cachedcrosshaircolor = Settings.CrosshairColor;
crosshairTexture = new Texture2D(1, 1);
crosshairTexture.SetPixel(0, 0, Settings.CrosshairColor);
crosshairTexture.Apply();
}
public void ReapplyCrosshairColour()
{
cachedcrosshaircolor = Settings.CrosshairColor;
crosshairTexture = new Texture2D(1, 1);
crosshairTexture.SetPixel(0, 0, Settings.CrosshairColor);
crosshairTexture.Apply();
}
private static bool IsZombie(Player player)
{
WildSpawnType role = player.Profile.Info.Settings.Role;
if (role != WildSpawnType.infectedAssault && role != WildSpawnType.infectedCivil && role != WildSpawnType.infectedLaborant)
{
return role == WildSpawnType.infectedPmc;
}
return true;
}
public void OnGUI()
{
if (Settings.AimbotDrawFOV && Menu2.showmenu)
{
Render.DrawCircle(new Vector2(Screen.width / 2, Screen.height / 2), Settings.AimbotFOV * 15.7f, 32, Settings.AimFOVColor);
}
if (Settings.Crosshair && Menu2.showmenu)
{
float num = Screen.width / 2;
float num2 = Screen.height / 2;
GUI.DrawTexture(new Rect(num - lineLength / 2f, num2 - lineThickness / 2f, lineLength, lineThickness), crosshairTexture);
GUI.DrawTexture(new Rect(num - lineThickness / 2f, num2 - lineLength / 2f, lineThickness, lineLength), crosshairTexture);
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (!gamePlayer.IsOnScreen || gamePlayer.Distance > Settings.DrawPlayersDistance || gamePlayer.Player == Main.LocalPlayer)
{
continue;
}
if (Settings.DrawPlayers && Settings.EnableSkeleton)
{
if (IsZombie(gamePlayer.Player))
{
DrawZombies(gamePlayer.Player);
}
else
{
DrawSkeleton(gamePlayer.Player);
}
}
if (Settings.drawaimpos && Settings.DrawPlayers)
{
DrawAim(gamePlayer);
}
}
}
private static void DrawAim(GamePlayer gamePlayer)
{
Vector3 vector = GameUtils.WorldPointToScreenPoint(RayCast.BarrelRayCast(gamePlayer.Player));
Render.DrawLine(GameUtils.WorldPointToScreenPoint(gamePlayer.Player.Fireport.position), vector, 1f, Color.red);
}
private static Dictionary<HumanBones, Vector3> GetBones(Player gamePlayer)
{
float time = Time.time;
if (GamePlayerBoneCache.TryGetValue(gamePlayer, out (Dictionary<HumanBones, Vector3>, float) value) && time - value.Item2 < cacheExpirationInterval)
{
return value.Item1;
}
Dictionary<HumanBones, Vector3> dictionary = new Dictionary<HumanBones, Vector3>();
if (gamePlayer.PlayerBody == null || gamePlayer.PlayerBody.SkeletonRootJoint == null)
{
return dictionary;
}
List<Transform> list = gamePlayer.PlayerBody.SkeletonRootJoint.Bones.Values.ToList();
for (int i = 0; i < list.Count; i++)
{
Transform transform = list[i];
if (transform != null && NeededBones.Contains((HumanBones)i))
{
Vector3 position = transform.position;
if (GameUtils.IsScreenPointVisible(Main.ActiveCamera.WorldToScreenPoint(position)))
{
dictionary[(HumanBones)i] = position;
}
}
}
GamePlayerBoneCache[gamePlayer] = (dictionary, time);
return dictionary;
}
private static void DrawSkeleton(Player gamePlayer)
{
Dictionary<HumanBones, Vector3> bones = GetBones(gamePlayer);
if (bones.Count != 0)
{
GL.PushMatrix();
GameUtils.DrawMaterial.SetPass(0);
GL.LoadProjectionMatrix(Main.ActiveCamera.projectionMatrix);
GL.modelview = Main.ActiveCamera.worldToCameraMatrix;
GL.Begin(1);
ConnectBonesGL(bones, HumanBones.HumanPelvis, HumanBones.HumanLThigh1, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLThigh1, HumanBones.HumanLThigh2, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLThigh2, HumanBones.HumanLCalf, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLCalf, HumanBones.HumanLFoot, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLFoot, HumanBones.HumanLToe, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanPelvis, HumanBones.HumanRThigh1, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRThigh1, HumanBones.HumanRThigh2, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRThigh2, HumanBones.HumanRCalf, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRCalf, HumanBones.HumanRFoot, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRFoot, HumanBones.HumanRToe, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanPelvis, HumanBones.HumanSpine1, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanSpine1, HumanBones.HumanSpine2, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanSpine2, HumanBones.HumanSpine3, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanSpine3, HumanBones.HumanNeck, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanNeck, HumanBones.HumanHead, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanSpine3, HumanBones.HumanLCollarbone, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLCollarbone, HumanBones.HumanLForearm1, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLForearm1, HumanBones.HumanLForearm2, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLForearm2, HumanBones.HumanLForearm3, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanLForearm3, HumanBones.HumanLPalm, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanSpine3, HumanBones.HumanRCollarbone, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRCollarbone, HumanBones.HumanRForearm1, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRForearm1, HumanBones.HumanRForearm2, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRForearm2, HumanBones.HumanRForearm3, gamePlayer);
ConnectBonesGL(bones, HumanBones.HumanRForearm3, HumanBones.HumanRPalm, gamePlayer);
GL.End();
GL.PopMatrix();
if (bones.ContainsKey(HumanBones.HumanHead) && bones.ContainsKey(HumanBones.HumanNeck))
{
Vector3 vector = bones[HumanBones.HumanHead];
Vector3 b = bones[HumanBones.HumanNeck];
float num = Vector3.Distance(vector, b);
float num2 = Vector3.Distance(Main.LocalPlayer.Transform.position, gamePlayer.Transform.position);
float thickness = headCircleThickness / (num2 * 0.1f);
int segments = ((num2 < 20f) ? 128 : 32);
DrawHeadCircleGL(vector, num * 1.15f, segments, Settings.SkeletonColor, thickness);
}
}
}
private static void ConnectBonesGL(Dictionary<HumanBones, Vector3> bones, HumanBones start, HumanBones stop, Player gamePlayer)
{
if (bones.ContainsKey(start) && bones.ContainsKey(stop))
{
Vector3 v = bones[start];
Vector3 v2 = bones[stop];
GL.Color(Settings.SkeletonColor);
GL.Vertex(v);
GL.Vertex(v2);
}
}
private static void DrawHeadCircleGL(Vector3 center, float radius, int segments, Color color, float thickness)
{
GL.PushMatrix();
GameUtils.DrawMaterial.SetPass(0);
GL.LoadProjectionMatrix(Main.ActiveCamera.projectionMatrix);
GL.modelview = Main.ActiveCamera.worldToCameraMatrix;
GL.Begin(1);
GL.Color(color);
float num = 360f / (float)segments;
for (int i = 0; i < segments; i++)
{
float f = (float)Math.PI / 180f * ((float)i * num);
float f2 = (float)Math.PI / 180f * ((float)(i + 1) * num);
Vector3 v = center + new Vector3(Mathf.Cos(f) * radius, Mathf.Sin(f) * radius, 0f);
Vector3 v2 = center + new Vector3(Mathf.Cos(f2) * radius, Mathf.Sin(f2) * radius, 0f);
GL.Vertex(v);
GL.Vertex(v2);
}
GL.End();
GL.PopMatrix();
}
private static void ConnectZombieBones(Dictionary<ZombieBones, Vector3> bones, ZombieBones start, ZombieBones stop, Player gamePlayer)
{
if (bones.ContainsKey(start) && bones.ContainsKey(stop))
{
Vector3 v = bones[start];
Vector3 v2 = bones[stop];
GL.Color(Settings.SkeletonColor);
GL.Vertex(v);
GL.Vertex(v2);
}
}
public static void DrawZombies(Player gamePlayer)
{
Dictionary<ZombieBones, Vector3> zombieBones = GetZombieBones(gamePlayer);
if (zombieBones.Count != 0)
{
GL.PushMatrix();
GameUtils.DrawMaterial.SetPass(0);
GL.LoadProjectionMatrix(Main.ActiveCamera.projectionMatrix);
GL.modelview = Main.ActiveCamera.worldToCameraMatrix;
GL.Begin(1);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanPelvis, ZombieBones.Base_HumanLThigh1, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanPelvis, ZombieBones.Base_HumanRThigh1, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLThigh1, ZombieBones.Base_HumanLCalf, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLCalf, ZombieBones.Base_HumanLFoot, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRThigh1, ZombieBones.Base_HumanRCalf, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRCalf, ZombieBones.Base_HumanRFoot, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanPelvis, ZombieBones.Base_HumanSpine2, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanSpine2, ZombieBones.Base_HumanSpine3, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanSpine3, ZombieBones.Base_HumanNeck, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanNeck, ZombieBones.Base_HumanHead, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanSpine3, ZombieBones.Base_HumanLCollarbone, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLCollarbone, ZombieBones.Base_HumanLUpperarm, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLUpperarm, ZombieBones.Base_HumanLForearm1, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLForearm1, ZombieBones.Base_HumanLForearm2, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanLForearm2, ZombieBones.Base_HumanLPalm, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanSpine3, ZombieBones.Base_HumanRCollarbone, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRCollarbone, ZombieBones.Base_HumanRUpperarm, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRUpperarm, ZombieBones.Base_HumanRForearm1, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRForearm1, ZombieBones.Base_HumanRForearm2, gamePlayer);
ConnectZombieBones(zombieBones, ZombieBones.Base_HumanRForearm2, ZombieBones.Base_HumanRPalm, gamePlayer);
GL.End();
GL.PopMatrix();
if (zombieBones.ContainsKey(ZombieBones.Base_HumanHead) && zombieBones.ContainsKey(ZombieBones.Base_HumanNeck))
{
Vector3 vector = zombieBones[ZombieBones.Base_HumanHead];
Vector3 b = zombieBones[ZombieBones.Base_HumanNeck];
float num = Vector3.Distance(vector, b);
float num2 = Vector3.Distance(Main.LocalPlayer.Transform.position, gamePlayer.Transform.position);
float thickness = headCircleThickness / (num2 * 0.1f);
int segments = ((num2 < 20f) ? 128 : 32);
DrawHeadCircleGL(vector, num * 1.15f, segments, Settings.SkeletonColor, thickness);
}
}
}
private static Dictionary<ZombieBones, Vector3> GetZombieBones(Player gamePlayer)
{
float time = Time.time;
if (zombieBoneCache.TryGetValue(gamePlayer, out (Dictionary<ZombieBones, Vector3>, float) value) && time - value.Item2 < cacheExpirationInterval)
{
return value.Item1;
}
Dictionary<ZombieBones, Vector3> dictionary = new Dictionary<ZombieBones, Vector3>();
if (gamePlayer.PlayerBody == null || gamePlayer.PlayerBody.SkeletonRootJoint == null)
{
return dictionary;
}
List<Transform> list = gamePlayer.PlayerBody.SkeletonRootJoint.Bones.Values.ToList();
for (int i = 0; i < list.Count; i++)
{
Transform transform = list[i];
if (transform != null && NeededZombieBones.Contains((ZombieBones)i))
{
Vector3 position = transform.position;
if (GameUtils.IsScreenPointVisible(Main.ActiveCamera.WorldToScreenPoint(position)))
{
dictionary[(ZombieBones)i] = position;
}
}
}
zombieBoneCache[gamePlayer] = (dictionary, time);
return dictionary;
}
}

View file

@ -0,0 +1,110 @@
using System.Collections.Generic;
using EFT.Interactive;
using EFT.InventoryLogic;
using stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class ExfiltrationPointsESP : MonoBehaviour
{
private List<GameExfiltrationPoint> _gameExfiltrationPoints = new List<GameExfiltrationPoint>();
private List<GameTransitPoint> _gameTransitPoints = new List<GameTransitPoint>();
private static readonly float CacheExfiltrationPointInterval = 5f;
private float _nextLootItemCacheTime;
public void Update()
{
if (Time.time >= _nextLootItemCacheTime && Main.GameWorld != null && Main.GameWorld.ExfiltrationController.ExfiltrationPoints != null)
{
_gameExfiltrationPoints.Clear();
ExfiltrationPoint[] exfiltrationPoints = Main.GameWorld.ExfiltrationController.ExfiltrationPoints;
foreach (ExfiltrationPoint exfiltrationPoint in exfiltrationPoints)
{
if (GameUtils.IsExfiltrationPointValid(exfiltrationPoint))
{
_gameExfiltrationPoints.Add(new GameExfiltrationPoint(exfiltrationPoint));
}
}
foreach (TransitPoint transitPoint in LocationsFixerV2.transitPoints)
{
if (GameUtils.IsTransitPointValid(transitPoint))
{
_gameTransitPoints.Add(new GameTransitPoint(transitPoint));
}
}
_nextLootItemCacheTime = Time.time + CacheExfiltrationPointInterval;
}
if (!(Main.GameWorld != null))
{
return;
}
foreach (GameExfiltrationPoint gameExfiltrationPoint in _gameExfiltrationPoints)
{
gameExfiltrationPoint.RecalculateDynamics();
}
foreach (GameTransitPoint gameTransitPoint in _gameTransitPoints)
{
gameTransitPoint.RecalculateDynamics();
}
}
private string RemoveUnderscores(string input)
{
return input.Replace("_", " ");
}
private void OnGUI()
{
if (!(Main.GameWorld != null))
{
return;
}
if (Settings.DrawExfiltrationPoints)
{
foreach (GameExfiltrationPoint gameExfiltrationPoint in _gameExfiltrationPoints)
{
if (GameUtils.IsExfiltrationPointValid(gameExfiltrationPoint.ExfiltrationPoint) && gameExfiltrationPoint.IsOnScreen)
{
string text = ColorUtility.ToHtmlStringRGB(Settings.ExfilESPColor);
string text2 = ColorUtility.ToHtmlStringRGB((gameExfiltrationPoint.status == "Open") ? Color.green : Color.red);
string label = "<color=#" + text + ">" + RemoveUnderscores(gameExfiltrationPoint.ExfiltrationPoint.Settings.Name) + " - </color><color=#" + text2 + ">" + gameExfiltrationPoint.status + "</color> <color=#" + text + ">[" + gameExfiltrationPoint.FormattedDistance + "]</color>";
Render.DrawRichTextString(new Vector2(gameExfiltrationPoint.ScreenPosition.x - 50f, gameExfiltrationPoint.ScreenPosition.y), label, Color.white);
}
}
foreach (GameTransitPoint gameTransitPoint in _gameTransitPoints)
{
if (GameUtils.IsTransitPointValid(gameTransitPoint.transitPoint) && gameTransitPoint.IsOnScreen)
{
string label2 = " " + RemoveUnderscores(gameTransitPoint.transitPoint.name) + " [" + gameTransitPoint.FormattedDistance + "] ";
Render.DrawString(new Vector2(gameTransitPoint.ScreenPosition.x - 50f, gameTransitPoint.ScreenPosition.y), label2, Settings.TransitPointColor);
}
}
}
if (Main.LocalPlayerWeapon == null || !(Main.LocalPlayer != null) || !Settings.DrawInfo)
{
return;
}
string label3 = string.Empty;
if (Main.LocalPlayer.HandsController.Item is Weapon)
{
Weapon localPlayerWeapon = Main.LocalPlayerWeapon;
_EF1A currentMagazine = localPlayerWeapon.GetCurrentMagazine();
if (currentMagazine != null)
{
label3 = $" {currentMagazine.Count + localPlayerWeapon.ChamberAmmoCount}/{currentMagazine.MaxCount + localPlayerWeapon.ChamberAmmoCount} ";
}
}
else
{
label3 = "";
}
float x = Screen.width / 2;
float num = Screen.height / 2;
Render.DrawString(new Vector2(x, num + 60f), label3, Settings.AmmoCounterColor);
}
}

View file

@ -0,0 +1,256 @@
using System.Collections.Generic;
using EFT.Interactive;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class ItemESP : MonoBehaviour
{
private static readonly float CacheLootItemsInterval = 5f;
private static readonly float clearcacheinterval = 600f;
private float _nextclearCacheTime;
private float _nextLootItemCacheTime;
public static List<GameLootItem> _gameLootItems = new List<GameLootItem>();
private Dictionary<Renderer, Shader> originalWeaponShaders = new Dictionary<Renderer, Shader>();
private bool addedwishitems;
private static Shader _cachedForceFieldShader;
public void Update()
{
if (Main.GameWorld == null && _gameLootItems.Count > 0)
{
_gameLootItems.Clear();
}
if (!Settings.DrawLootableContainers && !Settings.DrawLootItems)
{
return;
}
if (Main.LocalPlayer != null && !addedwishitems)
{
Main.GetWishlistItems();
addedwishitems = true;
ConsoleScreen.Log("Added wishlist items");
}
else if (Main.LocalPlayer == null && addedwishitems)
{
ClearWishlistItems();
}
if (!Settings.DrawLootItems)
{
return;
}
if (Time.time >= _nextLootItemCacheTime)
{
CacheLootItems();
_nextLootItemCacheTime = Time.time + CacheLootItemsInterval;
}
_gameLootItems.RemoveAll((GameLootItem li) => !GameUtils.IsLootItemValid(li.LootItem) || li == null || li.LootItem.transform == null);
foreach (GameLootItem gameLootItem in _gameLootItems)
{
if (gameLootItem != null && GameUtils.IsLootItemValid(gameLootItem.LootItem))
{
if (Main.GameWorld == null)
{
return;
}
gameLootItem.RecalculateDynamics();
if (gameLootItem.Itemcat == ItemCategories.Uninitialized)
{
gameLootItem.SetItemCat();
}
if (!gameLootItem.itemprice.HasValue)
{
gameLootItem.CalculateItemPrice();
}
}
}
if (Time.time >= _nextclearCacheTime)
{
_gameLootItems.Clear();
_nextclearCacheTime = Time.time + clearcacheinterval;
ConsoleScreen.Log("memory cleaned");
}
}
private void CacheLootItems()
{
if (Main.GameWorld == null || Main.GameWorld.LootItems == null)
{
return;
}
int num = 0;
for (int i = 0; i < Main.GameWorld.LootItems.Count; i++)
{
LootItem byIndex = Main.GameWorld.LootItems.GetByIndex(i);
if (!(byIndex == null) && GameUtils.IsLootItemValid(byIndex))
{
_ = byIndex.transform.position;
if (!(byIndex.Item.LocalizedName() == "Default Inventory"))
{
num++;
}
}
}
if (_gameLootItems.Count == num)
{
return;
}
_gameLootItems.Clear();
ConsoleScreen.Log("Item ESP Item Instance Mismatch, Updating...");
for (int j = 0; j < Main.GameWorld.LootItems.Count; j++)
{
LootItem byIndex2 = Main.GameWorld.LootItems.GetByIndex(j);
if (!(byIndex2 == null) && GameUtils.IsLootItemValid(byIndex2))
{
_ = byIndex2.transform.position;
if (!(byIndex2.Item.LocalizedName() == "Default Inventory"))
{
_gameLootItems.Add(new GameLootItem(byIndex2));
}
}
}
}
public void ClearWishlistItems()
{
Main.wishlistitemids.Clear();
Main.hideoutitemids.Clear();
addedwishitems = false;
}
private void RenderItemESP()
{
List<(Vector2, string, Color)> list = new List<(Vector2, string, Color)>();
foreach (GameLootItem gameLootItem in _gameLootItems)
{
if (gameLootItem != null && gameLootItem.IsOnScreen && !(gameLootItem.Distance > Settings.DrawLootItemsDistance))
{
_ = gameLootItem.LocalizedName;
_ = gameLootItem.ItemID;
string localizedName = gameLootItem.LocalizedName;
localizedName = ((!(gameLootItem.stackcount > 1)) ? gameLootItem.LocalizedName : $"{gameLootItem.LocalizedName}({gameLootItem.stackcount})");
int? itemprice = gameLootItem.itemprice;
bool flag = true;
if (Settings.DrawSimpleStrings)
{
Vector3 position = gameLootItem.LootItem.gameObject.transform.position;
flag = Aimbot.CaulculateInFov2(new Vector3(position.x, position.y, position.z)) <= Settings.SimpleStringsFOV;
}
string text = ((Settings.drawvalue && itemprice.HasValue) ? $"{localizedName} [{itemprice / 1000}K] - {gameLootItem.FormattedDistance} " : (localizedName + " - " + gameLootItem.FormattedDistance + " "));
string text2 = " + ";
string item = ((!Settings.DrawSimpleStrings) ? text : (flag ? text : text2));
ItemCategories itemcat = gameLootItem.Itemcat;
Vector2 screenPositionFinal = gameLootItem.ScreenPositionFinal;
Color itemColor = GameUtils.GetItemColor(itemcat);
if (itemcat == ItemCategories.Quest && Settings.quest)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Superrare && Settings.superrare)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Kappa && Settings.kappa)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Stim && Settings.stim)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Searched && Settings.searchItem)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Wishlist && Settings.drawwishlistitem)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Hideout && Settings.drawhideoutitems)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (itemcat == ItemCategories.Common && Settings.common && gameLootItem.Distance < Settings.commonitemdistance)
{
list.Add((screenPositionFinal, item, itemColor));
}
else if (gameLootItem.itemprice > Settings.ESPPRICEfiltervalue && Settings.ESPFilterbyprice)
{
list.Add((screenPositionFinal, item, itemColor));
}
}
}
foreach (var (position2, label, color) in list)
{
Render.DrawString(position2, label, color);
}
}
private void OnGUI()
{
if (Settings.DrawLootItems && !(Main.GameWorld == null) && !(Main.LocalPlayer == null))
{
RenderItemESP();
if (Settings.weaponchams)
{
weaponChams();
}
}
}
private void weaponChams()
{
if (Main.GameWorld == null || !Settings.weaponchams)
{
ResetWeaponChams();
return;
}
if (_cachedForceFieldShader == null)
{
_cachedForceFieldShader = Main.bundle.LoadAsset<Shader>("wireframe.shader");
}
Renderer[] componentsInChildren = Main.LocalPlayer.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer in componentsInChildren)
{
Material material = renderer.material;
if (!(material == null))
{
if (!originalWeaponShaders.ContainsKey(renderer))
{
originalWeaponShaders[renderer] = material.shader;
}
material.shader = _cachedForceFieldShader;
material.SetColor("_VisibleColor", Settings.SelfChamsColor);
material.SetColor("_InvisibleColor", Settings.SelfChamsColor);
}
}
}
private void ResetWeaponChams()
{
Renderer[] componentsInChildren = Main.LocalPlayer.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer in componentsInChildren)
{
if (!(renderer == null) && originalWeaponShaders.ContainsKey(renderer))
{
Material material = renderer.material;
if (!(material == null))
{
material.shader = originalWeaponShaders[renderer];
material.SetColor("_Color", Color.white);
}
}
}
originalWeaponShaders.Clear();
}
}

View file

@ -0,0 +1,241 @@
using System.Collections.Generic;
using System.Linq;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class LootableContainerESP : MonoBehaviour
{
private static readonly float CacheLootItemsInterval = 600f;
private float _nextLootContainerCacheTime;
public static List<GameLootContainer> _gameLootContainers;
private static readonly Color LootableContainerColor = new Color(1f, 0.2f, 0.09f);
private Dictionary<string, int?> lootItemPrices = new Dictionary<string, int?>();
private static readonly float ItemListCacheInterval = 10f;
private float _nextItemListCache;
private bool gameworldwasnotnull;
private bool repatchbecausenewgame;
public void Start()
{
_gameLootContainers = new List<GameLootContainer>();
}
public void Update()
{
if (!Settings.DrawLootableContainers)
{
return;
}
if ((Time.time >= _nextLootContainerCacheTime || repatchbecausenewgame) && Main.GameWorld != null && Main.GameWorld.LootItems != null && Main.LocalPlayer != null && Main.MainCamera != null)
{
repatchbecausenewgame = false;
_gameLootContainers.Clear();
ConsoleScreen.Log("Getting Container Instances (game start)");
LootableContainer[] array = Object.FindObjectsOfType<LootableContainer>();
foreach (LootableContainer lootableContainer in array)
{
if (GameUtils.IsLootableContainerValid(lootableContainer))
{
_gameLootContainers.Add(new GameLootContainer(lootableContainer));
}
}
_nextLootContainerCacheTime = Time.time + CacheLootItemsInterval;
gameworldwasnotnull = true;
}
if (gameworldwasnotnull && Main.GameWorld == null)
{
repatchbecausenewgame = true;
gameworldwasnotnull = false;
}
if (Main.GameWorld != null && _gameLootContainers.Count > 0)
{
foreach (GameLootContainer gameLootContainer2 in _gameLootContainers)
{
gameLootContainer2.RecalculateDynamics();
}
}
if (!(Time.time >= _nextItemListCache))
{
return;
}
foreach (GameLootContainer gameLootContainer in _gameLootContainers)
{
if (gameLootContainer.LootableContainer.ItemOwner.RootItem.GetAllItems().Count((Item item) => item != null && !gameLootContainer.IsContainerName(item.LocalizedName())) != gameLootContainer.CachedItemCount)
{
gameLootContainer.RefreshItems();
_ = gameLootContainer.ItemInit;
}
}
_nextItemListCache = Time.time + ItemListCacheInterval;
}
private void OnGUI()
{
if (!Settings.DrawLootableContainers || Main.MainCamera == null || (Main.GameWorld == null && Main.GameWorld.LootItems == null && Main.LocalPlayer == null))
{
return;
}
int xOffset = Settings.xOffset;
int initialYOffset = Settings.initialYOffset;
int itemLineHeight = Settings.itemLineHeight;
int lineWidth = Settings.lineWidth;
int lineX = Settings.lineX;
GUIStyle style = new GUIStyle(GUI.skin.label)
{
alignment = TextAnchor.UpperLeft,
fontSize = 12,
font = Main.TXTFONT,
normal = new GUIStyleState
{
textColor = Color.white
}
};
GUIStyle gUIStyle = new GUIStyle(GUI.skin.label)
{
alignment = TextAnchor.UpperLeft,
fontSize = 12,
font = Main.TXTFONT
};
foreach (GameLootContainer gameLootContainer in _gameLootContainers)
{
if (!GameUtils.IsLootableContainerValid(gameLootContainer.LootableContainer) || !gameLootContainer.IsOnScreen || gameLootContainer.Distance > Settings.DrawLootableContainersDistance)
{
continue;
}
Vector2 vector = new Vector2(gameLootContainer.ScreenPosition.x, gameLootContainer.ScreenPosition.y);
if (!gameLootContainer.ItemInit)
{
gameLootContainer.RefreshItems();
}
if (gameLootContainer.LootItems.Count <= 0)
{
continue;
}
Vector3 position = gameLootContainer.LootableContainer.transform.position;
bool flag = Aimbot.CaulculateInFov2(new Vector3(position.x, position.y, position.z)) <= Settings.SimpleStringsFOV;
if (Settings.DrawSimpleStrings)
{
string text = "";
string text2 = "";
foreach (ContainerItem lootItem in gameLootContainer.LootItems)
{
if (GameUtils.ShouldDisplayItem(lootItem))
{
switch (lootItem.Itemcat)
{
case ItemCategories.Kappa:
{
string text10 = ColorUtility.ToHtmlStringRGB(Settings.KappaColor);
text2 = text2 + "<color=#" + text10 + ">+</color>";
break;
}
case ItemCategories.Superrare:
{
string text9 = ColorUtility.ToHtmlStringRGB(Settings.SuperrareColor);
text2 = text2 + "<color=#" + text9 + ">+</color>";
break;
}
case ItemCategories.Stim:
{
string text8 = ColorUtility.ToHtmlStringRGB(Settings.StimItemColor);
text2 = text2 + "<color=#" + text8 + ">+</color>";
break;
}
case ItemCategories.Quest:
{
string text7 = ColorUtility.ToHtmlStringRGB(Settings.QuestItemColor);
text2 = text2 + "<color=#" + text7 + ">+</color>";
break;
}
case ItemCategories.Wishlist:
{
string text6 = ColorUtility.ToHtmlStringRGB(Settings.WishlistColor);
text2 = text2 + "<color=#" + text6 + ">+</color>";
break;
}
case ItemCategories.Hideout:
{
string text5 = ColorUtility.ToHtmlStringRGB(Settings.HideoutColor);
text2 = text2 + "<color=#" + text5 + ">+</color>";
break;
}
case ItemCategories.Searched:
{
string text4 = ColorUtility.ToHtmlStringRGB(Settings.SearchedColor);
text2 = text2 + "<color=#" + text4 + ">+</color>";
break;
}
case ItemCategories.Common:
{
string text3 = ColorUtility.ToHtmlStringRGB(Settings.CommonItemColor);
text2 = text2 + "<color=#" + text3 + ">+</color>";
break;
}
}
}
}
if (!string.IsNullOrEmpty(text2))
{
text += text2;
}
if (!flag && 0 < gameLootContainer.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item)))
{
if (gameLootContainer.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item)) <= 0)
{
break;
}
GUI.Label(new Rect(vector.x - (float)lineX - (float)xOffset - 8f, vector.y - (float)initialYOffset - (float)itemLineHeight + 3f, 200f, itemLineHeight), " [" + text + "] ", style);
}
}
if (!(!Settings.DrawSimpleStrings || flag) || 0 >= gameLootContainer.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item)))
{
continue;
}
int num = gameLootContainer.LootItems.Count((ContainerItem item) => GameUtils.ShouldDisplayItem(item));
if (num <= 0)
{
break;
}
new GUIStyle();
Texture2D texture2D = new Texture2D(1, 1);
texture2D.SetPixel(0, 0, Color.yellow);
texture2D.Apply();
GUI.DrawTexture(new Rect(vector.x - (float)lineX, vector.y - (float)initialYOffset, lineWidth, num * itemLineHeight + itemLineHeight - 25), texture2D);
int? totalprice = gameLootContainer.totalprice;
string text11 = "";
GUI.Label(text: (!Settings.drawvalue || !totalprice.HasValue) ? (gameLootContainer.ContainerName + " - " + gameLootContainer.FormattedDistance) : $"{gameLootContainer.ContainerName} [{totalprice / 1000}K] - {gameLootContainer.FormattedDistance}", position: new Rect(vector.x - (float)lineX - (float)xOffset - 8f, vector.y - (float)initialYOffset - (float)itemLineHeight + 3f, 200f, itemLineHeight), style: style);
int num2 = initialYOffset + itemLineHeight / 3;
foreach (ContainerItem lootItem2 in gameLootContainer.LootItems)
{
if (GameUtils.ShouldDisplayItem(lootItem2))
{
string localizedName = lootItem2.LocalizedName;
int count = lootItem2.Count;
Color itemColor = GameUtils.GetItemColor(lootItem2.Itemcat);
string text12 = ((count > 1) ? $" ({count})" : "");
string text13 = "";
int? itemprice = lootItem2.itemprice;
text13 = ((!Settings.drawvalue || !totalprice.HasValue) ? (localizedName + text12 + " ") : $"{localizedName} [{itemprice / 1000}K]{text12} ");
gUIStyle.normal.textColor = itemColor;
GUI.Label(new Rect(vector.x - (float)lineX - (float)xOffset, vector.y - (float)(num2 - itemLineHeight) - 16f, 200f, itemLineHeight), text13, gUIStyle);
num2 -= itemLineHeight;
}
}
}
}
}

View file

@ -0,0 +1,332 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EFT;
using EFT.InventoryLogic;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class PlayerESP : MonoBehaviour
{
private static readonly Color _healthColor = Color.green;
public static Color orange = Color.red;
private Color violet = new Color(148f, 0f, 211f);
public float lineLength = 20f;
public float lineThickness = 2f;
private static IEnumerator<Item> _equipItemList;
private Color ItemColor = Color.white;
private string _logFilePath;
private static HashSet<int> processedEntities = new HashSet<int>();
private static WildSpawnType WildSpawnType;
private bool shouldclear = true;
private bool shouldresetandclearchams;
private static readonly float ItemListCacheInterval = 30f;
private float _nextItemListCache;
private Dictionary<Renderer, Shader> originalShaders = new Dictionary<Renderer, Shader>();
private Dictionary<Renderer, (Color visibleColor, Color behindColor)> previousChamsColors = new Dictionary<Renderer, (Color, Color)>();
private void Awake()
{
_logFilePath = Path.Combine(Application.persistentDataPath, "log.txt");
}
private void Log(string message)
{
using StreamWriter streamWriter = new StreamWriter(_logFilePath, append: true);
streamWriter.WriteLine($"{DateTime.Now}: {message}");
}
public void Update()
{
if (Main.GameWorld == null && shouldclear)
{
processedEntities.Clear();
shouldclear = false;
originalShaders.Clear();
previousChamsColors.Clear();
}
else if (Main.GameWorld != null && !shouldclear)
{
shouldclear = true;
}
if (Main.GameWorld == null)
{
return;
}
if (Camera.main != null)
{
Camera.main.useOcclusionCulling = false;
}
if (!Settings.PlayerInventoryESP)
{
return;
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (!(Time.time >= _nextItemListCache) || gamePlayer.Player.Profile.Inventory.Equipment.GetAllItems().Count() < 2)
{
continue;
}
int num = 0;
foreach (ContainerItem lootItem in gamePlayer.LootItems)
{
num += lootItem.Count * lootItem.Item.StackObjectsCount;
}
if (gamePlayer.Player.Profile.Inventory.Equipment.GetAllItems().Count() != num)
{
gamePlayer.RefreshItems();
}
gamePlayer.RefreshItems();
_nextItemListCache = Time.time + ItemListCacheInterval;
}
}
public void OnGUI()
{
if (!Settings.DrawPlayers)
{
return;
}
if (Settings.Chams)
{
Chams();
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (!gamePlayer.IsOnScreen || gamePlayer.Player == Main.LocalPlayer || (gamePlayer.Distance > Settings.DrawPlayersDistance && !gamePlayer.isselected))
{
continue;
}
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
Vector3 zero = Vector3.zero;
zero = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByID(gamePlayer.Player, Aimbot.zombiebone) : GameUtils.GetBonePosByID(gamePlayer.Player, Settings.Aimbone));
bool flag = Aimbot.CaulculateInFov(zero) <= Settings.AimbotFOV;
int id = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? 31 : 133);
Vector3 bonePosByID = GameUtils.GetBonePosByID(gamePlayer.Player, id);
RaycastHit raycastHit;
bool flag2 = Aimbot.VisCheck(gamePlayer.Player.gameObject, Main.LocalPlayer.Fireport.position, bonePosByID, out raycastHit);
float num = gamePlayer.HeadScreenPosition.y - 10f;
float num2 = Math.Abs(gamePlayer.HeadScreenPosition.y - gamePlayer.ScreenPosition.y) + 10f;
float num3 = num2 * 0.65f;
if (Settings.DrawPlayerBox)
{
Vector2 position = new Vector2(gamePlayer.ScreenPosition.x - num3 / 2f, num);
Vector2 size = new Vector2(num3, num2);
Color color = ((!flag2) ? Settings.ESPBoxColor : Settings.boxsightline);
Render.DrawCornerBox(position, size, 2f, color, 5f, centered: false);
}
if (Settings.DrawPlayerHealth)
{
if (Settings.DrawSimpleStrings)
{
if (flag)
{
DrawHealth(gamePlayer);
}
}
else
{
DrawHealth(gamePlayer);
}
}
if (Settings.DrawPlayerName)
{
(string playerText, string shorttext, Color playerColor) playerTextDetails = GameUtils.GetPlayerTextDetails(gamePlayer, role);
string item = playerTextDetails.playerText;
string item2 = playerTextDetails.shorttext;
Color item3 = playerTextDetails.playerColor;
Vector2 vector = GUI.skin.GetStyle(item).CalcSize(new GUIContent(item));
string text = ((Settings.DrawSimpleStrings && flag) ? item : (Settings.DrawSimpleStrings ? item2 : item));
if (!gamePlayer.isselected)
{
Render.DrawString(new Vector2(gamePlayer.HeadScreenPosition.x, num - vector.y - 3f), text, item3);
}
else
{
Render.DrawString(new Vector2(gamePlayer.HeadScreenPosition.x, num - vector.y - 3f), " [+] Selected Player : " + text + " [+] ", Settings.SelectedEntityColor);
}
}
if (Settings.DrawPlayerLine)
{
Render.DrawLine(new Vector2(Screen.width / 2, Screen.height), new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y), 1.5f, flag2 ? Settings.isvisibleline : Settings.ESPLineColor);
}
if (Settings.playerWeapon && gamePlayer.Player.HandsController != null)
{
string text2 = string.Empty;
if (gamePlayer.Player.HandsController.Item is Weapon)
{
Weapon weapon = (Weapon)gamePlayer.Player.HandsController.Item;
_EF1A currentMagazine = weapon.GetCurrentMagazine();
if (currentMagazine != null)
{
string arg = ColorUtility.ToHtmlStringRGB(Settings.EnemyAmmoCounterColor);
text2 = $"<color=#{arg}>({currentMagazine.Count + weapon.ChamberAmmoCount}/{currentMagazine.MaxCount + weapon.ChamberAmmoCount}) </color>";
}
}
if (Settings.playerWeapon)
{
if (text2 == string.Empty)
{
Render.DrawString(new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y + 6.5f), " " + gamePlayer.Player.HandsController.Item.ShortName.Localized() + " ", Settings.EnemyWeaponTextColor);
}
else
{
Render.DrawString(new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y + 6.5f), " " + gamePlayer.Player.HandsController.Item.ShortName.Localized() + " " + text2, Settings.EnemyWeaponTextColor, centered: true, default(Color), outline: false);
}
}
}
if (!Settings.PlayerInventoryESP)
{
continue;
}
int num4 = -20;
HashSet<string> hashSet = new HashSet<string>();
if (!gamePlayer.ItemInit)
{
gamePlayer.RefreshItems();
}
if (gamePlayer.LootItems == null)
{
break;
}
foreach (ContainerItem lootItem in gamePlayer.LootItems)
{
string localizedName = lootItem.LocalizedName;
_ = lootItem.ItemID;
if (GameUtils.ShouldDisplayItem(lootItem) && !hashSet.Contains(localizedName))
{
Color itemColor = GameUtils.GetItemColor(lootItem.Itemcat);
string text3 = ((lootItem.Count > 1) ? $" ({lootItem.Count}) " : "");
string text4 = (Settings.drawvalue ? $"[{lootItem.itemprice / 1000}K] " : "");
Render.DrawString(new Vector2(gamePlayer.ScreenPosition.x, gamePlayer.ScreenPosition.y - (float)num4), "Has: " + lootItem.ShortName + text3 + text4 + ". ", itemColor);
hashSet.Add(localizedName);
num4 -= 20;
}
}
}
}
private void Chams()
{
if (Main.GameWorld == null)
{
return;
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (gamePlayer.Distance > Settings.DrawPlayersDistance || gamePlayer.Player == Main.LocalPlayer || !Settings.Chams)
{
continue;
}
Renderer[] componentsInChildren = gamePlayer.Player.GetComponentsInChildren<Renderer>();
bool flag = false;
Renderer[] array = componentsInChildren;
foreach (Renderer renderer in array)
{
if (renderer == null || renderer.material == null)
{
continue;
}
if (!originalShaders.ContainsKey(renderer))
{
originalShaders[renderer] = renderer.material.shader;
}
Color playerChamsVisible = Settings.PlayerChamsVisible;
Color playerChamsHidden = Settings.PlayerChamsHidden;
if (previousChamsColors.ContainsKey(renderer))
{
(Color, Color) tuple = previousChamsColors[renderer];
if (tuple.Item1 == playerChamsVisible && tuple.Item2 == playerChamsHidden)
{
continue;
}
flag = true;
}
else
{
flag = true;
}
if (flag)
{
Shader shader = Main.bundle.LoadAsset<Shader>("wireframe.shader");
if (!(shader == null))
{
renderer.material.shader = shader;
renderer.material.SetColor("_VisibleColor", playerChamsVisible);
renderer.material.SetColor("_InvisibleColor", playerChamsHidden);
renderer.allowOcclusionWhenDynamic = false;
renderer.forceRenderingOff = false;
renderer.enabled = true;
previousChamsColors[renderer] = (playerChamsVisible, playerChamsHidden);
}
}
}
processedEntities.Add(gamePlayer.Player.GetInstanceID());
}
if (Settings.Chams || !shouldresetandclearchams)
{
return;
}
foreach (GamePlayer gamePlayer2 in Main.GamePlayers)
{
ClearChams(gamePlayer2);
}
}
private void ClearChams(GamePlayer gamePlayer)
{
Renderer[] componentsInChildren = gamePlayer.Player.GetComponentsInChildren<Renderer>();
foreach (Renderer renderer in componentsInChildren)
{
if (!(renderer == null) && originalShaders.ContainsKey(renderer))
{
Shader shader = originalShaders[renderer];
renderer.material.shader = shader;
renderer.allowOcclusionWhenDynamic = true;
renderer.forceRenderingOff = false;
renderer.enabled = true;
}
}
shouldresetandclearchams = true;
processedEntities.Remove(gamePlayer.Player.GetInstanceID());
}
public void DrawHealth(GamePlayer gamePlayer)
{
float num = gamePlayer.HeadScreenPosition.y - 10f;
float num2 = Math.Abs(gamePlayer.HeadScreenPosition.y - gamePlayer.ScreenPosition.y) + 10f;
float num3 = num2 * 0.65f;
if (gamePlayer.Player.HealthController.IsAlive)
{
float current = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common).Current;
float maximum = gamePlayer.Player.HealthController.GetBodyPartHealth(EBodyPart.Common).Maximum;
Math.Floor(current);
Math.Floor(maximum);
float num4 = GameUtils.Map(current, 0f, maximum, 0f, num2);
Color color = ((current / maximum < 0.5f) ? Color.red : _healthColor);
float x = gamePlayer.ScreenPosition.x - num3 / 2f - 3f;
float num5 = num + num2;
Render.DrawLine(new Vector2(x, num5 - num4), new Vector2(x, num5), 3f, color);
}
}
}

View file

@ -0,0 +1,170 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
internal class Radar : MonoBehaviour
{
private Dictionary<bool, string> SettingList = new Dictionary<bool, string>
{
{
Settings.Godmode,
"Godmode"
},
{
Settings.Flyhack,
"Flyhack"
},
{
Settings.Speedhack,
"Speedhack"
},
{
Settings.MagicBullet,
"Magic Bullet"
}
};
private void Update()
{
try
{
if (Main.GameWorld != null)
{
_ = Settings.DrawRadar;
}
}
catch
{
}
}
private void OnGUI()
{
try
{
if (!Settings.DrawRadar || !Menu2.showmenu)
{
return;
}
Render.BoxRect(new Rect(Settings.RadarX + Settings.RadarSize / 2f - 3f, Settings.RadarY + Settings.RadarSize / 2f - 3f, 6f, 6f), Color.white);
Render.DrawCornerBox(new Vector2(Settings.RadarX + Settings.RadarSize / 2f, Settings.RadarY), Settings.RadarSize, Settings.RadarSize, Color.white, outline: true);
Render.DrawRadarBackground(new Rect(Settings.RadarX, Settings.RadarY, Settings.RadarSize, Settings.RadarSize));
int? num = Main.GameWorld.RegisteredPlayers.Count() - 1;
string[] obj = new string[5] { " Entity Count : ", null, null, null, null };
int? num2 = num;
obj[1] = num2.ToString();
obj[2] = " Radar Range : ";
obj[3] = ((int)Settings.DrawPlayersRadarDistance).ToString();
obj[4] = "m ";
string label = string.Concat(obj);
Vector2 position = new Vector2(Settings.RadarX - 5f, Settings.RadarY - 20f);
if (Main.GameWorld != null)
{
Render.DrawTextRadar(position, label, Color.white, centered: false);
}
if (Main.OnlineGamePlayers.Count > 0)
{
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
if (onlineGamePlayer.Distance < Settings.DrawPlayersRadarDistance)
{
float y = Main.LocalPlayer.Transform.position.x - onlineGamePlayer.Player.Transform.position.x;
float x = Main.LocalPlayer.Transform.position.z - onlineGamePlayer.Player.Transform.position.z;
float num3 = Mathf.Atan2(y, x) * 57.29578f - 270f - Main.LocalPlayer.Transform.eulerAngles.y;
float num4 = onlineGamePlayer.Distance * Mathf.Cos(num3 * ((float)Math.PI / 180f));
float num5 = onlineGamePlayer.Distance * Mathf.Sin(num3 * ((float)Math.PI / 180f));
num4 = num4 * (Settings.RadarSize / Settings.RadarRange) / 2f;
num5 = num5 * (Settings.RadarSize / Settings.RadarRange) / 2f;
_ = Color.white;
if (onlineGamePlayer.Distance <= Settings.RadarRange)
{
Color item = GameUtils.GetPlayerTextDetailsO(onlineGamePlayer).playerColor;
float num6 = Settings.RadarX + Settings.RadarSize / 2f + num4;
float num7 = Settings.RadarY + Settings.RadarSize / 2f + num5;
Render.BoxRect(new Rect(num6 - 3f, num7 - 3f, 6f, 6f), item);
}
}
}
return;
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (gamePlayer.Distance < Settings.DrawPlayersRadarDistance)
{
float y2 = Main.LocalPlayer.Transform.position.x - gamePlayer.Player.Transform.position.x;
float x2 = Main.LocalPlayer.Transform.position.z - gamePlayer.Player.Transform.position.z;
float num8 = Mathf.Atan2(y2, x2) * 57.29578f - 270f - Main.LocalPlayer.Transform.eulerAngles.y;
float num9 = gamePlayer.Distance * Mathf.Cos(num8 * ((float)Math.PI / 180f));
float num10 = gamePlayer.Distance * Mathf.Sin(num8 * ((float)Math.PI / 180f));
num9 = num9 * (Settings.RadarSize / Settings.RadarRange) / 2f;
num10 = num10 * (Settings.RadarSize / Settings.RadarRange) / 2f;
Color white = Color.white;
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
if (gamePlayer.Distance <= Settings.RadarRange)
{
white = GameUtils.GetPlayerTextDetails(gamePlayer, role).playerColor;
float num11 = Settings.RadarX + Settings.RadarSize / 2f + num9;
float num12 = Settings.RadarY + Settings.RadarSize / 2f + num10;
Render.BoxRect(new Rect(num11 - 3f, num12 - 3f, 6f, 6f), white);
}
}
}
}
catch
{
}
}
private void DrawActiveFeatures(bool setting, string settingName, ref int currentOffsetY)
{
string label = settingName + ": " + (setting ? "On" : "Off");
Render.DrawTextRadar(new Vector2(Settings.RadarX - 5f - (float)currentOffsetY, Settings.RadarY - 20f), label, Color.white, centered: false);
currentOffsetY += 20;
}
private void DrawFeatures()
{
int currentOffsetY = 0;
foreach (KeyValuePair<bool, string> setting in SettingList)
{
DrawActiveFeatures(setting.Key, setting.Value, ref currentOffsetY);
}
}
private void ShowAim(GamePlayer gamePlayer, float radarX, float radarY)
{
Vector3 vector = RayCast.BarrelRayCast(gamePlayer.Player);
if (vector != Vector3.zero)
{
Vector3 position = gamePlayer.Player.Fireport.position;
Vector3 normalized = (vector - position).normalized;
float num = normalized.x * 15f;
float num2 = normalized.y * 15f;
float x = radarX + num;
float y = radarY + num2;
Render.DrawLine(new Vector3(radarX, radarY, 0f), new Vector3(x, y, 0f), 1f, Color.red);
}
}
private void ShowAimO(OnlineGamePlayer gamePlayer, float radarX, float radarY)
{
Vector3 vector = RayCast.BarrelRayCastO(gamePlayer);
if (vector != Vector3.zero)
{
Vector3 position = gamePlayer.Player.ObservedPlayerController.HandsController.CurrentFireport.position;
Vector3 normalized = (vector - position).normalized;
float num = (0f - normalized.x) * 15f;
float num2 = normalized.y * 15f;
float x = radarX + num;
float y = radarY + num2;
Render.DrawLine(new Vector3(radarX, radarY, 0f), new Vector3(x, y, 0f), 1f, Color.red);
}
}
}

View file

@ -0,0 +1,367 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using EFT.UI;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features.ESP;
public class TracerESP : MonoBehaviour
{
private class HitMarker
{
public Vector3 position;
public float displayTime;
public float damage;
public Vector3 floatingOffset;
public bool isHeadshot;
public int playerId;
public HitMarker(Vector3 position, float displayTime, float damage, bool isHeadshot, int playerId)
{
this.position = position;
this.displayTime = displayTime;
this.damage = damage;
floatingOffset = Vector3.zero;
this.isHeadshot = isHeadshot;
this.playerId = playerId;
}
}
private class Tracer
{
public List<Vector3> positions = new List<Vector3>();
public int fireIndex;
public int fragmentIndex;
public int randomSeed;
public float startTime;
public bool hitTarget;
public bool hitMarkerDrawn;
public Vector3? startPosition;
public bool startUsed;
public Tracer(int fireIndex, int fragmentIndex, int randomSeed, Vector3? startPosition = null)
{
this.fireIndex = fireIndex;
this.fragmentIndex = fragmentIndex;
this.randomSeed = randomSeed;
this.startPosition = startPosition;
startUsed = false;
startTime = Time.time;
hitTarget = false;
hitMarkerDrawn = false;
}
public void AddPosition(Vector3 position)
{
if (!hitTarget)
{
positions.Add(position);
}
}
}
public bool hitmarkerloaded;
private static Dictionary<int, Tracer> validProjectiles = new Dictionary<int, Tracer>();
private static List<HitMarker> activeHitMarkers = new List<HitMarker>();
private Dictionary<int, bool> playerAliveStatus = new Dictionary<int, bool>();
private static Dictionary<int, float> damageTimers = new Dictionary<int, float>();
private HashSet<int> blacklistedSeeds = new HashSet<int>();
private bool clearalivestatus;
private float hitMarkerDuration = 1f;
private static float hitMarkerVolume = 0.2f;
private float damageAccumulationTime = 0.5f;
private static Texture2D hitMarkerTexture;
private bool isReactionOnShotHooked;
public static TestHook ReactionOnShotHook;
private static MethodInfo originalMethod;
public void Start()
{
ConsoleScreen.Log("Init GL material....");
GameUtils.InitMaterial();
}
public void Update()
{
if (!Settings.tracers && !Settings.HitMarkers)
{
return;
}
if (Main.GameWorld == null && clearalivestatus)
{
playerAliveStatus.Clear();
clearalivestatus = false;
}
else if (Main.GameWorld != null && !clearalivestatus)
{
clearalivestatus = true;
}
if (Main.GameWorld == null)
{
return;
}
if (!hitmarkerloaded && Main.bundle != null)
{
hitMarkerTexture = Main.bundle.LoadAsset<Texture2D>("hitmarkerImage");
hitmarkerloaded = hitMarkerTexture != null;
ConsoleScreen.Log((hitMarkerTexture != null) ? "Hitmarker image loaded successfully!" : "Failed to load hitmarker image!");
}
if (hitMarkerTexture == null)
{
return;
}
if (Main.OnlineGamePlayers.Count > 0)
{
if (!isReactionOnShotHooked && Settings.HitMarkers)
{
isReactionOnShotHooked = true;
}
_F163 obj = Main.GameWorld?.ClientBallisticCalculator;
int activeShotsCount = obj.ActiveShotsCount;
if (obj == null)
{
return;
}
for (int i = 0; i < activeShotsCount; i++)
{
_F16A activeShot = obj.GetActiveShot(i);
if (activeShot == null)
{
continue;
}
if (activeShot.PlayerProfileID == Main.LocalPlayer.ProfileId && !validProjectiles.ContainsKey(activeShot.RandomSeed))
{
Tracer value = new Tracer(activeShot.FireIndex, activeShot.FragmentIndex, activeShot.RandomSeed, activeShot.StartPosition);
validProjectiles[activeShot.RandomSeed] = value;
}
if (validProjectiles.ContainsKey(activeShot.RandomSeed))
{
Tracer tracer = validProjectiles[activeShot.RandomSeed];
if (tracer.startPosition.HasValue && !tracer.startUsed)
{
tracer.positions.Add(tracer.startPosition.Value);
tracer.startUsed = true;
}
tracer.AddPosition(activeShot.CurrentPosition);
}
}
activeHitMarkers.RemoveAll((HitMarker marker) => Time.time - marker.displayTime > hitMarkerDuration);
validProjectiles = validProjectiles.Where((KeyValuePair<int, Tracer> keyValuePair) => Time.time - keyValuePair.Value.startTime < 5f).ToDictionary((KeyValuePair<int, Tracer> keyValuePair) => keyValuePair.Key, (KeyValuePair<int, Tracer> keyValuePair) => keyValuePair.Value);
return;
}
_F163 obj2 = Main.GameWorld?.SharedBallisticsCalculator;
int activeShotsCount2 = obj2.ActiveShotsCount;
if (obj2 == null)
{
return;
}
for (int num = 0; num < activeShotsCount2; num++)
{
_F16A activeShot2 = obj2.GetActiveShot(num);
if (activeShot2 == null)
{
continue;
}
if (activeShot2.PlayerProfileID == Main.LocalPlayer.ProfileId && !validProjectiles.ContainsKey(activeShot2.RandomSeed))
{
Tracer value2 = new Tracer(activeShot2.FireIndex, activeShot2.FragmentIndex, activeShot2.RandomSeed, activeShot2.StartPosition);
validProjectiles[activeShot2.RandomSeed] = value2;
}
if (!validProjectiles.ContainsKey(activeShot2.RandomSeed))
{
continue;
}
Tracer tracer2 = validProjectiles[activeShot2.RandomSeed];
if (tracer2.startPosition.HasValue && !tracer2.startUsed)
{
tracer2.positions.Add(tracer2.startPosition.Value);
tracer2.startUsed = true;
}
tracer2.AddPosition(activeShot2.CurrentPosition);
if (Main.OnlineGamePlayers.Count >= 1 || !activeShot2.HasAchievedTarget || tracer2.hitMarkerDrawn)
{
continue;
}
tracer2.hitTarget = true;
tracer2.hitMarkerDrawn = true;
if (!(activeShot2.HittedBallisticCollider is BodyPartCollider { Player: var player } bodyPartCollider))
{
continue;
}
bool flag = bodyPartCollider.BodyPartType == EBodyPart.Head;
if (player == null)
{
continue;
}
int playerId = player.ProfileId.GetHashCode();
if (playerAliveStatus.ContainsKey(playerId) && !playerAliveStatus[playerId])
{
continue;
}
float current = player.HealthController.GetBodyPartHealth(EBodyPart.Common).Current;
float num2 = player.HealthController.GetBodyPartHealth(EBodyPart.Common).Maximum - current;
if (damageTimers.ContainsKey(playerId) && Time.time - damageTimers[playerId] < damageAccumulationTime)
{
HitMarker hitMarker = activeHitMarkers.FirstOrDefault((HitMarker m) => m.playerId == playerId);
if (hitMarker != null)
{
hitMarker.damage += num2;
hitMarker.displayTime = Time.time;
}
}
else
{
activeHitMarkers.Add(new HitMarker(activeShot2.HitPoint, Time.time, num2, flag, playerId));
damageTimers[playerId] = Time.time;
}
if (Settings.HitMarkers)
{
if (flag && Main.headshotsound != null)
{
Main.audioSourcehit.clip = Main.headshotsound;
Main.audioSourcehit.volume = hitMarkerVolume;
Main.audioSourcehit.Play();
}
else if (Main.hitMarkerSound != null)
{
Main.audioSourcehit.clip = Main.hitMarkerSound;
Main.audioSourcehit.volume = hitMarkerVolume;
Main.audioSourcehit.Play();
}
}
bool isAlive = player.HealthController.IsAlive;
playerAliveStatus[playerId] = isAlive;
if (!isAlive)
{
damageTimers.Remove(playerId);
}
}
activeHitMarkers.RemoveAll((HitMarker marker) => Time.time - marker.displayTime > hitMarkerDuration);
validProjectiles = validProjectiles.Where((KeyValuePair<int, Tracer> keyValuePair) => Time.time - keyValuePair.Value.startTime < 5f).ToDictionary((KeyValuePair<int, Tracer> keyValuePair) => keyValuePair.Key, (KeyValuePair<int, Tracer> keyValuePair) => keyValuePair.Value);
}
private static void ProcessOnlineHitMarker(Vector3 hitPosition, bool isHeadshot)
{
Vector3 position = GameUtils.WorldPointToScreenPoint(hitPosition);
ConsoleScreen.Log($"Drawing Hitmarker at : {hitPosition} Headshot ? {isHeadshot}");
if (position.z > 0f)
{
DrawHitMarker(position, 32f, isHeadshot);
}
}
private void Tracers()
{
if (!Settings.tracers)
{
return;
}
if (GameUtils.DrawMaterial == null)
{
GameUtils.InitMaterial();
}
Camera mainCamera = Main.MainCamera;
if (mainCamera == null)
{
return;
}
GameUtils.DrawMaterial.SetPass(0);
GL.PushMatrix();
GL.LoadProjectionMatrix(mainCamera.projectionMatrix);
GL.modelview = mainCamera.worldToCameraMatrix;
GL.Begin(1);
foreach (Tracer value in validProjectiles.Values)
{
if (value.positions.Count >= 1)
{
for (int i = 0; i < value.positions.Count - 1; i++)
{
Vector3 v = value.positions[i];
Vector3 v2 = value.positions[i + 1];
GL.Color(Settings.TracerColor);
GL.Vertex(v);
GL.Vertex(v2);
}
}
}
GL.End();
GL.PopMatrix();
}
private void OnGUI()
{
Tracers();
if (!Settings.HitMarkers)
{
return;
}
foreach (HitMarker activeHitMarker in activeHitMarkers)
{
Vector3 vector = GameUtils.WorldPointToScreenPoint(activeHitMarker.position);
if (vector.z > 0f && vector.x >= 0f && vector.x <= (float)Screen.width && vector.y >= 0f && vector.y <= (float)Screen.height)
{
DrawDamageNumbers(activeHitMarker, vector);
DrawHitMarker(vector, 32f, activeHitMarker.isHeadshot);
}
}
}
private void DrawDamageNumbers(HitMarker hitMarker, Vector3 screenPosition)
{
hitMarker.floatingOffset.y += Time.deltaTime * 20f;
Vector3 vector = screenPosition + hitMarker.floatingOffset;
vector.y = (float)Screen.height - vector.y;
if (hitMarker.isHeadshot)
{
string text = "HEADSHOT";
GUI.color = new Color(1f, 0f, 0f, 1f);
GUI.Label(new Rect(vector.x - 10f, vector.y - 40f, 100f, 20f), text);
}
string text2 = "";
if (Main.GamePlayers.Count > 0)
{
text2 = "- " + hitMarker.damage.ToString("F0") + " hp ";
}
GUI.color = Settings.HitmarkerHeadShotColor;
GUI.Label(new Rect(vector.x - 10f, vector.y - 20f, 100f, 20f), text2);
GUI.color = Color.white;
}
private static void DrawHitMarker(Vector3 position, float size, bool isHeadshot)
{
if (!(hitMarkerTexture == null))
{
GUI.color = (isHeadshot ? Settings.HitmarkerHeadShotColor : Settings.HitmarkerHitColor);
GUI.DrawTexture(new Rect(position.x - size / 2f, position.y - size / 2f, size, size), hitMarkerTexture);
GUI.color = Color.white;
}
}
}

View file

@ -0,0 +1,343 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using EFT;
using EFT.Ballistics;
using EFT.InventoryLogic;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features;
internal class Aimbot : MonoBehaviour
{
public static bool NotHooked = true;
private bool isBulletMovementHooked;
public static TestHook CreateShotHook;
public static TestHook BulletMovementHook;
public static GamePlayer Target;
public static OnlineGamePlayer OTarget;
public static List<GameUtils.Tracer> TracerList = new List<GameUtils.Tracer>();
public static List<GameUtils.HitMarker> HitList = new List<GameUtils.HitMarker>();
public static int zombiebone = 31;
public void Update()
{
switch (Settings.Aimbone)
{
case 133:
zombiebone = 31;
break;
case 132:
zombiebone = 30;
break;
case 36:
zombiebone = 15;
break;
case 35:
zombiebone = 14;
break;
}
if (!(Main.GameWorld != null) || !(Main.ActiveCamera != null))
{
return;
}
if (Settings.Aimbot)
{
Aim();
}
if (Settings.SilentAim)
{
if (Main.OnlineGamePlayers.Count > 0)
{
GetTargetO();
}
else
{
GetTarget();
}
}
if (Input.GetKeyDown(KeyCode.Mouse2) && Settings.artillery && !Settings.allinputdisabled)
{
_ = Vector3.zero;
Exploits.TestShelling(GameUtils.GetBonePosByID(Target.Player, Settings.Aimbone));
}
if (Input.GetKeyDown(KeyCode.Escape) && !Settings.allinputdisabled)
{
Main.GameWorld.ServerShellingController.StopShelling();
}
if (Settings.MagicBullet && Main.OnlineGamePlayers.Count < 1 && !isBulletMovementHooked)
{
MethodInfo method = Find("\uf16a").GetMethod("\ue014", BindingFlags.Instance | BindingFlags.NonPublic);
BulletMovementHook = new TestHook();
BulletMovementHook.Init(method, typeof(BulletMovement).GetMethod("MagicBullet_Hook"));
BulletMovementHook.Hook();
isBulletMovementHooked = true;
}
try
{
if (Main.GameWorld != null && Main.LocalPlayer.HandsController.Item is Weapon)
{
if (Settings.SilentAim && NotHooked)
{
CreateShotHook = new TestHook();
CreateShotHook.Init(typeof(BallisticsCalculator).GetMethod("CreateShot"), typeof(HookObject).GetMethod("SilentAimHook"));
CreateShotHook.Hook();
NotHooked = false;
ConsoleScreen.Log("Silent Aim Hooked");
}
if (Main.OnlineGamePlayers.Count > 0)
{
OTarget = GetTargetO();
}
else
{
Target = GetTarget();
}
}
}
catch (Exception)
{
}
}
public static bool VisCheck(GameObject obj, Vector3 Pos, Vector3 Position, out RaycastHit raycastHit)
{
if (Physics.Linecast(Pos, Position, out raycastHit, -2142957568) && (bool)raycastHit.collider)
{
return raycastHit.collider.gameObject.transform.root.gameObject == obj.transform.root.gameObject;
}
return false;
}
private GamePlayer GetTarget()
{
Dictionary<GamePlayer, int> dictionary = new Dictionary<GamePlayer, int>();
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (gamePlayer != null && !gamePlayer.Player.IsYourPlayer && gamePlayer.Player.HealthController.IsAlive)
{
Vector3 zero = Vector3.zero;
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
zero = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByID(gamePlayer.Player, zombiebone) : GameUtils.GetBonePosByID(gamePlayer.Player, Settings.Aimbone));
Vector3.Distance(Main.MainCamera.transform.position, gamePlayer.Player.Transform.position);
Vector3 rhs = gamePlayer.Player.Transform.position - Main.MainCamera.transform.position;
if (gamePlayer.Distance <= Settings.DrawPlayersDistance && CaulculateInFov(zero) <= Settings.AimbotFOV && Vector3.Dot(Main.MainCamera.transform.TransformDirection(Vector3.forward), rhs) > 0f && (!Settings.CheckVisible || VisCheck(gamePlayer.Player.gameObject, Main.LocalPlayer.Fireport.position, zero, out var _)))
{
dictionary.Add(gamePlayer, (int)gamePlayer.DistanceFromCenter);
}
}
}
if (dictionary.Count > 0)
{
dictionary = dictionary.OrderBy(delegate(KeyValuePair<GamePlayer, int> pair)
{
KeyValuePair<GamePlayer, int> keyValuePair = pair;
return keyValuePair.Value;
}).ToDictionary((KeyValuePair<GamePlayer, int> pair) => pair.Key, (KeyValuePair<GamePlayer, int> pair) => pair.Value);
return dictionary.Keys.First();
}
return null;
}
private OnlineGamePlayer GetTargetO()
{
Dictionary<OnlineGamePlayer, int> dictionary = new Dictionary<OnlineGamePlayer, int>();
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
if (onlineGamePlayer != null && !onlineGamePlayer.Player.IsYourPlayer && onlineGamePlayer.Player.HealthController.IsAlive && onlineGamePlayer.role != OnlineGamePlayer.PlayerType.Teammate)
{
Vector3 zero = Vector3.zero;
WildSpawnType wildSpawnType = WildSpawnType.pmcUSEC;
zero = ((wildSpawnType == WildSpawnType.infectedAssault || wildSpawnType == WildSpawnType.infectedCivil || wildSpawnType == WildSpawnType.infectedLaborant || wildSpawnType == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByIDO(onlineGamePlayer.Player, zombiebone) : GameUtils.GetBonePosByIDO(onlineGamePlayer.Player, Settings.Aimbone));
Vector3.Distance(Main.MainCamera.transform.position, onlineGamePlayer.Player.Transform.position);
Vector3 rhs = onlineGamePlayer.Player.Transform.position - Main.MainCamera.transform.position;
if (onlineGamePlayer.Distance <= Settings.DrawPlayersDistance && CaulculateInFov(zero) <= Settings.AimbotFOV && Vector3.Dot(Main.MainCamera.transform.TransformDirection(Vector3.forward), rhs) > 0f && (!Settings.CheckVisible || VisCheck(onlineGamePlayer.Player.gameObject, Main.LocalPlayer.Fireport.position, zero, out var _)))
{
dictionary.Add(onlineGamePlayer, (int)onlineGamePlayer.DistanceFromCenter);
}
}
}
if (dictionary.Count > 0)
{
dictionary = dictionary.OrderBy(delegate(KeyValuePair<OnlineGamePlayer, int> pair)
{
KeyValuePair<OnlineGamePlayer, int> keyValuePair = pair;
return keyValuePair.Value;
}).ToDictionary((KeyValuePair<OnlineGamePlayer, int> pair) => pair.Key, (KeyValuePair<OnlineGamePlayer, int> pair) => pair.Value);
return dictionary.Keys.First();
}
return null;
}
private void Aim()
{
if (!Input.GetKey(Settings.AimbotKey))
{
return;
}
Vector3 vector = Vector3.zero;
float num = 9999f;
if (Main.OnlineGamePlayers.Count > 0)
{
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
if (onlineGamePlayer == null || onlineGamePlayer.Player.IsYourPlayer || !onlineGamePlayer.Player.HealthController.IsAlive || onlineGamePlayer.role == OnlineGamePlayer.PlayerType.Teammate)
{
continue;
}
Vector3 zero = Vector3.zero;
zero = ((onlineGamePlayer.role == OnlineGamePlayer.PlayerType.Zombie) ? GameUtils.GetBonePosByIDO(onlineGamePlayer.Player, zombiebone) : GameUtils.GetBonePosByIDO(onlineGamePlayer.Player, Settings.Aimbone));
float num2 = Vector3.Distance(Main.MainCamera.transform.position, onlineGamePlayer.Player.Transform.position);
Weapon localPlayerWeapon = Main.LocalPlayerWeapon;
if (!(zero != Vector3.zero) || !(CaulculateInFov(zero) <= Settings.AimbotFOV) || (Settings.CheckVisible && !VisCheck(onlineGamePlayer.Player.gameObject, Main.LocalPlayer.Fireport.position, zero, out var _)) || !(num > num2))
{
continue;
}
num = num2;
if (localPlayerWeapon != null)
{
if (Main.LocalPlayerWeapon.CurrentAmmoTemplate != null)
{
float num3 = onlineGamePlayer.Distance / Main.LocalPlayerWeapon.CurrentAmmoTemplate.InitialSpeed;
zero += onlineGamePlayer.Player.Velocity * num3;
zero -= Main.LocalPlayer.Velocity * Time.deltaTime;
if (num2 > 100f)
{
zero += Vector3.up * BulletDrop(Main.LocalPlayer.Fireport.position, zero, Main.LocalPlayerWeapon.CurrentAmmoTemplate.InitialSpeed);
}
}
vector = zero;
}
vector = zero;
}
}
else
{
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
if (gamePlayer == null || gamePlayer.Player.IsYourPlayer || !gamePlayer.Player.HealthController.IsAlive)
{
continue;
}
Vector3 zero2 = Vector3.zero;
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
zero2 = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByID(gamePlayer.Player, zombiebone) : GameUtils.GetBonePosByID(gamePlayer.Player, Settings.Aimbone));
float num4 = Vector3.Distance(Main.MainCamera.transform.position, gamePlayer.Player.Transform.position);
Weapon localPlayerWeapon2 = Main.LocalPlayerWeapon;
if (!(zero2 != Vector3.zero) || !(CaulculateInFov(zero2) <= Settings.AimbotFOV) || (Settings.CheckVisible && !VisCheck(gamePlayer.Player.gameObject, Main.LocalPlayer.Fireport.position, zero2, out var _)) || !(num > num4))
{
continue;
}
num = num4;
if (localPlayerWeapon2 != null)
{
if (Main.LocalPlayerWeapon.CurrentAmmoTemplate != null)
{
float num5 = gamePlayer.Distance / Main.LocalPlayerWeapon.CurrentAmmoTemplate.InitialSpeed;
zero2 += gamePlayer.Player.Velocity * num5;
zero2 -= Main.LocalPlayer.Velocity * Time.deltaTime;
if (num4 > 100f)
{
zero2 += Vector3.up * BulletDrop(Main.LocalPlayer.Fireport.position, zero2, Main.LocalPlayerWeapon.CurrentAmmoTemplate.InitialSpeed);
}
}
vector = zero2;
}
vector = zero2;
}
}
if (vector != Vector3.zero)
{
AimAtPos(vector);
}
}
public static Vector2 GetAngleToTarget(Vector3 origin, Vector3 target)
{
Vector3 normalized = (target - origin).normalized;
float y = Mathf.Asin(normalized.y) * 57.29578f;
return new Vector2(Mathf.Atan2(normalized.x, normalized.z) * 57.29578f, y);
}
private static Vector2 GetSmoothAngle(Vector2 fromAngle, Vector2 toAngle, float smoothness)
{
float x = Mathf.LerpAngle(fromAngle.x, toAngle.x, smoothness * Time.deltaTime);
float y = Mathf.LerpAngle(fromAngle.y, toAngle.y, smoothness * Time.deltaTime);
return new Vector2(x, y);
}
public void OnGUI()
{
if (Settings.SilentTargetLines && (Settings.SilentAim || Settings.MagicBullet) && Main.GameWorld != null && Main.LocalPlayerWeapon != null && Target != null && Main.GamePlayers.Count > 0)
{
Vector3 zero = Vector3.zero;
WildSpawnType role = Target.Player.Profile.Info.Settings.Role;
zero = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByID(Target.Player, zombiebone) : GameUtils.GetBonePosByID(Target.Player, Settings.Aimbone));
Vector3 vector = Camera.main.WorldToScreenPoint(zero);
vector.y = (float)Screen.height - vector.y;
Render.DrawLine(GameUtils.ScreenCenter, vector, 1f, Settings.TargetSnaplineColor);
}
}
public static float CaulculateInFov(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 float CaulculateInFov2(Vector3 worldPosition)
{
Vector3 normalized = (worldPosition - Main.MainCamera.transform.position).normalized;
return Vector3.Angle(Main.MainCamera.transform.forward, normalized);
}
public static void AimAtPos(Vector3 position)
{
Vector3 vector = Main.LocalPlayer.Fireport.position - Main.LocalPlayer.Fireport.up * 1f;
Vector3 eulerAngles = Quaternion.LookRotation((position - vector).normalized).eulerAngles;
if (eulerAngles.x > 180f)
{
eulerAngles.x -= 360f;
}
Main.LocalPlayer.MovementContext.Rotation = new Vector2(eulerAngles.y, eulerAngles.x);
}
public static float BulletDrop(Vector3 startVector, Vector3 endVector, float BulletSpeed)
{
float num = Vector3.Distance(startVector, endVector);
if (num >= 50f)
{
float num2 = num / BulletSpeed;
return (float)(4.905 * (double)num2 * (double)num2);
}
return 0f;
}
public static Type Find(string type)
{
Type[] types = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "Assembly-CSharp").GetTypes();
foreach (Type type2 in types)
{
if (type == type2.Name || type == type2.FullName)
{
return type2;
}
}
return null;
}
}

View file

@ -0,0 +1,57 @@
using System;
using EFT;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features;
public class BulletMovement
{
public bool MagicBullet_Hook(Vector3 prevPosition, Vector3 nextPosition)
{
Aimbot.BulletMovementHook.Unhook();
bool result = false;
try
{
if (Settings.MagicBullet && Input.GetMouseButton(0))
{
GamePlayer target = Aimbot.Target;
OnlineGamePlayer oTarget = Aimbot.OTarget;
if (target != null)
{
Vector3 zero = Vector3.zero;
WildSpawnType role = target.Player.Profile.Info.Settings.Role;
zero = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByID(target.Player, Aimbot.zombiebone) : GameUtils.GetBonePosByID(target.Player, Settings.Aimbone));
Vector3 normalized = (Main.LocalPlayer.Fireport.position - zero).normalized;
prevPosition = zero + normalized * 0.1f;
nextPosition = zero;
}
else if (oTarget != null)
{
Vector3 zero2 = Vector3.zero;
WildSpawnType wildSpawnType = WildSpawnType.pmcUSEC;
zero2 = ((wildSpawnType == WildSpawnType.infectedAssault || wildSpawnType == WildSpawnType.infectedCivil || wildSpawnType == WildSpawnType.infectedLaborant || wildSpawnType == WildSpawnType.infectedPmc) ? GameUtils.GetBonePosByIDO(oTarget.Player, Aimbot.zombiebone) : GameUtils.GetBonePosByIDO(oTarget.Player, Settings.Aimbone));
Vector3 normalized2 = (Main.LocalPlayer.Fireport.position - zero2).normalized;
prevPosition = zero2 + normalized2 * 0.1f;
nextPosition = zero2;
}
}
result = (bool)Aimbot.BulletMovementHook.OriginalMethod.Invoke(this, new object[2] { prevPosition, nextPosition });
}
catch (Exception ex)
{
ConsoleScreen.Log("Exception in hook method:");
ConsoleScreen.Log($"Exception Type: {ex.GetType()}");
ConsoleScreen.Log("Exception Message: " + ex.Message);
ConsoleScreen.Log("Stack Trace: " + ex.StackTrace);
}
finally
{
Aimbot.BulletMovementHook.Hook();
}
return result;
}
}

View file

@ -0,0 +1,38 @@
using EFT.UI;
using EFT.Weather;
using UnityEngine;
namespace stupid.solutions.Features;
public class EZWeatherController : MonoBehaviour
{
public static WeatherController _weatherController;
private static ToDController _toDController;
private void Update()
{
}
public static void Initialize()
{
_weatherController = WeatherController.Instance;
_toDController = _weatherController?.TimeOfDayController;
if (_weatherController == null)
{
ConsoleScreen.LogError("WeatherController not found!");
}
if (_toDController == null)
{
ConsoleScreen.LogError("TimeOfDayController not found!");
}
}
public static void EnsureInitialized()
{
if (_weatherController == null || _toDController == null)
{
Initialize();
}
}
}

View file

@ -0,0 +1,477 @@
using System;
using System.Collections.Generic;
using EFT;
using EFT.InventoryLogic;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features;
public static class EntityManager
{
public static void KillEntity(Player entity)
{
if (entity != null && !entity.IsYourPlayer)
{
entity.ActiveHealthController.Kill(EDamageType.Landmine);
ConsoleScreen.Log("Killed " + entity.name);
}
}
public static void HealEntity(Player entity)
{
if (entity == null)
{
return;
}
foreach (EBodyPart value in Enum.GetValues(typeof(EBodyPart)))
{
if (entity.ActiveHealthController.IsBodyPartBroken(value) || entity.ActiveHealthController.IsBodyPartDestroyed(value))
{
entity.ActiveHealthController.RestoreBodyPart(value, 1f);
}
entity.ActiveHealthController.RemoveNegativeEffects(value);
entity.ActiveHealthController.RemoveNegativeEffects(EBodyPart.Common);
entity.ActiveHealthController.RestoreFullHealth();
entity.ActiveHealthController.ChangeHealth(value, 1000000f, default(_F167));
entity.ActiveHealthController.ApplyDamage(value, 0f, default(_F167));
ConsoleScreen.Log("Healed " + entity.name);
}
}
public static void TeleportEntityToCrosshair(Player entity)
{
if (!(entity == null) && !(Main.LocalPlayer == null))
{
Vector3 position = Main.LocalPlayer.gameObject.transform.position;
Vector3 forward = Main.LocalPlayer.gameObject.transform.forward;
float num = 5f;
Vector3 position2 = position + forward * num;
entity.Teleport(position2, onServerToo: true);
}
}
public static void ToggleOffEntityObject(Player entity)
{
try
{
if (entity.AIData.BotOwner.EnemiesController?.EnemyInfos != null && !(Main.LocalPlayer == null))
{
if (!entity.AIData.BotOwner.BotsGroup.Allies.Contains(Main.LocalPlayer) && entity.AIData.BotOwner.BotsGroup.Side == entity.Profile.Side)
{
entity.AIData.BotOwner.BotsGroup.RemoveEnemy(Main.LocalPlayer);
entity.AIData.BotOwner.BotsGroup.AddAlly(Main.LocalPlayer);
ConsoleScreen.Log($"Now an Ally of : {entity.AIData.BotOwner.BotsGroup.Side} Initial WST :{entity.AIData.BotOwner.BotsGroup.InitialBotType}");
}
entity.AIData.BotOwner.Memory.GoalTarget.Clear();
entity.AIData.BotOwner.Memory.GoalEnemy = null;
}
}
catch (Exception arg)
{
ConsoleScreen.Log($"Error in Bot Lobotomization code : {arg}");
}
}
public static void MakeBotAlly(Player entity)
{
try
{
if (entity.AIData.BotOwner.EnemiesController?.EnemyInfos != null && !(Main.LocalPlayer == null) && !entity.AIData.BotOwner.BotsGroup.IsAlly(Main.LocalPlayer) && entity.AIData.BotOwner.BotsGroup.Side == entity.Profile.Side)
{
entity.AIData.BotOwner.BotsGroup.RemoveEnemy(Main.LocalPlayer);
entity.AIData.BotOwner.BotsGroup.AddAlly(Main.LocalPlayer);
entity.AIData.BotOwner.Memory.GoalTarget.Clear();
entity.AIData.BotOwner.Memory.GoalEnemy = null;
}
}
catch (Exception arg)
{
ConsoleScreen.Log($"Error in Bot Lobotomization code : {arg}");
}
}
public static void GetKnifeOut(Player entity)
{
foreach (Item item in entity.AIData.BotOwner.InventoryController.Items)
{
entity.AIData.BotOwner.InventoryController.ThrowItem(item);
entity.AIData.BotOwner.ItemDropper.SetItemToDropNext(item);
entity.AIData.BotOwner.ItemDropper.TryDoDrop();
}
}
private static Item CreateLoadedBlicky()
{
ItemFactory itemFactory = new ItemFactory();
dynamic val = itemFactory.CreateItem("66015072e9f84d5680039678");
if (val == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: Failed to create weapon item!");
return null;
}
dynamic val2 = val.AllSlots;
foreach (dynamic item3 in val2)
{
dynamic val3 = item3?.Filters == null;
if (val3 || item3.Filters.Length == 0)
{
continue;
}
foreach (dynamic item4 in item3.Filters)
{
val3 = item4?.Filter == null;
if (val3 || item4.Filter.Length == 0)
{
continue;
}
string text = item4.Filter[UnityEngine.Random.Range(0, item4.Filter.Length)].ToString();
if (!string.IsNullOrEmpty(text))
{
Item item = itemFactory.CreateItem(text);
if (item != null)
{
item.SpawnedInSession = true;
item3.AddWithoutRestrictions(item);
}
}
break;
}
}
dynamic currentMagazine = val.GetCurrentMagazine();
if (currentMagazine != null)
{
int num = currentMagazine.Cartridges.MaxCount;
for (int i = 0; i < num; i++)
{
Item item2 = itemFactory.CreateItem("6601546f86889319850bd566");
if (item2 != null)
{
item2.SpawnedInSession = true;
currentMagazine.Cartridges?.Add(item2, false);
}
}
}
return val;
}
public static void GiveBotsBlickyKit(Player entity)
{
try
{
if (entity == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: Entity is null!");
return;
}
ConsoleScreen.Log("[GiveBotsBlickyKit] Starting for " + entity.Profile?.Nickname);
if (entity.AIData == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: AIData is null!");
return;
}
BotOwner botOwner = entity.AIData.BotOwner;
if (botOwner == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: BotOwner is null!");
return;
}
InventoryController inventoryController = botOwner.InventoryController;
if (inventoryController == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: InventoryController is null!");
return;
}
InventoryEquipment inventoryEquipment = inventoryController.Inventory?.Equipment;
if (inventoryEquipment == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: Equipment is null!");
return;
}
ItemFactory itemFactory = new ItemFactory();
Slot slot = inventoryEquipment.GetSlot(EquipmentSlot.FirstPrimaryWeapon);
Slot slot2 = inventoryEquipment.GetSlot(EquipmentSlot.SecondPrimaryWeapon);
Slot slot3 = inventoryEquipment.GetSlot(EquipmentSlot.Holster);
Slot slot4 = inventoryEquipment.GetSlot(EquipmentSlot.Scabbard);
Slot slot5 = inventoryEquipment.GetSlot(EquipmentSlot.Headwear);
Slot slot6 = inventoryEquipment.GetSlot(EquipmentSlot.TacticalVest);
Slot slot7 = inventoryEquipment.GetSlot(EquipmentSlot.FaceCover);
inventoryEquipment.GetSlot(EquipmentSlot.Pockets);
IEnumerable<Slot> allSlots = inventoryEquipment.GetAllSlots();
foreach (Slot item8 in allSlots)
{
item8?.RemoveItemWithoutRestrictions();
}
if (slot3 != null && slot3.ContainedItem?.TemplateId != (MongoID?)"66015072e9f84d5680039678")
{
Item item = CreateLoadedBlicky();
slot3.RemoveItemWithoutRestrictions();
slot3.AddWithoutRestrictions(item);
}
if (slot2 != null && slot2.ContainedItem?.TemplateId != (MongoID?)"66015072e9f84d5680039678")
{
Item item2 = CreateLoadedBlicky();
slot2.RemoveItemWithoutRestrictions();
slot2.AddWithoutRestrictions(item2);
}
if (slot != null && slot.ContainedItem?.TemplateId != (MongoID?)"66015072e9f84d5680039678")
{
Item item3 = CreateLoadedBlicky();
slot.RemoveItemWithoutRestrictions();
slot.AddWithoutRestrictions(item3);
}
if (slot4 != null && slot4.ContainedItem?.TemplateId != (MongoID?)"6540d2162ae6d96b540afcaf")
{
Item item4 = itemFactory.CreateItem("6540d2162ae6d96b540afcaf");
slot4.RemoveItemWithoutRestrictions();
slot4.AddWithoutRestrictions(item4);
}
if (slot5 != null && slot5.ContainedItem?.TemplateId != (MongoID?)"60bf74184a63fc79b60c57f6")
{
dynamic val = itemFactory.CreateItem("60bf74184a63fc79b60c57f6");
slot5.RemoveItemWithoutRestrictions();
dynamic val2 = val.AllSlots;
foreach (dynamic item9 in val2)
{
dynamic val3 = item9?.Filters == null;
if (val3 || item9.Filters.Length == 0)
{
continue;
}
foreach (dynamic item10 in item9.Filters)
{
val3 = item10?.Filter == null;
if (val3 || item10.Filter.Length == 0)
{
continue;
}
string text = item10.Filter[UnityEngine.Random.Range(0, item10.Filter.Length)].ToString();
if (!string.IsNullOrEmpty(text))
{
Item item5 = itemFactory.CreateItem(text);
if (item5 != null)
{
item5.SpawnedInSession = true;
item9.AddWithoutRestrictions(item5);
}
}
break;
}
}
slot5.AddWithoutRestrictions(val);
}
if (slot6 != null)
{
slot6.RemoveItemWithoutRestrictions();
dynamic val4 = itemFactory.CreateItem("5fd4c4fa16cac650092f6771");
if (val4 == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: Failed to create rig!");
return;
}
dynamic val5 = val4.Grids?[0];
dynamic val6 = val4.Grids?[1];
dynamic val7 = val4.Grids?[2];
dynamic val8 = val4?.Grids?[3];
if (val5 == null)
{
ConsoleScreen.Log("GiveBotsBlickyKit: rigGrid is null!");
return;
}
for (int i = 0; i < 4; i++)
{
Item item6 = itemFactory.CreateItem("6601546f86889319850bd566");
if (item6 == null)
{
continue;
}
item6.SpawnedInSession = true;
item6.StackObjectsCount = item6.Template.StackMaxSize;
LocationInGrid locationInGrid = val5.FindFreeSpace(item6);
if (locationInGrid != null)
{
val5.AddItemWithoutRestrictions(item6, locationInGrid);
}
else
{
if (!((val6 != null) ? true : false))
{
continue;
}
LocationInGrid locationInGrid2 = val6.FindFreeSpace(item6);
if (locationInGrid2 != null)
{
val6.AddItemWithoutRestrictions(item6, locationInGrid2);
}
else if (val7 != null)
{
LocationInGrid locationInGrid3 = val7.FindFreeSpace(item6);
if (locationInGrid3 != null)
{
val7.AddItemWithoutRestrictions(item6, locationInGrid3);
}
}
}
}
dynamic val9 = itemFactory.CreateItem("5a0c27731526d80618476ac4");
LocationInGrid locationInGrid4 = val8.FindFreeSpace(val9);
val8.AddItemWithoutRestrictions(val9, locationInGrid4);
slot6.AddWithoutRestrictions(val4);
slot6.ApplyContainedItem();
}
if (slot7 != null)
{
Item item7 = itemFactory.CreateItem("62a61bbf8ec41a51b34758d2");
slot7.RemoveItemWithoutRestrictions();
slot7.AddWithoutRestrictions(item7);
}
ConsoleScreen.Log("GiveBotsBlickyKit: Success!");
foreach (Slot item11 in allSlots)
{
item11.ApplyContainedItem();
}
entity.AIData.BotOwner.WeaponManager.UpdateWeaponsList();
entity.TrySetLastEquippedWeapon();
}
catch (Exception arg)
{
ConsoleScreen.Log($"[GiveBotsBlickyKit] Exception: {arg}");
}
}
public static (string displayName, Color displayColor) GetEntityDisplayInfo(GamePlayer gamePlayer)
{
WildSpawnType role = gamePlayer.Player.Profile.Info.Settings.Role;
string text = gamePlayer.Player.Profile.Info.Nickname.Localized();
Color white = Color.white;
if (gamePlayer.Player.Profile.Info.Settings.IsBoss())
{
if (Main.IsBossByName(text))
{
text = Main.TranslateBossName(text);
white = Settings.BossandGuardColor;
}
else
{
switch (role)
{
case WildSpawnType.shooterBTR:
text = "BTR";
white = Settings.BTRColor;
break;
case WildSpawnType.peacefullZryachiyEvent:
case WildSpawnType.ravangeZryachiyEvent:
text = "Event Zryachiy";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.bossTagillaAgro:
text = "Shadow of Tagilla";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.bossKillaAgro:
text = "Shadow of Killa";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.tagillaHelperAgro:
text = "Guard";
white = Settings.GuardColor;
break;
case WildSpawnType.infectedTagilla:
text = "Zombie Tagilla";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.exUsec:
text = "Rogue";
white = Settings.RogueColor;
break;
case WildSpawnType.pmcUSEC:
text = "[USEC] " + text;
white = Settings.USECColor;
break;
case WildSpawnType.pmcBEAR:
text = "[BEAR] " + text;
white = Settings.BEARColor;
break;
case WildSpawnType.followerZryachiy:
case WildSpawnType.bossBoarSniper:
text = "Guard";
white = Settings.GuardColor;
break;
case WildSpawnType.pmcBot:
text = "Raider";
white = Settings.RaiderColor;
break;
case WildSpawnType.sectantPriest:
case WildSpawnType.sectactPriestEvent:
case WildSpawnType.sectantPredvestnik:
case WildSpawnType.sectantPrizrak:
case WildSpawnType.sectantOni:
text = "Cultist";
white = Settings.CultistColor;
break;
case WildSpawnType.marksman:
case WildSpawnType.assault:
case WildSpawnType.assaultGroup:
text = "Scav";
white = Settings.ScavColor;
break;
case WildSpawnType.infectedAssault:
case WildSpawnType.infectedPmc:
case WildSpawnType.infectedCivil:
case WildSpawnType.infectedLaborant:
text = "Zombie";
white = Settings.ZombieColor;
break;
default:
text = "Unknown Boss: " + text;
white = Color.red;
break;
}
}
}
else
{
switch (role)
{
case WildSpawnType.sectantWarrior:
text = "Cultist";
white = Settings.CultistColor;
break;
case WildSpawnType.marksman:
text = "Scav Sniper";
white = Settings.ScavColor;
break;
case WildSpawnType.shooterBTR:
text = "BTR";
white = Settings.BTRColor;
break;
case WildSpawnType.infectedAssault:
case WildSpawnType.infectedPmc:
case WildSpawnType.infectedCivil:
case WildSpawnType.infectedLaborant:
text = "Zombie";
white = Settings.ZombieColor;
break;
case WildSpawnType.arenaFighter:
text = "Arena Fighter";
white = Settings.RaiderColor;
break;
default:
if (role != WildSpawnType.marksman && role != WildSpawnType.assault)
{
text = "Guard";
white = Settings.GuardColor;
}
else
{
text = "Scav";
white = Settings.ScavColor;
}
break;
}
}
return (displayName: text, displayColor: white);
}
}

View file

@ -0,0 +1,14 @@
using UnityEngine;
namespace stupid.solutions.Features;
public class HenryBotNav : MonoBehaviour
{
public void Start()
{
}
public void Update()
{
}
}

View file

@ -0,0 +1,73 @@
using System;
using EFT;
using EFT.InventoryLogic;
using stupid.solutions.Data;
using stupid.solutions.HenryBot;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions.Features;
public class HookObject
{
public object SilentAimHook(object ammo, Vector3 origin, Vector3 direction, int fireIndex, Player player, Item weapon, float speedFactor = 1f, int fragmentIndex = 0)
{
try
{
if (Main.LocalPlayer?.HandsController.Item is Weapon && Settings.SilentAim && Input.GetMouseButton(0))
{
GamePlayer target = Aimbot.Target;
OnlineGamePlayer oTarget = Aimbot.OTarget;
if ((target != null || oTarget != null) && Main.LocalPlayer != null)
{
Vector3 zero = Vector3.zero;
if (Main.OnlineGamePlayers.Count > 0)
{
WildSpawnType wildSpawnType = WildSpawnType.pmcUSEC;
zero = ((wildSpawnType == WildSpawnType.infectedAssault || wildSpawnType == WildSpawnType.infectedCivil || wildSpawnType == WildSpawnType.infectedLaborant || wildSpawnType == WildSpawnType.infectedPmc) ? (GameUtils.FinalVectorO(oTarget.Player, Aimbot.zombiebone) + new Vector3(0f, 0.072f, 0f)) : (GameUtils.FinalVectorO(oTarget.Player, Settings.Aimbone) + new Vector3(0f, 0.072f, 0f)));
if (Main.LocalPlayer.WeaponRoot != null)
{
direction = (zero - origin).normalized;
origin = Main.LocalPlayer.Fireport.position;
}
}
else
{
WildSpawnType role = target.Player.Profile.Info.Settings.Role;
zero = ((role == WildSpawnType.infectedAssault || role == WildSpawnType.infectedCivil || role == WildSpawnType.infectedLaborant || role == WildSpawnType.infectedPmc) ? (GameUtils.FinalVector(target.Player, Aimbot.zombiebone) + new Vector3(0f, 0.072f, 0f)) : (GameUtils.FinalVector(target.Player, Settings.Aimbone) + new Vector3(0f, 0.072f, 0f)));
if (Main.LocalPlayer.WeaponRoot != null)
{
direction = (zero - origin).normalized;
origin = Main.LocalPlayer.Fireport.position;
}
}
}
}
else if (Main.LocalPlayer?.HandsController.Item is Weapon && Settings.henryison)
{
GamePlayer currentTarget = HenryBotBrain.currentTarget;
if (currentTarget != null && Main.LocalPlayer != null)
{
Vector3 zero2 = Vector3.zero;
WildSpawnType role2 = currentTarget.Player.Profile.Info.Settings.Role;
zero2 = ((role2 == WildSpawnType.infectedAssault || role2 == WildSpawnType.infectedCivil || role2 == WildSpawnType.infectedLaborant || role2 == WildSpawnType.infectedPmc) ? (GameUtils.FinalVector(currentTarget.Player, Aimbot.zombiebone) + new Vector3(0f, 0.072f, 0f)) : (GameUtils.FinalVector(currentTarget.Player, Settings.Aimbone) + new Vector3(0f, 0.072f, 0f)));
if (Main.LocalPlayer.WeaponRoot != null)
{
direction = (zero2 - origin).normalized;
origin = Main.LocalPlayer.Fireport.position;
}
}
}
Aimbot.CreateShotHook.Unhook();
object[] parameters = new object[8] { ammo, origin, direction, fireIndex, player, weapon, speedFactor, fragmentIndex };
object result = Aimbot.CreateShotHook.OriginalMethod.Invoke(this, parameters);
Aimbot.CreateShotHook.Hook();
return result;
}
catch (Exception)
{
throw;
}
}
}

View file

@ -0,0 +1,17 @@
using stupid.solutions.Data;
using UnityEngine;
namespace stupid.solutions.HenryBot;
public class HenryBotBrain : MonoBehaviour
{
public static GamePlayer currentTarget;
private Vector3 currentDestination;
private bool engagingTarget;
private void Update()
{
}
}

View file

@ -0,0 +1,33 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
namespace stupid.solutions.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 += delegate(string condition, string stackTrace, LogType type)
{
Console.WriteLine(condition + " " + stackTrace);
};
}
public static void ClearAllocConsole()
{
system("CLS");
}
}

View file

@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT.Interactive;
using EFT.InventoryLogic;
using stupid.solutions.stupid.solutions.Data;
using UnityEngine;
namespace stupid.solutions.Utils;
internal class GameCorpse
{
private Vector3 _screenPosition;
public Corpse Corpse { get; }
public Vector3 ScreenPosition => _screenPosition;
public bool IsOnScreen { get; private set; }
public float Distance { get; private set; }
public List<ContainerItem> LootItems { get; private set; }
public bool ItemInit { get; private set; }
public string FormattedDistance => $"{Math.Round(Distance)}m";
public int? totalprice { get; private set; }
public GameCorpse(Corpse corpse)
{
Corpse = corpse ?? throw new ArgumentNullException("corpse");
_screenPosition = default(Vector3);
Distance = 0f;
LootItems = new List<ContainerItem>();
ItemInit = false;
totalprice = null;
}
public void RecalculateDynamics()
{
if (IsBodyValid(Corpse))
{
_screenPosition = GameUtils.WorldPointToScreenPoint(Corpse.transform.position);
IsOnScreen = GameUtils.IsScreenPointVisible(_screenPosition);
Distance = Vector3.Distance(Main.MainCamera.transform.position, Corpse.transform.position);
}
}
public static bool IsBodyValid(Corpse corpse)
{
return corpse != null;
}
public void RefreshItems()
{
LootItems.Clear();
foreach (Item allItem in Corpse.ItemOwner.RootItem.GetAllItems())
{
if (allItem == null)
{
continue;
}
ContainerItem lootItem = new ContainerItem(allItem);
if (lootItem.Item.StackObjectsCount > lootItem.Item.StackMaxSize || 100 < lootItem.Item.StackObjectsCount || allItem.LocalizedName().ToString() == "Default Inventory")
{
continue;
}
lootItem.RecalculateDynamics();
lootItem.SetItemCat();
ContainerItem containerItem = LootItems.FirstOrDefault((ContainerItem i) => i.ItemID == lootItem.ItemID);
if (containerItem != null)
{
containerItem.Count += lootItem.Count + (lootItem.Item.StackObjectsCount - 1);
if (containerItem.Count > 1500)
{
containerItem.Count -= 1500;
}
if (containerItem.Count > 500)
{
containerItem.Count -= 500;
}
}
else
{
if (lootItem.Item.StackObjectsCount > 1)
{
lootItem.Count += lootItem.Item.StackObjectsCount - 1;
}
LootItems.Add(lootItem);
}
}
foreach (ContainerItem lootItem2 in LootItems)
{
lootItem2.CalculateItemPrice();
}
totalprice = LootItems.Sum((ContainerItem item) => item.itemprice);
ItemInit = true;
}
}

View file

@ -0,0 +1,869 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using Diz.Skinning;
using EFT;
using EFT.CameraControl;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.NextObservedPlayer;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.stupid.solutions.Data;
using UnityEngine;
namespace stupid.solutions.Utils;
public static class GameUtils
{
public class Tracer
{
public Vector3 StartPos;
public Vector3 EndPos;
public float Time;
}
public class HitMarker
{
public Vector3 HitPos;
public float Time;
}
public static Camera AimCamera;
public static Material DrawMaterial;
public static Vector2 ScreenCenter = new Vector2((float)Screen.width / 2f, (float)Screen.height / 2f);
public static void InitMaterial()
{
try
{
DrawMaterial = new Material(Shader.Find("Hidden/Internal-Colored"))
{
hideFlags = HideFlags.HideAndDontSave
};
if (DrawMaterial.shader == null)
{
throw new Exception("Shader 'Hidden/Internal-Colored' not found or unavailable.");
}
ConsoleScreen.Log("Found Tracer Material Shader");
DrawMaterial.SetInt("_SrcBlend", 5);
DrawMaterial.SetInt("_DstBlend", 10);
DrawMaterial.SetInt("_Cull", 0);
DrawMaterial.SetInt("_ZWrite", 0);
ConsoleScreen.Log("Set Tracer Material Parameters");
}
catch (Exception ex)
{
ConsoleScreen.LogError("[TracerESP] Failed to initialize material: " + ex.Message);
}
}
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)
{
if (player != null && player.Transform != null && player.PlayerBones != null)
{
return player.PlayerBones.transform != null;
}
return false;
}
public static bool IsOPlayerValid(ObservedPlayerView player)
{
if (player != null && player.Transform != null && player.PlayerBones != null)
{
return player.PlayerBones.transform != null;
}
return false;
}
public static bool IsExfiltrationPointValid(ExfiltrationPoint lootItem)
{
return lootItem != null;
}
public static bool IsTransitPointValid(TransitPoint lootItem)
{
return lootItem != null;
}
public static bool IsLootItemValid(LootItem lootItem)
{
if (lootItem != null && lootItem.Item != null)
{
return lootItem.Item.Template != null;
}
return false;
}
public static int? GetItemPrice(GameLootItem item)
{
string itemid = item.LootItem.TemplateId;
List<ItemData> source = Menu2.pullItemIDs.itemList.Where((ItemData itemData2) => itemData2.Id == itemid).ToList();
if (source.Any())
{
ItemData itemData = source.First();
if (itemData.avg24hPrice > 0)
{
return itemData.avg24hPrice;
}
if (itemData.BasePrice > 0)
{
return itemData.BasePrice;
}
}
return 0;
}
public static int? GetItemPriceBYID(string itemid)
{
List<ItemData> source = Menu2.pullItemIDs.itemList.Where((ItemData itemData2) => itemData2.Id == itemid).ToList();
if (source.Any())
{
ItemData itemData = source.First();
if (itemData.avg24hPrice > 0)
{
return itemData.avg24hPrice;
}
if (itemData.BasePrice > 0)
{
return itemData.BasePrice;
}
}
return 0;
}
public static bool ShouldDisplayItem(ContainerItem lootItem)
{
if (lootItem == null || lootItem.Itemcat == ItemCategories.Uninitialized)
{
return false;
}
if (lootItem.Itemcat == ItemCategories.Superrare && Settings.superrare)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Kappa && Settings.kappa)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Quest && Settings.quest)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Wishlist && Settings.drawwishlistitem)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Stim && Settings.stim)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Hideout && Settings.drawhideoutitems)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Searched && Settings.searchItem)
{
return true;
}
if (lootItem.Itemcat == ItemCategories.Common && Settings.common)
{
return false;
}
if (lootItem.itemprice > Settings.ESPPRICEfiltervalue && Settings.ESPFilterbyprice)
{
return true;
}
return false;
}
public static Color GetItemColor(ItemCategories Itemcat)
{
if (Settings.searchItem && Itemcat == ItemCategories.Searched)
{
return Settings.SearchedColor;
}
if (Settings.kappa && Itemcat == ItemCategories.Kappa)
{
return Settings.KappaColor;
}
if (Settings.superrare && Itemcat == ItemCategories.Superrare)
{
return Settings.SuperrareColor;
}
if (Settings.stim && Itemcat == ItemCategories.Stim)
{
return Settings.StimItemColor;
}
if (Settings.quest && Itemcat == ItemCategories.Quest)
{
return Settings.QuestItemColor;
}
if (Settings.drawwishlistitem && Itemcat == ItemCategories.Wishlist)
{
return Settings.WishlistColor;
}
if (Settings.drawhideoutitems && Itemcat == ItemCategories.Hideout)
{
return Settings.HideoutColor;
}
if (Settings.common && Itemcat == ItemCategories.Common)
{
return Settings.CommonItemColor;
}
return Color.white;
}
public static (string playerText, string shorttext, Color playerColor) GetPlayerTextDetails(GamePlayer gamePlayer, WildSpawnType role)
{
string text = " ";
string text2 = " ";
Color white = Color.white;
if (gamePlayer.Player.Profile.Info.Settings.IsBoss())
{
if (Main.IsBossByName(gamePlayer.Player.Profile.Info.Nickname.Localized()))
{
text2 = " Boss ";
text = Main.TranslateBossName(gamePlayer.Player.Profile.Info.Nickname.Localized()) + " [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BossandGuardColor;
}
else
{
switch (role)
{
case WildSpawnType.shooterBTR:
text2 = " BTR ";
text = " BTR [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BTRColor;
break;
case WildSpawnType.peacefullZryachiyEvent:
case WildSpawnType.ravangeZryachiyEvent:
text2 = " Boss ";
text = " Event Zryachi [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.bossTagillaAgro:
text2 = " Boss ";
text = " Shadow of Tagilla [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.bossKillaAgro:
text2 = " Boss ";
text = " Shadow of Killa [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.tagillaHelperAgro:
text2 = " Guard ";
text = " Guard [" + gamePlayer.FormattedDistance + "] ";
white = Settings.GuardColor;
break;
case WildSpawnType.infectedTagilla:
text2 = " Boss ";
text = " Zombie Tagilla [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BossandGuardColor;
break;
case WildSpawnType.exUsec:
text2 = " Rogue ";
text = " Rogue [" + gamePlayer.FormattedDistance + "] ";
white = Settings.RogueColor;
break;
case WildSpawnType.pmcUSEC:
text2 = " PMC ";
text = $" [USEC] {gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.Player.Profile.Info.Level}] [{gamePlayer.FormattedDistance}] ";
white = Settings.USECColor;
break;
case WildSpawnType.pmcBEAR:
text2 = " PMC ";
text = $" [BEAR] {gamePlayer.Player.Profile.Info.Nickname} [{gamePlayer.Player.Profile.Info.Level}] [{gamePlayer.FormattedDistance}] ";
white = Settings.BEARColor;
break;
case WildSpawnType.followerZryachiy:
case WildSpawnType.bossBoarSniper:
text2 = " Guard ";
text = " Guard [" + gamePlayer.FormattedDistance + "] ";
white = Settings.GuardColor;
break;
case WildSpawnType.pmcBot:
text2 = " Raider ";
text = " Raider [" + gamePlayer.FormattedDistance + "] ";
white = Settings.RaiderColor;
break;
case WildSpawnType.sectantPriest:
case WildSpawnType.sectactPriestEvent:
case WildSpawnType.sectantPredvestnik:
case WildSpawnType.sectantPrizrak:
case WildSpawnType.sectantOni:
text2 = " Cultist ";
text = " Cultist [" + gamePlayer.FormattedDistance + "] ";
white = Settings.CultistColor;
break;
case WildSpawnType.marksman:
case WildSpawnType.assault:
case WildSpawnType.assaultGroup:
text2 = " Scav ";
text = " Scav [" + gamePlayer.FormattedDistance + "] ";
white = Settings.ScavColor;
break;
case WildSpawnType.infectedAssault:
case WildSpawnType.infectedPmc:
case WildSpawnType.infectedCivil:
case WildSpawnType.infectedLaborant:
text2 = " [Z] ";
text = " Zombie [" + gamePlayer.FormattedDistance + "] ";
white = Settings.ZombieColor;
break;
default:
{
text2 = " U-Boss ";
string text3 = role.ToString();
text = " Unknown Boss Entity Name : " + gamePlayer.Player.Profile.Info.Nickname + " [" + gamePlayer.FormattedDistance + "] Role : " + text3 + " ";
white = Color.red;
break;
}
}
}
}
else
{
switch (role)
{
case WildSpawnType.sectantWarrior:
text2 = " Cultist ";
text = " Cultist[" + gamePlayer.FormattedDistance + "] ";
white = Settings.CultistColor;
break;
case WildSpawnType.marksman:
text2 = " Sniper ";
text = " Scav Sniper [" + gamePlayer.FormattedDistance + "] ";
white = Settings.ScavColor;
break;
case WildSpawnType.shooterBTR:
text2 = " BTR ";
text = " BTR [" + gamePlayer.FormattedDistance + "] ";
white = Settings.BTRColor;
break;
case WildSpawnType.infectedAssault:
case WildSpawnType.infectedPmc:
case WildSpawnType.infectedCivil:
case WildSpawnType.infectedLaborant:
text2 = " [Z] ";
text = " Zombie [" + gamePlayer.FormattedDistance + "] ";
white = Settings.ZombieColor;
break;
case WildSpawnType.arenaFighter:
text2 = " Fighter ";
text = " Arena Fighter [" + gamePlayer.FormattedDistance + "] ";
white = Settings.RaiderColor;
break;
default:
if (role != WildSpawnType.marksman && role != WildSpawnType.assault)
{
text2 = " Guard ";
text = " Guard [" + gamePlayer.FormattedDistance + "] ";
white = Settings.GuardColor;
}
else
{
text2 = " Scav ";
text = " Scav [" + gamePlayer.FormattedDistance + "] ";
white = Settings.ScavColor;
}
break;
}
}
return (playerText: text, shorttext: text2, playerColor: white);
}
public static (string playerText, string shorttext, Color playerColor) GetPlayerTextDetailsO(OnlineGamePlayer gamePlayer)
{
string item = " ";
string item2 = " ";
Color item3 = Color.white;
OnlineGamePlayer.PlayerType role = gamePlayer.role;
if (role == OnlineGamePlayer.PlayerType.Boss)
{
item2 = " Boss ";
item = Main.TranslateBossNameBYWST(gamePlayer.wst) + " [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.BossandGuardColor;
}
else if (role == OnlineGamePlayer.PlayerType.Guard)
{
item2 = " Guard ";
item = " Guard [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.GuardColor;
}
else if (role == OnlineGamePlayer.PlayerType.BTR)
{
item2 = " BTR ";
item = " BTR [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.BTRColor;
}
else if (role == OnlineGamePlayer.PlayerType.Cultist)
{
item2 = " Cultist ";
item = " Cultist [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.CultistColor;
}
else if (role == OnlineGamePlayer.PlayerType.Raider)
{
item2 = " Raider ";
item = " Raider [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.RaiderColor;
}
else if (role == OnlineGamePlayer.PlayerType.Rogue)
{
item2 = " Rogue ";
item = " Rogue [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.RogueColor;
}
else if (role == OnlineGamePlayer.PlayerType.Zombie)
{
item2 = " [Z] ";
item = " Zombie [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.ZombieColor;
}
else if (role == OnlineGamePlayer.PlayerType.Scav)
{
item2 = " Scav ";
item = " Scav [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.ScavColor;
}
else if (role == OnlineGamePlayer.PlayerType.Teammate && !gamePlayer.IsAI)
{
item2 = " [Teammate] ";
item = $" [Teammate] {gamePlayer.NickName} [KD : {gamePlayer.kd:f1}] [{gamePlayer.FormattedDistance}] ";
item3 = Settings.teammatecolor;
}
else if (role == OnlineGamePlayer.PlayerType.USEC && !gamePlayer.IsAI)
{
item2 = " USEC ";
item = $" [LVL {gamePlayer.level} USEC] {gamePlayer.NickName} [KD : {gamePlayer.kd:f1}] [{gamePlayer.FormattedDistance}] ";
item3 = Settings.USECColor;
}
else if (role == OnlineGamePlayer.PlayerType.BEAR && !gamePlayer.IsAI)
{
item2 = " BEAR ";
item = $" [LVL {gamePlayer.level} BEAR] {gamePlayer.NickName} [KD : {gamePlayer.kd:f1}] [{gamePlayer.FormattedDistance}] ";
item3 = Settings.BEARColor;
}
else if (role == OnlineGamePlayer.PlayerType.PlayerScav && !gamePlayer.IsAI)
{
item2 = " Player Scav ";
item = " [Player Scav] " + ConvertRussianToLatin(gamePlayer.NickName) + " [" + gamePlayer.FormattedDistance + "] ";
item3 = Settings.playerscavcolor;
}
return (playerText: item, shorttext: item2, playerColor: item3);
}
public static bool ContainsRussianCharacters(string input)
{
string pattern = "[\\u0400-\\u04FF]";
return Regex.IsMatch(input, pattern);
}
public static bool IsHealing(string input)
{
if (string.IsNullOrWhiteSpace(input))
{
return false;
}
return new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"Splint", "CMS", "Surv12", "Aseptic", "Army", "CAT", "CALOK-B", "Esmarch", "AI-2", "Car",
"Salewa", "IFAK", "AFAK", "Grizzly"
}.Contains(input.Trim());
}
public static string ConvertRussianToLatin(string input)
{
if (string.IsNullOrWhiteSpace(input))
{
return input;
}
Dictionary<char, string> dictionary = new Dictionary<char, string>
{
{ 'А', "A" },
{ 'а', "a" },
{ 'Б', "B" },
{ 'б', "b" },
{ 'В', "V" },
{ 'в', "v" },
{ 'Г', "G" },
{ 'г', "g" },
{ 'Д', "D" },
{ 'д', "d" },
{ 'Е', "E" },
{ 'е', "e" },
{ 'Ё', "Yo" },
{ 'ё', "yo" },
{ 'Ж', "Zh" },
{ 'ж', "zh" },
{ 'З', "Z" },
{ 'з', "z" },
{ 'И', "I" },
{ 'и', "i" },
{ 'Й', "Y" },
{ 'й', "y" },
{ 'К', "K" },
{ 'к', "k" },
{ 'Л', "L" },
{ 'л', "l" },
{ 'М', "M" },
{ 'м', "m" },
{ 'Н', "N" },
{ 'н', "n" },
{ 'О', "O" },
{ 'о', "o" },
{ 'П', "P" },
{ 'п', "p" },
{ 'Р', "R" },
{ 'р', "r" },
{ 'С', "S" },
{ 'с', "s" },
{ 'Т', "T" },
{ 'т', "t" },
{ 'У', "U" },
{ 'у', "u" },
{ 'Ф', "F" },
{ 'ф', "f" },
{ 'Х', "Kh" },
{ 'х', "kh" },
{ 'Ц', "Ts" },
{ 'ц', "ts" },
{ 'Ч', "Ch" },
{ 'ч', "ch" },
{ 'Ш', "Sh" },
{ 'ш', "sh" },
{ 'Щ', "Shch" },
{ 'щ', "shch" },
{ 'Ъ', "" },
{ 'ъ', "" },
{ 'Ы', "Y" },
{ 'ы', "y" },
{ 'Ь', "" },
{ 'ь', "" },
{ 'Э', "E" },
{ 'э', "e" },
{ 'Ю', "Yu" },
{ 'ю', "yu" },
{ 'Я', "Ya" },
{ 'я', "ya" }
};
StringBuilder stringBuilder = new StringBuilder();
foreach (char c in input)
{
if (dictionary.TryGetValue(c, out var value))
{
stringBuilder.Append(value);
}
else
{
stringBuilder.Append(c);
}
}
return stringBuilder.ToString();
}
public static string ConvertLatinToRussian(string input)
{
if (string.IsNullOrWhiteSpace(input))
{
return input;
}
Dictionary<string, string> dictionary = new Dictionary<string, string>
{
{ "A", "А" },
{ "a", "а" },
{ "B", "Б" },
{ "b", "б" },
{ "V", "В" },
{ "v", "в" },
{ "G", "Г" },
{ "g", "г" },
{ "D", "Д" },
{ "d", "д" },
{ "E", "Е" },
{ "e", "е" },
{ "Yo", "Ё" },
{ "yo", "ё" },
{ "Zh", "Ж" },
{ "zh", "ж" },
{ "Z", "З" },
{ "z", "з" },
{ "I", "И" },
{ "i", "и" },
{ "Y", "Й" },
{ "y", "й" },
{ "K", "К" },
{ "k", "к" },
{ "L", "Л" },
{ "l", "л" },
{ "M", "М" },
{ "m", "м" },
{ "N", "Н" },
{ "n", "н" },
{ "O", "О" },
{ "o", "о" },
{ "P", "П" },
{ "p", "п" },
{ "R", "Р" },
{ "r", "р" },
{ "S", "С" },
{ "s", "с" },
{ "T", "Т" },
{ "t", "т" },
{ "U", "У" },
{ "u", "у" },
{ "F", "Ф" },
{ "f", "ф" },
{ "Kh", "Х" },
{ "kh", "х" },
{ "Ts", "Ц" },
{ "ts", "ц" },
{ "Ch", "Ч" },
{ "ch", "ч" },
{ "Sh", "Ш" },
{ "sh", "ш" },
{ "Shch", "Щ" },
{ "shch", "щ" },
{ "'", "ъ" },
{ "Y", "Ы" },
{ "y", "ы" },
{ "''", "ь" },
{ "E", "Э" },
{ "e", "э" },
{ "Yu", "Ю" },
{ "yu", "ю" },
{ "Ya", "Я" },
{ "ya", "я" }
};
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < input.Length; i++)
{
if (i < input.Length - 1)
{
string key = input.Substring(i, 2);
if (dictionary.TryGetValue(key, out var value))
{
stringBuilder.Append(value);
i++;
continue;
}
}
string text = input[i].ToString();
if (dictionary.TryGetValue(text, out var value2))
{
stringBuilder.Append(value2);
}
else
{
stringBuilder.Append(text);
}
}
return stringBuilder.ToString();
}
public static bool IsLootableContainerValid(LootableContainer lootableContainer)
{
if (lootableContainer != null)
{
return lootableContainer.Template != null;
}
return false;
}
public static bool IsPlayerAlive(Player player)
{
if (!IsPlayerValid(player))
{
return false;
}
if (player.HealthController == null)
{
return false;
}
return player.HealthController.IsAlive;
}
public static bool IsOPlayerAlive(ObservedPlayerView player)
{
if (!IsOPlayerValid(player))
{
return false;
}
if (player.HealthController == null)
{
return false;
}
return player.HealthController.IsAlive;
}
public static bool IsCorpseValid(Corpse corpse)
{
return corpse != null;
}
public static bool IsInventoryItemValid(Item item)
{
if (item != null)
{
return item.Template != null;
}
return false;
}
public static bool IsFriend(Player player)
{
if (Main.LocalPlayer.Profile.Info.GroupId == player.Profile.Info.GroupId && player.Profile.Info.GroupId != "0" && player.Profile.Info.GroupId != "")
{
return player.Profile.Info.GroupId != null;
}
return false;
}
public static bool IsInFov(Vector3 screenpos, float fovRadius)
{
Vector3 vector = screenpos;
float num = Screen.width;
float num2 = Screen.height;
Vector2 a = new Vector2(num / 2f, num2 / 2f);
Vector2 b = new Vector2(vector.x, vector.y);
return Vector2.Distance(a, b) <= fovRadius;
}
public static Vector3 WorldPointToScreenPoint(Vector3 worldPoint)
{
if (Main.MainCamera == null)
{
return Vector3.zero;
}
Vector3 result = Main.MainCamera.WorldToScreenPoint(worldPoint);
float num = (float)Screen.height / (float)Main.MainCamera.scaledPixelHeight;
result.y = (float)Screen.height - result.y * num;
result.x *= num;
return result;
}
private static bool IsPointInScopeView(Vector3 worldPoint, Camera opticCamera)
{
OpticSight componentInChildren = Main.LocalPlayer.ProceduralWeaponAnimation.HandsContainer.Weapon.GetComponentInChildren<OpticSight>();
if (componentInChildren == null)
{
return false;
}
Mesh mesh = componentInChildren.LensRenderer.GetComponent<MeshFilter>().mesh;
Vector3 position = componentInChildren.LensRenderer.transform.TransformPoint(mesh.bounds.max);
Vector3 position2 = componentInChildren.LensRenderer.transform.TransformPoint(mesh.bounds.min);
Vector3 vector = opticCamera.WorldToScreenPoint(position);
Vector3 vector2 = opticCamera.WorldToScreenPoint(position2);
Vector3 vector3 = opticCamera.WorldToScreenPoint(worldPoint);
if (vector3.x >= vector2.x && vector3.x <= vector.x && vector3.y >= vector2.y)
{
return vector3.y <= vector.y;
}
return false;
}
private static bool IsPointVisibleInCamera(Vector3 screenPoint, Camera camera)
{
Vector3 vector = camera.ScreenToViewportPoint(screenPoint);
if (screenPoint.z > 0.01f && vector.x >= 0f && vector.x <= 1f && vector.y >= 0f)
{
return vector.y <= 1f;
}
return false;
}
public static void DrawTracer(Vector3 worldpos, Color color)
{
Vector3 vector = Main.ActiveCamera.WorldToScreenPoint(worldpos);
vector.y = (float)Screen.height - vector.y;
GL.PushMatrix();
GL.Begin(1);
DrawMaterial.SetPass(0);
GL.Color(color);
GL.Vertex3(Screen.width / 2, Screen.height, 0f);
GL.Vertex3(vector.x, vector.y, 0f);
GL.End();
GL.PopMatrix();
}
public static bool IsScreenPointVisible(Vector3 screenPoint)
{
if (screenPoint.z > 0.01f && screenPoint.x > -5f && screenPoint.y > -5f && screenPoint.x < (float)Screen.width)
{
return screenPoint.y < (float)Screen.height;
}
return false;
}
public static Vector3 GetBonePosByID(Player player, int id)
{
try
{
return SkeletonBonePos(player.PlayerBones.AnimatedTransform.Original.gameObject.GetComponent<PlayerBody>().SkeletonRootJoint, id);
}
catch (Exception)
{
return Vector3.zero;
}
}
public static Vector3 GetBonePosByIDO(ObservedPlayerView player, int id)
{
try
{
return SkeletonBonePos(player.PlayerBones.AnimatedTransform.Original.gameObject.GetComponent<PlayerBody>().SkeletonRootJoint, id);
}
catch (Exception)
{
return Vector3.zero;
}
}
public static Vector3 SkeletonBonePos(Skeleton skeleton, int id)
{
return skeleton.Bones.ElementAt(id).Value.position;
}
public static Vector3 FinalVector(Player player, int bone)
{
try
{
return player.PlayerBody.SkeletonRootJoint.Bones.ElementAt(bone).Value.position;
}
catch
{
return Vector3.zero;
}
}
public static Vector3 FinalVectorO(ObservedPlayerView player, int bone)
{
try
{
return player.PlayerBody.SkeletonRootJoint.Bones.ElementAt(bone).Value.position;
}
catch
{
return Vector3.zero;
}
}
public static void UpdateCameraState(Player player)
{
Main.ActiveCamera = Main.MainCamera;
}
}

View file

@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EFT.UI;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace stupid.solutions.Utils;
public class ItemPresetManager
{
public Dictionary<string, object> itemParameters;
public ItemPresetManager()
{
itemParameters = new Dictionary<string, object>();
}
public void SaveToJson(string filePath)
{
try
{
string text = (itemParameters.ContainsKey("ItemId") ? itemParameters["ItemId"].ToString() : "");
if (string.IsNullOrEmpty(text))
{
ConsoleScreen.Log("Log: No main item ID found. Cannot save.");
return;
}
Dictionary<string, object> dictionary = new Dictionary<string, object>();
foreach (string key in itemParameters.Keys)
{
if (itemParameters[key] is Dictionary<string, string> dictionary2)
{
dictionary[key] = new Dictionary<string, string>
{
{
"SlotID",
dictionary2["SlotID"]
},
{
"SlotName",
dictionary2["SlotName"]
},
{
"ItemId",
dictionary2["ItemId"]
}
};
}
}
string contents = JsonConvert.SerializeObject(new Dictionary<string, object> {
{
text,
new Dictionary<string, object>
{
{
"StackMaxSize",
itemParameters.ContainsKey("StackMaxSize") ? itemParameters["StackMaxSize"] : ((object)1)
},
{
"QuestItem",
itemParameters.ContainsKey("QuestItem") ? itemParameters["QuestItem"] : ((object)false)
},
{ "Slots", dictionary }
}
} }, Formatting.Indented);
File.WriteAllText(filePath, contents);
ConsoleScreen.Log("Log: Item preset saved successfully to " + filePath);
}
catch (Exception ex)
{
ConsoleScreen.Log("Log: Error saving preset: " + ex.Message);
}
}
public Dictionary<string, Dictionary<string, string>> LoadFromJson(string filePath, out string mainItemId)
{
mainItemId = null;
try
{
if (!File.Exists(filePath))
{
ConsoleScreen.Log("Log: JSON file not found at " + filePath);
return null;
}
Dictionary<string, object> dictionary = JsonConvert.DeserializeObject<Dictionary<string, object>>(File.ReadAllText(filePath));
mainItemId = dictionary.Keys.FirstOrDefault();
if (string.IsNullOrEmpty(mainItemId))
{
ConsoleScreen.Log("Log: No main item ID found in the JSON.");
return null;
}
Dictionary<string, string> dictionary2 = new Dictionary<string, string>();
if (dictionary[mainItemId] is JObject jObject && jObject.TryGetValue("Slots", out JToken value) && value is JObject jObject2)
{
foreach (JProperty item in jObject2.Properties())
{
if (item.Value is JObject jObject3)
{
string key = jObject3["SlotID"].ToString();
string value2 = jObject3["ItemId"].ToString();
dictionary2[key] = value2;
}
}
}
return new Dictionary<string, Dictionary<string, string>> { { "Slots", dictionary2 } };
}
catch (Exception ex)
{
ConsoleScreen.Log("Log: Error loading preset: " + ex.Message);
return null;
}
}
public void Clear()
{
itemParameters.Clear();
ConsoleScreen.Log("Log: Item parameters cleared.");
}
}

View file

@ -0,0 +1,375 @@
using System;
using System.Collections.Generic;
using EFT.UI;
using UnityEngine;
namespace stupid.solutions.Utils;
public static class Render
{
private class RingArray
{
public Vector2[] Positions { get; private set; }
public RingArray(int numSegments)
{
Positions = new Vector2[numSegments];
float num = 360f / (float)numSegments;
for (int i = 0; i < numSegments; i++)
{
float f = (float)Math.PI / 180f * num * (float)i;
Positions[i] = new Vector2(Mathf.Sin(f), Mathf.Cos(f));
}
}
}
private static Color _texturesColor;
private static Texture2D _currentTexture;
private static Color _currentTextureColor = Color.black;
private static readonly Texture2D _texture = new Texture2D(2, 2, TextureFormat.ARGB32, mipChain: false)
{
filterMode = FilterMode.Bilinear
};
private static readonly Texture2D Texture2D = new Texture2D(2, 2, TextureFormat.ARGB32, mipChain: false)
{
filterMode = FilterMode.Bilinear
};
public static Material material;
private static Dictionary<int, RingArray> ringDict = new Dictionary<int, RingArray>();
public static Vector4[] taaJitter = new Vector4[4]
{
new Vector4(0.5f, 0.5f, 0f, 0f),
new Vector4(-0.5f, 0.5f, 0f, 0f),
new Vector4(-0.5f, -0.5f, 0f, 0f),
new Vector4(0.5f, -0.5f, 0f, 0f)
};
public static int frameIndex = 0;
public static GUIStyle StringStyle { get; set; } = new GUIStyle(GUI.skin.label);
public static GUIStyle StringStyleOutline { get; set; } = new GUIStyle(GUI.skin.label);
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)
{
Main.AAMaterial.SetPass(0);
Vector2 normalized = (to - from).normalized;
float num = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f;
GUIUtility.RotateAroundPivot(num, from);
DrawBox(from, Vector2.right * (from - to).magnitude, thickness, centered: false);
GUIUtility.RotateAroundPivot(0f - num, from);
}
public static void DrawLineGL(Vector2 from, Vector2 to, Color color)
{
GL.PushMatrix();
GameUtils.DrawMaterial.SetPass(0);
GL.LoadOrtho();
GL.Begin(1);
GL.Color(color);
GL.Vertex(new Vector3(from.x / (float)Screen.width, from.y / (float)Screen.height, 0f));
GL.Vertex(new Vector3(to.x / (float)Screen.width, to.y / (float)Screen.height, 0f));
GL.End();
GL.PopMatrix();
}
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)
{
if (centered)
{
_ = position - size / 2f;
}
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 DrawCornerBox(Vector2 position, Vector2 size, float thickness, Color color, float cornerLength = 10f, bool centered = true)
{
Vector2 vector = (centered ? (position - size / 2f) : position);
GUI.color = color;
GUI.DrawTexture(new Rect(vector.x, vector.y, cornerLength, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x, vector.y, thickness, cornerLength), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x + size.x - cornerLength, vector.y, cornerLength, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x + size.x - thickness, vector.y, thickness, cornerLength), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x, vector.y + size.y - cornerLength, thickness, cornerLength), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x, vector.y + size.y - thickness, cornerLength, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x + size.x - cornerLength, vector.y + size.y - thickness, cornerLength, thickness), Texture2D.whiteTexture);
GUI.DrawTexture(new Rect(vector.x + size.x - thickness, vector.y + size.y - cornerLength, thickness, cornerLength), Texture2D.whiteTexture);
GUI.color = Color.white;
}
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)
{
DrawBox(position - Vector2.one, Vector2.one * 2f, 1f);
}
public static void DrawString(Vector2 position, string label, Color color, bool centered = true, Color outlineColor = default(Color), bool outline = true)
{
if (outlineColor == default(Color))
{
outlineColor = Color.black;
}
DrawText(position, label, color, outlineColor, centered, outline);
}
public static void DrawRichTextString(Vector2 position, string label, Color color, bool centered = true)
{
DrawTextRich(position, label, color, centered);
}
private static void DrawTextRich(Vector2 position, string label, Color color, bool centered = true, bool outline = true)
{
if (Main.TXTFONT == null)
{
ConsoleScreen.Log("TEXT FONT NOT LOADED !");
return;
}
GUIContent content = new GUIContent(label);
StringStyle.fontSize = Settings.fontsize;
if (StringStyle.font != Main.TXTFONT)
{
StringStyle.font = Main.TXTFONT;
}
StringStyle.normal.textColor = color;
StringStyle.alignment = TextAnchor.MiddleCenter;
Vector2 vector = StringStyle.CalcSize(content);
Vector2 position2 = (centered ? (position - vector / 2f) : position);
Color = color;
StringStyle.normal.textColor = color;
GUI.Label(new Rect(position2, vector), content, StringStyle);
}
public static void DrawTextRadar(Vector2 position, string label, Color color, bool centered = true)
{
if (Main.TXTFONT == null)
{
ConsoleScreen.Log("TEXT FONT NOT LOADED !");
}
GUIContent content = new GUIContent(label);
StringStyle.fontSize = 12;
if (StringStyle.font != Main.TXTFONT)
{
StringStyle.font = Main.TXTFONT;
}
StringStyle.alignment = TextAnchor.MiddleCenter;
Vector2 vector = StringStyle.CalcSize(content);
Vector2 position2 = (centered ? (position - vector / 2f) : position);
StringStyle.normal.textColor = color;
Color = color;
GUI.Label(new Rect(position2, vector), content, StringStyle);
}
public static void DrawText1(Vector2 position, string label, Color color, bool centered = true)
{
if (Main.TXTFONT == null)
{
ConsoleScreen.Log("TEXT FONT NOT LOADED !");
}
GUIContent content = new GUIContent(label);
StringStyle.fontSize = Settings.fontsize;
if (StringStyle.font != Main.TXTFONT)
{
StringStyle.font = Main.TXTFONT;
}
StringStyle.alignment = TextAnchor.MiddleCenter;
Vector2 vector = StringStyle.CalcSize(content);
Vector2 position2 = (centered ? (position - vector / 2f) : position);
StringStyle.normal.textColor = color;
Color = color;
GUI.Label(new Rect(position2, vector), content, StringStyle);
}
private static void DrawText(Vector2 position, string label, Color color, Color outlinecolor, bool centered = true, bool outline = true)
{
if (Main.TXTFONT == null)
{
ConsoleScreen.Log("TEXT FONT NOT LOADED !");
return;
}
GUIContent content = new GUIContent(label);
StringStyle.fontSize = Settings.fontsize;
if (StringStyle.font != Main.TXTFONT)
{
StringStyle.font = Main.TXTFONT;
}
StringStyle.normal.textColor = color;
StringStyle.alignment = TextAnchor.MiddleCenter;
Vector2 vector = StringStyle.CalcSize(content);
Vector2 vector2 = (centered ? (position - vector / 2f) : position);
if (Settings.DrawOutline && outline)
{
StringStyleOutline.fontSize = Settings.fontsize;
if (StringStyleOutline.font != Main.TXTFONT)
{
StringStyleOutline.font = Main.TXTFONT;
}
StringStyleOutline.alignment = TextAnchor.MiddleCenter;
StringStyleOutline.normal.textColor = outlinecolor;
Vector2[] array = new Vector2[8]
{
new Vector2(-1f, 0f),
new Vector2(1f, 0f),
new Vector2(0f, -1f),
new Vector2(0f, 1f),
new Vector2(-1f, -1f),
new Vector2(1f, -1f),
new Vector2(-1f, 1f),
new Vector2(1f, 1f)
};
foreach (Vector2 vector3 in array)
{
GUI.Label(new Rect(vector2 + vector3, vector), content, StringStyleOutline);
}
}
Color = color;
StringStyle.normal.textColor = color;
GUI.Label(new Rect(vector2, vector), content, StringStyle);
}
public static void DrawCircle(Vector2 position, float radius, int numSides, Color color, bool centered = true)
{
GL.PushMatrix();
GameUtils.DrawMaterial.SetPass(0);
GL.LoadOrtho();
GL.Begin(1);
GL.Color(color);
float num = 360f / (float)numSides;
Vector2 vector = (centered ? position : (position + Vector2.one * radius));
for (int i = 0; i < numSides; i++)
{
float f = (float)Math.PI / 180f * ((float)i * num);
float f2 = (float)Math.PI / 180f * ((float)(i + 1) * num);
Vector2 vector2 = vector + new Vector2(Mathf.Cos(f), Mathf.Sin(f)) * radius;
Vector2 vector3 = vector + new Vector2(Mathf.Cos(f2), Mathf.Sin(f2)) * radius;
GL.Vertex(new Vector3(vector2.x / (float)Screen.width, vector2.y / (float)Screen.height, 0f));
GL.Vertex(new Vector3(vector3.x / (float)Screen.width, vector3.y / (float)Screen.height, 0f));
}
GL.End();
GL.PopMatrix();
}
public static void DrawCornerBox(Vector2 headPosition, float width, float height, Color color, bool outline)
{
int num = (int)(width / 4f);
int num2 = num;
if (outline)
{
RectFilled(headPosition.x - width / 2f - 1f, headPosition.y - 1f, num + 2, 3f, Color.black);
RectFilled(headPosition.x - width / 2f - 1f, headPosition.y - 1f, 3f, num2 + 2, Color.black);
RectFilled(headPosition.x + width / 2f - (float)num - 1f, headPosition.y - 1f, num + 2, 3f, Color.black);
RectFilled(headPosition.x + width / 2f - 1f, headPosition.y - 1f, 3f, num2 + 2, Color.black);
RectFilled(headPosition.x - width / 2f - 1f, headPosition.y + height - 4f, num + 2, 3f, Color.black);
RectFilled(headPosition.x - width / 2f - 1f, headPosition.y + height - (float)num2 - 4f, 3f, num2 + 2, Color.black);
RectFilled(headPosition.x + width / 2f - (float)num - 1f, headPosition.y + height - 4f, num + 2, 3f, Color.black);
RectFilled(headPosition.x + width / 2f - 1f, headPosition.y + height - (float)num2 - 4f, 3f, num2 + 3, Color.black);
}
RectFilled(headPosition.x - width / 2f, headPosition.y, num, 1f, color);
RectFilled(headPosition.x - width / 2f, headPosition.y, 1f, num2, color);
RectFilled(headPosition.x + width / 2f - (float)num, headPosition.y, num, 1f, color);
RectFilled(headPosition.x + width / 2f, headPosition.y, 1f, num2, color);
RectFilled(headPosition.x - width / 2f, headPosition.y + height - 3f, num, 1f, color);
RectFilled(headPosition.x - width / 2f, headPosition.y + height - (float)num2 - 3f, 1f, num2, color);
RectFilled(headPosition.x + width / 2f - (float)num, headPosition.y + height - 3f, num, 1f, color);
RectFilled(headPosition.x + width / 2f, headPosition.y + height - (float)num2 - 3f, 1f, num2 + 1, color);
}
public static void RectFilled(float x, float y, float width, float height, Color color)
{
if (color != _texturesColor)
{
_texturesColor = color;
_texture.SetPixel(0, 0, color);
_texture.Apply();
}
GUI.DrawTexture(new Rect(x, y, width, height), _texture);
}
public static void BoxRect(Rect rect, Color color)
{
if (_currentTexture == null)
{
_currentTexture = new Texture2D(1, 1);
_currentTexture.SetPixel(0, 0, color);
_currentTexture.Apply();
_currentTextureColor = color;
}
else if (color != _currentTextureColor)
{
_currentTexture.SetPixel(0, 0, color);
_currentTexture.Apply();
_currentTextureColor = color;
}
GUI.DrawTexture(rect, _currentTexture);
}
public static void DrawRadarBackground(Rect rect)
{
Color color = new Color(0f, 0f, 0f, 0.5f);
Texture2D.SetPixel(0, 0, color);
Texture2D.Apply();
GUI.color = color;
GUI.DrawTexture(rect, Texture2D);
}
public static void ApplyTAA()
{
if (Main.AAMaterial != null)
{
frameIndex = (frameIndex + 1) % taaJitter.Length;
Main.AAMaterial.SetVector("_Jitter", taaJitter[frameIndex]);
}
}
}

View file

@ -0,0 +1,10 @@
using UnityEngine;
namespace stupid.solutions.Utils;
public struct RendererStruct
{
public EDecalTextureType DecalType;
public Renderer[] Renderers;
}

View file

@ -0,0 +1,10 @@
using UnityEngine;
namespace stupid.solutions.Utils;
public static class ScopeParameters
{
public static Vector2 center;
public static float radius;
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AssemblyName>stupid.solutions</AssemblyName>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<TargetFramework>net48</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<LangVersion>12.0</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup />
<ItemGroup>
<Reference Include="Sirenix.Serialization">
<HintPath>..\Managed\Sirenix.Serialization.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="UnityEngine.UI">
<HintPath>..\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="Comfort">
<HintPath>..\Managed\Comfort.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>..\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>..\Managed\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="System.Net.Http">
<HintPath>..\Managed\System.Net.Http.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>..\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>..\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>..\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>..\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>..\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>..\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>..\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>..\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
</ItemGroup>
</Project>

Binary file not shown.

View file

@ -0,0 +1,23 @@
using EFT;
using UnityEngine;
namespace stupid.solutions.stupid.solutions.enums;
public class AIData
{
public string Name;
public WildSpawnType EnumID;
public string Description;
public Color NameColor;
public AIData(string name, WildSpawnType enumId, string description, Color nameColor)
{
Name = name;
EnumID = enumId;
Description = description;
NameColor = nameColor;
}
}

View file

@ -0,0 +1,78 @@
using System.Collections.Generic;
using EFT;
using stupid.solutions.Features.ESP;
using UnityEngine;
namespace stupid.solutions.stupid.solutions.enums;
public class AILister : MonoBehaviour
{
public List<AIData> aiPresets;
private Color orange = PlayerESP.orange;
private Color violet = new Color(148f, 0f, 211f);
private void Start()
{
aiPresets = new List<AIData>
{
new AIData("Shadow of Tagilla", WildSpawnType.bossTagillaAgro, "Shadow of Tagilla from the Labyrinth event", Color.red),
new AIData("Labyrinth Guard", WildSpawnType.tagillaHelperAgro, "Guard from the Labyrinth event", Color.red),
new AIData("Shadow of Killa", WildSpawnType.bossKillaAgro, "Special Killa from the Labyrinth event", Color.red),
new AIData("Reshala", WildSpawnType.bossBully, "Reshala - Boss, leads a small gang of guards.", Color.red),
new AIData("Reshala Guard", WildSpawnType.followerBully, "Guard for Reshala.", orange),
new AIData("Shturman", WildSpawnType.bossKojaniy, "Shturman - Skilled sniper and boss of Woods.", Color.red),
new AIData("Shturman Guard", WildSpawnType.followerKojaniy, "Guard for Shturman, provides backup on Woods.", orange),
new AIData("Tagilla", WildSpawnType.bossTagilla, "Tagilla - Melee-focused boss found on Factory.", Color.red),
new AIData("Sanitar", WildSpawnType.bossSanitar, "Sanitar - Former medic turned boss on Shoreline.", Color.red),
new AIData("Sanitar Guard", WildSpawnType.followerSanitar, "Guard for Sanitar, provides additional support.", orange),
new AIData("Killa", WildSpawnType.bossKilla, "Killa - Armored boss in the Interchange mall.", Color.red),
new AIData("Glukhar", WildSpawnType.bossGluhar, "Glukhar - Militarized boss found on Reserve.", Color.red),
new AIData("Glukhar Assault", WildSpawnType.followerGluharAssault, "Aggressive guard for Glukhar, specializes in assault, agressive.", orange),
new AIData("Glukhar Security", WildSpawnType.followerGluharSecurity, "Security guard for Glukhar, provides close protection.", orange),
new AIData("Glukhar Scout", WildSpawnType.followerGluharScout, "Scout for Glukhar, unknown behaviour.", orange),
new AIData("Glukhar Sniper", WildSpawnType.followerGluharSnipe, "Sniper guard for Glukhar, offers long-range support.", orange),
new AIData("Knight", WildSpawnType.bossKnight, "Knight - Rogue leader with tactical skills.", Color.red),
new AIData("Big Pipe", WildSpawnType.followerBigPipe, "Big Pipe - Heavy weapon specialist, follows Knight.", orange),
new AIData("BirdEye", WildSpawnType.followerBirdEye, "BirdEye - Sniper and scout for Knight's group.", orange),
new AIData("Kaban", WildSpawnType.bossBoar, "Kaban - Boss with strong combat presence.", Color.red),
new AIData("Kaban Sniper", WildSpawnType.bossBoarSniper, "Kaban's Sniper, provides ranged support.", orange),
new AIData("Kaban Guard", WildSpawnType.followerBoar, "Guard for Kaban, provides close protection.", orange),
new AIData("Kaban Gus", WildSpawnType.followerBoarClose1, "Gus - Close-range guard for Kaban.", orange),
new AIData("Kaban Basmach", WildSpawnType.followerBoarClose2, "Basmach - Close support for Kaban.", orange),
new AIData("Kollontay", WildSpawnType.bossKolontay, "Kollontay - Leader with intelligence background.", Color.red),
new AIData("Kollontay Assault", WildSpawnType.followerKolontayAssault, "Assault guard for Kollontay, aggressive fighter.", orange),
new AIData("Kollontay Security", WildSpawnType.followerKolontaySecurity, "Security guard for Kollontay, close-range defense.", orange),
new AIData("Zryachiy", WildSpawnType.bossZryachiy, "Zryachiy - Cultist boss, adept in silent killing.", violet),
new AIData("Zryachiy Guard", WildSpawnType.followerZryachiy, "Guard for Zryachiy, loyal cultist follower.", violet),
new AIData("Partisan", WildSpawnType.bossPartisan, "Partisan - Leader of a rogue unit.", Color.red),
new AIData("Cultist Priest", WildSpawnType.sectantPriest, "Cultist Priest, leads cultists in ritualistic ways.", violet),
new AIData("Cultist Warrior", WildSpawnType.sectantWarrior, "Warrior cultist, follows priest in operations.", violet),
new AIData("Santa", WildSpawnType.gifter, "Santa - Special event character with gifts.", Color.yellow),
new AIData("Sniper Scav", WildSpawnType.marksman, "Sniper Scav, provides ranged support for Scavs.", Color.yellow),
new AIData("Scav", WildSpawnType.assault, "Standard Scav, low-level enemy found in various areas. Might be an E-Sports Scav so watch out !", Color.yellow),
new AIData("Cursed Assault", WildSpawnType.cursedAssault, "Cursed Scav, more aggressive version of regular Scavs.", Color.yellow),
new AIData("Rogue", WildSpawnType.exUsec, "Rogue - Heavily armed ex-USEC, aggressive attacker.", Color.cyan),
new AIData("Raider", WildSpawnType.pmcBot, "Raider - Mixed Scav and PMC units.", Color.cyan),
new AIData("USEC PMC", WildSpawnType.pmcUSEC, "Standard USEC PMC operator.", Color.green),
new AIData("BEAR PMC", WildSpawnType.pmcBEAR, "Standard BEAR PMC operator.", Color.green),
new AIData("Peaceful Zryachiy", WildSpawnType.peacefullZryachiyEvent, "Special event version of Zryachiy, not hostile.", violet),
new AIData("Revenge Zryachiy", WildSpawnType.ravangeZryachiyEvent, "Zryachiy seeking revenge, highly hostile.", violet),
new AIData("Sectant Priest Event", WildSpawnType.sectactPriestEvent, "Sectant Priest during special event.", violet),
new AIData("BTR Gunner", WildSpawnType.shooterBTR, "Gunner of the BTR vehicle, provides heavy support.", Color.yellow),
new AIData("Arena Fighter", WildSpawnType.arenaFighter, "Arena combatant, part of Arena Game.", Color.yellow),
new AIData("Arena Cleanup Crew", WildSpawnType.arenaFighterEvent, "Arena cleaner, part of Arena Game.", Color.yellow),
new AIData("Peacemaker", WildSpawnType.peacemaker, "???.", Color.yellow),
new AIData("Predvestnik", WildSpawnType.sectantPredvestnik, "Cultist 'Predvestnik', Special Cultist Boss.", violet),
new AIData("Prizrak", WildSpawnType.sectantPrizrak, "Prizrak - Special Cultist Boss.", violet),
new AIData("Oni", WildSpawnType.sectantOni, "Oni - Special Cultist Boss.", violet),
new AIData("Zombie", WildSpawnType.infectedLaborant, "Standard Melee Zombie.", Color.yellow),
new AIData("Zombie 2", WildSpawnType.infectedCivil, "Standard Melee Zombie.", Color.yellow),
new AIData("Partisan", WildSpawnType.bossPartisan, "All Map Boss, Punishes Bad Players", Color.red),
new AIData("Infected/Zombie Tagilla", WildSpawnType.infectedTagilla, "Zombie Version of Tagilla.", Color.red),
new AIData("Pistol Zombie 2", WildSpawnType.infectedAssault, "Pistol Zombie.", Color.yellow),
new AIData("Pistol Zombie", WildSpawnType.infectedPmc, "Pistol Zombie.", Color.yellow)
};
}
}

View file

@ -0,0 +1,143 @@
namespace stupid.solutions.enums;
internal enum HumanBones
{
None,
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,
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
}

View file

@ -0,0 +1,86 @@
namespace stupid.solutions.enums;
internal enum ZombieBones
{
Player_Zombie,
VaultingGridRoot,
WeaponMountingView,
IKController,
Root_Joint,
Base_HumanPelvis,
Base_HumanLThigh1,
Base_HumanLCalf,
Base_HumanLFoot,
Left_weapon_holster_pistol,
Base_HumanRThigh1,
Base_HumanRCalf,
Base_HumanRFoot,
Right_weapon_holster_pistol,
Base_HumanSpine2,
Base_HumanSpine3,
Base_HumanLCollarbone,
Base_HumanLUpperarm,
Base_HumanLForearm1,
Base_HumanLForearm2,
Base_HumanLPalm,
Base_HumanLDigit11,
Base_HumanLDigit12,
Base_HumanLDigit13,
Base_HumanLDigit21,
Base_HumanLDigit22,
Base_HumanLDigit23,
Base_HumanLDigit41,
Base_HumanLDigit42,
Base_HumanLDigit43,
Base_HumanNeck,
Base_HumanHead,
Parietal,
BackHead,
FrontFace,
NeckForward,
NeckBackward,
Base_HumanRCollarbone,
Base_HumanRUpperarm,
Base_HumanRForearm1,
Base_HumanRForearm2,
Base_HumanRPalm,
Base_HumanRDigit11,
Base_HumanRDigit12,
Base_HumanRDigit13,
Base_HumanRDigit21,
Base_HumanRDigit22,
Base_HumanRDigit23,
Base_HumanRDigit41,
Base_HumanRDigit42,
Base_HumanRDigit43,
RightSideChestTop,
LeftSideChestTop,
weapon_holster,
AlternativeFirstPrimaryHolster,
weapon_holster1,
AlternativeSecondPrimaryHolster,
ScabbardTagilla,
SpineTopChest,
Weapon_root_3rd_anim,
XYZ_1,
Camera_animated,
Bend_Goal_Left,
XYZ_1_1,
Bend_Goal_Right,
XYZ_1_2,
Base_HumanBackpack,
Weapon_root,
MountingGridRoot,
SpineLowerChest,
RightSideChestDown,
LeftSideChestDown,
PelvisBack,
Zombie_Test,
BagSmall_1,
BEAR_body_1,
BEAR_feet_2,
Bear_Head_1,
CR_cryeAVS_body_lod0,
Mesh,
ProneCollisionTest
}

View file

@ -0,0 +1,968 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Comfort.Common;
using EFT;
using EFT.Animations;
using EFT.Animations.Recoil;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.NextObservedPlayer;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.Features.ESP;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions;
internal class Exploits : MonoBehaviour
{
private static readonly Array _bodyParts = Enum.GetValues(typeof(EBodyPart));
public static BotOwner _botOwner;
private static Coroutine artillerycoroutine;
private float waitime = 3f;
private static Material cachedskyboxmaterial;
private static bool doorhooked = false;
private static Dictionary<int, Vector3> originalHeadScales = new Dictionary<int, Vector3>();
private static Dictionary<int, bool> isHeadScaled = new Dictionary<int, bool>();
private static TestHook PlayTripwireInteractionHook;
private static TestHook StopTripwireInteractionHook;
private static bool isPlayHooked = false;
private static bool isStopHooked = false;
private static TestHook AntiFPSDropHook;
private static bool isantifpshooked = false;
public void Update()
{
if (Input.GetKeyDown(KeyCode.F5))
{
ConsoleScreen.IAmDevShowMeLogs = !ConsoleScreen.IAmDevShowMeLogs;
ConsoleScreen.Log($"Toggling Dev Logs {ConsoleScreen.IAmDevShowMeLogs}");
}
if (Input.GetKeyDown(KeyCode.F6))
{
ConsoleScreen.Log("Gameworld Location ID : " + Main.GameWorld.LocationId);
}
if (Main.GameWorld == null && isHeadScaled.Count > 0)
{
isHeadScaled.Clear();
}
if (Main.GameWorld == null && originalHeadScales.Count > 0)
{
originalHeadScales.Clear();
}
}
public static void UnlockAllDoors()
{
if (!(Main.GameWorld != null))
{
return;
}
if (Main.OnlineGamePlayers.Count > 0)
{
ConsoleScreen.Log("No Opening doors in Online !!!");
return;
}
Door[] array = UnityEngine.Object.FindObjectsOfType<Door>();
foreach (Door door in array)
{
if (door.DoorState != EDoorState.Open && !(Vector3.Distance(door.transform.position, Main.LocalPlayer.Position) > 20f))
{
door.DoorState = EDoorState.Shut;
}
}
}
public static void SwitchToThirdPerson()
{
if (Main.LocalPlayer != null)
{
Main.LocalPlayer.PointOfView = EPointOfView.ThirdPerson;
if (Main.LocalPlayer.CameraPosition != null)
{
Main.LocalPlayer.CameraPosition.localPosition = new Vector3(0f, 0.5f, -2f);
Main.MainCamera.transform.localRotation = Quaternion.identity;
}
}
}
public static void FreeCameraUpdate()
{
if (!(Main.LocalPlayer == null) && !(Main.MainCamera == null))
{
Transform transform = Main.MainCamera.transform;
float num = 2f;
if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
{
num = 10f;
}
Vector3 zero = Vector3.zero;
if (Input.GetKey(KeyCode.UpArrow))
{
zero += transform.forward;
}
if (Input.GetKey(KeyCode.DownArrow))
{
zero -= transform.forward;
}
if (Input.GetKey(KeyCode.LeftArrow))
{
zero -= transform.right;
}
if (Input.GetKey(KeyCode.RightArrow))
{
zero += transform.right;
}
if (zero != Vector3.zero)
{
transform.position += zero.normalized * num * Time.deltaTime;
}
}
}
public static void SwitchToFirstPerson()
{
if (Main.LocalPlayer != null)
{
Main.LocalPlayer.PointOfView = EPointOfView.FirstPerson;
}
}
public static void FlyHack()
{
if (Main.LocalPlayer != null && Main.LocalPlayer.Transform != null && Main.MainCamera != null)
{
Main.LocalPlayer.MovementContext.FreefallTime = 0f;
Main.LocalPlayer.MovementContext.IsGrounded = true;
if (Input.GetKey(KeyCode.Space))
{
Main.LocalPlayer.MovementContext.FreefallTime = -0.4f;
Main.LocalPlayer.Transform.position += Main.LocalPlayer.Transform.up / 5f * Settings.Speed;
}
if (Input.GetKey(KeyCode.LeftControl))
{
Main.LocalPlayer.Transform.position -= Main.LocalPlayer.Transform.up / 5f * Settings.Speed;
}
}
}
public static void SpeedHack()
{
if (Input.GetKey(KeyCode.W))
{
Main.LocalPlayer.Transform.position += Main.LocalPlayer.Transform.forward / 5f * Settings.Speed;
}
if (Input.GetKey(KeyCode.S))
{
Main.LocalPlayer.Transform.position -= Main.LocalPlayer.Transform.forward / 5f * Settings.Speed;
}
if (Input.GetKey(KeyCode.A))
{
Main.LocalPlayer.Transform.position -= Main.LocalPlayer.Transform.right / 5f * Settings.Speed;
}
if (Input.GetKey(KeyCode.D))
{
Main.LocalPlayer.Transform.position += Main.LocalPlayer.Transform.right / 5f * Settings.Speed;
}
}
public static void InfiniteStamina()
{
if (Main.LocalPlayer.Physical.Stamina.Current < 75f)
{
Main.LocalPlayer.Physical.Stamina.Current = Main.LocalPlayer.Physical.Stamina.TotalCapacity.Value;
}
if (Main.LocalPlayer.Physical.HandsStamina.Current < 75f)
{
Main.LocalPlayer.Physical.HandsStamina.Current = Main.LocalPlayer.Physical.HandsStamina.TotalCapacity.Value;
}
if (Main.LocalPlayer.Physical.Oxygen.Current < 75f)
{
Main.LocalPlayer.Physical.Oxygen.Current = Main.LocalPlayer.Physical.Oxygen.TotalCapacity.Value;
}
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Weight);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Swamp);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.SurfaceNormal);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Shot);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.HealthCondition);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Fall);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.BarbedWire);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Armor);
Main.LocalPlayer.RemoveStateSpeedLimit(Player.ESpeedLimit.Aiming);
}
public static void Instaheal()
{
if (!Input.GetKey(Settings.Instahealkey) || Settings.allinputdisabled)
{
return;
}
foreach (EBodyPart bodyPart in _bodyParts)
{
if (Main.LocalPlayer.ActiveHealthController.IsBodyPartBroken(bodyPart) || Main.LocalPlayer.ActiveHealthController.IsBodyPartDestroyed(bodyPart))
{
Main.LocalPlayer.ActiveHealthController.RestoreBodyPart(bodyPart, 1f);
}
Main.LocalPlayer.ActiveHealthController.RemoveNegativeEffects(bodyPart);
Main.LocalPlayer.ActiveHealthController.RemoveNegativeEffects(EBodyPart.Common);
Main.LocalPlayer.ActiveHealthController.RestoreFullHealth();
Main.LocalPlayer.ActiveHealthController.ChangeHealth(bodyPart, 1000000f, default(_F167));
Main.LocalPlayer.ActiveHealthController.ApplyDamage(bodyPart, 0f, default(_F167));
}
}
public static void Godmode()
{
Player localPlayer = Main.LocalPlayer;
if (localPlayer != null && localPlayer.ActiveHealthController != null && Settings.Godmode)
{
Main.fixedgodmode = false;
if (localPlayer.ActiveHealthController.DamageCoeff != -1f)
{
localPlayer.ActiveHealthController.SetDamageCoeff(-1f);
localPlayer.ActiveHealthController.RemoveNegativeEffects(EBodyPart.Common);
localPlayer.ActiveHealthController.RestoreFullHealth();
localPlayer.ActiveHealthController.ChangeEnergy(999f);
localPlayer.ActiveHealthController.ChangeHydration(999f);
localPlayer.ActiveHealthController.DoPainKiller();
}
if (localPlayer.ActiveHealthController.FallSafeHeight != 9999999f)
{
localPlayer.ActiveHealthController.FallSafeHeight = 9999999f;
}
}
}
public static void ResetGodmode()
{
Player localPlayer = Main.LocalPlayer;
if (localPlayer != null && localPlayer.ActiveHealthController != null)
{
localPlayer.ActiveHealthController.SetDamageCoeff(1f);
localPlayer.ActiveHealthController.FallSafeHeight = 1f;
localPlayer.ActiveHealthController.ChangeEnergy(100f);
localPlayer.ActiveHealthController.ChangeHydration(100f);
localPlayer.ActiveHealthController.RemoveMedEffect();
localPlayer.ActiveHealthController.DoPermanentHealthBoost(0f);
Settings.Godmode = false;
}
}
public static void Flares()
{
if (Input.GetKeyDown(KeyCode.RightBracket) && !Settings.allinputdisabled)
{
CallAirdrop(takeNearbyPoint: true, Main.LocalPlayer.Position);
}
}
public static void CallAirdrop(bool takeNearbyPoint = false, Vector3 position = default(Vector3))
{
GameWorld gameWorld = Main.GameWorld;
EFTHardSettings.Instance.WindFactor = 0f;
if (gameWorld != null)
{
gameWorld.InitAirdrop(null, takeNearbyPoint, position);
ConsoleScreen.Log("Airdrop has been called.");
}
else
{
ConsoleScreen.Log("GameWorld is null, cannot initiate airdrop.");
}
}
public static void Thermals()
{
Main._thermalVision.On = Settings.Thermal;
ThermalVision thermalVision = Main._thermalVision;
thermalVision.IsFpsStuck = false;
thermalVision.IsGlitch = false;
thermalVision.IsMotionBlurred = false;
thermalVision.IsNoisy = false;
thermalVision.IsPixelated = false;
thermalVision.TextureMask.Color = new Color(0f, 0f, 0f, 0f);
thermalVision.TextureMask.Stretch = false;
thermalVision.TextureMask.Size = 0f;
}
public static void KillALL()
{
GameWorld instance = Singleton<GameWorld>.Instance;
if (!(instance != null))
{
return;
}
foreach (Player item in instance.AllAlivePlayersList.Where((Player x) => !x.IsYourPlayer))
{
if (!item.IsYourPlayer)
{
item.ActiveHealthController.Kill(EDamageType.Landmine);
}
}
}
public static void TPall()
{
GameWorld instance = Singleton<GameWorld>.Instance;
if (!(instance != null))
{
return;
}
foreach (Player item in instance.AllAlivePlayersList.Where((Player x) => !x.IsYourPlayer))
{
bool flag = Main.IsBossByName(item.Profile.Info.Nickname.Localized());
WildSpawnType role = item.Profile.Info.Settings.Role;
if (!item.IsYourPlayer)
{
if (!Settings.tpboss && !Settings.tppmc)
{
Vector3 position = Main.LocalPlayer.gameObject.transform.position;
Vector3 forward = Main.LocalPlayer.gameObject.transform.forward;
float num = 5f;
Vector3 position2 = position + forward * num;
item.Teleport(position2, onServerToo: true);
}
if (Settings.tpboss && flag && role != WildSpawnType.pmcUSEC && role != WildSpawnType.pmcBEAR)
{
Vector3 position3 = Main.LocalPlayer.gameObject.transform.position;
Vector3 forward2 = Main.LocalPlayer.gameObject.transform.forward;
float num2 = 5f;
Vector3 position4 = position3 + forward2 * num2;
item.Teleport(position4, onServerToo: true);
}
if (role == WildSpawnType.pmcUSEC || (role == WildSpawnType.pmcBEAR && Settings.tppmc))
{
Vector3 position5 = Main.LocalPlayer.gameObject.transform.position;
Vector3 forward3 = Main.LocalPlayer.gameObject.transform.forward;
float num3 = 5f;
Vector3 position6 = position5 + forward3 * num3;
item.Teleport(position6, onServerToo: true);
}
}
}
}
public static void RemoveVisor()
{
Main._visorEffect.Intensity = (Settings.NoVisor ? 0f : 1f);
}
public static void InstaHit()
{
if (Main.LocalPlayer.HandsController.Item is Weapon)
{
Main.LocalPlayerWeapon.Template.Velocity = 1000f;
Main.LocalPlayerWeapon.CurrentAmmoTemplate.PenetrationChanceObstacle = 100000f;
Main.LocalPlayerWeapon.CurrentAmmoTemplate.PenetrationPower = 1000000;
Main.LocalPlayerWeapon.CurrentAmmoTemplate.RicochetChance = 0f;
}
}
public static void NoRecoil()
{
if (!Settings.NoRecoil || Main.LocalPlayer == null)
{
return;
}
IRecoilShotEffect recoilShotEffect = Main.LocalPlayer.ProceduralWeaponAnimation.Shootingg?.CurrentRecoilEffect;
if (recoilShotEffect != null)
{
recoilShotEffect.CameraRotationRecoilEffect.Intensity = 0f;
recoilShotEffect.HandPositionRecoilEffect.Intensity = 0f;
recoilShotEffect.HandRotationRecoilEffect.Intensity = 0f;
ProceduralWeaponAnimation proceduralWeaponAnimation = Main.LocalPlayer.ProceduralWeaponAnimation;
if (!(proceduralWeaponAnimation == null))
{
MotionEffector motionReact = proceduralWeaponAnimation.MotionReact;
motionReact.Intensity = 0f;
motionReact.SwayFactors = Vector3.zero;
motionReact.Velocity = Vector3.zero;
proceduralWeaponAnimation.Breath.Intensity = 0f;
proceduralWeaponAnimation.Walk.Intensity = 0f;
proceduralWeaponAnimation.ForceReact.Intensity = 0f;
proceduralWeaponAnimation.WalkEffectorEnabled = false;
}
}
}
public static void RemoveNoRecoil()
{
if (Main.LocalPlayer == null)
{
return;
}
Player localPlayer = Main.LocalPlayer;
if (!(localPlayer.ProceduralWeaponAnimation == null))
{
IRecoilShotEffect recoilShotEffect = localPlayer.ProceduralWeaponAnimation.Shootingg?.CurrentRecoilEffect;
if (recoilShotEffect != null)
{
recoilShotEffect.CameraRotationRecoilEffect.Intensity = 1f;
recoilShotEffect.HandPositionRecoilEffect.Intensity = 1f;
recoilShotEffect.HandRotationRecoilEffect.Intensity = 1f;
}
}
}
public static void NoJam()
{
if (Main.LocalPlayer.HandsController.Item is Weapon && Main.LocalPlayerWeapon.Template != null && Main.LocalPlayer != null)
{
Main.LocalPlayerWeapon.Template.AllowOverheat = false;
Main.LocalPlayerWeapon.Template.AllowMisfire = false;
Main.LocalPlayerWeapon.Template.AllowJam = false;
Main.LocalPlayerWeapon.Template.AllowFeed = false;
Main.LocalPlayerWeapon.Template.AllowSlide = false;
Main.LocalPlayerWeapon.Template.DurabilityBurnRatio = 0f;
}
}
public static void RemoveNoJam()
{
if (Main.LocalPlayer.HandsController.Item is Weapon && Main.LocalPlayerWeapon != null)
{
Main.LocalPlayerWeapon.Template.AllowOverheat = true;
Main.LocalPlayerWeapon.Template.AllowMisfire = true;
Main.LocalPlayerWeapon.Template.AllowJam = true;
Main.LocalPlayerWeapon.Template.AllowFeed = true;
Main.LocalPlayerWeapon.Template.AllowSlide = true;
Main.LocalPlayerWeapon.Template.DurabilityBurnRatio = 1f;
}
}
public static void ChangeFireRate()
{
if (!(Main.LocalPlayer.HandsController.Item is Weapon) || !(Main.LocalPlayer.HandsController.Item is Weapon weapon))
{
return;
}
Main.LocalPlayerWeapon.Template.bFirerate = 2000;
weapon.GetItemComponent<FireModeComponent>().FireMode = Weapon.EFireMode.fullauto;
Main.LocalPlayer.GetComponent<Player.FirearmController>().Item.Template.BoltAction = false;
if (Main.LocalPlayer.HandsController is Player.FirearmController firearmController)
{
WeaponTemplate weaponTemplate = firearmController.Item?.Template;
if (weaponTemplate != null)
{
weaponTemplate.BoltAction = false;
weaponTemplate.bFirerate = 2000;
}
}
}
public static void Fullbright()
{
if (Settings.fullbright)
{
if (!GameFullBright.LightCalled && GameFullBright.Enabled)
{
GameFullBright.LightGameObject = new GameObject("Fullbright");
GameFullBright.FullBrightLight = GameFullBright.LightGameObject.AddComponent<Light>();
GameFullBright.FullBrightLight.color = new Color(1f, 0.96f, 0.91f);
GameFullBright.FullBrightLight.range = 2000f;
GameFullBright.FullBrightLight.intensity = 0.6f;
GameFullBright.LightCalled = true;
}
GameFullBright.Enabled = true;
if (!(GameFullBright.FullBrightLight == null))
{
Main._tempPosition = Main.LocalPlayer.Transform.position;
Main._tempPosition.y += 0.2f;
GameFullBright.LightGameObject.transform.position = Main._tempPosition;
}
}
}
public static void RemoveFullbright()
{
if (GameFullBright.FullBrightLight != null)
{
UnityEngine.Object.Destroy(GameFullBright.FullBrightLight);
}
GameFullBright.LightCalled = false;
}
public static void Minecraftmode()
{
GameObject gameObject = GameObject.CreatePrimitive(PrimitiveType.Cube);
gameObject.transform.localScale = new Vector3(1f, 1f, 1f);
Vector3 position = Main.LocalPlayer.gameObject.transform.position;
Vector3 forward = Main.LocalPlayer.gameObject.transform.forward;
float num = 3f;
RaycastHit hitInfo;
Vector3 position2 = ((!Physics.Raycast(new Ray(position, forward), out hitInfo, num)) ? (position + forward * num) : hitInfo.point);
gameObject.transform.position = position2;
Material material = Main.bundle.LoadAsset<Material>("minecraftmaterial");
if (material != null)
{
gameObject.GetComponent<Renderer>().material = material;
}
AudioClip audioClip = Main.bundle.LoadAsset<AudioClip>("minecraftsound");
if (audioClip != null)
{
AudioSource audioSource = gameObject.AddComponent<AudioSource>();
audioSource.clip = audioClip;
audioSource.Play();
}
}
public static void Invisibletobots()
{
}
public static void TestShelling(Vector3 shellingpos)
{
Main.audioSource.clip = Main.artillerycall;
Main.audioSource.volume = 0.1f;
Main.audioSource.Play();
Main.GameWorld.ServerShellingController.StartShellingPosition(shellingpos);
PlayArtilleryAnswerAsync();
}
private static async void PlayArtilleryAnswerAsync()
{
await Task.Delay(3000);
Main.audioSource.clip = Main.artilleryaccept;
Main.audioSource.volume = 0.1f;
Main.audioSource.Play();
}
public static void AlwaysSurvive()
{
ConsoleScreen.Log("Hooking alwayssurvived...");
Type type = Main.FindType("LocalGame");
if (type != null)
{
MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
MethodInfo[] array = methods;
for (int i = 0; i < array.Length; i++)
{
_ = array[i];
}
MethodInfo methodInfo = methods.FirstOrDefault((MethodInfo m) => m.Name == "Stop");
if (methodInfo != null)
{
ConsoleScreen.Log("Stop method found successfully.");
ConsoleScreen.Log($"Stop method details - Name: {methodInfo.Name}, ReturnType: {methodInfo.ReturnType}, IsPublic: {methodInfo.IsPublic}, IsPrivate: {methodInfo.IsPrivate}, IsProtected: {methodInfo.IsFamily}");
try
{
Main.alwayssurvivedhook = new TestHook();
Main.alwayssurvivedhook.Init(methodInfo, typeof(StatusManager).GetMethod("Stop_Hook"));
Main.alwayssurvivedhook.Hook();
ConsoleScreen.Log("alwayssurvived hook applied successfully.");
Main.nothooked = false;
}
catch (Exception ex)
{
ConsoleScreen.Log("Error while hooking method: " + ex.Message);
}
}
}
else
{
ConsoleScreen.Log("Failed to find LocalGame type.");
}
}
public static void RemoveFilters1()
{
ConsoleScreen.Log("Hooking CheckItemFilter...");
Type type = Main.FindType("ItemFilter");
if (type != null)
{
MethodInfo methodInfo = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault((MethodInfo m) => m.Name == "CheckItemFilter");
if (methodInfo != null)
{
ConsoleScreen.Log("CheckItemFilter method found successfully.");
try
{
Main.checkItemFilterHook = new TestHook();
Main.checkItemFilterHook.Init(methodInfo, typeof(StatusManager).GetMethod("CheckItemFilter_Hook"));
Main.checkItemFilterHook.Hook();
ConsoleScreen.Log("CheckItemFilter hook applied successfully.");
Main.hookedCheckItemFilter = true;
return;
}
catch (Exception ex)
{
ConsoleScreen.Log("Error while hooking CheckItemFilter method: " + ex.Message);
return;
}
}
ConsoleScreen.Log("CheckItemFilter method not found.");
}
else
{
ConsoleScreen.Log("Failed to find ItemFilter type.");
}
}
public static void RemoveFilters2()
{
ConsoleScreen.Log("Hooking CheckItemExcludedFilter...");
Type type = Main.FindType("ItemFilter");
if (type != null)
{
MethodInfo methodInfo = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic).FirstOrDefault((MethodInfo m) => m.Name == "CheckItemExcludedFilter");
if (methodInfo != null)
{
ConsoleScreen.Log("CheckItemExcludedFilter method found successfully.");
try
{
Main.checkItemExcludedFilterHook = new TestHook();
Main.checkItemExcludedFilterHook.Init(methodInfo, typeof(StatusManager).GetMethod("CheckItemExcludedFilter_Hook"));
Main.checkItemExcludedFilterHook.Hook();
ConsoleScreen.Log("CheckItemExcludedFilter hook applied successfully.");
Main.hookedCheckItemExcludedFilter = true;
return;
}
catch (Exception ex)
{
ConsoleScreen.Log("Error while hooking CheckItemExcludedFilter method: " + ex.Message);
return;
}
}
ConsoleScreen.Log("CheckItemExcludedFilter method not found.");
}
else
{
ConsoleScreen.Log("Failed to find ItemFilter type.");
}
}
public static void CheckAndAddAmmoToChamber()
{
try
{
if (!(Main.LocalPlayer != null) || Main.LocalPlayerWeapon == null)
{
return;
}
Weapon localPlayerWeapon = Main.LocalPlayerWeapon;
if (localPlayerWeapon.IsGrenadeLauncher)
{
HandleGrenadeAmmo(localPlayerWeapon);
return;
}
_EF1A currentMagazine = localPlayerWeapon.GetCurrentMagazine();
string ammoID = Main.ammoID;
Item item = new ItemFactory().CreateItem(ammoID);
if (item == null)
{
return;
}
if (currentMagazine != null && currentMagazine.Count < currentMagazine.MaxCount)
{
currentMagazine.Cartridges?.Add(item, simulate: false);
return;
}
Slot[] chambers = localPlayerWeapon.Chambers;
for (int i = 0; i < chambers.Length; i++)
{
chambers[i].Add(item, simulate: false);
}
}
catch (Exception)
{
}
}
private static void HandleGrenadeAmmo(Weapon weapon)
{
try
{
ItemFactory itemFactory = new ItemFactory();
IEnumerable<Slot> allSlots = weapon.AllSlots;
if (allSlots == null || !allSlots.Any())
{
return;
}
string grenadeId = Main.ammoID;
if (string.IsNullOrEmpty(grenadeId))
{
return;
}
foreach (Slot item2 in allSlots)
{
ItemFilter[] filters = item2.Filters;
if (filters != null && filters.Length != 0 && filters.Any((ItemFilter filter) => filter != null && filter.Filter?.Contains(grenadeId) == true))
{
Item item = itemFactory.CreateItem(grenadeId);
if (item != null)
{
item.SpawnedInSession = true;
item2.AddWithoutRestrictions(item);
}
}
}
}
catch (Exception)
{
}
}
public static void Teleport(string tpname)
{
try
{
tpname = tpname.ToLower();
List<GameLootItem> list = new List<GameLootItem>();
foreach (GameLootItem gameLootItem2 in ItemESP._gameLootItems)
{
ItemCategories itemcat = gameLootItem2.Itemcat;
bool flag = false;
if (itemcat == ItemCategories.Quest && Settings.questTP)
{
flag = true;
}
else if (itemcat == ItemCategories.Superrare && Settings.superrareTP)
{
flag = true;
}
else if (itemcat == ItemCategories.Kappa && Settings.kappaTP)
{
flag = true;
}
else if (itemcat == ItemCategories.Stim && Settings.StimTP)
{
flag = true;
}
else if (itemcat == ItemCategories.Wishlist && Settings.TPwishlistitem)
{
flag = true;
}
else if (itemcat == ItemCategories.Hideout && Settings.TPhideoutitem)
{
flag = true;
}
else if (gameLootItem2.itemprice > Settings.ESPPRICEfiltervalue && Settings.TPHVitem)
{
flag = true;
}
if ((gameLootItem2.LocalizedName.ToLower().Contains(tpname) || gameLootItem2.ShortName.ToLower().Contains(tpname)) && Settings.searchTP)
{
flag = true;
}
if (flag)
{
list.Add(gameLootItem2);
}
}
if (Settings.questTP)
{
List<LootItem> list2 = Main.GameWorld.LootItems.Where((LootItem x) => x.Item.Template.QuestItem).ToList();
foreach (LootItem item2 in list2)
{
GameLootItem item = new GameLootItem(item2);
list.Add(item);
}
ConsoleScreen.Log($"[Teleport] Static spawned quest items found: {list2.Count}");
}
List<GameLootItem> list3 = list.OrderBy((GameLootItem gameLootItem2) => gameLootItem2.LocalizedName.ToLower()).ToList();
int count = list3.Count;
if (count > 0)
{
float num = 360f / (float)count;
float loottpradius = Settings.loottpradius;
Vector3 position = Main.LocalPlayer.gameObject.transform.position;
position.y += 1f;
for (int num2 = 0; num2 < count; num2++)
{
float f = (float)Math.PI / 180f * ((float)num2 * num);
float num3 = Mathf.Cos(f) * loottpradius;
float num4 = Mathf.Sin(f) * loottpradius;
Vector3 position2 = new Vector3(position.x + num3, position.y, position.z + num4);
GameLootItem gameLootItem = list3[num2];
try
{
Rigidbody component = gameLootItem.LootItem.gameObject.GetComponent<Rigidbody>();
if (component != null)
{
component.isKinematic = true;
}
gameLootItem.LootItem.gameObject.transform.position = position2;
GameObject obj = GameObject.CreatePrimitive(PrimitiveType.Sphere);
obj.GetComponent<SphereCollider>().enabled = false;
obj.transform.localScale = new Vector3(0.1f, 0.1f, 0.1f);
obj.transform.position = position2;
UnityEngine.Object.Destroy(obj, 1f);
}
catch (Exception ex)
{
ConsoleScreen.Log("[Teleport] Error teleporting item '" + gameLootItem.LocalizedName + "': " + ex.Message);
}
}
}
ConsoleScreen.Log("[Teleport] Teleportation complete.");
}
catch (Exception ex2)
{
ConsoleScreen.Log("[Teleport] Exception: " + ex2.Message);
}
}
public static void BulletsPerShot(int bulletsPerShot)
{
if (Main.LocalPlayer.HandsController.Item is Weapon)
{
Main.LocalPlayerWeapon.CurrentAmmoTemplate.ProjectileCount = Settings.bulletspershot;
}
}
public static void ExtendItemHitbox(GameLootItem item)
{
if (item?.LootItem?.gameObject != null)
{
GameObject obj = item.LootItem.gameObject;
obj.transform.localScale *= 5f;
Collider component = obj.GetComponent<Collider>();
if (component != null)
{
component.transform.localScale *= 5f;
component.enabled = false;
component.enabled = true;
}
}
}
public static void HandleBigHeads()
{
if (Main.OnlineGamePlayers.Count > 0)
{
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
if (onlineGamePlayer.role != OnlineGamePlayer.PlayerType.Teammate)
{
ObservedPlayerView player = onlineGamePlayer.Player;
if (player != null && player.PlayerBones != null && player.PlayerBones.Head != null)
{
int instanceID = player.GetInstanceID();
if (!isHeadScaled.ContainsKey(instanceID))
{
isHeadScaled[instanceID] = false;
originalHeadScales[instanceID] = player.PlayerBones.Head.Original.localScale;
}
float num = 4f;
if (Settings.BigHeads)
{
if (!isHeadScaled[instanceID])
{
Vector3 localScale = originalHeadScales[instanceID] * num;
player.PlayerBones.Head.Original.localScale = localScale;
isHeadScaled[instanceID] = true;
}
}
else if (!Settings.BigHeads && isHeadScaled[instanceID])
{
player.PlayerBones.Head.Original.localScale = originalHeadScales[instanceID];
isHeadScaled[instanceID] = false;
}
}
}
}
return;
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
Player player2 = gamePlayer.Player;
if (!(player2 != null) || !(player2.PlayerBones != null) || player2.PlayerBones.Head == null)
{
continue;
}
int instanceID2 = player2.GetInstanceID();
if (!isHeadScaled.ContainsKey(instanceID2))
{
isHeadScaled[instanceID2] = false;
originalHeadScales[instanceID2] = player2.PlayerBones.Head.Original.localScale;
}
if (Settings.BigHeads)
{
if (!isHeadScaled[instanceID2])
{
Vector3 localScale2 = originalHeadScales[instanceID2] * 4f;
player2.PlayerBones.Head.Original.localScale = localScale2;
isHeadScaled[instanceID2] = true;
}
}
else if (!Settings.BigHeads && isHeadScaled[instanceID2])
{
player2.PlayerBones.Head.Original.localScale = originalHeadScales[instanceID2];
isHeadScaled[instanceID2] = false;
}
}
}
public static void FPSExploit()
{
if (!isPlayHooked)
{
MethodInfo method = typeof(Player).GetMethod("PlayTripwireInteractionSound", BindingFlags.Instance | BindingFlags.Public);
MethodInfo method2 = typeof(TripwireHooks).GetMethod("PlayTripwireInteractionSound_Hook", BindingFlags.Static | BindingFlags.Public);
PlayTripwireInteractionHook = new TestHook();
PlayTripwireInteractionHook.Init(method, method2);
PlayTripwireInteractionHook.Hook();
isPlayHooked = true;
}
ClientPlayer clientPlayer = (ClientPlayer)Main.LocalPlayer;
clientPlayer.PlayTripwireInteractionSound(10f, hasMultiTool: false);
MethodInfo method3 = typeof(ClientPlayer).GetMethod("SendTripwireInteractionSoundState", BindingFlags.Instance | BindingFlags.NonPublic);
if (method3 != null)
{
try
{
EInteractionStatus eInteractionStatus = EInteractionStatus.Started;
bool flag = false;
bool flag2 = false;
method3.Invoke(clientPlayer, new object[3] { eInteractionStatus, flag, flag2 });
ConsoleScreen.Log("Called SendTripwireInteractionSoundState with parameters: " + $"interactionStatus={eInteractionStatus}, isSuccess={flag}, hasMultiTool={flag2}.");
return;
}
catch (Exception arg)
{
ConsoleScreen.Log($"Error with sending tripwire interaction : \n {arg}");
return;
}
}
ConsoleScreen.Log("Failed to locate SendTripwireInteractionSoundState method.");
}
public static void PreventTripwireSoundExploit()
{
if (!isantifpshooked)
{
AntiFPSDropHook = new TestHook();
AntiFPSDropHook.Init(typeof(ObservedPlayerAudioController).GetMethod("method_14", BindingFlags.Instance | BindingFlags.NonPublic), typeof(TripwireHooks).GetMethod("AntiTripWire_Hook"));
AntiFPSDropHook.Hook();
isantifpshooked = true;
ConsoleScreen.Log("hooked sound protection");
}
}
public static void changeskybox()
{
cachedskyboxmaterial = Main.levelSettings.skybox;
Material skybox = Main.bundle.LoadAsset<Material>("skyboxmaterial.mat");
if (cachedskyboxmaterial != null)
{
Main.levelSettings.skybox = skybox;
}
}
}

View file

@ -0,0 +1,16 @@
using UnityEngine;
namespace stupid.solutions;
public class GameFullBright
{
public static bool Enabled = false;
public static GameObject LightGameObject;
public static Light FullBrightLight;
public static bool LightEnabled = true;
public static bool LightCalled;
}

View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
namespace stupid.solutions;
[Serializable]
public class ItemTemplate
{
public int StackMaxSize { get; set; }
public bool QuestItem { get; set; }
public string Description { get; set; }
public Dictionary<string, SlotData> Slots { get; set; }
}

View file

@ -0,0 +1,15 @@
using UnityEngine;
namespace stupid.solutions;
public class Loader
{
public static GameObject HookObject;
public static void Load()
{
HookObject = new GameObject();
HookObject.AddComponent<Main>();
Object.DontDestroyOnLoad(HookObject);
}
}

View file

@ -0,0 +1,308 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using EFT;
using EFT.Interactive;
using EFT.UI;
using stupid.solutions.Features;
using stupid.solutions.Features.ESP;
using UnityEngine;
namespace stupid.solutions;
internal class LocationsFixerV2 : MonoBehaviour
{
private static List<object> cachedLocations = new List<object>();
public static TarkovApplication _tarkovApplication;
private static TestHook hookGetBoolForProfile;
private bool hookedpveonline;
private bool exfilfixtoggle;
public static List<TransitPoint> transitPoints = new List<TransitPoint>();
private bool foundtransitpoints;
private string infoText;
public static dynamic clientapp;
public static bool fixlocations = false;
private static TestHook TransitDataHook;
private static bool isTransitDataHooked = false;
private static object transitHandlerInstance;
private static readonly HashSet<string> loggedDictionaries = new HashSet<string>();
private bool monitortransit;
private static List<string> onlinelocationids = new List<string>();
public bool updatep = true;
private void Start()
{
}
private void Update()
{
if (updatep)
{
_ = monitortransit;
Input.GetKeyDown(KeyCode.Home);
FixTransitsAndLocations();
_ = hookedpveonline;
if (Main.GameWorld != null && transitPoints.Count <= 0 && Main.GameWorld.LocationId != "Labyrinth")
{
GetTransitPoints();
}
if (Main.GameWorld == null && transitPoints.Count > 0)
{
transitPoints.Clear();
}
}
}
public void SetRaidSettings()
{
foreach (_E6CC.Location value in UnityEngine.Object.FindObjectOfType<TarkovApplication>().GetClientBackEndSession().LocationSettings.locations.Values)
{
value.ForceOnlineRaidInPVE = false;
value.EscapeTimeLimit = 9999;
ConsoleScreen.Log("Updated Settings For Location " + value.Id);
}
}
private void FixTransitsAndLocations()
{
if (!TarkovApplication.Exist(out var tarkovApplication) || tarkovApplication == null)
{
return;
}
_tarkovApplication = tarkovApplication;
_EA29 clientBackEndSession = tarkovApplication.GetClientBackEndSession();
if (clientBackEndSession?.LocationSettings == null)
{
return;
}
foreach (_E6CC.Location value in clientBackEndSession.LocationSettings.locations.Values)
{
if (value.ForceOnlineRaidInPVE)
{
value.ForceOnlineRaidInPVE = false;
ConsoleScreen.Log("[Fix] Patched Location " + value.Name + " → ForceOnlineRaidInPVE = false");
if (!onlinelocationids.Contains(value.Id))
{
onlinelocationids.Add(value.Id);
ConsoleScreen.Log(value.Name + " Added to ID list (ID : " + value.Id + ")");
}
}
}
_ = _tarkovApplication.CurrentRaidSettings;
}
public void GetTransitPoints()
{
transitPoints.Clear();
infoText = "";
TransitPoint[] array = UnityEngine.Object.FindObjectsOfType<TransitPoint>();
if (array != null && array.Length != 0)
{
TransitPoint[] array2 = array;
foreach (TransitPoint transitPoint in array2)
{
transitPoints.Add(transitPoint);
string text = "Transit Point Information:\nID: " + transitPoint.parameters.id.ToString().Trim() + "\nTransit Point Name: " + transitPoint.name.Transliterate() + "\n---------------------------";
ConsoleScreen.Log(text);
infoText = infoText + text + "\n";
}
}
}
private void LogTransitPoints()
{
if (transitPoints == null || transitPoints.Count <= 0)
{
return;
}
Debug.Log($"TransitPoints Count: {transitPoints.Count}");
foreach (TransitPoint transitPoint in transitPoints)
{
if (transitPoint == null)
{
Debug.LogWarning("Null TransitPoint found in list.");
continue;
}
Debug.Log("TransitPoint Instance: " + transitPoint.name);
if (transitPoint.Controller != null && transitPoint.Controller.alreadyTransits != null && transitPoint.Controller.alreadyTransits.Count > 0)
{
Debug.Log($"alreadyTransits Count: {transitPoint.Controller.alreadyTransits.Count}");
foreach (KeyValuePair<string, _E98D> alreadyTransit in transitPoint.Controller.alreadyTransits)
{
Debug.Log($"alreadyTransits Key: {alreadyTransit.Key}, Value: {alreadyTransit.Value}");
}
}
else
{
Debug.Log("alreadyTransits is empty or null.");
}
}
if (_tarkovApplication != null)
{
_E869 transitionStatus = _tarkovApplication.transitionStatus;
if (transitionStatus.InTransition)
{
Debug.Log("--- TarkovApplication.transitionStatus (InTransition == true) ---");
Debug.Log($"InTransition: {transitionStatus.InTransition}");
Debug.Log("Location: " + transitionStatus.Location);
Debug.Log($"Training: {transitionStatus.Training}");
Debug.Log($"Side: {transitionStatus.Side}");
Debug.Log($"Mode: {transitionStatus.Mode}");
Debug.Log($"Time: {transitionStatus.Time}");
Debug.Log("-----------------------------------------");
}
else
{
Debug.Log("transitionStatus.InTransition is false. Skipping detailed log.");
}
}
else
{
Debug.LogWarning("_tarkovApplication is null!");
}
}
public static void StartTransitByID(int transitId)
{
if (Main.LocalPlayer == null)
{
ConsoleScreen.Log("[ERROR] Local player is null.");
return;
}
if (transitPoints == null || transitPoints.Count == 0)
{
ConsoleScreen.Log("[ERROR] No cached transit points. Did you call GetTransitPoints()?");
return;
}
TransitPoint transitPoint = transitPoints.FirstOrDefault((TransitPoint tp) => tp.parameters.id == transitId);
if (transitPoint == null || transitPoint.Controller == null)
{
ConsoleScreen.Log($"[ERROR] Invalid Transit Point ID or missing controller: {transitId}");
return;
}
ConsoleScreen.Log($"[TRANSIT] Starting Transit -> ID: {transitPoint.parameters.id} | Name: {transitPoint.name.Transliterate()}");
int playersCount = 1;
string hash = GenerateTransitHash(transitPoint);
Dictionary<string, ProfileKey> profileKeys = GetProfileKeys(Main.LocalPlayer.ProfileId);
transitPoint.Controller.Transit(transitPoint, playersCount, hash, profileKeys, Main.LocalPlayer);
transitPoints.Clear();
Main.GamePlayers.Clear();
ItemESP._gameLootItems.Clear();
CorpseEsp.Corpses.Clear();
Main.LocalPlayer = null;
Main.LocalPlayerWeapon = null;
Main.GameWorld = null;
Main.MainCamera = null;
}
private static string GenerateTransitHash(TransitPoint transitPoint)
{
return $"{transitPoint.parameters.id}_{DateTime.Now.Ticks}";
}
private static Dictionary<string, ProfileKey> GetProfileKeys(string profileId)
{
return new Dictionary<string, ProfileKey>();
}
public static void TransferItemsFromTempStash(int transitid)
{
TransitPoint transitPoint = transitPoints.FirstOrDefault((TransitPoint tp) => tp.parameters.id == transitid);
if (!(transitPoint == null) && transitPoint.Controller?.TransferItemsController != null)
{
ConsoleScreen.Log("Sending Items To Stash for Transit Point " + transitPoint.name);
transitPoint.Controller.TransferItemsController.MoveItemsFromTempStashToTransferStash(Main.LocalPlayer);
}
}
public static void StopTransitCountdown()
{
if (transitPoints == null || transitPoints.Count == 0)
{
ConsoleScreen.Log("No Transit Points Available To Stop.");
return;
}
foreach (TransitPoint transitPoint in transitPoints)
{
if (transitPoint.Controller != null)
{
transitPoint.Controller.transitPlayers.Clear();
ConsoleScreen.Log("Stopped Transit Countdown For: " + transitPoint.name.Localized());
}
else
{
ConsoleScreen.Log("Transit Controller Is Null For: " + transitPoint.name.Localized());
}
}
}
public static bool GetBoolForProfile_Hook(string variable, bool defaultValue)
{
foreach (string onlinelocationid in onlinelocationids)
{
if (variable.Contains(onlinelocationid))
{
ConsoleScreen.Log("[Hook] Blocking online requirement for location ID: " + onlinelocationid + " in variable '" + variable + "'");
return false;
}
}
return (bool)hookGetBoolForProfile.OriginalMethod.Invoke(null, new object[2] { variable, defaultValue });
}
private void HookGetBoolForProfile()
{
if (hookedpveonline)
{
return;
}
try
{
ConsoleScreen.Log("[Hook] Attempting to hook GetBoolForProfile...");
Type type = Aimbot.Find("\ue984");
if (type == null)
{
ConsoleScreen.Log("[Hook Error] Type '\ue984' not found.");
return;
}
ConsoleScreen.Log("[Hook] Found type: " + type.FullName);
MethodInfo method = type.GetMethod("GetBoolForProfile", BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
MethodInfo method2 = typeof(LocationsFixerV2).GetMethod("GetBoolForProfile_Hook", BindingFlags.Static | BindingFlags.Public);
if (method == null)
{
ConsoleScreen.Log("[Hook Error] Method 'GetBoolForProfile' not found in " + type.FullName + ".");
return;
}
if (method2 == null)
{
ConsoleScreen.Log("[Hook Error] Hook method 'GetBoolForProfile_Hook' not found.");
return;
}
hookGetBoolForProfile = new TestHook();
hookGetBoolForProfile.Init(method, method2);
hookGetBoolForProfile.Hook();
hookedpveonline = true;
ConsoleScreen.Log("[Hook] Successfully hooked GetBoolForProfile.");
}
catch (Exception ex)
{
ConsoleScreen.Log("[Hook Error] " + ex.Message + "\n" + ex.StackTrace);
}
}
}

View file

@ -0,0 +1,926 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Comfort.Common;
using EFT;
using EFT.Ballistics;
using EFT.Hideout;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.UI;
using EFT.UI.DragAndDrop;
using stupid.solutions.Data;
using stupid.solutions.Features;
using stupid.solutions.Features.ESP;
using stupid.solutions.HenryBot;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.stupid.solutions.enums;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions;
public class Main : MonoBehaviour
{
public static List<GamePlayer> GamePlayers = new List<GamePlayer>();
public static List<OnlineGamePlayer> OnlineGamePlayers = new List<OnlineGamePlayer>();
public static Player LocalPlayer;
public static LootItem LootItem;
public static GameWorld GameWorld;
public static LevelSettings levelSettings;
public static Camera MainCamera;
public static RaidSettings raidSettings;
public static ERaidMode raidMode;
public static Weapon LocalPlayerWeapon;
public static float _nextPlayerCacheTime;
private static readonly float _cachePlayersInterval = 10f;
public static NetworkPlayer networkPlayer;
public static List<Throwable> Grenades = new List<Throwable>();
public static LocalRaidSettings localRaidSettings;
public static ThermalVision _thermalVision;
public static VisorEffect _visorEffect;
internal static List<GameCorpse> Corpses = new List<GameCorpse>();
public static ELevelType levelType;
public static List<Location> locations = new List<Location>();
public static ItemViewFactory itemViewFactory;
public static List<IPlayer> Players = new List<IPlayer>();
private string _logFilePath;
private BotsController botsController;
public string soundName = "startup";
private Vector3 thirdPersonOffset = new Vector3(0f, 2f, -5f);
public static AudioSource audioSource;
public static AudioSource audioSourcehit;
public static TracerController tracerController;
private static bool isQuestHooked = false;
public static string ammoID = "";
public TarkovApplication tarkovApplication;
private bool shouldrecache;
public static AudioClip artillerycall;
public static AudioClip artilleryaccept;
public static Camera ActiveCamera;
public static Font TXTFONT;
public static GamePlayerOwner playerOwner;
public static TestHook alwayssurvivedhook;
public static TestHook checkItemFilterHook;
public static TestHook checkItemExcludedFilterHook;
public static TestHook transitHook;
public static TestHook tryGetLocationByIdHook;
public static TestHook localRaidSettingsHook;
public static bool hookedCheckItemFilter = false;
public static bool hookedCheckItemExcludedFilter = false;
public static bool forcepveofflinehooked = false;
public static bool Forcepveofflinebool = true;
public TransferItemsInRaidScreen transferItemsInRaidScreen;
public static bool nothooked = true;
public static bool nothooked2 = true;
public BallisticsCalculator ballisticsCalculator;
private Dictionary<string, float> OriginalFeedChance = new Dictionary<string, float>();
private Dictionary<string, float> OriginalMisFireChance = new Dictionary<string, float>();
private Dictionary<string, float> OriginalBaseMalfunctionChance = new Dictionary<string, float>();
public static Vector3 _tempPosition;
public EnemyInfo enemyInfo;
public static HashSet<string> wishlistitemids = new HashSet<string>();
public static HashSet<string> hideoutitemids = new HashSet<string>();
public static Dictionary<string, int> teams = new Dictionary<string, int>();
public static Dictionary<string, int> teamPlayerCount = new Dictionary<string, int>();
public static bool fixedgodmode = false;
private bool _isThirdPerson;
private bool freecam;
public static AudioClip hitMarkerSound;
public static AudioClip headshotsound;
private static Shader aaShader;
public static Material AAMaterial;
public static Material CustomSkybox;
private bool removednojam;
private bool removedfb;
private bool removenr;
private bool UpdateToggle = true;
public static bool isinhideout = false;
private string _lastAlivePlayersHash = string.Empty;
private string lastGameWorldId;
public bool updatep = true;
private void RegisterClasses()
{
GameObject obj = new GameObject();
obj.AddComponent<Menu2>();
obj.AddComponent<PlayerESP>();
obj.AddComponent<ItemESP>();
obj.AddComponent<LootableContainerESP>();
obj.AddComponent<ExfiltrationPointsESP>();
obj.AddComponent<Aimbot>();
obj.AddComponent<Crosshairetc>();
obj.AddComponent<CorpseEsp>();
obj.AddComponent<Radar>();
obj.AddComponent<QuestModule>();
obj.AddComponent<PullItemIDs>();
obj.AddComponent<PullItemPresets>();
obj.AddComponent<GrenadeESP>();
obj.AddComponent<TracerESP>();
obj.AddComponent<Exploits>();
obj.AddComponent<AILister>();
obj.AddComponent<PullQuestIDs>();
obj.AddComponent<QuestESP>();
obj.AddComponent<OnlinePlayerInfo>();
obj.AddComponent<WildSpawnTypeManager>();
obj.AddComponent<HenryBotNav>();
obj.AddComponent<HenryBotBrain>();
obj.AddComponent<LocationsFixerV2>();
audioSourcehit = obj.AddComponent<AudioSource>();
audioSource = obj.AddComponent<AudioSource>();
UnityEngine.Object.DontDestroyOnLoad(obj);
}
public void Start() { }
public void OnGUI() { }
public void Awake()
{
RegisterClasses();
_logFilePath = Path.Combine(Application.persistentDataPath, "log.txt");
Settings.LoadSettings();
}
public void Log(string message)
{
using StreamWriter streamWriter = new StreamWriter(_logFilePath, append: true);
streamWriter.WriteLine($"{DateTime.Now}: {message}");
}
public bool IsGameReady()
{
GameWorld instance = Singleton<GameWorld>.Instance;
return instance != null;
}
public bool IsGameWorldInitialized()
{
return GameWorld != null;
}
public bool IsCacheAvailable()
{
return IsGameWorldInitialized() && GamePlayers != null && GamePlayers.Count > 0;
}
public bool GameWorldHasPlayers()
{
return GameWorld.RegisteredPlayers != null && GameWorld.RegisteredPlayers.Count > 0;
}
private void UpdateGameWorld()
{
GameWorld instance = Singleton<GameWorld>.Instance;
if (instance == null) // Game is not ready
{
GameWorld = null;
isinhideout = false;
lastGameWorldId = null;
return;
}
string locationId = instance.LocationId;
if (locationId == lastGameWorldId) // No updates required
return;
ConsoleScreen.Log("Map changed : " + lastGameWorldId + " -> " + instance.LocationId);
lastGameWorldId = locationId;
if (instance.LocationId == null && instance.LocationId.Contains("hideout")) // In hideout
{
GameWorld = null;
isinhideout = true;
return;
}
GameWorld = instance; // In raid
isinhideout = false;
}
private void UpdatePlayerCache()
{
// PRECHECKS
UpdateGameWorld();
MainCamera = Camera.main;
ActiveCamera = UpdateActiveCamera();
if (!IsGameWorldInitialized()) // Game world not initialized
return;
bool playerAliveAndRegistered = GameWorld.RegisteredPlayers.Any((IPlayer rp) => rp is Player player2 && GameUtils.IsPlayerAlive(player2));
bool playerListUpdated = GameWorld.RegisteredPlayers.Count != GamePlayers.Count;
if (!playerAliveAndRegistered && !playerListUpdated) // No need to update cache
{
_nextPlayerCacheTime = Time.time + _cachePlayersInterval;
return;
}
GamePlayers.Clear(); // Clean up
OnlineGamePlayers.Clear();
teams.Clear();
if (! GameWorldHasPlayers())
return;
// END PRECHECKS
foreach (IPlayer registeredPlayer in GameWorld.RegisteredPlayers)
{
try
{
if (registeredPlayer == null) // Skip null players
continue;
if (registeredPlayer is not Player) // Skip non-player entities
continue;
Player player = registeredPlayer as Player;
if (player == null) // Skip invalid players
continue;
if (player.Transform == null) // Skip players without transforms
continue;
if (player.IsYourPlayer) // Local player
LocalPlayer = player;
if (GameUtils.IsPlayerAlive(player)) // Alive players
{
Vector3.Distance(MainCamera.transform.position, player.Transform.position);
GamePlayers.Add(new GamePlayer(player));
}
} catch (Exception) { } // Swallow exceptions for individual players
}
_nextPlayerCacheTime = Time.time + _cachePlayersInterval; // Finally set next cache time
}
private void DoUpdate()
{
try
{
if (Time.time >= _nextPlayerCacheTime)
UpdatePlayerCache();
}
catch (Exception ex2)
{
ConsoleScreen.Log("Error in Main Loop Player list" + ex2.Message + "-" + ex2.StackTrace);
}
if (IsCacheAvailable())
{
try
{
GamePlayers.RemoveAll((GamePlayer gp) => !GameUtils.IsPlayerValid(gp.Player) || !GameUtils.IsPlayerAlive(gp.Player));
foreach (GamePlayer gamePlayer in GamePlayers)
{
gamePlayer.RecalculateDynamics();
}
}
catch (Exception ex3)
{
ConsoleScreen.Log("Error in Recalculate Dynamics" + ex3.Message + "-" + ex3.StackTrace);
}
}
if (GameWorld != null && OnlineGamePlayers.Count > 0)
{
try
{
OnlineGamePlayers.RemoveAll((OnlineGamePlayer gp) => !GameUtils.IsOPlayerValid(gp.Player));
foreach (OnlineGamePlayer onlineGamePlayer in OnlineGamePlayers)
{
onlineGamePlayer.RecalculateDynamics();
}
}
catch (Exception ex4)
{
ConsoleScreen.Log("Error in Recalculate Dynamics" + ex4.Message + "-" + ex4.StackTrace);
}
}
}
public void Update()
{
if (UpdateToggle)
DoUpdate();
if (Input.GetKeyDown(Settings.ClearCache) && !Settings.allinputdisabled)
{
GamePlayers.Clear();
Resources.UnloadUnusedAssets();
GC.Collect();
}
if (LocalPlayer == null || !(GameWorld != null))
{
return;
}
try
{
if (LocalPlayer != null && LocalPlayer.HandsController != null && LocalPlayer.HandsController.Item != null && LocalPlayer?.HandsController?.Item is Weapon)
{
LocalPlayerWeapon = (Weapon)(LocalPlayer?.HandsController?.Item);
}
if ((_thermalVision == null || _visorEffect == null) && MainCamera != null)
{
_thermalVision = MainCamera.GetComponent<ThermalVision>();
_visorEffect = MainCamera.GetComponent<VisorEffect>();
}
if (Input.GetKeyDown(Settings.UnlockDoors) && !Settings.allinputdisabled)
{
Exploits.UnlockAllDoors();
}
if (Input.GetKeyDown(Settings.tpp) && !Settings.allinputdisabled)
{
_isThirdPerson = !_isThirdPerson;
if (!_isThirdPerson)
{
Exploits.SwitchToFirstPerson();
}
if (_isThirdPerson)
{
Exploits.SwitchToThirdPerson();
}
ConsoleScreen.Log($"Third person toggle is{_isThirdPerson} ");
}
if (Settings.Flyhack)
{
Exploits.FlyHack();
}
if (Settings.Speedhack)
{
Exploits.SpeedHack();
}
if (Settings.Infstamina)
{
Exploits.InfiniteStamina();
}
if (Settings.Instaheal)
{
Exploits.Instaheal();
}
if (Settings.Godmode)
{
Exploits.Godmode();
}
if (!Settings.Godmode && !fixedgodmode)
{
Exploits.ResetGodmode();
fixedgodmode = true;
}
if (Settings.flares)
{
Exploits.Flares();
}
if (Settings.InstaSearch && LocalPlayer != null && LocalPlayer.Skills?.AttentionEliteLuckySearch != null)
{
LocalPlayer.Skills.AttentionEliteLuckySearch.Value = 100000f;
}
if (Settings.Thermal)
{
Exploits.Thermals();
}
else
{
_thermalVision.On = Settings.Thermal;
}
if (Input.GetKeyDown(Settings.KillAll) && !Settings.allinputdisabled)
{
Exploits.KillALL();
}
if (Input.GetKeyDown(Settings.TPall) && !Settings.allinputdisabled)
{
Exploits.TPall();
}
if (Settings.NoVisor)
{
Exploits.RemoveVisor();
}
if (Settings.TeleportItems && Input.GetKeyDown(Settings.teleportitem) && !Settings.allinputdisabled)
{
Exploits.Teleport(Menu2.TPItemInputstring);
}
if (Settings.instahit)
{
Exploits.InstaHit();
}
if (Settings.nojam)
{
Exploits.NoJam();
removednojam = false;
}
else if (!Settings.nojam && !removednojam)
{
Exploits.RemoveNoJam();
removednojam = true;
}
if (Settings.NoRecoil)
{
Exploits.NoRecoil();
removenr = false;
}
else if (!removenr)
{
Exploits.RemoveNoRecoil();
removenr = true;
}
if (Settings.firerate)
{
Exploits.ChangeFireRate();
}
if (Settings.fullbright)
{
Exploits.Fullbright();
removedfb = false;
}
else if (!Settings.fullbright && !removedfb)
{
Exploits.RemoveFullbright();
removedfb = true;
}
if (Settings.changemaincamfov)
{
MainCamera.fieldOfView = Settings.maincamfov;
}
if (Settings.infammo)
{
Exploits.CheckAndAddAmmoToChamber();
}
if (Input.GetKey(KeyCode.F6) && !Settings.allinputdisabled)
{
Exploits.Minecraftmode();
}
if (Settings.invisible)
{
Exploits.Invisibletobots();
}
if (Settings.farreach)
{
FarReach();
}
if (Settings.alwayssurvived && nothooked)
{
Exploits.AlwaysSurvive();
}
if (Settings.removefilters)
{
if (!hookedCheckItemFilter)
{
Exploits.RemoveFilters1();
}
if (!hookedCheckItemExcludedFilter)
{
Exploits.RemoveFilters2();
}
}
if (Input.GetKeyDown(Settings.flyhacktoggle) && !Settings.allinputdisabled)
{
Settings.Flyhack = !Settings.Flyhack;
}
if (Input.GetKeyDown(Settings.speedhacktoggle) && !Settings.allinputdisabled)
{
Settings.Speedhack = !Settings.Speedhack;
}
Input.GetKey(KeyCode.F8);
if (GameWorld != null && LocalPlayerWeapon != null)
{
shouldrecache = false;
if (LocalPlayerWeapon != null && LocalPlayerWeapon.CurrentAmmoTemplate != null)
{
ammoID = LocalPlayerWeapon.CurrentAmmoTemplate._id.ToString();
}
}
if ((GameWorld == null || LocalPlayerWeapon == null) && !shouldrecache)
{
GamePlayers.Clear();
shouldrecache = true;
ammoID = "";
}
if (Settings.bulletspershottoggle)
{
Exploits.BulletsPerShot(Settings.bulletspershot);
}
Exploits.HandleBigHeads();
_ = Settings.soundexploit;
if (!Settings.makeallbotsfriendly)
{
return;
}
foreach (GamePlayer gamePlayer2 in GamePlayers)
{
EntityManager.MakeBotAlly(gamePlayer2.Player);
}
}
catch (Exception)
{
}
}
public static void FarReach()
{
if (!(GameWorld == null) && !(ActiveCamera == null) && !(LocalPlayer == null))
{
EFTHardSettings instance = EFTHardSettings.Instance;
instance.LOOT_RAYCAST_DISTANCE = 12f;
instance.DOOR_RAYCAST_DISTANCE = 12f;
instance.DelayToOpenContainer = 0f;
instance.POSE_CHANGING_SPEED = 15f;
}
}
private void Test()
{
}
public static Type FindType(string type)
{
Type[] types = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault((Assembly a) => a.GetName().Name == "Assembly-CSharp").GetTypes();
foreach (Type type2 in types)
{
if (type == type2.Name || type == type2.FullName)
{
return type2;
}
}
return null;
}
public static string TranslateBossName(string name)
{
return name switch
{
"Килла" => "Killa",
"Решала" => "Reshala",
"Глухарь" => "Gluhar",
"Штурман" => "Shturman",
"Санитар" => "Sanitar",
"Тагилла" => "Tagilla",
"Зрячий" => "Zryachiy",
"Кабан" => "Kaban",
"Дед Мороз" => "Santa",
"Коллонтай" => "Kollontay",
"Big Pipe" => "Big Pipe",
"Birdeye" => "Birdeye",
"Knight" => "Death Knight",
"Партизан" => "Partisan",
"Гус" => "Gus",
"Басмацх" => "Basmach",
_ => "Z",
};
}
public static string TranslateBossNameBYWST(WildSpawnType? type)
{
if (!type.HasValue)
{
return "Unknown";
}
return type.Value switch
{
WildSpawnType.bossKilla => "Killa",
WildSpawnType.bossBully => "Reshala",
WildSpawnType.bossGluhar => "Gluhar",
WildSpawnType.bossKojaniy => "Shturman",
WildSpawnType.bossSanitar => "Sanitar",
WildSpawnType.bossTagilla => "Tagilla",
WildSpawnType.bossZryachiy => "Zryachiy",
WildSpawnType.bossBoar => "Kaban",
WildSpawnType.gifter => "Santa",
WildSpawnType.bossKolontay => "Kollontay",
WildSpawnType.bossKnight => "Death Knight",
WildSpawnType.followerBigPipe => "Big Pipe",
WildSpawnType.followerBirdEye => "Bird Eye",
WildSpawnType.bossPartisan => "Partisan",
WildSpawnType.sectantPredvestnik => "Predvestnik",
WildSpawnType.sectantPrizrak => "Prizrak",
WildSpawnType.sectantOni => "Oni",
_ => "Unknown Boss",
};
}
public static bool IsSuperrare(string SuperName)
{
if (!(SuperName == "TerraGroup Labs keycard (Green)") && !(SuperName == "TerraGroup Labs keycard (Red)") && !(SuperName == "TerraGroup Labs keycard (Blue)") && !(SuperName == "TerraGroup Labs keycard (Violet)") && !(SuperName == "TerraGroup Labs keycard (Yellow)") && !(SuperName == "TerraGroup Labs keycard (Black)") && !(SuperName == "UVSR Taiga-1 survival machete") && !(SuperName == "Red Rebel ice pick") && !(SuperName == "Dorm room 314 marked key") && !(SuperName == "Chekannaya 15 apartment key") && !(SuperName == "Graphics card") && !(SuperName == "Physical Bitcoin") && !(SuperName == "Intelligence folder") && !(SuperName == "LEDX Skin Transilluminator") && !(SuperName == "TerraGroup Labs access keycard") && !(SuperName == "Bottle of Fierce Hatchling moonshine") && !(SuperName == "Portable defibrillator") && !(SuperName == "RB-PKPM marked key") && !(SuperName == "Tetriz portable game console") && !(SuperName == "Bronze lion figurine") && !(SuperName == "Virtex programmable processor") && !(SuperName == "Military power filter") && !(SuperName == "VPX Flash Storage Module") && !(SuperName == "Relaxation room key"))
{
switch (SuperName)
{
default:
if (!SuperName.Contains("Blue Folders") && !SuperName.Contains("keycard"))
{
return false;
}
break;
case "Phased array element":
case "Military COFDM Wireless Signal Transmitter":
case "Silicon Optoelectronic Integrated Circuits textbook":
case "Gold skull ring":
case "Golden Star balm":
case "Chain with Prokill medallion":
case "GreenBat lithium battery":
case "Roler Submariner gold wrist watch":
case "Ophthalmoscope":
case "Iridium military thermal vision module":
case "Car dealership closed section key":
case "RB-BK marked key":
case "RB-VO marked key":
case "Keycard with a blue marking":
case "Mysterious room marked key":
case "Abandoned factory marked key":
case "Health Resort west wing room 216 key":
case "Cottage back door key":
case "ULTRA medical storage key":
case "Kiba Arms outer door key":
case "Health Resort office key with a blue tape":
case "RB-PKPM marked key":
case "Health Resort west wing room 301 key":
case "Health Resort east wing room 226 key":
case "Health Resort west wing room 218 key":
case "TerraGroup Labs weapon testing area key":
case "Shared bedroom marked key":
case "EMERCOM medical unit key":
case "Factory emergency exit key":
case "Relaxation room key":
case "BEAR operative figurine":
case "USEC operative figurine":
case "Cultist figurine":
case "Ded Moroz figurine":
case "Den figurine":
case "Killa figurine":
case "Tagilla figurine":
case "Reshala figurine":
case "Politician Multkevich figurine":
case "Scav figurine":
case "Far-forward GPS Signal Amplifier Unit":
case "Advanced current converter":
case "Microcontroller board":
case "VPX Flash Storage Module":
case "Dorm overseer key":
case "RB-ORB1 key":
case "TerraGroup Labs arsenal storage room key":
case "TerraGroup Labs manager's office room key":
case "TerraGroup storage room keycard":
case "Rusted bloody key":
case "Medicine case":
case "Grenade case":
case "Magazine case":
case "Ammunition case":
case "Documents case":
case "Key tool":
case "Injector case":
case "Keycard holder case":
case "Dogtag case":
break;
}
}
return true;
}
public static bool IsKappa(string KappaName)
{
if (new string[37]
{
"Old firesteel", "Antique axe", "FireKlean gun lube", "Golden rooster figurine", "Silver Badge", "Deadlyslob's beard oil", "Golden 1GPhone smartphone", "Jar of DevilDog mayo", "Can of sprats", "Fake mustache",
"Kotton beanie", "Can of Dr. Lupo's coffee beans", "Pestily plague mask", "Shroud half-mask", "42 Signature Blend English Tea", "Smoke balaclava", "Evasion armband", "Can of RatCola soda", "WZ Wallet", "LVNDMARK's rat poison",
"Missam forklift key", "Video cassette with the Cyborg Killer movie", "BakeEzy cook book", "JohnB Liquid DNB glasses", "Glorious E lightweight armored mask", "Baddie's red beard", "DRD body armor", "Gingy keychain", "Press pass (issued for NoiceGuy)", "Veritas guitar pick",
"Tamatthi kunai knife replica", "Loot Lord plushie", "Raven figurine", "Axel parrot figurine", "BEAR Buddy plush toy", "Battered antique book", "Golden egg"
}.Contains(KappaName))
{
return true;
}
return false;
}
public static bool SearchedItem(string LocalizedName)
{
if (LocalizedName.Contains(Menu2.publicSearchString))
{
return true;
}
return false;
}
public static bool IsStim(string StimName)
{
switch (StimName)
{
case "Obdolbos N cocktail injector":
case "2A2-(b-TG) stimulant injector":
case "3-(b-TG) stimulant injector":
case "Adrenaline injector":
case "AHF1-M stimulant injector":
case "Antitoxin":
case "ETG-change regenerative stimulant injector":
case "L1 (Norepinephrine) injector":
case "M.U.L.E. stimulant injector":
case "Meldonin injector":
case "Obdolbos 2 cocktail injector":
case "Obdolbos cocktail injector":
case "P22 (Product 22) stimulant injector":
case "Perfotoran (Blue Blood) stimulant injector":
case "PNB (Product 16) stimulant injector":
case "Propital regenerative stimulant injector":
case "SJ1 TGLabs combat stimulant injector":
case "SJ12 TGLabs combat stimulant injector":
case "SJ15 TGLabs combat stimulant injector":
case "SJ6 TGLabs combat stimulant injector":
case "SJ9 TGLabs combat stimulant injector":
case "Trimadol stimulant injector":
case "XTG-12 antidote injector":
case "Zagustin hemostatic drug injector":
return true;
default:
return false;
}
}
private void FPSMODE()
{
Renderer[] array = UnityEngine.Object.FindObjectsOfType<Renderer>();
for (int i = 0; i < array.Length; i++)
{
Material[] materials = array[i].materials;
foreach (Material material in materials)
{
BindingFlags bindingAttr = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
FieldInfo[] fields = typeof(Material).GetFields(bindingAttr);
foreach (FieldInfo fieldInfo in fields)
{
if (fieldInfo.FieldType == typeof(Texture))
{
fieldInfo.SetValue(material, null);
}
else if (fieldInfo.FieldType == typeof(Color))
{
fieldInfo.SetValue(material, Color.white);
}
else if (fieldInfo.FieldType == typeof(float))
{
fieldInfo.SetValue(material, 0f);
}
}
material.shader = Shader.Find("Standard");
}
}
}
public static bool IsBossByName(string name)
{
if (!(name == "Килла") && !(name == "Решала") && !(name == "Глухарь") && !(name == "Штурман") && !(name == "Санитар") && !(name == "Тагилла") && !(name == "Зрячий") && !(name == "Кабан"))
{
switch (name)
{
case "Big Pipe":
case "Birdeye":
case "Knight":
case "Дед Мороз":
case "Коллонтай":
case "Партизан":
case "Santa":
case "Кабан":
case "Зрячий":
case "Басмацх":
case "Гус":
break;
default:
return false;
}
}
return true;
}
public static bool IsBoss(WildSpawnType? type)
{
WildSpawnType[] source = new WildSpawnType[17]
{
WildSpawnType.bossBully,
WildSpawnType.bossKilla,
WildSpawnType.bossKojaniy,
WildSpawnType.bossGluhar,
WildSpawnType.bossSanitar,
WildSpawnType.bossTagilla,
WildSpawnType.bossKnight,
WildSpawnType.followerBigPipe,
WildSpawnType.followerBirdEye,
WildSpawnType.gifter,
WildSpawnType.bossZryachiy,
WildSpawnType.bossBoar,
WildSpawnType.bossKolontay,
WildSpawnType.bossPartisan,
WildSpawnType.sectantPredvestnik,
WildSpawnType.sectantPrizrak,
WildSpawnType.sectantOni
};
if (!type.HasValue)
{
return false;
}
return source.Contains(type.Value);
}
public static bool Isdeadbody(string LocalizedName)
{
if (LocalizedName == "Default Inventory")
{
return true;
}
return false;
}
public static void GetWishlistItems()
{
if (QuestModule._tarkovApplication == null)
{
return;
}
_E8D9 wishlistManager = QuestModule._tarkovApplication.GetClientBackEndSession().Profile.WishlistManager;
if (wishlistManager == null)
{
return;
}
wishlistitemids.Clear();
hideoutitemids.Clear();
foreach (MongoID key in wishlistManager.UserItems.Keys)
{
wishlistitemids.Add(key);
}
foreach (MongoID item in wishlistManager.GetWishlist().Keys.Except(wishlistManager.UserItems.Keys))
{
hideoutitemids.Add(item);
}
}
public static Camera UpdateActiveCamera()
{
return Camera.main;
}
}

View file

@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using EFT.UI;
using Newtonsoft.Json;
using UnityEngine;
namespace stupid.solutions;
public class PullItemPresets : MonoBehaviour
{
public List<TemplateData> templateList;
public async void Start()
{
ConsoleScreen.Log("Fetching Item Presets");
await LoadPresetsData();
ConsoleScreen.Log("Item Presets Loaded");
}
private async Task LoadPresetsData()
{
string filePath = Path.Combine(Application.persistentDataPath, "itempresetslist.json");
if (File.Exists(filePath))
{
try
{
Dictionary<string, List<TemplateData>> dictionary = JsonConvert.DeserializeObject<Dictionary<string, List<TemplateData>>>(await Task.Run(() => File.ReadAllText(filePath)));
if (dictionary != null && dictionary.ContainsKey("Templates"))
{
templateList = dictionary["Templates"];
ConsoleScreen.Log($"Item presets loaded successfully. Template count: {templateList.Count}");
}
else
{
ConsoleScreen.LogError("Error: Deserialized template list is null or malformed.");
}
return;
}
catch (Exception ex)
{
ConsoleScreen.LogError("Error occurred while loading item presets: " + ex.Message);
return;
}
}
ConsoleScreen.LogError("Error: JSON file (" + filePath + ") does not exist.");
}
public void SaveItemToPresetList(dynamic item, string presetName)
{
Dictionary<string, SlotData> dictionary = new Dictionary<string, SlotData>();
foreach (dynamic item3 in item.AllSlots)
{
if (item3.ContainedItem != null)
{
dictionary[item3.FullId] = new SlotData
{
SlotID = item3.FullId,
SlotName = item3.Name,
ItemId = item3.ContainedItem.TemplateId
};
}
}
TemplateData templateData = new TemplateData();
templateData.PresetName = presetName;
Dictionary<string, ItemTemplate> dictionary2 = new Dictionary<string, ItemTemplate>();
dictionary2.Add(item.TemplateId.ToString(), new ItemTemplate
{
StackMaxSize = 1,
QuestItem = false,
Description = $"Saved on {DateTime.Now}, Made With Advanced Item Spawner",
Slots = dictionary
});
templateData.ItemTemplate = dictionary2;
TemplateData item2 = templateData;
string path = Path.Combine(Application.persistentDataPath, "itempresetslist.json");
Dictionary<string, List<TemplateData>> dictionary3 = ((!File.Exists(path)) ? new Dictionary<string, List<TemplateData>>() : (JsonConvert.DeserializeObject<Dictionary<string, List<TemplateData>>>(File.ReadAllText(path)) ?? new Dictionary<string, List<TemplateData>>()));
if (!dictionary3.ContainsKey("Templates"))
{
dictionary3["Templates"] = new List<TemplateData>();
}
dictionary3["Templates"].Add(item2);
File.WriteAllText(path, JsonConvert.SerializeObject(dictionary3, Formatting.Indented));
ConsoleScreen.Log("Preset saved to list.");
Start();
}
}

View file

@ -0,0 +1,481 @@
using System;
using System.Collections.Generic;
using System.Linq;
using EFT;
using EFT.Counters;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.Quests;
using EFT.UI;
using stupid.solutions.Data;
using stupid.solutions.Features;
using stupid.solutions.Features.ESP;
using stupid.solutions.stupid.solutions.Data;
using stupid.solutions.Utils;
using UnityEngine;
namespace stupid.solutions;
public class QuestESP : MonoBehaviour
{
public struct QuestItemsSearched
{
public string ID { get; set; }
}
private List<PointOfInterest> poiList = new List<PointOfInterest>();
private List<dynamic> startedQuests = new List<object>();
private bool shouldRefreshData = true;
public static List<string> QuestItemIds = new List<string>();
private List<PlaceItemTrigger> placeItemTriggers = new List<PlaceItemTrigger>();
private List<ExperienceTrigger> experienceTrigger = new List<ExperienceTrigger>();
private bool gettriggers = true;
private bool getquestitems = true;
private float _nextQuestCacheTime;
private static readonly float _cacheQuestInterval = 5f;
public Color Color { get; set; } = Color.magenta;
private void Update()
{
if (Settings.QuestESP && Time.time >= _nextQuestCacheTime)
{
if (Main.GameWorld != null && Main.LocalPlayer != null && Main.MainCamera != null)
{
try
{
poiList.Clear();
RefreshData(poiList);
shouldRefreshData = false;
}
catch (Exception ex)
{
ConsoleScreen.Log("Error refreshing data: " + ex.Message);
}
}
_nextQuestCacheTime = Time.time + _cacheQuestInterval;
}
if (gettriggers && Main.GameWorld != null && Main.LocalPlayer != null && Main.MainCamera != null)
{
GetTriggers();
}
if (Main.GameWorld == null)
{
gettriggers = true;
getquestitems = true;
poiList.Clear();
QuestItemIds.Clear();
placeItemTriggers.Clear();
experienceTrigger.Clear();
}
}
public void GetTriggers()
{
if (placeItemTriggers == null)
{
placeItemTriggers = new List<PlaceItemTrigger>();
}
if (experienceTrigger == null)
{
experienceTrigger = new List<ExperienceTrigger>();
}
gettriggers = false;
placeItemTriggers.Clear();
experienceTrigger.Clear();
placeItemTriggers = UnityEngine.Object.FindObjectsOfType<PlaceItemTrigger>().ToList();
experienceTrigger = UnityEngine.Object.FindObjectsOfType<ExperienceTrigger>().ToList();
ConsoleScreen.Log($"Got Triggers + {experienceTrigger.Count + placeItemTriggers.Count}");
}
public void RefreshData(List<PointOfInterest> data)
{
GameWorld gameWorld = Main.GameWorld;
if (gameWorld == null)
{
return;
}
Player localPlayer = Main.LocalPlayer;
if (localPlayer == null || Main.MainCamera == null)
{
return;
}
Profile profile = localPlayer.Profile;
if (profile == null)
{
return;
}
try
{
List<_F286> questsData = profile.QuestsData;
startedQuests.Clear();
foreach (_F286 item in questsData)
{
if (item.Template != null && item.Template.Conditions != null && profile.Stats != null && profile.Stats.Eft != null && profile.Stats.Eft.OverallCounters != null && item.Status == EQuestStatus.Started)
{
startedQuests.Add(item);
}
}
if (startedQuests.Any())
{
RefreshVisitPlaceLocations(startedQuests, profile, data);
RefreshFindItemLocations(startedQuests, gameWorld, data);
RefreshPlaceOrRepairItemLocations(startedQuests, profile, data);
if (getquestitems)
{
RefreshNonStaticQuestItems(startedQuests, gameWorld, data);
getquestitems = false;
}
}
}
catch (Exception)
{
}
}
private void RefreshVisitPlaceLocations(List<dynamic> startedQuests, Profile profile, List<PointOfInterest> records)
{
try
{
List<ExperienceTrigger> source = this.experienceTrigger.ToList();
foreach (dynamic startedQuest in startedQuests)
{
dynamic val = startedQuest.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (val == null)
{
continue;
}
foreach (dynamic item in val)
{
try
{
if ((startedQuest.CompletedConditions.Contains(item.id)) || !(item is ConditionCounterCreator conditionCounterCreator))
{
continue;
}
foreach (Condition condition in conditionCounterCreator.Conditions)
{
if (condition is ConditionVisitPlace conditionVisitPlace)
{
string expectedTriggerId = conditionVisitPlace.target;
ExperienceTrigger experienceTrigger = source.FirstOrDefault((ExperienceTrigger t) => t.Id == expectedTriggerId);
if (!(experienceTrigger == null) && profile.Stats.Eft.OverallCounters.GetInt(CounterTag.TriggerVisited, experienceTrigger.Id) <= 0)
{
Vector3 position = experienceTrigger.transform.position;
AddQuestRecord(records, conditionCounterCreator, startedQuest, position, Color.cyan);
break;
}
}
}
}
catch (Exception ex)
{
ConsoleScreen.Log($"Error processing condition {(object)item?.id}: {ex.Message}");
}
}
}
}
catch (Exception)
{
}
}
private bool IsQuestConditionAvailableForFinish(dynamic quest)
{
dynamic val = quest.Template?.Conditions[EQuestStatus.AvailableForFinish];
return val != null && !quest.CompletedConditions.Contains(val.id);
}
private void RefreshFindItemLocations(List<dynamic> startedQuests, GameWorld world, List<PointOfInterest> records)
{
try
{
_E3D7<int, LootItem> lootItems = world.LootItems;
for (int i = 0; i < lootItems.Count; i++)
{
try
{
LootItem byIndex = lootItems.GetByIndex(i);
if (!GameUtils.IsLootItemValid(byIndex))
{
continue;
}
bool flag = false;
foreach (dynamic startedQuest in startedQuests)
{
dynamic val = startedQuest.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (val == null)
{
continue;
}
foreach (object item in val)
{
if (!(item is ConditionFindItem conditionFindItem))
{
continue;
}
string text = conditionFindItem.target.FirstOrDefault()?.ToString();
bool flag2 = text == null || !text.Contains(byIndex.Item.TemplateId.ToString());
if (!flag2 && !((flag2 | startedQuest.CompletedConditions.Contains(conditionFindItem.id)) ? true : false))
{
if (!byIndex.Item.QuestItem && !flag)
{
QuestItemIds.Add(byIndex.Item.LocalizedName());
flag = true;
}
else
{
Vector3 position = byIndex.transform.position;
AddQuestRecord(records, conditionFindItem, startedQuest, position, Color.yellow);
}
}
}
}
}
catch (Exception)
{
}
}
}
catch (Exception)
{
}
}
private void RefreshNonStaticQuestItems(List<dynamic> startedQuests, GameWorld world, List<PointOfInterest> records)
{
try
{
foreach (GameLootContainer gameLootContainer in LootableContainerESP._gameLootContainers)
{
if (!GameUtils.IsLootableContainerValid(gameLootContainer.LootableContainer))
{
continue;
}
foreach (Item allItem in gameLootContainer.LootableContainer.ItemOwner.RootItem.GetAllItems())
{
foreach (dynamic startedQuest in startedQuests)
{
dynamic val = startedQuest.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (val == null)
{
continue;
}
bool flag = false;
foreach (object item in val)
{
if (item is ConditionFindItem conditionFindItem)
{
string text = conditionFindItem.target.FirstOrDefault()?.ToString();
bool flag2 = text == null || !text.Contains(allItem.TemplateId.ToString());
if (!flag2 && !((flag2 | startedQuest.CompletedConditions.Contains(conditionFindItem.id)) ? true : false) && !allItem.QuestItem && !flag)
{
QuestItemIds.Add(allItem.LocalizedName());
flag = true;
}
}
}
}
}
}
if (Main.OnlineGamePlayers.Count > 0)
{
foreach (OnlineGamePlayer onlineGamePlayer in Main.OnlineGamePlayers)
{
IEnumerator<Item> enumerator6 = onlineGamePlayer.Player.ObservedPlayerController.EquipmentViewController.Equipment.GetAllItems().GetEnumerator();
while (enumerator6.MoveNext())
{
if (enumerator6.Current != null)
{
foreach (Item allItem2 in enumerator6.Current.GetAllItems())
{
foreach (dynamic startedQuest2 in startedQuests)
{
dynamic val2 = startedQuest2.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (!((val2 == null) ? true : false))
{
bool flag3 = false;
foreach (object item2 in val2)
{
if (item2 is ConditionFindItem conditionFindItem2)
{
string text2 = conditionFindItem2.target.FirstOrDefault()?.ToString();
bool flag2 = text2 == null || !text2.Contains(allItem2.TemplateId.ToString());
if (!flag2 && !((flag2 | startedQuest2.CompletedConditions.Contains(conditionFindItem2.id)) ? true : false) && !allItem2.QuestItem && !flag3)
{
QuestItemIds.Add(allItem2.LocalizedName());
flag3 = true;
}
}
}
}
}
}
}
}
}
return;
}
foreach (GamePlayer gamePlayer in Main.GamePlayers)
{
IEnumerator<Item> enumerator8 = gamePlayer.Player.Profile.Inventory.Equipment.GetAllItems().GetEnumerator();
while (enumerator8.MoveNext())
{
if (enumerator8.Current == null)
{
continue;
}
foreach (Item allItem3 in enumerator8.Current.GetAllItems())
{
foreach (dynamic startedQuest3 in startedQuests)
{
dynamic val3 = startedQuest3.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (val3 == null)
{
continue;
}
bool flag4 = false;
foreach (object item3 in val3)
{
if (item3 is ConditionFindItem conditionFindItem3)
{
string text3 = conditionFindItem3.target.FirstOrDefault()?.ToString();
bool flag2 = text3 == null || !text3.Contains(allItem3.TemplateId.ToString());
if (!flag2 && !((flag2 | startedQuest3.CompletedConditions.Contains(conditionFindItem3.id)) ? true : false) && !allItem3.QuestItem && !flag4)
{
QuestItemIds.Add(allItem3.LocalizedName());
flag4 = true;
}
}
}
}
}
}
}
}
catch (Exception)
{
}
}
private void RefreshPlaceOrRepairItemLocations(List<dynamic> startedQuests, Profile profile, List<PointOfInterest> records)
{
try
{
Item[] source = profile.Inventory.GetPlayerItems()?.ToArray();
List<PlaceItemTrigger> source2 = placeItemTriggers;
foreach (dynamic startedQuest in startedQuests)
{
try
{
dynamic val = startedQuest.Template?.Conditions[EQuestStatus.AvailableForFinish];
if (val == null)
{
continue;
}
foreach (object item in val)
{
ConditionZone zoneCondition = item as ConditionZone;
if (zoneCondition == null)
{
continue;
}
if (startedQuest.CompletedConditions.Contains(zoneCondition.id))
{
continue;
}
string zoneconditionstring = zoneCondition.target.FirstOrDefault()?.ToString();
if (zoneconditionstring != null && source.FirstOrDefault((Item x) => zoneconditionstring.Contains(x.TemplateId.ToString())) != null)
{
PlaceItemTrigger placeItemTrigger = source2.FirstOrDefault((PlaceItemTrigger t) => t.Id == zoneCondition.zoneId);
if (!(placeItemTrigger == null))
{
Vector3 position = placeItemTrigger.transform.position;
AddQuestRecord(records, zoneCondition, startedQuest, position, Color);
break;
}
}
}
}
catch (Exception)
{
}
}
}
catch (Exception)
{
}
}
private void AddQuestRecord(List<PointOfInterest> records, dynamic condition, dynamic quest, Vector3 position, Color color)
{
PointOfInterest item = new PointOfInterest
{
Name = $" {(object)quest.Template.Name} ",
Description = $" {(object)condition.FormattedDescription} ",
Position = position,
Color = color,
Quest = quest
};
records.Add(item);
}
public void OnGUI()
{
if (!(Main.GameWorld != null) || !Settings.QuestESP)
{
return;
}
foreach (var item in (from poi in poiList
group poi by new { poi.Position, poi.Name }).ToDictionary(g => g.Key, g => g.ToList()))
{
List<PointOfInterest> value = item.Value;
Vector3 position = item.Key.Position;
Vector3 vector = GameUtils.WorldPointToScreenPoint(position);
float num = Vector3.Distance(Main.MainCamera.transform.position, position);
bool num2 = vector.z > 0f && vector.x > 0f && vector.x < (float)Screen.width && vector.y > 0f && vector.y < (float)Screen.height;
bool flag = Aimbot.CaulculateInFov2(position) <= Settings.SimpleStringsFOV;
if (!num2)
{
continue;
}
if (Settings.DrawSimpleStrings)
{
string label = (flag ? $"{item.Key.Name} [{num:F0}m]" : "[Q]");
Render.DrawString(new Vector2(vector.x - 50f, vector.y), label, value[0].Color);
if (!flag || !Settings.DrawDescription)
{
continue;
}
float num3 = 15f;
foreach (PointOfInterest item2 in value)
{
Render.DrawString(new Vector2(vector.x - 50f, vector.y + num3), item2.Description, Color.white);
num3 += 15f;
}
continue;
}
string label2 = $"{item.Key.Name} [{num:F0}m]";
Render.DrawString(new Vector2(vector.x - 50f, vector.y), label2, value[0].Color);
if (!Settings.DrawDescription)
{
continue;
}
float num4 = 15f;
foreach (PointOfInterest item3 in value)
{
Render.DrawString(new Vector2(vector.x - 50f, vector.y + num4), item3.Description, Color.white);
num4 += 15f;
}
}
}
}

View file

@ -0,0 +1,13 @@
using System;
namespace stupid.solutions;
[Serializable]
public class SlotData
{
public string SlotID { get; set; }
public string SlotName { get; set; }
public string ItemId { get; set; }
}

View file

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace stupid.solutions;
[Serializable]
public class TemplateData
{
public string PresetName { get; set; }
public Dictionary<string, ItemTemplate> ItemTemplate { get; set; }
}

View file

@ -0,0 +1,135 @@
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace stupid.solutions;
public class TestHook
{
internal class Import
{
[DllImport("kernel32.dll", SetLastError = true)]
internal static extern bool VirtualProtect(IntPtr address, uint size, uint newProtect, out uint oldProtect);
}
private byte[] original;
private const uint HOOK_SIZE_X64 = 12u;
private const uint HOOK_SIZE_X86 = 7u;
public MethodInfo OriginalMethod { get; private set; }
public MethodInfo HookMethod { get; private set; }
public TestHook()
{
original = null;
OriginalMethod = (HookMethod = null);
}
public TestHook(MethodInfo orig, MethodInfo hook)
{
original = null;
Init(orig, hook);
}
public MethodInfo GetMethodByName(Type typeOrig, string nameOrig)
{
return typeOrig.GetMethod(nameOrig);
}
public TestHook(Type typeOrig, string nameOrig, Type typeHook, string nameHook)
{
original = null;
Init(GetMethodByName(typeOrig, nameOrig), GetMethodByName(typeHook, nameHook));
}
public void Init(MethodInfo orig, MethodInfo hook)
{
if (orig == null || hook == null)
{
throw new ArgumentException("Both original and hook need to be valid methods");
}
RuntimeHelpers.PrepareMethod(orig.MethodHandle);
RuntimeHelpers.PrepareMethod(hook.MethodHandle);
OriginalMethod = orig;
HookMethod = hook;
}
public unsafe void Hook()
{
if (OriginalMethod == null || HookMethod == null)
{
throw new ArgumentException("Hook has to be properly Init'd before use");
}
try
{
IntPtr functionPointer = OriginalMethod.MethodHandle.GetFunctionPointer();
IntPtr functionPointer2 = HookMethod.MethodHandle.GetFunctionPointer();
if (IntPtr.Size == 8)
{
original = new byte[12];
if (Import.VirtualProtect(functionPointer, 12u, 64u, out var _))
{
byte* ptr = (byte*)(void*)functionPointer;
for (int i = 0; (long)i < 12L; i++)
{
original[i] = ptr[i];
}
*ptr = 72;
ptr[1] = 184;
*(IntPtr*)(ptr + 2) = functionPointer2;
ptr[10] = byte.MaxValue;
ptr[11] = 224;
}
return;
}
original = new byte[7];
if (Import.VirtualProtect(functionPointer, 7u, 64u, out var _))
{
byte* ptr2 = (byte*)(void*)functionPointer;
for (int j = 0; (long)j < 7L; j++)
{
original[j] = ptr2[j];
}
*ptr2 = 184;
*(IntPtr*)(ptr2 + 1) = functionPointer2;
ptr2[5] = byte.MaxValue;
ptr2[6] = 224;
}
}
catch (Exception)
{
}
}
public unsafe void Unhook()
{
if (original == null)
{
return;
}
try
{
IntPtr functionPointer = OriginalMethod.MethodHandle.GetFunctionPointer();
uint num = (uint)original.Length;
if (Import.VirtualProtect(functionPointer, num, 64u, out var _))
{
byte* ptr = (byte*)(void*)functionPointer;
for (int i = 0; i < num; i++)
{
ptr[i] = original[i];
}
}
}
catch (Exception)
{
}
finally
{
original = null;
}
}
}

View file

@ -0,0 +1,27 @@
using System.Reflection;
using EFT;
using EFT.UI;
namespace stupid.solutions;
public static class TripwireHooks
{
public static void PlayTripwireInteractionSound_Hook(object instance, float plantTime, bool hasMultiTool)
{
Player player = instance as Player;
if (!(player == null))
{
typeof(Player).GetMethod("SendTripwireInteractionSoundState", BindingFlags.Instance | BindingFlags.NonPublic)?.Invoke(player, new object[3]
{
EInteractionStatus.Started,
true,
hasMultiTool
});
}
}
public static void AntiTripWire_Hook(object instance, object tripwireSoundMessage)
{
ConsoleScreen.Log("TripWire sound blocked");
}
}