the initial commit to the repo.
This commit is contained in:
parent
025c032b8c
commit
1b757591b9
264 changed files with 21882 additions and 0 deletions
343
stoopid.raw/stupid.solutions.Features/Aimbot.cs
Normal file
343
stoopid.raw/stupid.solutions.Features/Aimbot.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
57
stoopid.raw/stupid.solutions.Features/BulletMovement.cs
Normal file
57
stoopid.raw/stupid.solutions.Features/BulletMovement.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
38
stoopid.raw/stupid.solutions.Features/EZWeatherController.cs
Normal file
38
stoopid.raw/stupid.solutions.Features/EZWeatherController.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
477
stoopid.raw/stupid.solutions.Features/EntityManager.cs
Normal file
477
stoopid.raw/stupid.solutions.Features/EntityManager.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
14
stoopid.raw/stupid.solutions.Features/HenryBotNav.cs
Normal file
14
stoopid.raw/stupid.solutions.Features/HenryBotNav.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using UnityEngine;
|
||||
|
||||
namespace stupid.solutions.Features;
|
||||
|
||||
public class HenryBotNav : MonoBehaviour
|
||||
{
|
||||
public void Start()
|
||||
{
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
}
|
||||
}
|
||||
73
stoopid.raw/stupid.solutions.Features/HookObject.cs
Normal file
73
stoopid.raw/stupid.solutions.Features/HookObject.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue