-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProgram.cs
105 lines (95 loc) · 3.2 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
using cs2.Game.Features;
using cs2.Game.Objects;
using cs2.GameOverlay;
using cs2.Offsets;
using cs2.PInvoke;
using System.Numerics;
using System;
using System.Runtime.InteropServices;
using SharpDX.XAudio2;
using System.Text;
namespace cs2
{
internal class Program
{
static void Main(string[] args)
{
Initialize();
ParseArguments(args);
HitMarker.Initialize();
Input.Initialize();
LocalPlayer.Initialize();
if (!OffsetsLoader.Initialize(LoadType.FROM_GIT))
{
Log("offsets init failed", ConsoleColor.Red);
Console.ReadKey();
Environment.Exit(0);
}
if (!Memory.Initialize(out string mes))
{
Log(mes, ConsoleColor.Red);
Console.ReadKey();
Environment.Exit(0);
}
AimAssist.LoadValue();
AimAssist.Start();
Bhop.Start();
WorldEsp.Start();
new Thread(() =>
{
Console.Beep();
Thread.Sleep(1000);
for (int i = 3; i > 0; i--)
{
Program.Log(i);
Thread.Sleep(1000);
}
Console.Clear();
}).Start();
new Overlay(); // thr join
}
static void Initialize()
{
Console.Title = Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())).Replace("0", "").Replace("L", "");
string currentPath = Directory.GetCurrentDirectory();
string soundsPath = Path.Combine(currentPath, "sounds");
string offsetsPath = Path.Combine(currentPath, "generated");
string configsPath = Path.Combine(currentPath, "configs");
void Dir(string path)
{
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
Log(path, ConsoleColor.Green);
}
}
Dir(soundsPath);
Dir(offsetsPath);
Dir(configsPath);
}
static void ParseArguments(string[] args)
{
//List<string> arguments = new List<string>();
//foreach (var arg in args)
// arguments.Add(arg.ToLower());
//int index = 0;
//if ((index = arguments.IndexOf("angle")) != -1)
//{
// AimAssist.AnglePerPixel = double.Parse(arguments[index + 1]);
// Program.Log($"AnglePerPixel: {AimAssist.AnglePerPixel}", ConsoleColor.Green);
//}
}
public static void Log(string text, ConsoleColor color = ConsoleColor.Gray)
{
Console.ForegroundColor = color;
Console.WriteLine(text);
Console.ForegroundColor = ConsoleColor.Gray;
}
public static void Log(int integer, ConsoleColor color = ConsoleColor.Gray) => Log(integer.ToString(), color);
public static List<Entity> Entities
{
get; set;
} = new List<Entity>();
public static readonly int ENTITY_LIST_COUNT = 32;
}
}