From 1be90d9ec6637640f580f8d383d298886acc3131 Mon Sep 17 00:00:00 2001 From: Robert Quinn Date: Tue, 8 Jun 2021 18:29:59 -0400 Subject: [PATCH] Add project files. --- Aurium.sln | 25 ++++ Aurium/App.config | 6 + Aurium/Aurium.csproj | 65 ++++++++++ Aurium/Aurium.ico | Bin 0 -> 5705 bytes Aurium/Beam.cs | 72 +++++++++++ Aurium/DLLImports.cs | 14 +++ Aurium/Display.cs | 90 ++++++++++++++ Aurium/Hotkeys.cs | 170 ++++++++++++++++++++++++++ Aurium/Properties/AssemblyInfo.cs | 36 ++++++ Aurium/Tables.cs | 113 +++++++++++++++++ Aurium/Variables.cs | 194 ++++++++++++++++++++++++++++++ 11 files changed, 785 insertions(+) create mode 100644 Aurium.sln create mode 100644 Aurium/App.config create mode 100644 Aurium/Aurium.csproj create mode 100644 Aurium/Aurium.ico create mode 100644 Aurium/Beam.cs create mode 100644 Aurium/DLLImports.cs create mode 100644 Aurium/Display.cs create mode 100644 Aurium/Hotkeys.cs create mode 100644 Aurium/Properties/AssemblyInfo.cs create mode 100644 Aurium/Tables.cs create mode 100644 Aurium/Variables.cs 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 0000000000000000000000000000000000000000..57a4a48630d8c871ff6bd5f0d6adb7b16b535be3 GIT binary patch literal 5705 zcmV-P7PjdC00962000000096X05cW<02TlM0EtjeM-2)Z3IG5A4M|8uQUCw}00001 z00;&E003NasAd2F00D1uPE-NUqIa4A02S>?L_t(|+U=bUuoTsmfSW%NTom0!cs&?V ziIT|1+D%FR)ksWq{fS0|mBhGYHOabau~8Ef7u4)ltyUS3>3JwbR?z&_W;a2_kdnk7 z^aX-J6t=Qkm1HY|(ZU}qF@B`slVcQ`_oHXi0UJ<&4rNTFb zOTwZ*Y46=*hVaWFNUJk?;Exa^`lxW7aKG?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8Kpbg+kd`XDv-5@*e{j9A1w-dweSd4hyy|$=%YG@<-k80jY8aY z1||O}QRK^oWx`gByU%O2G)4Cdm7oKoN3tioI}1ain893Ob?_Rn6pb ziQf4L61(gvR*xPvJ8`OTW#k~f6FG?$QBM5EsO!zv=o+ 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; } + } + } +}