diff --git a/Aurium.sln b/Aurium.sln new file mode 100644 index 0000000..c2e200c --- /dev/null +++ b/Aurium.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31321.278 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aurium", "Aurium\Aurium.csproj", "{562C2BE9-6687-4837-AD88-4AF1DE412231}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {562C2BE9-6687-4837-AD88-4AF1DE412231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {562C2BE9-6687-4837-AD88-4AF1DE412231}.Debug|Any CPU.Build.0 = Debug|Any CPU + {562C2BE9-6687-4837-AD88-4AF1DE412231}.Release|Any CPU.ActiveCfg = Release|Any CPU + {562C2BE9-6687-4837-AD88-4AF1DE412231}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6B2070F6-4BAD-43BF-9025-F5E0113414F8} + EndGlobalSection +EndGlobal diff --git a/Aurium/App.config b/Aurium/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Aurium/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Aurium/Aurium.csproj b/Aurium/Aurium.csproj new file mode 100644 index 0000000..29e1aab --- /dev/null +++ b/Aurium/Aurium.csproj @@ -0,0 +1,65 @@ + + + + + Debug + AnyCPU + {562C2BE9-6687-4837-AD88-4AF1DE412231} + Exe + Aurium + Aurium + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + Aurium.ico + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Aurium/Aurium.ico b/Aurium/Aurium.ico new file mode 100644 index 0000000..57a4a48 Binary files /dev/null and b/Aurium/Aurium.ico differ diff --git a/Aurium/Beam.cs b/Aurium/Beam.cs new file mode 100644 index 0000000..3b0794b --- /dev/null +++ b/Aurium/Beam.cs @@ -0,0 +1,72 @@ +using System; +using System.Threading; +using System.Windows.Forms; +using static Aurium.Variables; + +namespace Aurium +{ + class Recoil + { + private static bool IsKeyDown(Keys key) + { return 0 != (DLLImports.GetAsyncKeyState((int)key) & 0x8000); } + + public static void RecoilLoop() + { + while (true) + { + if (Variables.Menu.isEnabled() && !string.IsNullOrEmpty(Weapon.getName())) + { + while (IsKeyDown(Keys.RButton) && IsKeyDown(Keys.LButton)) + { + for (int i = 0; i <= Weapon.getAmmo() - 1; i++) + { + if (!IsKeyDown(Keys.LButton)) break; + Smoothing(Weapon.isMuzzleBoost(Weapon.getShootingMilliSec()), + Weapon.isMuzzleBoost(Weapon.getShotDelay(i)), + (int)((((Weapon.getRecoilX(i) + GetRandomNumber(0.0, Weapon.getRandomness())) / 4) / Settings.getSensitivity()) * Weapon.getScopeMulitplier() * Weapon.getBarrelMultiplier()), + (int)((((Weapon.getRecoilY(i) + GetRandomNumber(0.0, Weapon.getRandomness())) / 4) / Settings.getSensitivity()) * Weapon.getScopeMulitplier() * Weapon.getBarrelMultiplier())); + DLLImports.mouse_event(0x0001, 0, 0, 0, 0); + } + } + } + Thread.Sleep(1); + } + } + + private static double GetRandomNumber(double minimum, double maximum) + { + Random random = new Random(); + return random.NextDouble() * (maximum - minimum) + minimum; + } + + static private void Smoothing(double MS, double ControlledTime, int X, int Y) + { + int oldX = 0, oldY = 0, oldT = 0; + for (int i = 1; i <= (int)ControlledTime; ++i) + { + int newX = i * X / (int)ControlledTime; + int newY = i * Y / (int)ControlledTime; + int newTime = i * (int)ControlledTime / (int)ControlledTime; + DLLImports.mouse_event(1, newX - oldX, newY - oldY, 0, 0); + PerciseSleep(newTime - oldT); + oldX = newX; oldY = newY; oldT = newTime; + } + PerciseSleep((int)MS - (int)ControlledTime); + } + + static private void PerciseSleep(int ms) + { + DLLImports.QueryPerformanceFrequency(out long timerResolution); + timerResolution /= 1000; + + DLLImports.QueryPerformanceCounter(out long currentTime); + long wantedTime = currentTime / timerResolution + ms; + currentTime = 0; + while (currentTime < wantedTime) + { + DLLImports.QueryPerformanceCounter(out currentTime); + currentTime /= timerResolution; + } + } + } +} diff --git a/Aurium/DLLImports.cs b/Aurium/DLLImports.cs new file mode 100644 index 0000000..a316231 --- /dev/null +++ b/Aurium/DLLImports.cs @@ -0,0 +1,14 @@ +using System; +using System.Runtime.InteropServices; + +namespace Aurium +{ + class DLLImports + { + [DllImport("user32.dll")] public static extern void mouse_event(int dwFlags, int dx, int dy, int dwData, int dwExtraInfo); + [DllImport("user32.dll")] public static extern short GetAsyncKeyState(int vKey); + [DllImport("Kernel32.dll")] public static extern bool QueryPerformanceCounter(out long lpPerformanceCount); + [DllImport("Kernel32.dll")] public static extern bool QueryPerformanceFrequency(out long lpFrequency); + [DllImport("user32.dll")] public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk); + } +} diff --git a/Aurium/Display.cs b/Aurium/Display.cs new file mode 100644 index 0000000..086a386 --- /dev/null +++ b/Aurium/Display.cs @@ -0,0 +1,90 @@ +using System; + +namespace Aurium +{ + class Display + { + private static void InitializeWindow() + { + Console.SetWindowSize(50, 40); + Console.SetBufferSize(50, 40); + Console.Title = "Aurium"; + PrintHeader(); + } + + public static void PrintHeader() + { + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.WriteLine(@" _ _ "); + Console.WriteLine(@" / \ _ _ _ __(_)_ _ _ __ ___ "); + Console.WriteLine(@" / _ \| | | | '__| | | | | '_ ` _ \ "); + Console.WriteLine(@" / ___ \ |_| | | | | |_| | | | | | |"); + Console.WriteLine(@" /_/ \_\__,_|_| |_|\__,_|_| |_| |_|"); + Console.WriteLine(); + Console.WriteLine(" -------------------------------------------------"); + Console.ResetColor(); + Console.WriteLine(" Sensitivity Randomness"); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.Write(" "); + Console.Write("{0:0.0}", Variables.Settings.getSensitivity()); + Console.Write(" "); + Console.Write("{0:0}", Variables.Weapon.getRandomness()); + Console.WriteLine(); + Console.ResetColor(); + Console.WriteLine(); + Console.Write(" Script Enabled: "); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.Write(Variables.Menu.isEnabled() + "\n"); + Console.ResetColor(); + + Console.Write(" Current Weapon: "); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.Write(Variables.Weapon.getName() + "\n"); + Console.ResetColor(); + + Console.Write(" Scope Attachment: "); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.Write(Variables.Weapon.getActiveScope() + "\n"); + Console.ResetColor(); + + Console.Write(" Muzzle Attachment: "); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.Write(Variables.Weapon.getActiveBarrel() + "\n"); + Console.WriteLine(); + Console.WriteLine(" -------------------------------------------------"); + Console.ResetColor(); + Console.WriteLine(" CTRL + Number Pad:"); + Console.ForegroundColor = ConsoleColor.DarkYellow; + + Console.WriteLine(); + Console.WriteLine(" 0: Enable/Disable"); + Console.WriteLine(); + Console.WriteLine(" 1: Assault Rifle"); + Console.WriteLine(" 2: Custom SMG"); + Console.WriteLine(" 3: LR-300 Assault Rifle"); + Console.WriteLine(" 4: M39"); + Console.WriteLine(" 5: M92"); + Console.WriteLine(" 6: M249"); + Console.WriteLine(" 7: MP5A4"); + Console.WriteLine(" 8: Semi-Automatic Rifle"); + Console.WriteLine(" 9: Thompson"); + Console.WriteLine(); + Console.WriteLine(" +: Cycle Sights [None/Simple/Holo/8x/16x]"); + Console.WriteLine(" Enter: Cycle Barrels [None/Silencer/Boost/Break]"); + Console.WriteLine(); + Console.ResetColor(); + Console.WriteLine(" CTRL + Arrow Key:"); + Console.WriteLine(); + Console.ForegroundColor = ConsoleColor.DarkYellow; + Console.WriteLine(" Randomness: [← Decrease] [→ Increase]"); + Console.WriteLine(" In-game Sensitivity: [↓ Decrease] [↑ Increase]"); + } + + static void Main(string[] args) + { + InitializeWindow(); + Hotkeys.Initiate.InitiateHotKeys(); + Recoil.RecoilLoop(); + } + } +} diff --git a/Aurium/Hotkeys.cs b/Aurium/Hotkeys.cs new file mode 100644 index 0000000..e49b488 --- /dev/null +++ b/Aurium/Hotkeys.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Aurium +{ + class Hotkeys + { + private static volatile MessageWindow _wnd; + private static volatile IntPtr _hwnd; + private static ManualResetEvent _windowReadyEvent = new ManualResetEvent(false); + private static event EventHandler HotKeyPressed; + + private class MessageWindow : Form + { + public MessageWindow() + { + _wnd = this; + _hwnd = this.Handle; + _windowReadyEvent.Set(); + } + + protected override void WndProc(ref Message m) + { + if (m.Msg == WM_HOTKEY) + { + HotKeyEventArgs e = new HotKeyEventArgs(m.LParam); + Hotkey.OnHotKeyPressed(e); + } + base.WndProc(ref m); + } + + protected override void SetVisibleCore(bool value) + { base.SetVisibleCore(false); } + private const int WM_HOTKEY = 0x312; + } + + static Hotkeys() + { + Thread messageLoop = new Thread(delegate () + { Application.Run(new MessageWindow()); }); + messageLoop.Name = "HotKeyMessageThread"; + messageLoop.IsBackground = true; + messageLoop.Start(); + } + + [Flags] public enum KeyModifiers { Control = 2 } + + public class HotKeyEventArgs : EventArgs + { + public readonly Keys Key; + public readonly KeyModifiers Modifiers; + + public HotKeyEventArgs(IntPtr hotKeyParam) + { + uint param = (uint)hotKeyParam.ToInt64(); + Key = (Keys)((param & 0xffff0000) >> 16); + Modifiers = (KeyModifiers)(param & 0x0000ffff); + } + } + + public class Initiate + { + private static int _id = 0; + public static int RegisterHotKey(Keys key, KeyModifiers modifiers) + { + _windowReadyEvent.WaitOne(); + int id = Interlocked.Increment(ref _id); + _wnd.Invoke(new RegisterHotKeyDelegate(RegisterHotKeyInternal), _hwnd, id, (uint)modifiers, (uint)key); + return id; + } + + delegate void RegisterHotKeyDelegate(IntPtr hwnd, int id, uint modifiers, uint key); + + private static void RegisterHotKeyInternal(IntPtr hwnd, int id, uint modifiers, uint key) + { DLLImports.RegisterHotKey(hwnd, id, modifiers, key); } + + public static void InitiateHotKeys() + { + RegisterHotKey(Keys.NumPad0, KeyModifiers.Control); // Enable/Disable + RegisterHotKey(Keys.NumPad1, KeyModifiers.Control); // AK + RegisterHotKey(Keys.NumPad2, KeyModifiers.Control); // LR300 + RegisterHotKey(Keys.NumPad3, KeyModifiers.Control); // Semi + RegisterHotKey(Keys.NumPad4, KeyModifiers.Control); // Custom + RegisterHotKey(Keys.NumPad5, KeyModifiers.Control); // MP5 + RegisterHotKey(Keys.NumPad6, KeyModifiers.Control); // Thompson + RegisterHotKey(Keys.NumPad7, KeyModifiers.Control); // M39 + RegisterHotKey(Keys.NumPad8, KeyModifiers.Control); // M92 + RegisterHotKey(Keys.NumPad9, KeyModifiers.Control); // M249 + RegisterHotKey(Keys.Left, KeyModifiers.Control); // Randomness Down + RegisterHotKey(Keys.Right, KeyModifiers.Control); // Randomness Up + RegisterHotKey(Keys.Up, KeyModifiers.Control); // Sensitivty Up + RegisterHotKey(Keys.Down, KeyModifiers.Control); // Sensitivity Down + RegisterHotKey(Keys.Add, KeyModifiers.Control); // Scopes + RegisterHotKey(Keys.Enter, KeyModifiers.Control); // Barrels + HotKeyPressed += new EventHandler(Hotkey.HotKeys_HotKeyPressed); + } + } + + public class Hotkey + { + + public static void OnHotKeyPressed(HotKeyEventArgs e) + { HotKeyPressed?.Invoke(null, e); } + + public static void HotKeys_HotKeyPressed(object sender, HotKeyEventArgs e) + { + switch (e.Key) + { + case Keys.NumPad0: + Variables.Menu.setEnabled(!Variables.Menu.isEnabled()); + break; + case Keys.NumPad1: + Weapons.setVariables(1); + break; + case Keys.NumPad2: + Weapons.setVariables(2); + break; + case Keys.NumPad3: + Weapons.setVariables(3); + break; + case Keys.NumPad4: + Weapons.setVariables(4); + break; + case Keys.NumPad5: + Weapons.setVariables(5); + break; + case Keys.NumPad6: + Weapons.setVariables(6); + break; + case Keys.NumPad7: + Weapons.setVariables(7); + break; + case Keys.NumPad8: + Weapons.setVariables(8); + break; + case Keys.NumPad9: + Weapons.setVariables(9); + break; + case Keys.Left: + Variables.Weapon.setRandomness(-1); + break; + case Keys.Right: + Variables.Weapon.setRandomness(1); + break; + case Keys.Up: + Variables.Settings.setSensitivity(1); + break; + case Keys.Down: + Variables.Settings.setSensitivity(-1); + break; + case Keys.Add: + Variables.Weapon.scopeIndex++; + Variables.Weapon.changeScope(); + break; + case Keys.Enter: + Variables.Weapon.barrelIndex++; + Variables.Weapon.changeBarrel(); + break; + } + Console.Clear(); + Display.PrintHeader(); + } + } + } +} diff --git a/Aurium/Properties/AssemblyInfo.cs b/Aurium/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..aea7a29 --- /dev/null +++ b/Aurium/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Aurium")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Aurium")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("562c2be9-6687-4837-ad88-4af1de412231")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Aurium/Tables.cs b/Aurium/Tables.cs new file mode 100644 index 0000000..07404a5 --- /dev/null +++ b/Aurium/Tables.cs @@ -0,0 +1,113 @@ +using static Aurium.Variables.Weapon; + +namespace Aurium +{ + class Weapons + { + private static readonly int[,] AssaultRifle = { { -69, 100 }, { 10, 92 }, { -110, 83 }, { -85, 75 }, { 0, 67 }, { 33, 57 }, { 58, 48 }, { 76, 39 }, { 84, 29 }, { 85, 19 }, { 76, 20 }, { 60, 37 }, { 34, 50 }, { 2, 59 }, { -30, 65 }, { -55, 67 }, { -74, 64 }, { -86, 59 }, { -92, 49 }, { -91, 34 }, { -84, 17 }, { -70, 10 }, { -49, 28 }, { -22, 42 }, { 24, 51 }, { 72, 56 }, { 97, 57 }, { 98, 51 }, { 77, 43 } }; + private static readonly double[] AssaultRifleControlTime = { 121.96149709966872, 92.6333814724611, 138.60598637206294, 113.37874368443146, 66.25151186427745, 66.29530438019354, 75.9327831420658, 85.05526144256157, 89.20256669256554, 86.68010184667988, 78.82145888317788, 70.0451048111144, 60.85979604582978, 59.51642457624619, 71.66762996283607, 86.74060009403034, 98.3363599080854, 104.34161954944257, 104.09299204005345, 97.58780746901739, 85.48062700875559, 70.4889202349561, 56.56417811530545, 47.386907899993936, 56.63787408680247, 91.5937793023631, 112.38667610336424, 111.39338971888095, 87.5067801164596 }; + + private static readonly int[,] LR300AssaultRifle = { { 0, 50 }, { -11, 60 }, { -22, 67 }, { -28, 59 }, { -31, 50 }, { -29, 42 }, { -9, 38 }, { -9, 30 }, { 23, 25 }, { 36, 24 }, { 35, 13 }, { 40, 19 }, { 18, 6 }, { 0, 17 }, { -13, 6 }, { -16, 5 }, { -19, 6 }, { -34, 12 }, { -31, 2 }, { -29, 5 }, { -28, 0 }, { -21, 5 }, { -12, 13 }, { -7, 0 }, { 19, 5 }, { 3, 11 }, { 61, 0 }, { 73, 0 }, { 54, 6 }, { 0, 8 }, { 50, 0 } }; + private static readonly double[] LRControlTime = { 50.486527, 63.409837, 69.352231, 69.019084, 60.342866, 50.279209, 40.623896, 30.626204, 31.369554, 40.533283, 43.897277, 38.230196, 23.219868, 9.947927, 14.267603, 20.268351, 25.386810, 29.051251, 31.098685, 31.469423, 30.140472, 27.108869, 22.395387, 16.088652, 8.546886, 27.487437, 61.533720, 72.697228, 60.831257 }; + + private static readonly int[,] SemiAutomaticRifle = { { 0, 80 }, { 0, 80 } }; + private static readonly double[] SemiControlTime = { 175 }; + + private static readonly int[,] CustomSMG = { { -28, 52 }, { -10, 53 }, { 0, 53 }, { 11, 44 }, { 20, 45 }, { 22, 42 }, { 17, 35 }, { 7, 30 }, { -9, 27 }, { -13, 28 }, { -23, 22 }, { -21, 21 }, { -15, 24 }, { 0, 13 }, { 20, 14 }, { 16, 12 }, { 29, 19 }, { 7, 6 }, { 11, 10 }, { -4, 8 }, { -8, 13 }, { -7, 2 }, { -13, 14 }, { 0, 0 } }; + private static readonly double[] CustomSMGControlTime = { 72.942129, 66.636213, 62.974812, 61.750535, 60.935042, 57.200952, 49.164097, 38.976078, 35.006739, 37.638419, 39.187920, 36.075356, 28.171659, 21.234233, 24.358432, 28.987042, 29.927871, 26.070199, 18.119360, 13.438176, 16.856357, 19.274035, 18.320346 }; + + private static readonly int[,] MP5A4 = { { 0, 43 }, { 0, 58 }, { 0, 65 }, { 25, 66 }, { 59, 58 }, { 63, 42 }, { 46, 27 }, { 3, 23 }, { -37, 19 }, { -47, 18 }, { -40, 18 }, { -8, 7 }, { 16, 12 }, { 28, 11 }, { 35, 9 }, { 34, 8 }, { 25, 6 }, { 12, 0 }, { -4, 2 }, { -6, 2 }, { -18, 0 }, { -27, 5 }, { -26, 0 }, { -27, 0 }, { -20, 0 }, { -32, 0 }, { -12, 0 }, { -25, 0 }, { -4, 0 }, { 0, 0 }, { 43, 0 }, { 0, 0 } }; + private static readonly double[] MP5A4ControlTime = { 43.441909, 58.669031, 66.411108, 71.385438, 83.641583, 79.398875, 52.763157, 21.615756, 40.987258, 52.649410, 42.242421, 15.073904, 19.158961, 29.407978, 34.560589, 33.587834, 26.295315, 12.769285, 4.207833, 10.980831, 17.070518, 21.744130, 24.917849, 26.570261, 26.693439, 25.283775, 22.339392, 17.859221, 11.842602 }; + + private static readonly int[,] Thompson = { { -29, 63 }, { -12, 61 }, { 9, 61 }, { 21, 55 }, { 25, 52 }, { 21, 43 }, { 5, 32 }, { -16, 33 }, { -24, 25 }, { -24, 26 }, { -14, 21 }, { 7, 17 }, { 16, 18 }, { 23, 16 }, { 25, 17 }, { 8, 16 }, { -5, 5 }, { -13, 15 }, { -14, 8 } }; + private static readonly double[] ThompsonControlTime = { 86.598887, 78.347140, 74.408310, 73.568908, 69.211680, 57.652541, 44.231602, 43.172386, 46.847870, 43.832255, 32.594771, 25.597451, 32.269315, 36.054248, 31.898137, 20.621504, 16.997289, 22.046002, 22.690070 }; + + private static readonly int[,] M92 = { { 0, 68 }, { 0, 68 } }; + private static readonly double[] M92Time = { 100 }; + + private static readonly int[,] M39 = { { 0, 90 }, { 0, 90 } }; + private static readonly double[] M39ControlTime = { 200 }; + + private static readonly int[,] M249 = { { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, + { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 }, { 0, 85 } }; + private static readonly double[] M249ControlTime = { 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000, 151.250000 }; + + public static void setVariables(int weaponIndex) + { + switch (weaponIndex) + { + case 1: // AssaultRifle + setName("Assault Rifle"); + setRecoilPattern(AssaultRifle); + setShotDelay(AssaultRifleControlTime); + setShootingMilliSec(133); + setAmmo(29); + break; + case 2: // Custom SMG + setName("Custom SMG"); + setRecoilPattern(CustomSMG); + setShotDelay(CustomSMGControlTime); + setShootingMilliSec(100); + setAmmo(23); + break; + case 3: // LR-300 Assault Rifle + setName("LR-300 Assault Rifle"); + setRecoilPattern(LR300AssaultRifle); + setShotDelay(LRControlTime); + setShootingMilliSec(120); + setAmmo(29); + break; + case 4: // M39 + setName("M39"); + setRecoilPattern(M39); + setShotDelay(M39ControlTime); + setShootingMilliSec(200); + setAmmo(1); + break; + case 5: // M92 + setName("M92"); + setRecoilPattern(M92); + setShotDelay(M92Time); + setShootingMilliSec(100); + setAmmo(1); + break; + case 6: // M249 + setName("M249"); + setRecoilPattern(M249); + setShotDelay(M249ControlTime); + setShootingMilliSec(120); + setAmmo(99); + break; + case 7: // MP5A4 + setName("MP5A4"); + setRecoilPattern(MP5A4); + setShotDelay(MP5A4ControlTime); + setShootingMilliSec(100); + setAmmo(29); + break; + case 8: // Semi-Automatic Rifle + setName("Semi-Automatic Rifle"); + setRecoilPattern(SemiAutomaticRifle); + setShotDelay(SemiControlTime); + setShootingMilliSec(175); + setAmmo(1); + break; + case 9: // Thompson + setName("Thompson"); + setRecoilPattern(Thompson); + setShotDelay(ThompsonControlTime); + setShootingMilliSec(130); + setAmmo(19); + break; + } + } + } +} diff --git a/Aurium/Variables.cs b/Aurium/Variables.cs new file mode 100644 index 0000000..7ee23ef --- /dev/null +++ b/Aurium/Variables.cs @@ -0,0 +1,194 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Aurium +{ + class Variables + { + public class Menu + { + // ENABLED // + private static bool Enabled { get; set; } = false; + public static bool isEnabled() + { return Enabled; } + public static void setEnabled(bool boolean) + { Enabled = boolean; } + } + + public class Weapon + { + // WEAPON NAME // + private static string Name { get; set; } = string.Empty; + public static string getName() + { + if (!String.IsNullOrEmpty(Name)) return Name; + else return "None"; + } + public static void setName(string newName) + { Name = newName; } + + // AMMO // + private static int Ammo { get; set; } = 0; + public static int getAmmo() + { return Ammo; } + public static void setAmmo(int AmmoSize) + { Ammo = AmmoSize; } + + // RECOIL X / Y // + private static int[,] ActiveRecoil { get; set; } = { { 0, 0 } }; + public static int getRecoilX(int Bullet) + { return ActiveRecoil[Bullet, 0]; } + public static int getRecoilY(int Bullet) + { return ActiveRecoil[Bullet, 1]; } + public static void setRecoilPattern(int[,] Pattern) + { ActiveRecoil = Pattern; } + + // DELAY // + private static double[] Delay { get; set; } = { 0 }; + public static double getShotDelay(int Bullet) + { return Delay[Bullet]; } + public static void setShotDelay(double[] Delays) + { Delay = Delays; } + + // SHOOTING MILLISECONDS // + private static int ShootingMilliSec { get; set; } = 0; + public static int getShootingMilliSec() + { return ShootingMilliSec; } + public static void setShootingMilliSec(int MilliSec) + { ShootingMilliSec = MilliSec; } + + // SCOPES ATTACHMENTS // + public static int scopeIndex { get; set; } = 0; + private static string Scope { get; set; } = "None"; + private static double ScopeMulitplier { get; set; } = 1.0; + public static string getActiveScope() + { + if (!string.IsNullOrEmpty(Scope) && Scope != "None") + return Scope; + else return "None"; + } + public static void changeScope() + { + switch (scopeIndex) + { + case 0: // None + Scope = "None"; + ScopeMulitplier = 1.0; + break; + case 1: // Simple + Scope = "Simple Handmade Sight"; + ScopeMulitplier = 0.8; + break; + case 2: // Holo + Scope = "Holosight"; + ScopeMulitplier = 1.2; + break; + case 3: // 8x + Scope = "8x Zoom Scope"; + ScopeMulitplier = 3.83721; + break; + case 4: // 16x + Scope = "16x Zoom Scope"; + ScopeMulitplier = 7.65116; + scopeIndex = -1; + break; + } + } + + public static double getScopeMulitplier() + { return ScopeMulitplier; } + + // BARREL ATTACHMENTS // + public static int barrelIndex { get; set; } = 0; + private static string Barrel { get; set; } = "None"; + private static double BarrelMultiplier { get; set; } = 1.0; + public static string getActiveBarrel() + { + if (!string.IsNullOrEmpty(Barrel) && Barrel != "None") + return Barrel; + else return "None"; + } + public static void changeBarrel() + { + switch (barrelIndex) + { + case 0: // None + Barrel = "None"; + BarrelMultiplier = 1.0; + break; + case 1: // Silencer + Barrel = "Silencer"; + BarrelMultiplier = 0.8; + break; + case 2: // Muzzle Boost + Barrel = "Muzzle Boost"; + BarrelMultiplier = 1.0; + MuzzleBoost = true; + break; + case 3: // Muzzle Break + Barrel = "Muzzle Break"; + BarrelMultiplier = 0.5; + barrelIndex = -1; + MuzzleBoost = false; + break; + } + } + public static double getBarrelMultiplier() + { return BarrelMultiplier; } + + // MUZZLE BOOST // + private static bool MuzzleBoost { get; set; } = false; + public static double isMuzzleBoost(double MilliSec) + { + if (MuzzleBoost) + return (MilliSec - (MilliSec * 0.1f)); + else + return MilliSec; + } + + // RANDOMNESS // + private static double Randomness { get; set; } = 5.0; + public static void setRandomness(int RandomnessIndex) + { + switch (RandomnessIndex) + { + case -1: + if (0 < Randomness) + Randomness--; + break; + case 1: + if (Randomness < 10) + Randomness++; + break; + } + } + public static double getRandomness() + { return Randomness; } + } + + public class Settings + { + // SENSITIVITY // + private static double Sensitivity { get; set; } = 1.0; + public static void setSensitivity(int SensitivityIndex) + { + switch (SensitivityIndex) + { + case -1: + if (0.2 < Sensitivity) + Sensitivity -= 0.1; + break; + case 1: + if (Sensitivity < 2.0) + Sensitivity += 0.1; + break; + } + } + public static double getSensitivity() + { return Sensitivity; } + } + } +}