|
| 1 | +using System; |
| 2 | +using System.Collections.Generic; |
| 3 | +using System.Linq; |
| 4 | +using System.Numerics; |
| 5 | +using System.Text; |
| 6 | +using System.Threading; |
| 7 | +using System.Threading.Tasks; |
| 8 | +using Chrones.Cmr; |
| 9 | + |
| 10 | +namespace ChronClient.Modules |
| 11 | +{ |
| 12 | + public static class ModuleCommandManagment |
| 13 | + { |
| 14 | + public static bool ProcessCommand(string command) |
| 15 | + { |
| 16 | + #region Standard |
| 17 | + |
| 18 | + if (command == "module list" || command == "mod list" || command == "list module" || command == "list mod") |
| 19 | + { |
| 20 | + Console.Write($"{cmr.cr}"); |
| 21 | + cmr.ccoutl($"{cmr.cf(255, 59, 59)}ChronClient", $"{cmr.cf(255, 253, 112)}Listing the Modules that ChronClient has:"); |
| 22 | + Console.Write($"{cmr.cf(220, 220, 220)}╔═════════ {cmr.cf(176, 255, 158)}Module List{cmr.tr} ═════════╗\n"); Console.Write($"{cmr.cr}"); |
| 23 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ┌ {cmr.cf(171, 230, 255)}TabGUI{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 24 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}ListGUI{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 25 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}Airjump{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 26 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}Speed{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 27 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}Reach{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 28 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}AutoClick{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 29 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}NoKnockBack{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 30 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}NoFall{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 31 | + Console.Write($"{cmr.cf(220, 220, 220)}║ └ {cmr.cf(171, 230, 255)}NoSwing{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 32 | + Console.Write($"{cmr.cf(220, 220, 220)}╚═══════════════════════════════╝\n"); Console.Write($"{cmr.cr}"); |
| 33 | + Console.Write($"{cmr.cr}"); |
| 34 | + } else if (command == "list") |
| 35 | + { |
| 36 | + Console.Write($"{cmr.cr}"); |
| 37 | + cmr.ccoutl($"{cmr.cf(255, 59, 59)}ChronClient", $"{cmr.cf(255, 253, 112)}Listing the Commands that ChronClient has:"); |
| 38 | + Console.Write($"{cmr.cf(220, 220, 220)}╔═════════ {cmr.cf(176, 255, 158)}Command List{cmr.tr} ═════════╗\n"); Console.Write($"{cmr.cr}"); |
| 39 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ┌ {cmr.cf(171, 230, 255)}help{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 40 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}list{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 41 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}module{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 42 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}discord{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 43 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}patreon{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 44 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}update{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 45 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}about{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 46 | + Console.Write($"{cmr.cf(220, 220, 220)}║ ├ {cmr.cf(171, 230, 255)}clear{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 47 | + Console.Write($"{cmr.cf(220, 220, 220)}║ └ {cmr.cf(171, 230, 255)}exit{cmr.cf(220, 220, 220)} ║\n"); Console.Write($"{cmr.cr}"); |
| 48 | + Console.Write($"{cmr.cf(220, 220, 220)}╚════════════════════════════════╝\n"); Console.Write($"{cmr.cr}"); |
| 49 | + } |
| 50 | + |
| 51 | + if (command == "discord") |
| 52 | + { |
| 53 | + cmr.ccoutl("ChronClient", "Do you want to open the Discord invite link in your browser? [Y|N]"); |
| 54 | + Console.Write($"{cmr.cf(153, 242, 194)}[]{cmr.cr} {cmr.cf(255, 59, 59)}<{cmr.cr} {cmr.cf(255, 241, 89)}{cmr.cb(44, 49, 54)}"); |
| 55 | + ConsoleKeyInfo ResultKey; |
| 56 | + ResultKey = Console.ReadKey(); |
| 57 | + Console.WriteLine($"{cmr.cr}"); |
| 58 | + if (ResultKey.Key == ConsoleKey.Y) |
| 59 | + { |
| 60 | + System.Diagnostics.Process.Start("http://discord.chrones.cc"); |
| 61 | + cmr.clogl("ChronClient", "The Discord Link was opened in your browser."); |
| 62 | + } else |
| 63 | + { |
| 64 | + cmr.ccoutl("ChronClient", "Stopped."); |
| 65 | + } |
| 66 | + } |
| 67 | + |
| 68 | +#endregion |
| 69 | + |
| 70 | + #region Module |
| 71 | + if (command == "speed.value") |
| 72 | + { |
| 73 | + Console.Write($"{cmr.cf(173, 255, 243)}{cmr.cb(16, 26, 24)}Enter the value here:{cmr.cr} {cmr.cf(255, 255, 255)}"); |
| 74 | + float value; |
| 75 | + try |
| 76 | + { |
| 77 | + value = Convert.ToSingle(Console.ReadLine()); |
| 78 | + value = value / 100; |
| 79 | + Module.Speed.Value = value; |
| 80 | + Console.Write($"{cmr.cr}"); |
| 81 | + cmr.clogl("Module_Speed", $"Speedvalue set to {value}{cmr.cr}"); |
| 82 | + } |
| 83 | + catch |
| 84 | + { |
| 85 | + Console.Write($"{cmr.cr}"); |
| 86 | + Console.WriteLine($"{cmr.cf(255, 30, 30)}There was an error!{cmr.cr}"); |
| 87 | + } |
| 88 | + } |
| 89 | + |
| 90 | + if (command == "highjump.value") |
| 91 | + { |
| 92 | + Console.Write($"{cmr.cf(173, 255, 243)}{cmr.cb(16, 26, 24)}Enter the value here:{cmr.cr} {cmr.cf(255, 255, 255)}"); |
| 93 | + float value; |
| 94 | + try |
| 95 | + { |
| 96 | + value = Convert.ToSingle(Console.ReadLine()); |
| 97 | + value = value / 100; |
| 98 | + Module.Highjump.Value = value; |
| 99 | + Module.Highjump.Refresh(); |
| 100 | + Console.Write($"{cmr.cr}"); |
| 101 | + cmr.clogl("Module_Highjump", $"Speedvalue set to {value}{cmr.cr}"); |
| 102 | + } |
| 103 | + catch |
| 104 | + { |
| 105 | + Console.Write($"{cmr.cr}"); |
| 106 | + Console.WriteLine($"{cmr.cf(255, 30, 30)}There was an error!{cmr.cr}"); |
| 107 | + } |
| 108 | + } |
| 109 | + |
| 110 | + if (command == "tp" || command == "teleport") |
| 111 | + { |
| 112 | + |
| 113 | + } |
| 114 | + |
| 115 | + if (command == "pos" || command == "position" || command == "get pos" || command == "get position" || command == "pos get" || command == "position get") |
| 116 | + { |
| 117 | + Vector3 Position = Module.Teleport.GetPosition(); |
| 118 | + Console.WriteLine($"{cmr.cb(30, 32, 36)}{cmr.cf(112, 119, 255)}X: {cmr.cf(166, 184, 255)}{Position.X} {cmr.cf(112, 119, 255)}Y: {cmr.cf(166, 184, 255)}{Position.Y} {cmr.cf(112, 119, 255)}Z: {cmr.cf(166, 184, 255)}{Position.Z}{cmr.cr}"); |
| 119 | + } |
| 120 | + |
| 121 | +#endregion |
| 122 | + |
| 123 | + return false; |
| 124 | + } |
| 125 | + |
| 126 | + public static void GetCommand() |
| 127 | + { |
| 128 | + cmr.EnableQuickEdit(); |
| 129 | + Console.Write($"{cmr.cf(153, 242, 194)}[]{cmr.cr} {cmr.cf(255, 59, 59)}<{cmr.cr} {cmr.cf(166, 216, 255)}"); |
| 130 | + string Input; |
| 131 | + Input = Console.ReadLine(); |
| 132 | + Console.Write($"{cmr.cr}"); |
| 133 | + cmr.DisableQuickEdit(); |
| 134 | + |
| 135 | + if (Input == "exit !" || Input == "exit!") |
| 136 | + { |
| 137 | + cmr.ccoutl($"{cmr.cf(255, 153, 0)}ChronClient", $"{cmr.cf(255, 153, 0)}Exiting..."); |
| 138 | + cmr.ExitApplication(false); |
| 139 | + } |
| 140 | + |
| 141 | + if (Input == "exit") |
| 142 | + { |
| 143 | + cmr.ExitApplicationPrint(); |
| 144 | + } |
| 145 | + |
| 146 | + if (Input == "clear") |
| 147 | + { |
| 148 | + Console.Clear(); |
| 149 | + cmr.clogl("ChronClient", "Console was cleared"); |
| 150 | + } |
| 151 | + |
| 152 | + if (Input == "clear !" || Input == "clear!") |
| 153 | + { |
| 154 | + Console.Clear(); |
| 155 | + } |
| 156 | + |
| 157 | + Modules.ModuleCommandManagment.ProcessCommand(Input); |
| 158 | + } |
| 159 | + } |
| 160 | +} |
0 commit comments