├── .gitattributes ├── .gitignore ├── Conan Exiles DMA.sln ├── ConanExilesDMA ├── Aimbot │ ├── Aimbot.cpp │ └── Aimbot.h ├── ConanExilesDMA.vcxproj ├── ConanExilesDMA.vcxproj.filters ├── Config │ ├── AimbotConfig.h │ ├── AnimalConfig.h │ ├── BuildableConfig.h │ ├── ConfigInstance.h │ ├── ConfigUtilities.cpp │ ├── ConfigUtilities.h │ ├── MiscConfig.h │ ├── OtherEspConfig.h │ ├── Overlay.h │ └── PlayerConfig.h ├── ESP │ ├── AnimalEsp.cpp │ ├── AnimalEsp.h │ ├── BuildingEsp.cpp │ ├── BuildingEsp.h │ ├── OtherEsp.cpp │ ├── OtherEsp.h │ ├── PlayerEsp.cpp │ └── PlayerEsp.h ├── Globals.h ├── Graphics │ ├── Drawing.cpp │ ├── Drawing.h │ ├── Entities │ │ ├── Button.cpp │ │ ├── Button.h │ │ ├── ColourPicker.cpp │ │ ├── ColourPicker.h │ │ ├── ComboBox.cpp │ │ ├── ComboBox.h │ │ ├── DropDown.cpp │ │ ├── DropDown.h │ │ ├── Entity.cpp │ │ ├── Entity.h │ │ ├── Form.cpp │ │ ├── Form.h │ │ ├── KeyBind.cpp │ │ ├── KeyBind.h │ │ ├── Label.cpp │ │ ├── Label.h │ │ ├── Slider.h │ │ ├── Tab.cpp │ │ ├── Tab.h │ │ ├── TabController.cpp │ │ ├── TabController.h │ │ ├── TabListBox.cpp │ │ ├── TabListBox.h │ │ ├── TabListBoxController.cpp │ │ ├── TabListBoxController.h │ │ ├── TextBox.cpp │ │ ├── TextBox.h │ │ ├── Toggle.cpp │ │ └── Toggle.h │ ├── Graphics.h │ ├── Start Up │ │ ├── GUI.cpp │ │ ├── GUI.h │ │ ├── Init.cpp │ │ └── Init.h │ └── Utility │ │ ├── Animation.cpp │ │ ├── Animation.h │ │ ├── Colour.cpp │ │ ├── Colour.h │ │ ├── Font.cpp │ │ └── Font.h ├── Main.cpp ├── Memory │ ├── InputManager.cpp │ ├── InputManager.h │ ├── Memory.cpp │ ├── Memory.h │ ├── Registry.cpp │ └── Registry.h ├── Misc │ ├── CheatFunction.cpp │ ├── CheatFunction.h │ ├── Input.cpp │ ├── Input.h │ ├── Kmbox.cpp │ ├── Kmbox.h │ ├── Pch │ │ ├── Pch.cpp │ │ └── Pch.h │ ├── Vector.cpp │ └── Vector.h ├── SDK │ ├── ActorEntity.cpp │ ├── ActorEntity.h │ ├── Camera.cpp │ ├── Camera.h │ ├── Engine.cpp │ ├── Engine.h │ └── EngineStructs.h └── Security │ └── XorStr.h ├── Images ├── 1.png ├── 2.png ├── 3.png └── 4.png ├── Include ├── json.hpp ├── leechcore.h └── vmmdll.h ├── Instructions.md ├── LICENSE ├── Lib ├── FTD3XX.lib ├── leechcore.lib └── vmm.lib └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Mono auto generated files 17 | mono_crash.* 18 | 19 | # Build results 20 | [Dd]ebug/ 21 | [Dd]ebugPublic/ 22 | [Rr]elease/ 23 | [Rr]eleases/ 24 | x64/ 25 | x86/ 26 | [Ww][Ii][Nn]32/ 27 | [Aa][Rr][Mm]/ 28 | [Aa][Rr][Mm]64/ 29 | bld/ 30 | [Bb]in/ 31 | [Oo]bj/ 32 | [Oo]ut/ 33 | [Ll]og/ 34 | [Ll]ogs/ 35 | 36 | # Visual Studio 2015/2017 cache/options directory 37 | .vs/ 38 | # Uncomment if you have tasks that create the project's static files in wwwroot 39 | #wwwroot/ 40 | 41 | # Visual Studio 2017 auto generated files 42 | Generated\ Files/ 43 | 44 | # MSTest test Results 45 | [Tt]est[Rr]esult*/ 46 | [Bb]uild[Ll]og.* 47 | 48 | # NUnit 49 | *.VisualState.xml 50 | TestResult.xml 51 | nunit-*.xml 52 | 53 | # Build Results of an ATL Project 54 | [Dd]ebugPS/ 55 | [Rr]eleasePS/ 56 | dlldata.c 57 | 58 | # Benchmark Results 59 | BenchmarkDotNet.Artifacts/ 60 | 61 | # .NET Core 62 | project.lock.json 63 | project.fragment.lock.json 64 | artifacts/ 65 | 66 | # ASP.NET Scaffolding 67 | ScaffoldingReadMe.txt 68 | 69 | # StyleCop 70 | StyleCopReport.xml 71 | 72 | # Files built by Visual Studio 73 | *_i.c 74 | *_p.c 75 | *_h.h 76 | *.ilk 77 | *.meta 78 | *.obj 79 | *.iobj 80 | *.pch 81 | *.pdb 82 | *.ipdb 83 | *.pgc 84 | *.pgd 85 | *.rsp 86 | *.sbr 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.tmp_proj 92 | *_wpftmp.csproj 93 | *.log 94 | *.vspscc 95 | *.vssscc 96 | .builds 97 | *.pidb 98 | *.svclog 99 | *.scc 100 | 101 | # Chutzpah Test files 102 | _Chutzpah* 103 | 104 | # Visual C++ cache files 105 | ipch/ 106 | *.aps 107 | *.ncb 108 | *.opendb 109 | *.opensdf 110 | *.sdf 111 | *.cachefile 112 | *.VC.db 113 | *.VC.VC.opendb 114 | 115 | # Visual Studio profiler 116 | *.psess 117 | *.vsp 118 | *.vspx 119 | *.sap 120 | 121 | # Visual Studio Trace Files 122 | *.e2e 123 | 124 | # TFS 2012 Local Workspace 125 | $tf/ 126 | 127 | # Guidance Automation Toolkit 128 | *.gpState 129 | 130 | # ReSharper is a .NET coding add-in 131 | _ReSharper*/ 132 | *.[Rr]e[Ss]harper 133 | *.DotSettings.user 134 | 135 | # TeamCity is a build add-in 136 | _TeamCity* 137 | 138 | # DotCover is a Code Coverage Tool 139 | *.dotCover 140 | 141 | # AxoCover is a Code Coverage Tool 142 | .axoCover/* 143 | !.axoCover/settings.json 144 | 145 | # Coverlet is a free, cross platform Code Coverage Tool 146 | coverage*.json 147 | coverage*.xml 148 | coverage*.info 149 | 150 | # Visual Studio code coverage results 151 | *.coverage 152 | *.coveragexml 153 | 154 | # NCrunch 155 | _NCrunch_* 156 | .*crunch*.local.xml 157 | nCrunchTemp_* 158 | 159 | # MightyMoose 160 | *.mm.* 161 | AutoTest.Net/ 162 | 163 | # Web workbench (sass) 164 | .sass-cache/ 165 | 166 | # Installshield output folder 167 | [Ee]xpress/ 168 | 169 | # DocProject is a documentation generator add-in 170 | DocProject/buildhelp/ 171 | DocProject/Help/*.HxT 172 | DocProject/Help/*.HxC 173 | DocProject/Help/*.hhc 174 | DocProject/Help/*.hhk 175 | DocProject/Help/*.hhp 176 | DocProject/Help/Html2 177 | DocProject/Help/html 178 | 179 | # Click-Once directory 180 | publish/ 181 | 182 | # Publish Web Output 183 | *.[Pp]ublish.xml 184 | *.azurePubxml 185 | # Note: Comment the next line if you want to checkin your web deploy settings, 186 | # but database connection strings (with potential passwords) will be unencrypted 187 | *.pubxml 188 | *.publishproj 189 | 190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 191 | # checkin your Azure Web App publish settings, but sensitive information contained 192 | # in these scripts will be unencrypted 193 | PublishScripts/ 194 | 195 | # NuGet Packages 196 | *.nupkg 197 | # NuGet Symbol Packages 198 | *.snupkg 199 | # The packages folder can be ignored because of Package Restore 200 | **/[Pp]ackages/* 201 | # except build/, which is used as an MSBuild target. 202 | !**/[Pp]ackages/build/ 203 | # Uncomment if necessary however generally it will be regenerated when needed 204 | #!**/[Pp]ackages/repositories.config 205 | # NuGet v3's project.json files produces more ignorable files 206 | *.nuget.props 207 | *.nuget.targets 208 | 209 | # Microsoft Azure Build Output 210 | csx/ 211 | *.build.csdef 212 | 213 | # Microsoft Azure Emulator 214 | ecf/ 215 | rcf/ 216 | 217 | # Windows Store app package directories and files 218 | AppPackages/ 219 | BundleArtifacts/ 220 | Package.StoreAssociation.xml 221 | _pkginfo.txt 222 | *.appx 223 | *.appxbundle 224 | *.appxupload 225 | 226 | # Visual Studio cache files 227 | # files ending in .cache can be ignored 228 | *.[Cc]ache 229 | # but keep track of directories ending in .cache 230 | !?*.[Cc]ache/ 231 | 232 | # Others 233 | ClientBin/ 234 | ~$* 235 | *~ 236 | *.dbmdl 237 | *.dbproj.schemaview 238 | *.jfm 239 | *.pfx 240 | *.publishsettings 241 | orleans.codegen.cs 242 | 243 | # Including strong name files can present a security risk 244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 245 | #*.snk 246 | 247 | # Since there are multiple workflows, uncomment next line to ignore bower_components 248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 249 | #bower_components/ 250 | 251 | # RIA/Silverlight projects 252 | Generated_Code/ 253 | 254 | # Backup & report files from converting an old project file 255 | # to a newer Visual Studio version. Backup files are not needed, 256 | # because we have git ;-) 257 | _UpgradeReport_Files/ 258 | Backup*/ 259 | UpgradeLog*.XML 260 | UpgradeLog*.htm 261 | ServiceFabricBackup/ 262 | *.rptproj.bak 263 | 264 | # SQL Server files 265 | *.mdf 266 | *.ldf 267 | *.ndf 268 | 269 | # Business Intelligence projects 270 | *.rdl.data 271 | *.bim.layout 272 | *.bim_*.settings 273 | *.rptproj.rsuser 274 | *- [Bb]ackup.rdl 275 | *- [Bb]ackup ([0-9]).rdl 276 | *- [Bb]ackup ([0-9][0-9]).rdl 277 | 278 | # Microsoft Fakes 279 | FakesAssemblies/ 280 | 281 | # GhostDoc plugin setting file 282 | *.GhostDoc.xml 283 | 284 | # Node.js Tools for Visual Studio 285 | .ntvs_analysis.dat 286 | node_modules/ 287 | 288 | # Visual Studio 6 build log 289 | *.plg 290 | 291 | # Visual Studio 6 workspace options file 292 | *.opt 293 | 294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 295 | *.vbw 296 | 297 | # Visual Studio LightSwitch build output 298 | **/*.HTMLClient/GeneratedArtifacts 299 | **/*.DesktopClient/GeneratedArtifacts 300 | **/*.DesktopClient/ModelManifest.xml 301 | **/*.Server/GeneratedArtifacts 302 | **/*.Server/ModelManifest.xml 303 | _Pvt_Extensions 304 | 305 | # Paket dependency manager 306 | .paket/paket.exe 307 | paket-files/ 308 | 309 | # FAKE - F# Make 310 | .fake/ 311 | 312 | # CodeRush personal settings 313 | .cr/personal 314 | 315 | # Python Tools for Visual Studio (PTVS) 316 | __pycache__/ 317 | *.pyc 318 | 319 | # Cake - Uncomment if you are using it 320 | # tools/** 321 | # !tools/packages.config 322 | 323 | # Tabs Studio 324 | *.tss 325 | 326 | # Telerik's JustMock configuration file 327 | *.jmconfig 328 | 329 | # BizTalk build output 330 | *.btp.cs 331 | *.btm.cs 332 | *.odx.cs 333 | *.xsd.cs 334 | 335 | # OpenCover UI analysis results 336 | OpenCover/ 337 | 338 | # Azure Stream Analytics local run output 339 | ASALocalRun/ 340 | 341 | # MSBuild Binary and Structured Log 342 | *.binlog 343 | 344 | # NVidia Nsight GPU debugger configuration file 345 | *.nvuser 346 | 347 | # MFractors (Xamarin productivity tool) working folder 348 | .mfractor/ 349 | 350 | # Local History for Visual Studio 351 | .localhistory/ 352 | 353 | # BeatPulse healthcheck temp database 354 | healthchecksdb 355 | 356 | # Backup folder for Package Reference Convert tool in Visual Studio 2017 357 | MigrationBackup/ 358 | 359 | # Ionide (cross platform F# VS Code tools) working folder 360 | .ionide/ 361 | 362 | # Fody - auto-generated XML schema 363 | FodyWeavers.xsd -------------------------------------------------------------------------------- /Conan Exiles DMA.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.7.34003.232 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ConanExilesDMA", "ConanExilesDMA\ConanExilesDMA.vcxproj", "{8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Debug|x64.ActiveCfg = Debug|x64 17 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Debug|x64.Build.0 = Debug|x64 18 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Debug|x86.ActiveCfg = Debug|Win32 19 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Debug|x86.Build.0 = Debug|Win32 20 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Release|x64.ActiveCfg = Release|x64 21 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Release|x64.Build.0 = Release|x64 22 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Release|x86.ActiveCfg = Release|Win32 23 | {8CBA9E6C-73A9-49D7-AAFD-AD74FF639CAD}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {1DB9EA1C-37A1-43E7-970A-B78020A9EE4C} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /ConanExilesDMA/Aimbot/Aimbot.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "aimbot.h" 3 | #include "PlayerEsp.h" 4 | #include "globals.h" 5 | #include "CheatFunction.h" 6 | #include "Drawing.h" 7 | #include "ConfigInstance.h" 8 | #include "ConfigUtilities.h" 9 | #include "Kmbox.h" 10 | #include "InputManager.h" 11 | #include "Camera.h" 12 | 13 | void AimbotDrawing() 14 | { 15 | Vector2 centreofscreen = Vector2(Configs.Overlay.OverrideResolution ? Configs.Overlay.Width / 2 : GetSystemMetrics(SM_CXSCREEN) / 2, Configs.Overlay.OverrideResolution ? Configs.Overlay.Height /2 : GetSystemMetrics(SM_CYSCREEN) /2); 16 | if (Configs.Aimbot.DrawFOV) 17 | { 18 | OutlineCircle(centreofscreen.x, centreofscreen.y, Configs.Aimbot.FOV,2, Configs.Aimbot.FOVColour); 19 | } 20 | } 21 | int ConditionalSwapPlayer(std::vector>& entities, int low, int high) 22 | { 23 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 24 | std::shared_ptr pivot = entities[high]; 25 | int i = low - 1; 26 | Vector2 centreofscreen = Vector2(Configs.Overlay.OverrideResolution ? Configs.Overlay.Width / 2 : GetSystemMetrics(SM_CXSCREEN) / 2, Configs.Overlay.OverrideResolution ? Configs.Overlay.Height /2 : GetSystemMetrics(SM_CYSCREEN) /2); 27 | for (int j = low; j < high; ++j) 28 | { 29 | if (Configs.Aimbot.Priority == 2) 30 | { 31 | if (Vector2::Distance(centreofscreen, Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,entities[j]->GetHeadPosition())) < Vector2::Distance(centreofscreen, Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,pivot->GetHeadPosition()))) 32 | { 33 | ++i; 34 | std::swap(entities[i], entities[j]); 35 | continue; 36 | } 37 | if (Vector3::DistanceTo(campos, entities[j]->GetHeadPosition()) < Vector3::DistanceTo(campos, pivot->GetHeadPosition())) 38 | { 39 | ++i; 40 | std::swap(entities[i], entities[j]); 41 | } 42 | } 43 | if (Configs.Aimbot.Priority == 0) 44 | { 45 | if (Vector3::DistanceTo(campos, entities[j]->GetHeadPosition()) < Vector3::DistanceTo(campos, pivot->GetHeadPosition())) 46 | { 47 | ++i; 48 | std::swap(entities[i], entities[j]); 49 | } 50 | } 51 | if (Configs.Aimbot.Priority == 1) 52 | { 53 | if (Vector2::Distance(centreofscreen, Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,entities[j]->GetHeadPosition())) < Vector2::Distance(centreofscreen, Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,pivot->GetHeadPosition()))) 54 | { 55 | ++i; 56 | std::swap(entities[i], entities[j]); 57 | } 58 | } 59 | } 60 | std::swap(entities[i + 1], entities[high]); 61 | return i + 1; 62 | } 63 | 64 | void QuickSortPlayers(std::vector>& entities, int low, int high) 65 | { 66 | if (low < high) 67 | { 68 | int pi = ConditionalSwapPlayer(entities, low, high); 69 | QuickSortPlayers(entities, low, pi - 1); 70 | QuickSortPlayers(entities, pi + 1, high); 71 | } 72 | } 73 | 74 | std::shared_ptr AimbotTarget; 75 | 76 | void GetAimbotTarget() 77 | { 78 | if(!EngineInstance.load()) 79 | return; 80 | if(EngineInstance.load()->GetActorCount() <= 0) 81 | return; 82 | if (!Configs.Aimbot.Enable) 83 | return; 84 | Vector2 centreofscreen = Vector2(Configs.Overlay.OverrideResolution ? Configs.Overlay.Width / 2 : GetSystemMetrics(SM_CXSCREEN) / 2, Configs.Overlay.OverrideResolution ? Configs.Overlay.Height / 2 : GetSystemMetrics(SM_CYSCREEN) / 2); 85 | 86 | std::vector> templist; 87 | 88 | EngineInstance.load()->PlayersMutex.lock(); 89 | templist = EngineInstance.load()->GetPlayers(); 90 | EngineInstance.load()->PlayersMutex.unlock(); 91 | 92 | QuickSortPlayers(templist, 0, templist.size() - 1); 93 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 94 | for (std::shared_ptr player : templist) 95 | { 96 | if (player == nullptr) 97 | continue; 98 | if (((Vector3::DistanceTo(campos, player->GetPosition()) / 100.f) - 2) > Configs.Aimbot.MaxDistance) 99 | continue; 100 | if (Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,player->GetHeadPosition()) == Vector2::Zero()) 101 | continue; 102 | if (Vector2::Distance(Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,player->GetHeadPosition()), centreofscreen) > Configs.Aimbot.FOV) 103 | continue; 104 | if (player->GetHeadPosition().z <= player->GetPosition().z + 5) 105 | continue; 106 | AimbotTarget = player; 107 | // printf("Targeting: %s\n", AimbotTarget->GetName().c_str()); 108 | return; 109 | } 110 | AimbotTarget = nullptr; 111 | } 112 | 113 | bool AimKeyDown = false; 114 | std::shared_ptr UpdateAimKey = std::make_shared(50, [] { 115 | if (!EngineInstance.load()) 116 | return; 117 | if (EngineInstance.load()->GetActorCount() <= 0) 118 | return; 119 | if (!Configs.Aimbot.Enable) 120 | return; 121 | if (Keyboard::IsKeyDown(Configs.Aimbot.Aimkey)) 122 | { 123 | 124 | AimKeyDown = true; 125 | } 126 | else 127 | { 128 | AimKeyDown = false; 129 | } 130 | }); 131 | 132 | std::chrono::system_clock::time_point KmboxStart; 133 | void Aimbot() 134 | { 135 | UpdateAimKey->Execute(); 136 | if (!kmbox::connected || !AimKeyDown) 137 | { 138 | AimbotTarget = nullptr; 139 | return; 140 | } 141 | GetAimbotTarget(); 142 | if (AimbotTarget == nullptr) 143 | return; 144 | 145 | if (AimbotTarget->GetPosition() == Vector3::Zero()) 146 | { 147 | AimbotTarget = nullptr; 148 | return; 149 | } 150 | Vector2 screenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV,AimbotTarget->GetHeadPosition()); 151 | Vector2 centreofscreen = Vector2(Configs.Overlay.OverrideResolution ? Configs.Overlay.Width / 2 : GetSystemMetrics(SM_CXSCREEN) / 2, Configs.Overlay.OverrideResolution ? Configs.Overlay.Height / 2 : GetSystemMetrics(SM_CYSCREEN) / 2); 152 | if (Vector2::Distance(screenpos, centreofscreen) > Configs.Aimbot.FOV) 153 | return; 154 | if (AimbotTarget->GetHeadPosition().z <= AimbotTarget->GetPosition().z + 5) 155 | return; 156 | if (screenpos == Vector2::Zero()) 157 | { 158 | AimbotTarget = nullptr; 159 | return; 160 | } 161 | Vector2 diff = {0,0}; 162 | if (Configs.Aimbot.Smoothing > 0) 163 | { 164 | float x = screenpos.x - centreofscreen.x; 165 | float y = screenpos.y - centreofscreen.y; 166 | int smoothx = Configs.Aimbot.Smoothing; 167 | int smoothy = Configs.Aimbot.Smoothing; 168 | float randomnumber = (float)(rand() % 100001) / 100000; 169 | srand(__rdtsc()); 170 | diff.x = static_cast(std::round(x / ((smoothx > 1 ? smoothx / 2 : smoothx) 171 | + (float(rand() % ((int)(smoothx > 1 ? smoothx / 2 : smoothx)) + (float)(rand() % 5) + randomnumber))))); 172 | diff.y = static_cast(std::round(y / ((smoothy > 1 ? smoothy / 2 : smoothy) 173 | + (float(rand() % ((int)(smoothy > 1 ? smoothy / 2 : smoothy)) + (float)(rand() % 5) + randomnumber))))); 174 | 175 | } 176 | else 177 | { 178 | diff.x = screenpos.x - centreofscreen.x; 179 | diff.y = screenpos.y - centreofscreen.y; 180 | } 181 | float x = diff.x; 182 | float y = diff.y; 183 | if (KmboxStart + std::chrono::milliseconds(15) < std::chrono::system_clock::now()) 184 | { 185 | kmbox::move(x, y); 186 | KmboxStart = std::chrono::system_clock::now(); 187 | } 188 | 189 | } 190 | -------------------------------------------------------------------------------- /ConanExilesDMA/Aimbot/Aimbot.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern void Aimbot(); 3 | extern void AimbotDrawing(); -------------------------------------------------------------------------------- /ConanExilesDMA/ConanExilesDMA.vcxproj.filters: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | Source Files 47 | 48 | 49 | Source Files 50 | 51 | 52 | Source Files 53 | 54 | 55 | Source Files 56 | 57 | 58 | Source Files 59 | 60 | 61 | Source Files 62 | 63 | 64 | Source Files 65 | 66 | 67 | Source Files 68 | 69 | 70 | Source Files 71 | 72 | 73 | Source Files 74 | 75 | 76 | Source Files 77 | 78 | 79 | Source Files 80 | 81 | 82 | Source Files 83 | 84 | 85 | Source Files 86 | 87 | 88 | Source Files 89 | 90 | 91 | Source Files 92 | 93 | 94 | Source Files 95 | 96 | 97 | Source Files 98 | 99 | 100 | Source Files 101 | 102 | 103 | Source Files 104 | 105 | 106 | Source Files 107 | 108 | 109 | Source Files 110 | 111 | 112 | Source Files 113 | 114 | 115 | Source Files 116 | 117 | 118 | Source Files 119 | 120 | 121 | Source Files 122 | 123 | 124 | Source Files 125 | 126 | 127 | Source Files 128 | 129 | 130 | Source Files 131 | 132 | 133 | 134 | 135 | Header Files 136 | 137 | 138 | Header Files 139 | 140 | 141 | Header Files 142 | 143 | 144 | Header Files 145 | 146 | 147 | Header Files 148 | 149 | 150 | Header Files 151 | 152 | 153 | Header Files 154 | 155 | 156 | Header Files 157 | 158 | 159 | Header Files 160 | 161 | 162 | Header Files 163 | 164 | 165 | Header Files 166 | 167 | 168 | Header Files 169 | 170 | 171 | Header Files 172 | 173 | 174 | Header Files 175 | 176 | 177 | Header Files 178 | 179 | 180 | Header Files 181 | 182 | 183 | Header Files 184 | 185 | 186 | Header Files 187 | 188 | 189 | Header Files 190 | 191 | 192 | Header Files 193 | 194 | 195 | Header Files 196 | 197 | 198 | Header Files 199 | 200 | 201 | Header Files 202 | 203 | 204 | Header Files 205 | 206 | 207 | Header Files 208 | 209 | 210 | Header Files 211 | 212 | 213 | Header Files 214 | 215 | 216 | Header Files 217 | 218 | 219 | Header Files 220 | 221 | 222 | Header Files 223 | 224 | 225 | Header Files 226 | 227 | 228 | Header Files 229 | 230 | 231 | Header Files 232 | 233 | 234 | Header Files 235 | 236 | 237 | Header Files 238 | 239 | 240 | Header Files 241 | 242 | 243 | Header Files 244 | 245 | 246 | Header Files 247 | 248 | 249 | Header Files 250 | 251 | 252 | Header Files 253 | 254 | 255 | Header Files 256 | 257 | 258 | Header Files 259 | 260 | 261 | Header Files 262 | 263 | 264 | Header Files 265 | 266 | 267 | Header Files 268 | 269 | 270 | Header Files 271 | 272 | 273 | Header Files 274 | 275 | 276 | Header Files 277 | 278 | 279 | Header Files 280 | 281 | 282 | Header Files 283 | 284 | 285 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/AimbotConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class AimbotConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | AimbotConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Enable = true; 13 | int MaxDistance = 250; 14 | int Priority = 1; 15 | int FOV = 200; 16 | int Aimkey = 5; 17 | bool DrawFOV = true; 18 | int Smoothing = 10; 19 | D2D1::ColorF FOVColour = D2D1::ColorF::White; 20 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 21 | { 22 | (*j)[ConfigName][name][LIT("r")] = colour->r; 23 | (*j)[ConfigName][name][LIT("g")] = colour->g; 24 | (*j)[ConfigName][name][LIT("b")] = colour->b; 25 | (*j)[ConfigName][name][LIT("a")] = colour->a; 26 | 27 | } 28 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 29 | { 30 | if (j[ConfigName].contains(name)) 31 | { 32 | colour->r = j[ConfigName][name][LIT("r")]; 33 | colour->g = j[ConfigName][name][LIT("g")]; 34 | colour->b = j[ConfigName][name][LIT("b")]; 35 | colour->a = j[ConfigName][name][LIT("a")]; 36 | } 37 | } 38 | 39 | json ToJson() 40 | { 41 | json j; 42 | j[ConfigName][LIT("Enable")] = Enable; 43 | j[ConfigName][LIT("MaxDistance")] = MaxDistance; 44 | j[ConfigName][LIT("Priority")] = Priority; 45 | j[ConfigName][LIT("FOV")] = FOV; 46 | j[ConfigName][LIT("Aimkey")] = Aimkey; 47 | j[ConfigName][LIT("DrawFOV")] = DrawFOV; 48 | ToJsonColour(&j, LIT("FOVColour"), &FOVColour); 49 | j[ConfigName][LIT("Smoothing")] = Smoothing; 50 | 51 | 52 | 53 | return j; 54 | } 55 | void FromJson(const json& j) 56 | { 57 | if (!j.contains(ConfigName)) 58 | return; 59 | if (j[ConfigName].contains(LIT("Enable"))) 60 | Enable = j[ConfigName][LIT("Enable")]; 61 | if (j[ConfigName].contains(LIT("MaxDistance"))) 62 | MaxDistance = j[ConfigName][LIT("MaxDistance")]; 63 | if (j[ConfigName].contains(LIT("Priority"))) 64 | Priority = j[ConfigName][LIT("Priority")]; 65 | if (j[ConfigName].contains(LIT("FOV"))) 66 | FOV = j[ConfigName][LIT("FOV")]; 67 | if (j[ConfigName].contains(LIT("Aimkey"))) 68 | Aimkey = j[ConfigName][LIT("Aimkey")]; 69 | if (j[ConfigName].contains(LIT("DrawFOV"))) 70 | DrawFOV = j[ConfigName][LIT("DrawFOV")]; 71 | FromJsonColour(j, LIT("FOVColour"), &FOVColour); 72 | if (j[ConfigName].contains(LIT("Smoothing"))) 73 | Smoothing = j[ConfigName][LIT("Smoothing")]; 74 | } 75 | }; 76 | 77 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/AnimalConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class AnimalConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | AnimalConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Enabled = true; 13 | bool Name = true; 14 | bool Distance = true; 15 | int MaxDistance = 1000; 16 | D2D1::ColorF TextColour = Colour(255, 255, 255); 17 | int FontSize = 11; 18 | 19 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 20 | { 21 | (*j)[ConfigName][name][LIT("r")] = colour->r; 22 | (*j)[ConfigName][name][LIT("g")] = colour->g; 23 | (*j)[ConfigName][name][LIT("b")] = colour->b; 24 | (*j)[ConfigName][name][LIT("a")] = colour->a; 25 | 26 | } 27 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 28 | { 29 | if (j[ConfigName].contains(name)) 30 | { 31 | colour->r = j[ConfigName][name][LIT("r")]; 32 | colour->g = j[ConfigName][name][LIT("g")]; 33 | colour->b = j[ConfigName][name][LIT("b")]; 34 | colour->a = j[ConfigName][name][LIT("a")]; 35 | } 36 | } 37 | 38 | json ToJson() 39 | { 40 | json j; 41 | j[ConfigName][LIT("Enabled")] = Enabled; 42 | j[ConfigName][LIT("Name")] = Name; 43 | j[ConfigName][LIT("Distance")] = Distance; 44 | j[ConfigName][LIT("FontSize")] = FontSize; 45 | j[ConfigName][LIT("MaxDistance")] = MaxDistance; 46 | ToJsonColour(&j, LIT("TextColour"), &TextColour); 47 | 48 | return j; 49 | } 50 | void FromJson(const json& j) 51 | { 52 | if (!j.contains(ConfigName)) 53 | return; 54 | if (j[ConfigName].contains(LIT("Enabled"))) 55 | Enabled = j[ConfigName][LIT("Enabled")]; 56 | if (j[ConfigName].contains(LIT("Name"))) 57 | Name = j[ConfigName][LIT("Name")]; 58 | if (j[ConfigName].contains(LIT("Distance"))) 59 | Distance = j[ConfigName][LIT("Distance")]; 60 | if (j[ConfigName].contains(LIT("FontSize"))) 61 | FontSize = j[ConfigName][LIT("FontSize")]; 62 | if (j[ConfigName].contains(LIT("MaxDistance"))) 63 | MaxDistance = j[ConfigName][LIT("MaxDistance")]; 64 | FromJsonColour(j, LIT("TextColour"), &TextColour); 65 | } 66 | }; 67 | 68 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/BuildableConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class BuildableConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | BuildableConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Enabled = false; 13 | bool Name = true; 14 | bool Distance = true; 15 | int MaxDistance = 1000; 16 | D2D1::ColorF TextColour = Colour(255, 255, 255); 17 | int FontSize = 11; 18 | 19 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 20 | { 21 | (*j)[ConfigName][name][LIT("r")] = colour->r; 22 | (*j)[ConfigName][name][LIT("g")] = colour->g; 23 | (*j)[ConfigName][name][LIT("b")] = colour->b; 24 | (*j)[ConfigName][name][LIT("a")] = colour->a; 25 | 26 | } 27 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 28 | { 29 | if (j[ConfigName].contains(name)) 30 | { 31 | colour->r = j[ConfigName][name][LIT("r")]; 32 | colour->g = j[ConfigName][name][LIT("g")]; 33 | colour->b = j[ConfigName][name][LIT("b")]; 34 | colour->a = j[ConfigName][name][LIT("a")]; 35 | } 36 | } 37 | 38 | json ToJson() 39 | { 40 | json j; 41 | j[ConfigName][LIT("Enabled")] = Enabled; 42 | j[ConfigName][LIT("Name")] = Name; 43 | j[ConfigName][LIT("Distance")] = Distance; 44 | j[ConfigName][LIT("FontSize")] = FontSize; 45 | j[ConfigName][LIT("MaxDistance")] = MaxDistance; 46 | ToJsonColour(&j, LIT("TextColour"), &TextColour); 47 | 48 | return j; 49 | } 50 | void FromJson(const json& j) 51 | { 52 | if (!j.contains(ConfigName)) 53 | return; 54 | if (j[ConfigName].contains(LIT("Enabled"))) 55 | Enabled = j[ConfigName][LIT("Enabled")]; 56 | if (j[ConfigName].contains(LIT("Name"))) 57 | Name = j[ConfigName][LIT("Name")]; 58 | if (j[ConfigName].contains(LIT("Distance"))) 59 | Distance = j[ConfigName][LIT("Distance")]; 60 | if (j[ConfigName].contains(LIT("FontSize"))) 61 | FontSize = j[ConfigName][LIT("FontSize")]; 62 | if (j[ConfigName].contains(LIT("MaxDistance"))) 63 | MaxDistance = j[ConfigName][LIT("MaxDistance")]; 64 | FromJsonColour(j, LIT("TextColour"), &TextColour); 65 | } 66 | }; 67 | 68 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/ConfigInstance.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Pch.h" 3 | #include "PlayerConfig.h" 4 | #include "Overlay.h" 5 | #include "AnimalConfig.h" 6 | #include "BuildableConfig.h" 7 | #include "OtherEspConfig.h" 8 | #include "AimbotConfig.h" 9 | #include "MiscConfig.h" 10 | class ConfigInstances 11 | { 12 | public: 13 | PlayerConfig Player = PlayerConfig(LIT("Player")); 14 | PlayerConfig Humanoid = PlayerConfig(LIT("Humanoid")); 15 | OverlayConfig Overlay = OverlayConfig(LIT("Overlay")); 16 | AnimalConfig Imp = AnimalConfig(LIT("Imp")); 17 | AnimalConfig Rhino = AnimalConfig(LIT("Rhino")); 18 | AnimalConfig Kappa = AnimalConfig(LIT("Kappa")); 19 | AnimalConfig Crocodile = AnimalConfig(LIT("Crocodile")); 20 | AnimalConfig Corpse = AnimalConfig(LIT("Corpse")); 21 | AnimalConfig Rabbit = AnimalConfig(LIT("Rabbit")); 22 | AnimalConfig DialogNPC = AnimalConfig(LIT("DialogNPC")); 23 | AnimalConfig Hyena = AnimalConfig(LIT("Hyena")); 24 | AnimalConfig Vulture = AnimalConfig(LIT("Vulture")); 25 | AnimalConfig Gazelle = AnimalConfig(LIT("Gazelle")); 26 | AnimalConfig Rocknose = AnimalConfig(LIT("Rocknose")); 27 | AnimalConfig Ostrich = AnimalConfig(LIT("Ostrich")); 28 | AnimalConfig Kudo = AnimalConfig(LIT("Kudo")); 29 | AnimalConfig Fawn = AnimalConfig(LIT("Fawn")); 30 | AnimalConfig HyenaBoss = AnimalConfig(LIT("HyenaBoss")); 31 | AnimalConfig Spider = AnimalConfig(LIT("Spider")); 32 | AnimalConfig Slamander = AnimalConfig(LIT("Slamander")); 33 | AnimalConfig Scorpion = AnimalConfig(LIT("Scorpion")); 34 | AnimalConfig ScorpionBoss = AnimalConfig(LIT("ScorpionBoss")); 35 | AnimalConfig Snake = AnimalConfig(LIT("Snake")); 36 | AnimalConfig SnakeBoss = AnimalConfig(LIT("SnakeBoss")); 37 | AnimalConfig Antilope = AnimalConfig(LIT("Antilope")); 38 | AnimalConfig RhinoKing = AnimalConfig(LIT("RhinoKing")); 39 | AnimalConfig Locust = AnimalConfig(LIT("Locust")); 40 | AnimalConfig Jaguar = AnimalConfig(LIT("Jaguar")); 41 | AnimalConfig Tiger = AnimalConfig(LIT("Tiger")); 42 | AnimalConfig Wight = AnimalConfig(LIT("Wight")); 43 | AnimalConfig Wolf = AnimalConfig(LIT("Wolf")); 44 | AnimalConfig Ape = AnimalConfig(LIT("Ape")); 45 | AnimalConfig Silverback = AnimalConfig(LIT("Silverback")); 46 | AnimalConfig JungleBird = AnimalConfig(LIT("JungleBird")); 47 | AnimalConfig JungleBirdBoss = AnimalConfig(LIT("JungleBirdBoss")); 48 | AnimalConfig ReptileMonstrosity = AnimalConfig(LIT("ReptileMonstrosity")); 49 | AnimalConfig Komodo = AnimalConfig(LIT("Komodo")); 50 | AnimalConfig Panther = AnimalConfig(LIT("Panther")); 51 | AnimalConfig Deer = AnimalConfig(LIT("Deer")); 52 | AnimalConfig SandStormCreature = AnimalConfig(LIT("SandStormCreature")); 53 | AnimalConfig RockNoseBoss = AnimalConfig(LIT("RockNoseBoss")); 54 | AnimalConfig Bear = AnimalConfig(LIT("Bear")); 55 | 56 | BuildableConfig Furnace = BuildableConfig(LIT("Furnace")); 57 | BuildableConfig Armorer = BuildableConfig(LIT("Armorer")); 58 | BuildableConfig MetalSmith = BuildableConfig(LIT("MetalSmith")); 59 | BuildableConfig LandClaim = BuildableConfig(LIT("LandClaim")); 60 | BuildableConfig Foundation = BuildableConfig(LIT("Foundation")); 61 | BuildableConfig Tanner = BuildableConfig(LIT("Tanner")); 62 | BuildableConfig Bedroll = BuildableConfig(LIT("Bedroll")); 63 | BuildableConfig Alchemist = BuildableConfig(LIT("Alchemist")); 64 | BuildableConfig Chest = BuildableConfig(LIT("Chest")); 65 | BuildableConfig OtherBuildable = BuildableConfig(LIT("OtherBuildable")); 66 | 67 | OtherEspConfig OtherEsp = OtherEspConfig(LIT("OtherEsp")); 68 | 69 | AimbotConfig Aimbot = AimbotConfig(LIT("Aimbot")); 70 | 71 | MiscConfig Misc = MiscConfig(LIT("Misc")); 72 | json ToJson() 73 | { 74 | json jsoned; 75 | jsoned.merge_patch(Player.ToJson()); 76 | jsoned.merge_patch(Overlay.ToJson()); 77 | jsoned.merge_patch(Humanoid.ToJson()); 78 | jsoned.merge_patch(Imp.ToJson()); 79 | jsoned.merge_patch(Rhino.ToJson()); 80 | jsoned.merge_patch(Kappa.ToJson()); 81 | jsoned.merge_patch(Crocodile.ToJson()); 82 | jsoned.merge_patch(Corpse.ToJson()); 83 | jsoned.merge_patch(Rabbit.ToJson()); 84 | jsoned.merge_patch(DialogNPC.ToJson()); 85 | jsoned.merge_patch(Hyena.ToJson()); 86 | jsoned.merge_patch(Vulture.ToJson()); 87 | jsoned.merge_patch(Gazelle.ToJson()); 88 | jsoned.merge_patch(Rocknose.ToJson()); 89 | jsoned.merge_patch(Ostrich.ToJson()); 90 | jsoned.merge_patch(Kudo.ToJson()); 91 | jsoned.merge_patch(Fawn.ToJson()); 92 | jsoned.merge_patch(HyenaBoss.ToJson()); 93 | jsoned.merge_patch(Spider.ToJson()); 94 | jsoned.merge_patch(Slamander.ToJson()); 95 | jsoned.merge_patch(Scorpion.ToJson()); 96 | jsoned.merge_patch(ScorpionBoss.ToJson()); 97 | jsoned.merge_patch(Snake.ToJson()); 98 | jsoned.merge_patch(SnakeBoss.ToJson()); 99 | jsoned.merge_patch(Antilope.ToJson()); 100 | jsoned.merge_patch(RhinoKing.ToJson()); 101 | jsoned.merge_patch(Locust.ToJson()); 102 | jsoned.merge_patch(Jaguar.ToJson()); 103 | jsoned.merge_patch(Tiger.ToJson()); 104 | jsoned.merge_patch(Wight.ToJson()); 105 | jsoned.merge_patch(Wolf.ToJson()); 106 | jsoned.merge_patch(Ape.ToJson()); 107 | jsoned.merge_patch(Silverback.ToJson()); 108 | jsoned.merge_patch(JungleBird.ToJson()); 109 | jsoned.merge_patch(JungleBirdBoss.ToJson()); 110 | jsoned.merge_patch(ReptileMonstrosity.ToJson()); 111 | jsoned.merge_patch(Komodo.ToJson()); 112 | jsoned.merge_patch(Panther.ToJson()); 113 | jsoned.merge_patch(Deer.ToJson()); 114 | jsoned.merge_patch(SandStormCreature.ToJson()); 115 | jsoned.merge_patch(RockNoseBoss.ToJson()); 116 | jsoned.merge_patch(Bear.ToJson()); 117 | jsoned.merge_patch(Furnace.ToJson()); 118 | jsoned.merge_patch(Armorer.ToJson()); 119 | jsoned.merge_patch(MetalSmith.ToJson()); 120 | jsoned.merge_patch(LandClaim.ToJson()); 121 | jsoned.merge_patch(Foundation.ToJson()); 122 | jsoned.merge_patch(Tanner.ToJson()); 123 | jsoned.merge_patch(Bedroll.ToJson()); 124 | jsoned.merge_patch(Alchemist.ToJson()); 125 | jsoned.merge_patch(Chest.ToJson()); 126 | jsoned.merge_patch(OtherBuildable.ToJson()); 127 | jsoned.merge_patch(OtherEsp.ToJson()); 128 | jsoned.merge_patch(Aimbot.ToJson()); 129 | jsoned.merge_patch(Misc.ToJson()); 130 | 131 | 132 | return jsoned; 133 | } 134 | 135 | void FromJson(json jsoned) 136 | { 137 | Player.FromJson(jsoned); 138 | Overlay.FromJson(jsoned); 139 | Humanoid.FromJson(jsoned); 140 | Imp.FromJson(jsoned); 141 | Rhino.FromJson(jsoned); 142 | Kappa.FromJson(jsoned); 143 | Crocodile.FromJson(jsoned); 144 | Corpse.FromJson(jsoned); 145 | Rabbit.FromJson(jsoned); 146 | DialogNPC.FromJson(jsoned); 147 | Hyena.FromJson(jsoned); 148 | Vulture.FromJson(jsoned); 149 | Gazelle.FromJson(jsoned); 150 | Rocknose.FromJson(jsoned); 151 | Ostrich.FromJson(jsoned); 152 | Kudo.FromJson(jsoned); 153 | Fawn.FromJson(jsoned); 154 | HyenaBoss.FromJson(jsoned); 155 | Spider.FromJson(jsoned); 156 | Slamander.FromJson(jsoned); 157 | Scorpion.FromJson(jsoned); 158 | ScorpionBoss.FromJson(jsoned); 159 | Snake.FromJson(jsoned); 160 | SnakeBoss.FromJson(jsoned); 161 | Antilope.FromJson(jsoned); 162 | RhinoKing.FromJson(jsoned); 163 | Locust.FromJson(jsoned); 164 | Jaguar.FromJson(jsoned); 165 | Tiger.FromJson(jsoned); 166 | Wight.FromJson(jsoned); 167 | Wolf.FromJson(jsoned); 168 | Ape.FromJson(jsoned); 169 | Silverback.FromJson(jsoned); 170 | JungleBird.FromJson(jsoned); 171 | JungleBirdBoss.FromJson(jsoned); 172 | ReptileMonstrosity.FromJson(jsoned); 173 | Komodo.FromJson(jsoned); 174 | Panther.FromJson(jsoned); 175 | Deer.FromJson(jsoned); 176 | SandStormCreature.FromJson(jsoned); 177 | RockNoseBoss.FromJson(jsoned); 178 | Bear.FromJson(jsoned); 179 | Furnace.FromJson(jsoned); 180 | Armorer.FromJson(jsoned); 181 | MetalSmith.FromJson(jsoned); 182 | LandClaim.FromJson(jsoned); 183 | Foundation.FromJson(jsoned); 184 | Tanner.FromJson(jsoned); 185 | Bedroll.FromJson(jsoned); 186 | Alchemist.FromJson(jsoned); 187 | Chest.FromJson(jsoned); 188 | OtherBuildable.FromJson(jsoned); 189 | OtherEsp.FromJson(jsoned); 190 | Aimbot.FromJson(jsoned); 191 | Misc.FromJson(jsoned); 192 | 193 | 194 | } 195 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/Config/ConfigUtilities.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "ConfigUtilities.h" 3 | #include "ConfigInstance.h" 4 | 5 | json Config; 6 | std::string Path; 7 | ConfigInstances Configs; 8 | 9 | void SetUpConfig() 10 | { 11 | std::filesystem::path filePath = std::filesystem::path(getenv(LIT("USERPROFILE"))) / LIT("Documents") / LIT("Conan") / (LIT("Default.json")); 12 | std::filesystem::create_directories(filePath.parent_path()); 13 | std::filesystem::exists(filePath) ? LoadConfig(LIT(L"Default")) : SaveConfig(LIT(L"Default")); 14 | } 15 | void SaveConfig(const std::wstring& config) 16 | { 17 | std::string cfg(config.begin(), config.end()); 18 | Config = json::array(); 19 | Config = Configs.ToJson(); 20 | std::string jsonstring = Config.dump() + "\n"; 21 | 22 | std::filesystem::path filePath = std::filesystem::path(getenv(LIT("USERPROFILE"))) / LIT("Documents") / LIT("Conan") / (cfg + LIT(".json")); 23 | 24 | std::filesystem::create_directories(filePath.parent_path()); 25 | 26 | std::ofstream file(filePath); 27 | if (file.is_open()) { 28 | file << jsonstring; 29 | file.close(); 30 | } 31 | 32 | } 33 | 34 | void LoadConfig(const std::wstring& config) 35 | { 36 | std::string cfg(config.begin(), config.end()); 37 | 38 | std::filesystem::path filePath = std::filesystem::path(getenv(LIT("USERPROFILE"))) / LIT("Documents") / LIT("Conan") / (cfg + LIT(".json")); 39 | 40 | if (!std::filesystem::exists(filePath)) { 41 | return; 42 | } 43 | 44 | std::ifstream file(filePath); 45 | if (file.is_open()) { 46 | std::stringstream buffer; 47 | buffer << file.rdbuf(); 48 | std::string jsonstring = buffer.str(); 49 | 50 | if (json::accept(jsonstring)) { 51 | Config = json::parse(jsonstring); 52 | Configs.FromJson(Config); 53 | 54 | } 55 | else { 56 | 57 | } 58 | file.close(); 59 | } 60 | else { 61 | 62 | } 63 | } 64 | 65 | std::vector GetAllConfigs() 66 | { 67 | std::vector confignames; 68 | 69 | std::filesystem::path directory = std::filesystem::path(getenv(LIT("USERPROFILE"))) / LIT("Documents") / LIT("Hunt"); 70 | 71 | for (const auto& entry : std::filesystem::directory_iterator(directory)) { 72 | if (entry.is_regular_file()) { 73 | std::wstring configname = entry.path().filename().stem(); 74 | confignames.push_back(configname); 75 | } 76 | } 77 | 78 | return confignames; 79 | } -------------------------------------------------------------------------------- /ConanExilesDMA/Config/ConfigUtilities.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ConfigInstance.h" 3 | void SaveConfig(const std::wstring& config); 4 | void LoadConfig(const std::wstring& config); 5 | std::vector GetAllConfigs(); 6 | extern ConfigInstances Configs; 7 | extern void SetUpConfig(); -------------------------------------------------------------------------------- /ConanExilesDMA/Config/MiscConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class MiscConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | MiscConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Speedhack = true; 13 | float Speed = 3.0f; 14 | bool LockedContents = true; 15 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 16 | { 17 | (*j)[ConfigName][name][LIT("r")] = colour->r; 18 | (*j)[ConfigName][name][LIT("g")] = colour->g; 19 | (*j)[ConfigName][name][LIT("b")] = colour->b; 20 | (*j)[ConfigName][name][LIT("a")] = colour->a; 21 | 22 | } 23 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 24 | { 25 | if (j[ConfigName].contains(name)) 26 | { 27 | colour->r = j[ConfigName][name][LIT("r")]; 28 | colour->g = j[ConfigName][name][LIT("g")]; 29 | colour->b = j[ConfigName][name][LIT("b")]; 30 | colour->a = j[ConfigName][name][LIT("a")]; 31 | } 32 | } 33 | 34 | json ToJson() 35 | { 36 | json j; 37 | j[ConfigName][LIT("Speedhack")] = Speedhack; 38 | j[ConfigName][LIT("Speed")] = Speed; 39 | j[ConfigName][LIT("LockedContents")] = LockedContents; 40 | 41 | return j; 42 | } 43 | void FromJson(const json& j) 44 | { 45 | if (!j.contains(ConfigName)) 46 | return; 47 | if (j[ConfigName].contains(LIT("Speedhack"))) 48 | Speedhack = j[ConfigName][LIT("Speedhack")]; 49 | if (j[ConfigName].contains(LIT("Speed"))) 50 | Speed = j[ConfigName][LIT("Speed")]; 51 | if (j[ConfigName].contains(LIT("LockedContents"))) 52 | LockedContents = j[ConfigName][LIT("LockedContents")]; 53 | 54 | } 55 | }; 56 | 57 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/OtherEspConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class OtherEspConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | OtherEspConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Enabled = false; 13 | bool Name = true; 14 | bool Distance = true; 15 | int MaxDistance = 1000; 16 | D2D1::ColorF TextColour = Colour(255, 255, 255); 17 | int FontSize = 11; 18 | 19 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 20 | { 21 | (*j)[ConfigName][name][LIT("r")] = colour->r; 22 | (*j)[ConfigName][name][LIT("g")] = colour->g; 23 | (*j)[ConfigName][name][LIT("b")] = colour->b; 24 | (*j)[ConfigName][name][LIT("a")] = colour->a; 25 | 26 | } 27 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 28 | { 29 | if (j[ConfigName].contains(name)) 30 | { 31 | colour->r = j[ConfigName][name][LIT("r")]; 32 | colour->g = j[ConfigName][name][LIT("g")]; 33 | colour->b = j[ConfigName][name][LIT("b")]; 34 | colour->a = j[ConfigName][name][LIT("a")]; 35 | } 36 | } 37 | 38 | json ToJson() 39 | { 40 | json j; 41 | j[ConfigName][LIT("Enabled")] = Enabled; 42 | j[ConfigName][LIT("Name")] = Name; 43 | j[ConfigName][LIT("Distance")] = Distance; 44 | j[ConfigName][LIT("FontSize")] = FontSize; 45 | j[ConfigName][LIT("MaxDistance")] = MaxDistance; 46 | ToJsonColour(&j, LIT("TextColour"), &TextColour); 47 | 48 | return j; 49 | } 50 | void FromJson(const json& j) 51 | { 52 | if (!j.contains(ConfigName)) 53 | return; 54 | if (j[ConfigName].contains(LIT("Enabled"))) 55 | Enabled = j[ConfigName][LIT("Enabled")]; 56 | if (j[ConfigName].contains(LIT("Name"))) 57 | Name = j[ConfigName][LIT("Name")]; 58 | if (j[ConfigName].contains(LIT("Distance"))) 59 | Distance = j[ConfigName][LIT("Distance")]; 60 | if (j[ConfigName].contains(LIT("FontSize"))) 61 | FontSize = j[ConfigName][LIT("FontSize")]; 62 | if (j[ConfigName].contains(LIT("MaxDistance"))) 63 | MaxDistance = j[ConfigName][LIT("MaxDistance")]; 64 | FromJsonColour(j, LIT("TextColour"), &TextColour); 65 | } 66 | }; 67 | 68 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/Overlay.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class OverlayConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | OverlayConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool OverrideResolution = false; 13 | int Width = 1920; 14 | int Height = 1080; 15 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 16 | { 17 | (*j)[ConfigName][name][LIT("r")] = colour->r; 18 | (*j)[ConfigName][name][LIT("g")] = colour->g; 19 | (*j)[ConfigName][name][LIT("b")] = colour->b; 20 | (*j)[ConfigName][name][LIT("a")] = colour->a; 21 | 22 | } 23 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 24 | { 25 | if (j[ConfigName].contains(name)) 26 | { 27 | colour->r = j[ConfigName][name][LIT("r")]; 28 | colour->g = j[ConfigName][name][LIT("g")]; 29 | colour->b = j[ConfigName][name][LIT("b")]; 30 | colour->a = j[ConfigName][name][LIT("a")]; 31 | } 32 | } 33 | 34 | json ToJson() 35 | { 36 | json j; 37 | j[ConfigName][LIT("OverrideResolution")] = OverrideResolution; 38 | j[ConfigName][LIT("Width")] = Width; 39 | j[ConfigName][LIT("Height")] = Height; 40 | 41 | return j; 42 | } 43 | void FromJson(const json& j) 44 | { 45 | if (!j.contains(ConfigName)) 46 | return; 47 | if (j[ConfigName].contains(LIT("OverrideResolution"))) 48 | OverrideResolution = j[ConfigName][LIT("OverrideResolution")]; 49 | if (j[ConfigName].contains(LIT("Width"))) 50 | Width = j[ConfigName][LIT("Width")]; 51 | if (j[ConfigName].contains(LIT("Height"))) 52 | Height = j[ConfigName][LIT("Height")]; 53 | } 54 | }; 55 | 56 | -------------------------------------------------------------------------------- /ConanExilesDMA/Config/PlayerConfig.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | class PlayerConfig 4 | { 5 | std::string ConfigName; 6 | 7 | public: 8 | PlayerConfig(const std::string& name) 9 | { 10 | ConfigName = name; 11 | } 12 | bool Enabled = true; 13 | bool Name = true; 14 | int NameType = 0; 15 | bool Distance = true; 16 | int MaxDistance = 1000; 17 | D2D1::ColorF TextColour = Colour(255, 255, 255); 18 | int FontSize = 11; 19 | bool Box = true; 20 | D2D1::ColorF BoxColour = Colour(0, 150, 255); 21 | 22 | void ToJsonColour(json* j, const std::string& name, D2D1::ColorF* colour) 23 | { 24 | (*j)[ConfigName][name][LIT("r")] = colour->r; 25 | (*j)[ConfigName][name][LIT("g")] = colour->g; 26 | (*j)[ConfigName][name][LIT("b")] = colour->b; 27 | (*j)[ConfigName][name][LIT("a")] = colour->a; 28 | 29 | } 30 | void FromJsonColour(json j, const std::string& name, D2D1::ColorF* colour) 31 | { 32 | if (j[ConfigName].contains(name)) 33 | { 34 | colour->r = j[ConfigName][name][LIT("r")]; 35 | colour->g = j[ConfigName][name][LIT("g")]; 36 | colour->b = j[ConfigName][name][LIT("b")]; 37 | colour->a = j[ConfigName][name][LIT("a")]; 38 | } 39 | } 40 | 41 | json ToJson() 42 | { 43 | json j; 44 | j[ConfigName][LIT("Enabled")] = Enabled; 45 | j[ConfigName][LIT("Name")] = Name; 46 | j[ConfigName][LIT("Box")] = Box; 47 | j[ConfigName][LIT("NameType")] = NameType; 48 | j[ConfigName][LIT("Distance")] = Distance; 49 | j[ConfigName][LIT("FontSize")] = FontSize; 50 | j[ConfigName][LIT("MaxDistance")] = MaxDistance; 51 | ToJsonColour(&j, LIT("TextColour"), &TextColour); 52 | ToJsonColour(&j, LIT("BoxColour"), &BoxColour); 53 | 54 | return j; 55 | } 56 | void FromJson(const json& j) 57 | { 58 | if (!j.contains(ConfigName)) 59 | return; 60 | if (j[ConfigName].contains(LIT("Enabled"))) 61 | Enabled = j[ConfigName][LIT("Enabled")]; 62 | if (j[ConfigName].contains(LIT("Name"))) 63 | Name = j[ConfigName][LIT("Name")]; 64 | if (j[ConfigName].contains(LIT("Distance"))) 65 | Distance = j[ConfigName][LIT("Distance")]; 66 | if (j[ConfigName].contains(LIT("FontSize"))) 67 | FontSize = j[ConfigName][LIT("FontSize")]; 68 | if (j[ConfigName].contains(LIT("MaxDistance"))) 69 | MaxDistance = j[ConfigName][LIT("MaxDistance")]; 70 | FromJsonColour(j, LIT("TextColour"), &TextColour); 71 | FromJsonColour(j, LIT("BoxColour"), &BoxColour); 72 | if (j[ConfigName].contains(LIT("Box"))) 73 | Box = j[ConfigName][LIT("Box")]; 74 | if (j[ConfigName].contains(LIT("NameType"))) 75 | NameType = j[ConfigName][LIT("NameType")]; 76 | 77 | } 78 | }; 79 | 80 | -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/AnimalEsp.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "Drawing.h" 3 | #include "Globals.h" 4 | #include "Camera.h" 5 | #include "ActorEntity.h" 6 | #include "Engine.h" 7 | #include "AnimalEsp.h" 8 | #include "ConfigUtilities.h" 9 | 10 | AnimalConfig GetConfig(EntityType type) 11 | { 12 | if(type == Imp) 13 | return Configs.Imp; 14 | if(type == Crocodile) 15 | return Configs.Crocodile; 16 | if(type == Rhino) 17 | return Configs.Rhino; 18 | if(type == Kappa) 19 | return Configs.Kappa; 20 | if(type == Corpse) 21 | return Configs.Corpse; 22 | if(type == Rabbit) 23 | return Configs.Rabbit; 24 | if(type == DialogNPC) 25 | return Configs.DialogNPC; 26 | if(type == Hyena) 27 | return Configs.Hyena; 28 | if(type == Vulture) 29 | return Configs.Vulture; 30 | if(type == Gazelle) 31 | return Configs.Gazelle; 32 | if(type == Rocknose) 33 | return Configs.Rocknose; 34 | if(type == Ostrich) 35 | return Configs.Ostrich; 36 | if(type == Kudo) 37 | return Configs.Kudo; 38 | if(type == Fawn) 39 | return Configs.Fawn; 40 | if(type == HyenaBoss) 41 | return Configs.HyenaBoss; 42 | if(type == Spider) 43 | return Configs.Spider; 44 | if(type == Slamander) 45 | return Configs.Slamander; 46 | if(type == Scorpion) 47 | return Configs.Scorpion; 48 | if(type == ScorpionBoss) 49 | return Configs.ScorpionBoss; 50 | if(type == Snake) 51 | return Configs.Snake; 52 | if(type == SnakeBoss) 53 | return Configs.SnakeBoss; 54 | if(type == Antilope) 55 | return Configs.Antilope; 56 | if(type == RhinoKing) 57 | return Configs.RhinoKing; 58 | if(type == Locust) 59 | return Configs.Locust; 60 | if(type == Jaguar) 61 | return Configs.Jaguar; 62 | if(type == Tiger) 63 | return Configs.Tiger; 64 | if(type == Wight) 65 | return Configs.Wight; 66 | if(type == Wolf) 67 | return Configs.Wolf; 68 | if(type == Ape) 69 | return Configs.Ape; 70 | if(type == Silverback) 71 | return Configs.Silverback; 72 | if(type == JungleBird) 73 | return Configs.JungleBird; 74 | if(type == JungleBirdBoss) 75 | return Configs.JungleBirdBoss; 76 | if(type == ReptileMonstrosity) 77 | return Configs.ReptileMonstrosity; 78 | if(type == Komodo) 79 | return Configs.Komodo; 80 | if(type == Panther) 81 | return Configs.Panther; 82 | if(type == Deer) 83 | return Configs.Deer; 84 | if(type == SandStormCreature) 85 | return Configs.SandStormCreature; 86 | if(type == RockNoseBoss) 87 | return Configs.RockNoseBoss; 88 | if(type == Bear) 89 | return Configs.Bear; 90 | return Configs.Imp; 91 | 92 | 93 | } 94 | std::shared_ptr UpdateAnimals = std::make_shared(15, [] { 95 | if (!EngineInstance.load()) 96 | return; 97 | EngineInstance.load()->UpdateAnimals(); 98 | 99 | }); 100 | 101 | void DrawAnimalEsp() 102 | { 103 | if (!EngineInstance.load()) 104 | return; 105 | EngineInstance.load()->AnimalsMutex.lock(); 106 | std::vector> animals = EngineInstance.load()->GetAnimals(); 107 | EngineInstance.load()->AnimalsMutex.unlock(); 108 | for (auto entity : animals) 109 | { 110 | if (entity->GetPosition() == Vector3(0, 0, 0)) 111 | continue; 112 | AnimalConfig config = GetConfig(entity->GetEntityID()); 113 | if(!config.Enabled) 114 | continue; 115 | Vector2 screenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV, entity->GetPosition()); 116 | if (screenpos == Vector2::Zero()) 117 | continue; 118 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 119 | float distance = (Vector3::DistanceTo(campos, entity->GetPosition()) / 100.f) - 2; 120 | if (distance < 0) 121 | continue; 122 | std::wstring wdistance = config.Distance ? L"[" + std::to_wstring((int)distance) + L"m]" : L""; 123 | std::wstring name = config.Name ? entity->GetName() : L""; 124 | if (entity->GetEntityID() == Player) 125 | name = config.Name ? entity->GetName() : L""; 126 | 127 | if (distance > config.MaxDistance) 128 | continue; 129 | DrawText(screenpos.x, screenpos.y, name + wdistance, "Verdana", config.FontSize, config.TextColour, CentreCentre); 130 | 131 | } 132 | 133 | } -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/AnimalEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern std::shared_ptr UpdateAnimals; 3 | extern void DrawAnimalEsp(); -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/BuildingEsp.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "Drawing.h" 3 | #include "Globals.h" 4 | #include "Camera.h" 5 | #include "ActorEntity.h" 6 | #include "Engine.h" 7 | #include "AnimalEsp.h" 8 | #include "ConfigUtilities.h" 9 | 10 | BuildableConfig GetConfig(EntityType type) 11 | { 12 | if(type == Foundation) 13 | return Configs.Foundation; 14 | if(type == Chest) 15 | return Configs.Chest; 16 | if(type == Bedroll) 17 | return Configs.Bedroll; 18 | if(type == Furnace) 19 | return Configs.Furnace; 20 | if(type == Armorer) 21 | return Configs.Armorer; 22 | if(type == MetalSmith) 23 | return Configs.MetalSmith; 24 | if(type == LandClaim) 25 | return Configs.LandClaim; 26 | if(type == Tanner) 27 | return Configs.Tanner; 28 | if(type == Alchemist) 29 | return Configs.Alchemist; 30 | if (type == OtherBuildable) 31 | return Configs.OtherBuildable; 32 | return Configs.Foundation; 33 | 34 | 35 | 36 | 37 | 38 | } 39 | 40 | 41 | void DrawBuildingEsp() 42 | { 43 | if (!EngineInstance.load()) 44 | return; 45 | EngineInstance.load()->BuildingsMutex.lock(); 46 | std::vector> buildings = EngineInstance.load()->GetBuildings(); 47 | EngineInstance.load()->BuildingsMutex.unlock(); 48 | for (auto entity : buildings) 49 | { 50 | if (entity->GetPosition() == Vector3(0, 0, 0)) 51 | continue; 52 | BuildableConfig config = GetConfig(entity->GetEntityID()); 53 | if (!config.Enabled) 54 | continue; 55 | Vector2 screenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV, entity->GetPosition()); 56 | if (screenpos == Vector2::Zero()) 57 | continue; 58 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 59 | float distance = (Vector3::DistanceTo(campos, entity->GetPosition()) / 100.f) - 2; 60 | if (distance < 0) 61 | continue; 62 | std::wstring wdistance = config.Distance ? L"[" + std::to_wstring((int)distance) + L"m]" : L""; 63 | std::wstring name = config.Name ? entity->GetName() : L""; 64 | if (entity->GetEntityID() == Player) 65 | name = config.Name ? entity->GetName() : L""; 66 | 67 | if (distance > config.MaxDistance) 68 | continue; 69 | DrawText(screenpos.x, screenpos.y, name + wdistance, "Verdana", config.FontSize, config.TextColour, CentreCentre); 70 | 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/BuildingEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern void DrawBuildingEsp(); -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/OtherEsp.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "Drawing.h" 3 | #include "Globals.h" 4 | #include "Camera.h" 5 | #include "ActorEntity.h" 6 | #include "Engine.h" 7 | #include "OtherEsp.h" 8 | #include "ConfigUtilities.h" 9 | 10 | 11 | 12 | void DrawOtherEsp() 13 | { 14 | if (!EngineInstance.load()) 15 | return; 16 | EngineInstance.load()->OtherActorsMutex.lock(); 17 | std::vector> otheractors = EngineInstance.load()->GetOtherActors(); 18 | EngineInstance.load()->OtherActorsMutex.unlock(); 19 | for (auto entity : otheractors) 20 | { 21 | if (entity->GetPosition() == Vector3(0, 0, 0)) 22 | continue; 23 | OtherEspConfig config = Configs.OtherEsp; 24 | if (!config.Enabled) 25 | continue; 26 | Vector2 screenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV, entity->GetPosition()); 27 | if (screenpos == Vector2::Zero()) 28 | continue; 29 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 30 | float distance = (Vector3::DistanceTo(campos, entity->GetPosition()) / 100.f) - 2; 31 | if (distance < 0) 32 | continue; 33 | std::wstring wdistance = config.Distance ? L"[" + std::to_wstring((int)distance) + L"m]" : L""; 34 | std::wstring name = config.Name ? entity->GetName() : L""; 35 | if (entity->GetEntityID() == Player) 36 | name = config.Name ? entity->GetName() : L""; 37 | 38 | if (distance > config.MaxDistance) 39 | continue; 40 | DrawText(screenpos.x, screenpos.y, name + wdistance, "Verdana", config.FontSize, config.TextColour, CentreCentre); 41 | 42 | } 43 | 44 | } -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/OtherEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern void DrawOtherEsp(); -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/PlayerEsp.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "Drawing.h" 3 | #include "Globals.h" 4 | #include "Camera.h" 5 | #include "ActorEntity.h" 6 | #include "Engine.h" 7 | #include "PlayerEsp.h" 8 | #include "ConfigUtilities.h" 9 | 10 | std::shared_ptr UpdatePlayers = std::make_shared(10, [] { 11 | if (!EngineInstance.load()) 12 | return; 13 | EngineInstance.load()->UpdatePlayers(); 14 | 15 | }); 16 | 17 | void DrawPlayerEsp() 18 | { 19 | if (!EngineInstance.load()) 20 | return; 21 | EngineInstance.load()->PlayersMutex.lock(); 22 | std::vector> players = EngineInstance.load()->GetPlayers(); 23 | EngineInstance.load()->PlayersMutex.unlock(); 24 | for (auto entity : players) 25 | { 26 | if (entity->GetPosition() == Vector3(0, 0, 0)) 27 | continue; 28 | PlayerConfig config = Configs.Player; 29 | 30 | if (entity->GetEntityID() == Humanoid) 31 | config = Configs.Humanoid; 32 | if (!config.Enabled) 33 | continue; 34 | Vector2 screenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV, entity->GetPosition()); 35 | if (screenpos == Vector2::Zero()) 36 | continue; 37 | Vector3 campos = Vector3(EngineInstance.load()->GetCameraCache().POV.Location.X, EngineInstance.load()->GetCameraCache().POV.Location.Y, EngineInstance.load()->GetCameraCache().POV.Location.Z); 38 | float distance = (Vector3::DistanceTo(campos,entity->GetPosition()) / 100.f) - 2; 39 | if (distance < 0) 40 | continue; 41 | std::wstring wdistance = config.Distance ? L"[" + std::to_wstring((int)distance) + L"m]" : L""; 42 | std::wstring name = config.Name ? entity->GetName() : L""; 43 | if (entity->GetEntityID() == Player) 44 | name = config.Name ? config.NameType == 0 ? entity->GetCharacterName() : entity->GetPlayerName() : L""; 45 | if (name.length() > 20) 46 | name = LIT(L"Player"); 47 | 48 | if (distance > config.MaxDistance) 49 | continue; 50 | DrawText(screenpos.x, screenpos.y, name + wdistance, "Verdana", config.FontSize, config.TextColour, CentreCentre); 51 | 52 | if (config.Box) 53 | { 54 | if (entity->GetHeadPosition() == Vector3(0, 0, 0)) 55 | continue; 56 | Vector3 temphead = entity->GetHeadPosition(); 57 | temphead.z += 15; 58 | Vector2 headscreenpos = Camera::WorldToScreen(EngineInstance.load()->GetCameraCache().POV, temphead); 59 | if (screenpos == Vector2::Zero()) 60 | continue; 61 | float height = Vector2::Distance(screenpos, headscreenpos); 62 | float width = height / 2; 63 | if (entity->GetHeadPosition().z <= entity->GetPosition().z + 5) 64 | continue; 65 | if (height > 250) 66 | continue; 67 | 68 | OutlineRectangle(screenpos.x - (width/2), headscreenpos.y - 7, width, height, 2, config.BoxColour); 69 | } 70 | } 71 | 72 | } -------------------------------------------------------------------------------- /ConanExilesDMA/ESP/PlayerEsp.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | extern std::shared_ptr UpdatePlayers; 3 | extern void DrawPlayerEsp(); -------------------------------------------------------------------------------- /ConanExilesDMA/Globals.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Engine.h" 3 | extern std::atomic> EngineInstance; 4 | extern std::string ProcessName; -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Drawing.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | void DrawText(int x, int y, std::wstring text, std::string font, int fontsize, MyColour colour, FontAlignment alignment); 3 | void OutlineCircle(int x, int y, float radius, float linewidth, MyColour colour); 4 | void FilledCircle(int x, int y, float radius, MyColour colour); 5 | void OutlineRectangle(int x, int y, int width, int height, int linewidth, MyColour colour); 6 | void FilledRectangle(int x, int y, int width, int height, MyColour colour); 7 | void OutlineRoundedRectangle(int x, int y, int width, int height, int linewidth, int rounding, MyColour colour); 8 | void FilledRoundedRectangle(int x, int y, int width, int height, int rounding, MyColour colour); 9 | void FilledLine(int xstart, int ystart, int xend, int yend, int width, MyColour colour); 10 | void FilledLineAliased(int xstart, int ystart, int xend, int yend, int width, MyColour colour); 11 | void DrawBitmap(ID2D1Bitmap* bmp, int x, int y, int width, int height); 12 | void DrawBitmap(ID2D1Bitmap* bmp, int x, int y); 13 | void SaturationSlider(int x, int y, int width, int height, MyColour colour); 14 | void AlphaSlider(int x, int y, int width, int height, MyColour col); 15 | void HueSlider(int x, int y, int width, int height); 16 | void FilledTriangle(int x1, int y1, int x2, int y2, int x3, int y3, MyColour colour); 17 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Button.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Input.h" 3 | #include "Drawing.h" 4 | #include "Button.h" 5 | #include "Font.h"; 6 | #include "Graphics.h" 7 | 8 | Button::Button(float x, float y, std::wstring text, std::function click) 9 | { 10 | Button::Name = text; 11 | Button::Pos = {x, y}; 12 | Button::Size = {70, 20}; 13 | Button::Action = click; 14 | Button::SetWidth(); 15 | SetVisible(true); 16 | } 17 | 18 | void Button::SetWidth() 19 | { 20 | Button::Size.x = GetTextSize(Button::Name, LIT("Verdana"), 11).x + 20; 21 | } 22 | 23 | void Button::Update() 24 | { 25 | if (!Button::Parent) 26 | Button::SetVisible(false); 27 | if (!Button::IsVisible()) 28 | return; 29 | 30 | Button::ParentPos = Button::Parent->GetParentPos(); 31 | if (!Button::Blocked) 32 | { 33 | if (IsMouseInRectangle(Button::Pos + ParentPos, Button::Size) && IsKeyClicked(VK_LBUTTON) && Button::LastClick < (clock() * 0.00001f)) 34 | { 35 | Button::Action(); 36 | Button::LastClick = (clock() * 0.00001f) + 0.002f; 37 | } 38 | } 39 | } 40 | 41 | void Button::Draw() 42 | { 43 | if (!Button::Parent) 44 | Button::SetVisible(false); 45 | if (!Button::IsVisible()) 46 | return; 47 | 48 | MyColour rectColour = MenuColours[LIT("Button")]; 49 | MyColour rectOutlineColour = MenuColours[LIT("ButtonOutline")]; 50 | MyColour textColour = MenuColours[LIT("Text")]; 51 | 52 | //if is hovering color 53 | if (IsMouseInRectangle(Button::Pos + ParentPos, Button::Size)) 54 | { 55 | rectColour = MenuColours[LIT("ButtonHover")]; 56 | textColour = MenuColours[LIT("TextHover")]; 57 | if (IsKeyDown(VK_LBUTTON)) 58 | { 59 | rectColour = MenuColours[LIT("ButtonActive")]; 60 | } 61 | } 62 | 63 | OutlineRectangle(ParentPos.x + Pos.x, ParentPos.y + Pos.y, Size.x + 1, Size.y + 1, 1, rectColour); 64 | FilledRectangle(ParentPos.x + Button::Pos.x, ParentPos.y + Button::Pos.y, Button::Size.x, Button::Size.y, rectOutlineColour); 65 | DrawText(ParentPos.x + Button::Pos.x + (Button::Size.x / 2), ParentPos.y + Button::Pos.y + (Button::Size.y / 2), Button::Name, LIT("Verdana"), 12, textColour, CentreCentre); 66 | } 67 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Button.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class Button : public Entity 5 | { 6 | protected: 7 | std::function Action; 8 | void SetWidth(); 9 | 10 | public: 11 | Button(float x, float y, std::wstring text, std::function click); 12 | void SetSize(Vector2 size) { Button::Size = size; } 13 | void Update(); 14 | void Draw(); 15 | }; 16 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/ColourPicker.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "ColourPicker.h" 3 | #include "Input.h" 4 | #include "Drawing.h" 5 | #include "GUI.h" 6 | 7 | ColourPicker::ColourPicker(float x, float y, D2D1::ColorF* colour) 8 | { 9 | ColourPicker::MainColour = colour; 10 | ColourPicker::Size = { 20, 10 }; 11 | ColourPicker::Pos = { x, y }; 12 | ColourPicker::Open = false; 13 | ColourPicker::Hue = RGBToHue(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b); 14 | ColourPicker::Alpha = MainColour->a; 15 | ColourPicker::Saturation = RgbToHsv(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b).V; 16 | ColourPicker::Brightness = RgbToHsv(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b).S; 17 | ColourPicker::ContextSize = { 80.0f, 20.0f * (int)ColourPicker::ContextNames.size() }; 18 | SetVisible(true); 19 | } 20 | 21 | float ColourPicker::HueToSliderValue(float hue) 22 | { 23 | return hue / 360.0f; 24 | } 25 | 26 | float ColourPicker::SliderValueToHue(float slidervalue) 27 | { 28 | return slidervalue * 360.0f; 29 | } 30 | 31 | float ColourPicker::SaturationToSliderValue(float saturation) 32 | { 33 | return saturation / 255.0f; 34 | } 35 | 36 | void ColourPicker::Copy() 37 | { 38 | ColourPickerClipBoard = *ColourPicker::MainColour; 39 | } 40 | 41 | void ColourPicker::Paste() 42 | { 43 | *ColourPicker::MainColour = ColourPickerClipBoard; 44 | ColourPicker::Alpha = ColourPickerClipBoard.a; 45 | ColourPicker::Saturation = RgbToHsv(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b).S; 46 | ColourPicker::Brightness = RgbToHsv(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b).V; 47 | ColourPicker::Hue = RGBToHue(ColourPicker::MainColour->r, ColourPicker::MainColour->g, ColourPicker::MainColour->b); 48 | ColourPicker::ValueChangeEvent(); 49 | } 50 | 51 | void ColourPicker::ContextMenu() 52 | { 53 | if (IsMouseInRectangle(ColourPicker::Pos + ColourPicker::ParentPos, ColourPicker::Size) && IsKeyClicked(VK_RBUTTON) && !ColourPicker::Blocked && !ColourPicker::Open) 54 | { 55 | ColourPicker::ContextActive = true; 56 | ColourPicker::Open = false; 57 | ColourPicker::ContextPos = MousePos; 58 | SetBlockedSiblings(true); 59 | } 60 | 61 | if (!IsMouseInRectangle(ColourPicker::ContextPos, ColourPicker::ContextSize) && IsKeyClicked(VK_LBUTTON)) 62 | { 63 | if (ColourPicker::ContextActive) 64 | SetBlockedSiblings(false); 65 | ColourPicker::ContextActive = false; 66 | } 67 | if (!ColourPicker::ContextActive) 68 | return; 69 | int i = 0; 70 | for (auto& pair : ColourPicker::ContextNames) 71 | { 72 | if (IsMouseInRectangle(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y + (i * 20), ColourPicker::ContextSize.x, 20) && IsKeyClicked(VK_LBUTTON) && ColourPicker::LastClick < (clock() * 0.00001f)) 73 | { 74 | pair.second(); 75 | ColourPicker::LastClick = (clock() * 0.00001f) + 0.002f; 76 | } 77 | i++; 78 | } 79 | } 80 | 81 | void ColourPicker::Update() 82 | { 83 | if (!ColourPicker::Parent) 84 | ColourPicker::SetVisible(false); 85 | if (!ColourPicker::IsVisible()) 86 | return; 87 | 88 | ColourPicker::ParentPos = ColourPicker::Parent->GetParentPos(); 89 | ColourPicker::ContextMenu(); 90 | if (!(IsMouseInRectangle(ColourPicker::ParentPos.x + ColourPicker::Pos.x, ColourPicker::ParentPos.y + ColourPicker::Pos.y, ColourPicker::Size.x, ColourPicker::Size.y) || IsMouseInRectangle(ClickedPos.x - 5, ClickedPos.y - 5, 175, 175)) && IsKeyClicked(VK_LBUTTON) && ColourPicker::Open) 91 | { 92 | ColourPicker::Open = false; 93 | 94 | SetBlockedSiblings(false); 95 | } 96 | 97 | if (ColourPicker::Blocked) 98 | return; 99 | 100 | if (IsMouseInRectangle(ColourPicker::ParentPos.x + ColourPicker::Pos.x, ColourPicker::ParentPos.y + ColourPicker::Pos.y, ColourPicker::Size.x, ColourPicker::Size.y) && IsKeyClicked(VK_LBUTTON) && ColourPicker::LastClick < (clock() * 0.00001f) && !(IsMouseInRectangle(ClickedPos.x - 5, ClickedPos.y - 5, 185, 175) && ColourPicker::Open)) 101 | { 102 | ClickedPos = MousePos; 103 | ColourPicker::Open = !ColourPicker::Open; 104 | ColourPicker::LastClick = (clock() * 0.00001f) + 0.002f; 105 | ColourPicker::ContextActive = false; 106 | if (ColourPicker::Open) 107 | SetBlockedSiblings(true); 108 | if (!ColourPicker::Open) 109 | SetBlockedSiblings(false); 110 | } 111 | 112 | if (!IsKeyDown(VK_LBUTTON) && !ColourPicker::ContextActive) 113 | { 114 | if (ColourPicker::HeldHue || ColourPicker::Alpha || ColourPicker::HeldSaturation) 115 | ColourPicker::ValueChangeEvent(); 116 | ColourPicker::HeldHue = false; 117 | ColourPicker::HeldAlpha = false; 118 | ColourPicker::HeldSaturation = false; 119 | int alpha = static_cast(ColourPicker::Alpha * 255); 120 | *ColourPicker::MainColour = HsvToRgb(ColourPicker::Hue, ColourPicker::Brightness, ColourPicker::Saturation, alpha); 121 | ColourPicker::MainColour->a = ColourPicker::Alpha; 122 | } 123 | 124 | if (!ColourPicker::Open) 125 | return; 126 | if (IsMouseInRectangle(ClickedPos.x, ClickedPos.y, 150, 150) && IsKeyClicked(VK_LBUTTON) && ColourPicker::LastClick < (clock() * 0.00001f)) 127 | { 128 | ColourPicker::HeldSaturation = true; 129 | ColourPicker::LastClick = (clock() * 0.00001f) + 0.002f; 130 | } 131 | 132 | if (IsMouseInRectangle(ClickedPos.x, ClickedPos.y + 155, 150, 10) && IsKeyClicked(VK_LBUTTON) && ColourPicker::LastClick < (clock() * 0.00001f)) 133 | { 134 | ColourPicker::HeldHue = true; 135 | ColourPicker::LastClick = (clock() * 0.00001f) + 0.002f; 136 | } 137 | 138 | if (IsMouseInRectangle(ClickedPos.x + 155, ClickedPos.y, 20, 165) && IsKeyClicked(VK_LBUTTON) && ColourPicker::LastClick < (clock() * 0.00001f)) 139 | { 140 | ColourPicker::HeldAlpha = true; 141 | ColourPicker::LastClick = (clock() * 0.00001f) + 0.002f; 142 | } 143 | 144 | if (HeldHue) 145 | { 146 | // Calculate the slider value from the mouse position 147 | const float clamp = std::clamp((float)MousePos.x - (float)(ClickedPos.x), 0.00f, (float)150); 148 | const float ratio = clamp / 150; 149 | ColourPicker::Hue = 0.0f + (360.0f - 0.0f) * ratio; 150 | // second var creates brigthness/ fullcolour - white, second one does black to full colour 151 | *ColourPicker::MainColour = HsvToRgb(ColourPicker::Hue, ColourPicker::Brightness, ColourPicker::Saturation, ColourPicker::Alpha); 152 | } 153 | 154 | if (HeldAlpha) 155 | { 156 | // Calculate the slider value from the mouse position 157 | const float clamp = std::clamp((float)MousePos.y - (float)(ClickedPos.y), 0.00f, (float)165); 158 | const float ratio = clamp / 165; 159 | ColourPicker::Alpha = (1.0f - ratio); 160 | ColourPicker::Alpha = std::min(ColourPicker::Alpha, 1.0f); 161 | ColourPicker::MainColour->a = ColourPicker::Alpha; 162 | } 163 | 164 | if (HeldSaturation) 165 | { 166 | // Calculate the saturation values from the mouse position 167 | const float xclamp = std::clamp((float)MousePos.x - (float)(ClickedPos.x), 0.00f, (float)150); 168 | const float yclamp = std::clamp((float)MousePos.y - (float)(ClickedPos.y), 0.00f, (float)150); 169 | 170 | const float xratio = xclamp / 150.0f; 171 | const float yratio = (150.0f - yclamp) / 150.0f; 172 | ColourPicker::Saturation = yratio; 173 | ColourPicker::Brightness = xratio; 174 | ColourPicker::Saturation = std::min(ColourPicker::Saturation, 255.0f); 175 | ColourPicker::Brightness = std::min(ColourPicker::Brightness, 255.0f); 176 | } 177 | } 178 | 179 | void ColourPicker::Draw() 180 | { 181 | if (!ColourPicker::Parent) 182 | ColourPicker::SetVisible(false); 183 | if (!ColourPicker::IsVisible()) 184 | return; 185 | FilledRectangle(ColourPicker::ParentPos.x + ColourPicker::Pos.x, ColourPicker::ParentPos.y + ColourPicker::Pos.y, ColourPicker::Size.x, ColourPicker::Size.y, *ColourPicker::MainColour); 186 | OutlineRectangle(ColourPicker::ParentPos.x + ColourPicker::Pos.x, ColourPicker::ParentPos.y + ColourPicker::Pos.y, ColourPicker::Size.x, ColourPicker::Size.y, 1, Colour(85, 85, 85, 255)); 187 | 188 | if (ColourPicker::Open) 189 | { 190 | FilledRectangle(ClickedPos.x - 5, ClickedPos.y - 5, 185, 175, Colour(85, 85, 85, 255)); 191 | OutlineRectangle(ClickedPos.x - 5, ClickedPos.y - 5, 185, 175, 1, Colour(180, 180, 180, 255)); 192 | int alpha = static_cast(ColourPicker::Alpha * 255); 193 | SaturationSlider(ClickedPos.x, ClickedPos.y, 150, 150, HsvToRgb(ColourPicker::Hue, 255.0f, 255.0f, alpha)); 194 | 195 | // alpha 196 | OutlineRectangle(ClickedPos.x + 155, ClickedPos.y, 20, 165, 1, Colour(180, 180, 180, 255)); 197 | AlphaSlider(ClickedPos.x + 155, ClickedPos.y, 20, 165, *MainColour); 198 | float alphavalue = ColourPicker::Alpha; 199 | FilledRectangle(ClickedPos.x + 155, ClickedPos.y + ((int)165 * (1.0f - alphavalue)), 20, 2, Colour(255, 255, 255, 255)); 200 | 201 | // hue 202 | HueSlider(ClickedPos.x, ClickedPos.y + 155, 150, 10); 203 | float huevalue = ColourPicker::HueToSliderValue(ColourPicker::Hue); 204 | FilledRectangle(ClickedPos.x + ((int)150 * huevalue), ClickedPos.y + 155, 2, 10, Colour(255, 255, 255, 255)); 205 | } 206 | 207 | if (ColourPicker::ContextActive) 208 | { 209 | OutlineRectangle(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y, ColourPicker::ContextSize.x, ColourPicker::ContextSize.y, 1, Colour(255, 255, 255, 255)); 210 | FilledRectangle(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y, ColourPicker::ContextSize.x, ColourPicker::ContextSize.y, Colour(80, 80, 80, 255)); 211 | int i = 0; 212 | for (auto pair : ColourPicker::ContextNames) 213 | { 214 | if (i != 0) 215 | FilledLine(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y + i * 20, ColourPicker::ContextPos.x + ColourPicker::ContextSize.x, ColourPicker::ContextPos.y + i * 20, 1.0f, Colour(255, 255, 255, 255)); 216 | 217 | if (IsMouseInRectangle(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y + (i * 20), ColourPicker::ContextSize.x, 20)) 218 | FilledRectangle(ColourPicker::ContextPos.x, ColourPicker::ContextPos.y + (i * 20), ColourPicker::ContextSize.x, 20, Colour(120, 120, 120, 255)); 219 | DrawText(ColourPicker::ContextPos.x + (ColourPicker::ContextSize.x / 2), ColourPicker::ContextPos.y + (i * 20) + 10, pair.first, LIT("Verdana"), 11, Colour(255, 255, 255, 255), CentreCentre); 220 | 221 | i++; 222 | } 223 | } 224 | } 225 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/ColourPicker.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class ColourPicker : public Entity 5 | { 6 | protected: 7 | Vector2 ClickedPos; 8 | D2D1::ColorF BaseColour = Colour(0, 0, 0, 0); 9 | D2D1::ColorF* MainColour = &BaseColour; 10 | D2D1::ColorF* RangeColour = &BaseColour; 11 | D2D1::ColorF* SelectedColour = &BaseColour; 12 | Vector2 SelectedPos; 13 | 14 | float Saturation = 255; 15 | float Brightness = 255; 16 | bool HeldSaturation = false; 17 | 18 | float Hue = 360; 19 | bool HeldHue = false; 20 | 21 | bool HeldAlpha = false; 22 | float Alpha = 255; 23 | 24 | bool ContextActive = false; 25 | Vector2 ContextPos; 26 | Vector2 ContextSize; 27 | void ContextMenu(); 28 | void Copy(); 29 | void Paste(); 30 | std::map> ContextNames = { 31 | {L"Copy", [this]() { Copy(); }}, 32 | {L"Paste", [this]() { Paste(); }} 33 | }; 34 | 35 | bool Open = false; 36 | static float HueToSliderValue(float hue); 37 | static float SliderValueToHue(float slidervalue); 38 | static float AlphaToSliderValue(float alpha); 39 | static float SaturationToSliderValue(float saturation); 40 | 41 | public: 42 | ColourPicker(float x, float y, D2D1::ColorF* colour); 43 | void Update(); 44 | void Draw(); 45 | }; 46 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/ComboBox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class ComboBox : public Entity 5 | { 6 | protected: 7 | float DropWidth; 8 | std::list Names; 9 | std::list Items; 10 | bool Active = false; 11 | std::wstring SelectedName; 12 | float TextWidth = 0; 13 | float CutOffBuffer = 0; 14 | float SizeDifference; 15 | 16 | int MaxVisibleItems = 5; 17 | 18 | int PointerStart = 0; 19 | int PointerEnd = MaxVisibleItems; 20 | 21 | void ConvertSelectedName(); 22 | void CalculateBuffer(); 23 | void SetComboBoxWidth(); 24 | void ArrowNavigation(); 25 | void UpdateScrollBar(); 26 | 27 | bool ScrollBarHeld = false; 28 | 29 | public: 30 | ComboBox(float x, float y, std::wstring text, std::list items, std::list names); 31 | void Update(); 32 | void Draw(); 33 | }; 34 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/DropDown.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | class DropDown : public Entity 4 | { 5 | protected: 6 | float DropWidth; 7 | std::vectorNames; 8 | int* Index; 9 | bool Active = false; 10 | std::wstring SelectedName; 11 | float TextWidth = 0; 12 | float CutOffBuffer = 0; 13 | float SizeDifference; 14 | 15 | int MaxVisibleItems = 5; 16 | 17 | int PointerStart = 0; 18 | int PointerEnd = MaxVisibleItems; 19 | 20 | void ConvertSelectedName(); 21 | void CalculateBuffer(); 22 | void SetDropDownWidth(); 23 | void ArrowNavigation(); 24 | void UpdateScrollBar(); 25 | 26 | bool ScrollBar = false; 27 | 28 | 29 | public: 30 | DropDown(float x, float y, std::wstring text, int* items, std::vectornames); 31 | void Update(); 32 | void Draw(); 33 | }; 34 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Entity.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Entity.h" 3 | #include "drawing.h" 4 | #pragma region Entity 5 | 6 | bool Entity::IsVisible() 7 | { 8 | if (Entity::Condition) 9 | return Entity::Condition(); 10 | 11 | return Entity::Visible; 12 | } 13 | 14 | void Entity::SetCondition(condition condition) 15 | { 16 | Entity::Condition = condition; 17 | } 18 | 19 | void Entity::SetVisible(bool visible) 20 | { 21 | Entity::Visible = visible; 22 | } 23 | 24 | void Entity::SetBlocked(bool block) 25 | { 26 | Entity::Blocked = block; 27 | } 28 | 29 | child Entity::GetParent() 30 | { 31 | return Entity::Parent; 32 | } 33 | 34 | child Entity::GetChildRelativeParent() 35 | { 36 | return Entity::ChildRelativeParent; 37 | } 38 | 39 | void Entity::SetBlockedSiblings(bool block) 40 | { 41 | for (auto& it : Entity::Parent->GetContainer()) 42 | { 43 | if (it == shared_from_this()) 44 | continue; 45 | 46 | it->SetBlocked(block); 47 | } 48 | } 49 | 50 | Entity* Entity::GetInstance() 51 | { 52 | return Entity::Instance; 53 | } 54 | 55 | float Entity::GetLastClick() 56 | { 57 | return Entity::LastClick; 58 | } 59 | 60 | void Entity::SetLastClick(float value) 61 | { 62 | Entity::LastClick = value; 63 | } 64 | 65 | void Entity::SetParent(child parent) 66 | { 67 | Entity::Parent = parent; 68 | } 69 | 70 | void Entity::SetRelativeParent(child parent) 71 | { 72 | Entity::ChildRelativeParent = parent; 73 | } 74 | #pragma endregion 75 | 76 | #pragma region Events 77 | 78 | void Entity::SetValueChangedEvent(std::function evnt) 79 | { 80 | Entity::ValueChangeEvent = evnt; 81 | } 82 | 83 | std::function Entity::GetValueChangedEvent() 84 | { 85 | return Entity::ValueChangeEvent; 86 | } 87 | #pragma endregion 88 | 89 | #pragma region Container 90 | void Container::Draw() 91 | { 92 | // Reverse iterat 93 | for (auto it = ContainerInstance.crbegin(); it != ContainerInstance.crend(); it++) 94 | { 95 | (*it)->Draw(); 96 | } 97 | } 98 | 99 | void Container::Update() 100 | { 101 | for (auto it = ContainerInstance.crbegin(); it != ContainerInstance.crend(); it++) 102 | { 103 | (*it)->Update(); 104 | } 105 | } 106 | 107 | /*childcontainer& Container::Container() 108 | { 109 | return Container::ContainerInstance; 110 | }*/ 111 | 112 | /*size_t Container::GetChildren() 113 | { 114 | return Container::ContainerInstance.size(); 115 | }*/ 116 | #pragma endregion 117 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Entity.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class Entity; 3 | using condition = std::function; 4 | using child = std::shared_ptr; 5 | using childcontainer = std::vector; 6 | 7 | class Entity : public std::enable_shared_from_this 8 | { 9 | protected: 10 | bool Visible; 11 | bool Blocked = false; 12 | 13 | condition Condition; 14 | 15 | child Parent; 16 | child ChildRelativeParent; 17 | 18 | Vector2 Pos; 19 | Vector2 Size; 20 | Vector2 OriginalSize; 21 | Vector2 Scale; 22 | Vector2 TextSize; 23 | Vector2 ParentPos; 24 | Vector2 ParentSize; 25 | 26 | std::wstring Name; 27 | 28 | Entity* Instance = this; 29 | 30 | float LastClick = 0; 31 | 32 | // event handlers. 33 | std::function ValueChangeEvent = []() 34 | { 35 | }; // blank event 36 | public: 37 | // This can be overriden by the parent. 38 | virtual void Draw() 39 | { 40 | }; 41 | 42 | virtual void Update() 43 | { 44 | }; 45 | 46 | virtual childcontainer& GetContainer() 47 | { 48 | static childcontainer bad { }; 49 | return bad; 50 | } 51 | 52 | virtual size_t Children() { return 0; } 53 | 54 | virtual Vector2 GetPos() { return Pos; } 55 | virtual Vector2 GetSize() { return Size; } 56 | virtual Vector2 GetScale() { return Scale; } 57 | virtual Vector2 GetParentPos() { return ParentPos; } 58 | virtual Vector2 GetParentSize() { return ParentSize; } 59 | virtual std::wstring GetName() { return Name; } 60 | 61 | child GetChildRelativeParent(); 62 | child GetParent(); 63 | Entity* GetInstance(); 64 | 65 | bool IsVisible(); 66 | 67 | float GetLastClick(); 68 | 69 | void SetLastClick(float value); 70 | void SetCondition(condition condition); 71 | void SetVisible(bool visible); 72 | void SetBlocked(bool block); 73 | void SetBlockedSiblings(bool block); 74 | void SetParent(child parent); 75 | void SetRelativeParent(child parent); 76 | 77 | // event handlers 78 | void SetValueChangedEvent(std::function evnt); 79 | std::function GetValueChangedEvent(); 80 | 81 | friend class Container; 82 | friend class Tab; 83 | friend class ListBoxTab; 84 | friend class GroupBox; 85 | }; 86 | 87 | class Container : public Entity 88 | { 89 | protected: 90 | childcontainer ContainerInstance; 91 | 92 | public: 93 | virtual child Push(child child) 94 | { 95 | child.get()->Parent = shared_from_this(); 96 | ContainerInstance.emplace_back(child); 97 | return child; 98 | } 99 | 100 | void Draw(); 101 | void Update(); 102 | virtual childcontainer& GetContainer() override { return ContainerInstance; } 103 | virtual size_t Children() override { return ContainerInstance.size(); } 104 | }; 105 | 106 | using EntityVector = std::shared_ptr; 107 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Form.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Form.h" 3 | #include "pch.h" 4 | #include "Form.h" 5 | #include "Drawing.h" 6 | #include "input.h" 7 | #include "Entity.h" 8 | #include "GUI.h" 9 | #include "Graphics.h" 10 | Form::Form(float x, float y, float w, float h, float borderwidth, float borderheight, std::wstring text, bool stretch) 11 | { 12 | Form::Name = text; 13 | Form::Pos = {x, y}; 14 | Form::Size = {w, h}; 15 | Form::OriginalSize = Form::Size; 16 | Form::Stretching = false; 17 | Form::Dragging = false; 18 | Form::Drag = {0, 0}; 19 | Form::Scale.x = (Form::Size.x / Form::OriginalSize.x); 20 | Form::Scale.y = (Form::Size.y / Form::OriginalSize.y); 21 | Form::Border.x = borderwidth; 22 | Form::Border.y = borderheight; 23 | Form::CanStretch = stretch; 24 | Form::CanClose = true; 25 | Form::CanMinimize = true; 26 | SetVisible(true); 27 | } 28 | 29 | void Form::DragAction() 30 | { 31 | if (Form::Dragging && !IsKeyDown(VK_LBUTTON)) 32 | Form::Dragging = false; 33 | 34 | if (Form::Dragging) 35 | { 36 | Form::Pos.x = Form::Cursor.x - Form::Drag.x; 37 | Form::Pos.y = Form::Cursor.y - Form::Drag.y; 38 | } 39 | if (IsMouseInRectangle(Form::Pos, Form::TitleBar)) 40 | { 41 | if (IsKeyClicked(VK_LBUTTON)) // This prevents a user holding down and hovering over the title bar to drag it. You need to actually click down. 42 | Form::Dragging = true; 43 | 44 | Form::Drag.x = Form::Cursor.x - Form::Pos.x; 45 | Form::Drag.y = Form::Cursor.y - Form::Pos.y; 46 | } 47 | } 48 | 49 | void Form::StretchAction() 50 | { 51 | if (Form::Blocked) 52 | return; 53 | // If the user clicks in the rectangle we go through all forms and then set this one as the highest priority to draw 54 | StretchPoint1 = Vector2 {Form::Pos.x + Form::Size.x, Form::Pos.y + Form::Size.y}; 55 | StretchPoint2 = Vector2 {Form::Pos.x + Form::Size.x - (25 * Form::Scale.x), Form::Pos.y + Form::Size.y}; 56 | StretchPoint3 = Vector2 {Form::Pos.x + Form::Size.x, Form::Pos.y + Form::Size.y - (25 * Form::Scale.y)}; 57 | 58 | if (Form::Stretching && !IsKeyDown(VK_LBUTTON)) 59 | { 60 | Form::Stretching = false; 61 | } 62 | 63 | if (Form::Stretching) 64 | { 65 | float stretchx = Form::Cursor.x - Form::Stretch.x; 66 | float stretchy = Form::Cursor.y - Form::Stretch.y; 67 | Vector2 Stretched {stretchx, stretchy}; 68 | // Prevent the gui going below the original scale 69 | if (stretchx > Form::OriginalSize.x && stretchy > Form::OriginalSize.y) 70 | { 71 | Form::Scale.x = (Form::Size.x / Form::OriginalSize.x); 72 | Form::Scale.y = (Form::Size.y / Form::OriginalSize.y); 73 | Form::Size.x = stretchx; 74 | Form::Size.y = stretchy; 75 | } 76 | } 77 | 78 | if (IsMouseInTriangle(StretchPoint1, StretchPoint2, StretchPoint3) && Form::CanStretch) 79 | { 80 | if (IsKeyClicked(VK_LBUTTON)) 81 | Form::Stretching = true; 82 | 83 | Form::Stretch.x = Form::Cursor.x - (Form::Size.x); 84 | Form::Stretch.y = Form::Cursor.y - (Form::Size.y); 85 | } 86 | } 87 | 88 | void Form::Update() 89 | { 90 | if (!Form::Parent) 91 | Form::SetVisible(false); 92 | if (!Form::IsVisible()) 93 | return; 94 | 95 | if (!MenuOpen) 96 | return; 97 | 98 | Form::TitleBar = {Form::Size.x, Form::Border.y}; 99 | Form::Cursor = MousePos; 100 | Form::ParentPos = {Form::Pos.x + Form::Border.x, Form::Pos.y + Form::Border.y}; 101 | if (Form::Blocked) 102 | return; 103 | Form::DragAction(); 104 | Form::StretchAction(); 105 | 106 | Container::Update(); 107 | } 108 | 109 | void Form::Draw() 110 | { 111 | if (!Form::IsVisible()) 112 | return; 113 | if (!MenuOpen) 114 | return; 115 | 116 | MyColour textColour = MenuColours[LIT("Text")]; 117 | MyColour rectColour = MenuColours[LIT("Background")]; 118 | MyColour rectOutlineColour = MenuColours[LIT("Outline")]; 119 | MyColour rectHeaderColour = MenuColours[LIT("Header")]; 120 | 121 | // when someone clicks into a form it will prioritize the drawing of the form. 122 | if (IsMouseInRectangle(Form::Pos, Form::Size) && IsKeyClicked(VK_LBUTTON)) 123 | { 124 | Form::SetLastClick(clock() * 0.00001f); // we multiple it for accuracy purposes to turn it into a float 125 | } 126 | 127 | OutlineRectangle((Form::Pos.x - Form::Border.x / 2) + 1, (Form::Pos.y - Form::Border.x / 2) + 1, Form::Size.x + Form::Border.x - 1, Form::Size.y + Form::Border.x - 1, 1, rectOutlineColour); // Draw Border 128 | FilledRectangle(Form::Pos.x, Form::Pos.y, Form::Size.x, Form::Size.y, rectColour); 129 | FilledRectangle(Form::Pos.x, Form::Pos.y, Form::Size.x, Form::Border.y, rectHeaderColour); // header 130 | FilledRectangle(Form::Pos.x, Form::Pos.y + Form::Border.y, Form::Size.x, 1, MenuColours[LIT("HeaderSeperator")]); 131 | DrawText(Form::Pos.x + 5, Form::Pos.y + 5, Form::Name, LIT("Verdana"), 12, textColour, None); 132 | 133 | Container::Draw(); 134 | } 135 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Form.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | class Form : public Container 4 | { 5 | protected: 6 | bool Dragging; 7 | bool Stretching; 8 | bool CanStretch; 9 | bool CanMinimize; 10 | bool CanClose; 11 | 12 | float InitTime; 13 | 14 | Vector2 Drag; 15 | Vector2 Stretch; 16 | Vector2 Border; 17 | Vector2 TitleBar; 18 | 19 | Vector2 Cursor; 20 | 21 | Vector2 StretchPoint1; 22 | Vector2 StretchPoint2; 23 | Vector2 StretchPoint3; 24 | 25 | void DragAction(); 26 | void StretchAction(); 27 | 28 | public: 29 | Form(float x, float y, float w, float h, float borderwidth, float borderheight, std::wstring text, bool drag); 30 | void Draw(); 31 | void Update(); 32 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/KeyBind.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "KeyBind.h" 3 | #include "Drawing.h" 4 | #include "Input.h" 5 | #include "GUI.h" 6 | 7 | KeyBind::KeyBind(float x, float y, std::wstring text, int* key) 8 | { 9 | KeyBind::Pos = {x, y}; 10 | KeyBind::Name = text; 11 | KeyBind::Key = key; 12 | KeyBind::Size = {80, 20}; 13 | KeyBind::ConvertKeyToName(); 14 | KeyBind::ContextSize = {80.0f, 20.0f * (int)KeyBind::ContextNames.size()}; 15 | SetVisible(true); 16 | } 17 | 18 | void KeyBind::ConvertKeyToName() 19 | { 20 | if (KeyBind::Active) 21 | { 22 | KeyBind::KeyName = LIT(L"[Click A Key]"); 23 | return; 24 | } 25 | 26 | if (*KeyBind::Key == NULL && !KeyBind::Active) 27 | { 28 | KeyBind::KeyName = LIT(L"[Unbound]"); 29 | return; 30 | } 31 | 32 | int keycode = *KeyBind::Key; 33 | int scancode = MapVirtualKey(keycode, MAPVK_VK_TO_VSC); 34 | WCHAR keyname[256] = {0}; 35 | if (SymbolKeys[keycode] != L"") 36 | { 37 | KeyBind::KeyName = SymbolKeys[keycode]; 38 | return; 39 | } 40 | 41 | if (GetKeyNameTextW((scancode << 16), keyname, sizeof(keyname) / sizeof(keyname[0])) == 0 && KeyBind::Key != NULL) 42 | { 43 | KeyBind::KeyName = LIT(L"[Unknown Key]"); 44 | } 45 | else 46 | { 47 | KeyBind::KeyName = keyname; 48 | } 49 | } 50 | 51 | void KeyBind::Update() 52 | { 53 | if (!KeyBind::Parent) 54 | KeyBind::SetVisible(false); 55 | if (!KeyBind::IsVisible()) 56 | return; 57 | 58 | KeyBind::ContextMenu(); 59 | KeyBind::ParentPos = KeyBind::Parent->GetParentPos(); 60 | if (!KeyBind::Blocked) 61 | { 62 | if (IsMouseInRectangle(KeyBind::Pos + ParentPos, KeyBind::Size) && IsKeyClicked(VK_LBUTTON) && KeyBind::LastClick < (clock() * 0.00001f) && !KeyBind::Blocked && !KeyBind::Active) 63 | { 64 | // KeyBind::SetBlockedSiblings(true); 65 | KeyBind::Blocked = true; 66 | KeyBind::LastClick = (clock() * 0.00001f) + 0.002f; 67 | KeyBind::Active = true; 68 | KeyBind::Blocked = false; 69 | } 70 | } 71 | if (Active && !ContextActive) 72 | { 73 | *KeyBind::Key = 0; 74 | KeyBind::KeyName = LIT(L"[Click A Key]"); 75 | KeyBind::CollectInput(); 76 | KeyBind::ConvertKeyToName(); 77 | } 78 | } 79 | 80 | void KeyBind::ContextMenu() 81 | { 82 | if (IsMouseInRectangle(KeyBind::Pos + KeyBind::ParentPos, KeyBind::Size) && IsKeyClicked(VK_RBUTTON) && !KeyBind::Blocked && !KeyBind::Active && KeyBind::LastClick < (clock() * 0.00001f)) 83 | { 84 | KeyBind::ContextActive = true; 85 | KeyBind::Active = false; 86 | KeyBind::ContextPos = MousePos; 87 | SetBlockedSiblings(true); 88 | } 89 | 90 | if (!IsMouseInRectangle(KeyBind::ContextPos, KeyBind::ContextSize) && IsKeyClicked(VK_LBUTTON)) 91 | { 92 | if (KeyBind::ContextActive) 93 | SetBlockedSiblings(false); 94 | KeyBind::ContextActive = false; 95 | } 96 | 97 | if (!KeyBind::ContextActive) 98 | return; 99 | 100 | int i = 0; 101 | for (auto& pair : KeyBind::ContextNames) 102 | { 103 | if (IsMouseInRectangle(KeyBind::ContextPos.x, KeyBind::ContextPos.y + (i * 20), KeyBind::ContextSize.x, 20) && IsKeyClicked(VK_LBUTTON) && KeyBind::LastClick < (clock() * 0.00001f)) 104 | { 105 | pair.second(); 106 | KeyBind::LastClick = (clock() * 0.00001f) + 0.002f; 107 | } 108 | i++; 109 | } 110 | } 111 | 112 | void KeyBind::Copy() 113 | { 114 | KeyBindClipBoard = *KeyBind::Key; 115 | } 116 | 117 | void KeyBind::Paste() 118 | { 119 | *KeyBind::Key = KeyBindClipBoard; 120 | KeyBind::ConvertKeyToName(); 121 | KeyBind::ValueChangeEvent(); 122 | } 123 | 124 | void KeyBind::CollectInput() 125 | { 126 | for (int i = 0; i <= 255; i++) 127 | { 128 | if (IsKeyClicked(VK_RETURN) || IsKeyClicked(VK_ESCAPE)) 129 | { 130 | KeyBind::Active = false; 131 | return; 132 | } 133 | if (IsKeyClicked(i) && KeyBind::LastClick < (clock() * 0.00001f)) 134 | { 135 | *KeyBind::Key = i; 136 | KeyBind::Active = false; 137 | KeyBind::LastClick = (clock() * 0.00001f) + 0.002f; 138 | KeyBind::ValueChangeEvent(); 139 | return; 140 | } 141 | 142 | } 143 | } 144 | 145 | void KeyBind::Draw() 146 | { 147 | if (!KeyBind::Parent) 148 | KeyBind::SetVisible(false); 149 | if (!KeyBind::IsVisible()) 150 | return; 151 | 152 | MyColour rectColour = MenuColours[LIT("Keybind")]; 153 | MyColour rectHoverColour = MenuColours[LIT("KeybindHover")]; 154 | MyColour rectOutlineColour = MenuColours[LIT("KeybindOutline")]; 155 | MyColour textColour = MenuColours[LIT("Text")]; 156 | MyColour textselected = MenuColours[LIT("TextSelected")]; 157 | 158 | OutlineRectangle(ParentPos.x + Pos.x, ParentPos.y + Pos.y, Size.x + 1, Size.y + 1, 1, rectOutlineColour); 159 | FilledRectangle(ParentPos.x + KeyBind::Pos.x, ParentPos.y + KeyBind::Pos.y, KeyBind::Size.x, KeyBind::Size.y, rectColour); 160 | DrawText(ParentPos.x + KeyBind::Pos.x, ParentPos.y + KeyBind::Pos.y - KeyBind::Size.y, KeyBind::Name, LIT("Verdana"), 12, textColour, None); 161 | DrawText(ParentPos.x + KeyBind::Pos.x + (KeyBind::Size.x / 2), ParentPos.y + KeyBind::Pos.y + (KeyBind::Size.y / 2), KeyName, LIT("Verdana"), 10, Active ? textselected : textColour, CentreCentre); 162 | if (KeyBind::ContextActive) 163 | { 164 | OutlineRectangle(KeyBind::ContextPos.x, KeyBind::ContextPos.y, KeyBind::ContextSize.x, KeyBind::ContextSize.y, 1, textColour); 165 | FilledRectangle(KeyBind::ContextPos.x, KeyBind::ContextPos.y, KeyBind::ContextSize.x, KeyBind::ContextSize.y, rectColour); 166 | int i = 0; 167 | for (auto pair : KeyBind::ContextNames) 168 | { 169 | if (i != 0) 170 | FilledLine(KeyBind::ContextPos.x, KeyBind::ContextPos.y + i * 20, KeyBind::ContextPos.x + KeyBind::ContextSize.x, KeyBind::ContextPos.y + i * 20, 1.0f, textColour); 171 | 172 | if (IsMouseInRectangle(KeyBind::ContextPos.x, KeyBind::ContextPos.y + (i * 20), KeyBind::ContextSize.x, 20)) 173 | FilledRectangle(KeyBind::ContextPos.x, KeyBind::ContextPos.y + (i * 20), KeyBind::ContextSize.x, 20, rectHoverColour); 174 | DrawText(KeyBind::ContextPos.x + (KeyBind::ContextSize.x / 2), KeyBind::ContextPos.y + (i * 20) + 10, pair.first, LIT("Verdana"), 11, textColour, CentreCentre); 175 | 176 | i++; 177 | } 178 | } 179 | } 180 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/KeyBind.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | class KeyBind : public Entity 4 | { 5 | protected: 6 | int* Key; 7 | void CollectInput(); 8 | std::wstring KeyName; 9 | bool Active = false; 10 | void ConvertKeyToName(); 11 | 12 | bool ContextActive = false; 13 | Vector2 ContextPos; 14 | Vector2 ContextSize; 15 | void ContextMenu(); 16 | void Copy(); 17 | void Paste(); 18 | std::map> ContextNames = { 19 | { L"Copy", [this]() { Copy(); } }, 20 | { L"Paste", [this]() { Paste(); } } 21 | }; 22 | 23 | std::map SymbolKeys = { {VK_LEFT,L"Left"},{VK_RIGHT,L"Right"},{VK_UP,L"Up"},{VK_DOWN,L"Down"},{VK_LWIN,L"Win"},{VK_RWIN,L"Win"} 24 | ,{VK_RWIN,L"Win"} ,{VK_DELETE,L"Delete"} ,{VK_INSERT,L"Insert"},{VK_END,L"End"},{VK_HOME,L"Home"},{VK_NEXT,L"Pg Up"},{VK_DOWN,L"Pg Down"} 25 | ,{VK_NUMLOCK,L"Num Lock"} ,{VK_DIVIDE,L"Num /"},{VK_LBUTTON,L"Mouse 1"},{VK_RBUTTON,L"Mouse 2"},{VK_MBUTTON,L"Mid Mouse"},{VK_XBUTTON1,L"Mouse 4"},{VK_XBUTTON2,L"Mouse5"} 26 | ,{VK_MENU,L"Alt"},{VK_RMENU,L"Right Alt"} ,{VK_LMENU,L"Left Alt"} }; 27 | public: 28 | KeyBind(float x, float y, std::wstring text, int* key); 29 | void Update(); 30 | void Draw(); 31 | }; 32 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Label.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Drawing.h" 3 | #include "label.h" 4 | 5 | Label::Label(std::wstring text, float posx, float posy) 6 | { 7 | Label::Pos = {posx, posy}; 8 | Label::Name = text; 9 | SetVisible(true); 10 | } 11 | 12 | void Label::Update() 13 | { 14 | if (!Label::Parent) 15 | Label::SetVisible(false); 16 | if (!Label::IsVisible()) 17 | return; 18 | Label::ParentPos = Label::Parent->GetParentPos(); 19 | } 20 | 21 | void Label::Draw() 22 | { 23 | if (!Label::Parent) 24 | Label::SetVisible(false); 25 | if (!Label::IsVisible()) 26 | return; 27 | 28 | MyColour textColour = MenuColours[LIT("Text")]; 29 | 30 | DrawText(Label::ParentPos.x + Label::Pos.x, Label::ParentPos.y + Label::Pos.y, Label::Name, LIT("Verdana"), 12, textColour, None); 31 | } 32 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Label.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class Label : public Entity 5 | { 6 | protected: 7 | bool Tabbed; 8 | public: 9 | Label(std::wstring name, float x, float y); 10 | void Update(); 11 | void Draw(); 12 | }; 13 | 14 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Slider.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | #include "Drawing.h" 4 | #include "Input.h" 5 | 6 | // due to using templates in c++ classes it is illegal to use a c++ file so this will look rather odd to the other code. 7 | template 8 | class Slider : public Entity 9 | { 10 | protected: 11 | T MinValue; 12 | T MaxValue; 13 | T* Value; 14 | T OutputValue; 15 | 16 | bool Held = false; 17 | 18 | std::wstring Measurement; 19 | std::wstring OutputString; 20 | 21 | void ConvertValueToString() 22 | { 23 | OutputString = std::to_wstring(OutputValue); 24 | size_t dotpos = OutputString.find(L"."); 25 | if (dotpos != std::string::npos) 26 | { 27 | if (OutputString.length() > dotpos + 2) 28 | { 29 | OutputString.resize(dotpos + 3); // Truncate to two places after the decimal place 30 | } 31 | } 32 | } 33 | 34 | public: 35 | void Update() 36 | { 37 | if (!Parent) 38 | SetVisible(false); 39 | if (!IsVisible()) 40 | return; 41 | 42 | ParentPos = Parent->GetParentPos(); 43 | 44 | if (!IsKeyDown(VK_LBUTTON)) 45 | { 46 | if (Held == true) 47 | ValueChangeEvent(); 48 | Held = false; 49 | } 50 | float ratio = (float)(*Value - (float)MinValue) / float(MaxValue - MinValue); 51 | if ((IsMouseInRectangle(ParentPos.x + Pos.x - 2, ParentPos.y + (Pos.y + 15) - 2, Size.x + 3, Size.y + 3) || IsMouseInRectangle(ParentPos.x + Pos.x + (Size.x * ratio), ParentPos.y + (Pos.y + 15) - (Size.y / 2.2), 5, Size.y * 2.2)) && IsKeyClicked(VK_LBUTTON) && !Blocked) 52 | { 53 | Held = true; 54 | } 55 | if (Held) 56 | { 57 | // make sure no clicks go through when holding. 58 | const float clamp = std::clamp((float)MousePos.x - (float)(Pos.x + ParentPos.x), 0.00f, (float)Size.x); 59 | const float ratio = clamp / Size.x; 60 | *Value = MinValue + (MaxValue - MinValue) * ratio; 61 | OutputValue = *Value; 62 | ConvertValueToString(); 63 | } 64 | } 65 | 66 | void Draw() 67 | { 68 | if (!IsVisible()) 69 | return; 70 | if (!Parent) 71 | SetVisible(false); 72 | 73 | MyColour rectColour = MenuColours[LIT("Slider")]; 74 | MyColour textColour = MenuColours[LIT("Text")]; 75 | MyColour insideColour = MenuColours[LIT("SliderInside")]; 76 | MyColour outline = MenuColours[LIT("SliderOutline")]; 77 | MyColour widget = MenuColours[LIT("SliderWidget")]; 78 | DrawText(ParentPos.x + Pos.x + Size.x, (ParentPos.y + Pos.y) - 3, OutputString + Measurement, LIT("Verdana"), 11, textColour, Left); 79 | DrawText(ParentPos.x + Pos.x, (ParentPos.y + Pos.y) - 3, Name + LIT(L": "), LIT("Verdana"), 11, textColour, None); 80 | OutlineRectangle(ParentPos.x + Pos.x, ParentPos.y + (Pos.y + 15), Size.x, Size.y, 1, outline); 81 | FilledRectangle(ParentPos.x + Pos.x, ParentPos.y + (Pos.y + 15), Size.x, Size.y, Colour(80, 80, 80, 255)); 82 | float ratio = (float)(*Value - (float)MinValue) / float(MaxValue - MinValue); 83 | FilledRectangle(ParentPos.x + Pos.x, ParentPos.y + (Pos.y + 15), (int)Size.x * ratio, Size.y, insideColour); 84 | 85 | OutlineRoundedRectangle(ParentPos.x + Pos.x + (Size.x * ratio), ParentPos.y + (Pos.y + 15) - (Size.y / 2.2), 5, Size.y * 2.2, 2, 2, outline); 86 | FilledRoundedRectangle(ParentPos.x + Pos.x + (Size.x * ratio), ParentPos.y + (Pos.y + 15) - (Size.y / 2.2), 5, Size.y * 2.2, 2, widget); 87 | } 88 | 89 | Slider(int x, int y,int width, std::wstring name, std::wstring measurement, T minvalue, T maxvalue, T* value) : Measurement(measurement), MaxValue(maxvalue), MinValue(minvalue), Value(value) 90 | { 91 | Pos = {(float)x, (float)y}; 92 | Name = name; 93 | Size = { (float)width,5 }; 94 | OutputValue = *Value; 95 | ConvertValueToString(); 96 | SetVisible(true); 97 | } 98 | }; 99 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Tab.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Tab.h" 3 | #include "Input.h" 4 | #include "Gui.h" 5 | #include "Drawing.h" 6 | 7 | Tab::Tab(std::wstring name, float x, float y, int* selectedtab, float width, float height) 8 | { 9 | //Calc Size based off the name size 10 | Vector2 txtSize = GetTextSize(name, LIT("Verdana"), 12); 11 | if (width == 0 && height == 0) 12 | Tab::Size = txtSize; 13 | else 14 | { 15 | //Let's make it impossible to make it smaller than the actual font size.. otherwise it looks so weird lol 16 | if (width < txtSize.x) 17 | width = txtSize.x; 18 | if (height < txtSize.y) 19 | height = txtSize.y; 20 | Tab::Size = {width, height}; 21 | } 22 | Size.x += 10; 23 | Tab::SetVisible(true); 24 | Tab::Index = TabCount; // this doesn't need to be changed for a different set of tabs or whatever, you dont need to import a value here you just need a nonce value so you never get a repeated one 25 | Tab::Pos = {x, y}; 26 | Tab::Selected = selectedtab; 27 | Tab::Name = name; 28 | TabCount++; 29 | SetVisible(true); 30 | } 31 | 32 | void Tab::Update() 33 | { 34 | if (!Tab::Parent) 35 | Tab::SetVisible(false); 36 | 37 | if (!Tab::IsVisible()) 38 | return; 39 | Tab::ParentPos = Tab::GetParent()->GetParentPos(); 40 | Tab::ParentSize = Tab::GetParent()->GetSize(); 41 | 42 | size_t ignorecount = 0; 43 | 44 | for (child& it : Tab::Parent->GetContainer()) 45 | { 46 | if (it == shared_from_this()) 47 | break; 48 | 49 | if (!it->IsVisible()) 50 | ++ignorecount; 51 | } 52 | bool selected = Index == *Selected; 53 | if (!selected && !Tab::Blocked) 54 | { 55 | if (IsMouseInRectangle(Tab::ParentPos.x + Tab::Pos.x, Tab::ParentPos.y + Tab::Pos.y, Tab::Size.x, Tab::Size.y) && IsKeyClicked(VK_LBUTTON) && !selected && Tab::LastClick < (clock() * 0.00001f)) 56 | { 57 | *Selected = Index; 58 | // ideally you just want to make a timer and use that but since this is just poc we do this 59 | Tab::LastClick = (clock() * 0.00001f) + 0.002f; 60 | Tab::ValueChangeEvent(); 61 | } 62 | } 63 | } 64 | 65 | void Tab::Draw() 66 | { 67 | if (!Tab::IsVisible()) 68 | return; 69 | 70 | MyColour rectColour = MenuColours[LIT("Tab")]; 71 | MyColour textColour = MenuColours[LIT("Text")]; 72 | bool selected = Index == *Selected; 73 | 74 | //if is hovering color 75 | if (IsMouseInRectangle(Tab::ParentPos.x + Tab::Pos.x, Tab::ParentPos.y + Tab::Pos.y, Tab::Size.x, Tab::Size.y)) 76 | { 77 | rectColour = MenuColours[LIT("TabHover")]; 78 | if (IsKeyDown(VK_LBUTTON)) 79 | { 80 | rectColour = MenuColours[LIT("TabActive")]; 81 | } 82 | } 83 | 84 | //If is selected 85 | if (selected) 86 | { 87 | rectColour = MenuColours[LIT("TabActive")]; 88 | textColour = MenuColours[LIT("TextSelected")]; 89 | } 90 | FilledRectangle(Tab::ParentPos.x + Tab::Pos.x, Tab::ParentPos.y + Tab::Pos.y, Tab::Size.x, Tab::Size.y, rectColour); 91 | DrawText(Tab::ParentPos.x + Tab::Pos.x + (Tab::Size.x / 2), Tab::ParentPos.y + Tab::Pos.y + (Tab::Size.y / 2), Tab::Name, LIT("Verdana"), 12, textColour, CentreCentre); 92 | 93 | if (selected) 94 | { 95 | Container::Draw(); 96 | Container::Update(); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Tab.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class Tab : public Container 5 | { 6 | protected: 7 | int Index; 8 | int* Selected; 9 | 10 | public: 11 | Tab(std::wstring name, float x, float y, int* selectedtab, float width = 0, float height = 0); 12 | void Update(); 13 | void Draw(); 14 | }; 15 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TabController.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "TabController.h" 3 | #include "Drawing.h" 4 | TabController::TabController() 5 | { 6 | TabController::SetVisible(true); 7 | } 8 | 9 | void TabController::Update() 10 | { 11 | if (!TabController::Parent) 12 | TabController::SetVisible(false); 13 | 14 | if (!TabController::IsVisible()) 15 | return; 16 | TabController::ParentPos = TabController::Parent->GetParentPos(); 17 | TabController::Pos.x = 0; 18 | TabController::Pos.y = 0; 19 | TabController::Size = {100, TabController::Parent->GetSize().y-30}; 20 | TabController::Container::Update(); 21 | } 22 | 23 | void TabController::Draw() 24 | { 25 | if (!TabController::IsVisible()) 26 | return; 27 | int size = TabController::Size.x / 12; 28 | 29 | TabController::Container::Draw(); 30 | } 31 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TabController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class TabController : public Container 5 | { 6 | public: 7 | TabController(); 8 | void Update(); 9 | void Draw(); 10 | }; 11 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TabListBox.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "TabListBox.h" 3 | #include "GUI.h" 4 | #include "Input.h" 5 | #include "Drawing.h" 6 | #include "Font.h" 7 | #include "Graphics.h" 8 | 9 | TabListBox::TabListBox(std::wstring name) 10 | { 11 | TabListBox::Name = name; 12 | TabListBox::Index = TabCount; 13 | TabCount++; 14 | SetVisible(true); 15 | } 16 | 17 | void TabListBox::Update() 18 | { 19 | TabListBox::ParentPos = TabListBox::Parent->GetParentPos(); 20 | TabListBox::Pos = TabListBox::Parent->GetParentPos(); 21 | Container::Update(); 22 | } 23 | 24 | void TabListBox::Draw() 25 | { 26 | Container::Draw(); 27 | } 28 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TabListBox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class TabListBox : public Container 5 | { 6 | protected: 7 | int* Selected; 8 | 9 | public: 10 | TabListBox(std::wstring name); 11 | int Index; 12 | void Update(); 13 | void Draw(); 14 | }; 15 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TabListBoxController.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | #include "TabListBox.h" 4 | 5 | class TabListBoxController : public Container 6 | { 7 | protected: 8 | std::list> Tabs; 9 | std::list Names; 10 | std::list CulledNames; 11 | int ScrollWidth = 5; 12 | int Selected; 13 | bool ScrollBarHeld = false; 14 | bool Active = false; 15 | 16 | void UpdateCulledNames(); 17 | void ArrowKeyNavigation(); 18 | void ScrollBarAction(); 19 | void SetActiveIndex(); 20 | void SetActive(); 21 | int PointerStart = 2; 22 | int PointerEnd; 23 | int MaxVisibleItems = TabListBoxController::Size.y / 20; 24 | int ActiveIndex = 0; 25 | int CachedHeight; 26 | 27 | bool FirstItem = false; 28 | 29 | public: 30 | TabListBoxController(float x, float y, float width, float height); 31 | void Update(); 32 | void Draw(); 33 | void PushBack(std::shared_ptr tab); 34 | int GetActiveIndex(); 35 | }; 36 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/TextBox.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class TextBox : public Entity 5 | { 6 | protected: 7 | std::chrono::time_point AnimationStart; 8 | float AnimationInterval = 1.0f; 9 | 10 | std::chrono::time_point SelectingAnimationStart; 11 | float SelectingAnimationInterval = 0.005f; 12 | 13 | int SelectedPoint; 14 | float SelectedPosition; 15 | 16 | int SelectionStart; 17 | int SelectionEnd; 18 | float SelectingStartPosition = 0; 19 | float SelectingEndPosition = 0; 20 | 21 | int VisiblePointerStart; 22 | int VisiblePointerEnd; 23 | void SetStartIndex(); 24 | 25 | bool hide_text = false; 26 | 27 | std::wstring* MainString; 28 | std::wstring VisibleString; 29 | 30 | float TextWidth = 0; 31 | 32 | bool ContextActive = false; 33 | Vector2 ContextPos; 34 | Vector2 ContextSize; 35 | void ContextCopyText(); 36 | void ContextSelectAll(); 37 | void ContextPasteText(); 38 | std::map> ContextNames = { 39 | {L"Select All", [this]() { ContextSelectAll(); }}, 40 | {L"Copy", [this]() { ContextCopyText(); }}, 41 | {L"Paste", [this]() { ContextPasteText(); }} 42 | }; 43 | 44 | bool Active = false; 45 | bool Selecting = false; 46 | bool Held = false; 47 | 48 | bool IsKeyAcceptable(); 49 | 50 | void SetState(); 51 | void ArrowKeyNavition(); 52 | void InputText(); 53 | void DeleteText(); 54 | void SetSelectionPoint(); 55 | void SelectionDragging(); 56 | void CopyText(); 57 | void PasteText(); 58 | void ContextMenu(); 59 | void SetSelection(); 60 | 61 | public: 62 | TextBox(float x, float y, std::wstring text, std::wstring* data, bool hide = false); 63 | void Update(); 64 | void Draw(); 65 | bool IsTabbed; 66 | }; 67 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Toggle.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Toggle.h" 3 | #include "Input.h" 4 | #include "Drawing.h" 5 | #include "Font.h" 6 | 7 | Toggle::Toggle(float x, float y, std::wstring text, bool* data = nullptr) 8 | { 9 | Toggle::Pos = {x, y}; 10 | Toggle::Size = {11, 11}; 11 | Toggle::Name = text; 12 | Toggle::TextSize = GetTextSize(text, LIT("Verdana"), 12); 13 | Data = data; 14 | SetVisible(true); 15 | } 16 | 17 | void Toggle::Update() 18 | { 19 | if (!Toggle::Parent) 20 | Toggle::SetVisible(false); 21 | if (!Toggle::IsVisible()) 22 | return; 23 | auto currenttime = std::chrono::high_resolution_clock::now(); 24 | std::chrono::duration deltatime = currenttime - Toggle::LastUpdateTime; 25 | Toggle::LastUpdateTime = currenttime; 26 | double deltaseconds = deltatime.count(); 27 | Toggle::ParentPos = Toggle::Parent->GetParentPos(); 28 | if (!Toggle::Blocked) 29 | { 30 | // square click check 31 | if (IsMouseInRectangle(Toggle::Pos + Toggle::ParentPos, Toggle::Size) && IsKeyClicked(VK_LBUTTON) && Toggle::LastClick < (clock() * 0.00001f)) 32 | { 33 | *Toggle::Data = !(*Toggle::Data); 34 | Toggle::LastClick = (clock() * 0.00001f) + 0.002f; 35 | Toggle::ValueChangeEvent(); 36 | } 37 | // text click check 38 | Vector2 textdimensions = {Toggle::TextSize.x + 4, Toggle::TextSize.y}; 39 | if (IsMouseInRectangle(Toggle::ParentPos.x + Toggle::Pos.x + (Toggle::Size.x), Toggle::ParentPos.y + Toggle::Pos.y - 1, Toggle::TextSize.x, Toggle::TextSize.y) && IsKeyClicked(VK_LBUTTON) && Toggle::LastClick < (clock() * 0.00001f)) 40 | { 41 | *Toggle::Data = !(*Toggle::Data); 42 | Toggle::LastClick = (clock() * 0.00001f) + 0.002f; 43 | Toggle::ValueChangeEvent(); 44 | } 45 | } 46 | 47 | if (*Data) 48 | { 49 | Toggle::ClickedAnimationProgress += (1.0f / Toggle::ClickedAnimationDuration) * deltaseconds; 50 | Toggle::ClickedAnimationProgress = std::min(Toggle::ClickedAnimationProgress, 1.0f); 51 | Toggle::FadeAnimationProgress += (1.0f / Toggle::FadeAnimationDuration) * deltaseconds; 52 | Toggle::FadeAnimationProgress = std::min(Toggle::FadeAnimationProgress, 1.0f); 53 | } 54 | else { 55 | Toggle::ClickedAnimationProgress -= (1.0f / Toggle::ClickedAnimationDuration) * deltaseconds; 56 | Toggle::ClickedAnimationProgress = std::max(Toggle::ClickedAnimationProgress, 0.0f); 57 | Toggle::FadeAnimationProgress -= (1.0f / Toggle::FadeAnimationDuration) * deltaseconds; 58 | Toggle::FadeAnimationProgress = std::max(Toggle::FadeAnimationProgress, 0.0f); 59 | } 60 | MenuColours[LIT("ToggleInside")].a = static_cast(1 + (255 - 1) * Toggle::FadeAnimationProgress); 61 | int size = static_cast(1 + (Size.x - 2 - 1) * Toggle::ClickedAnimationProgress); 62 | Toggle::RectangleColour = MenuColours[LIT("ToggleInside")]; 63 | Toggle::ClickedSize = size; 64 | } 65 | 66 | void Toggle::Draw() 67 | { 68 | if (!Toggle::Parent) 69 | Toggle::SetVisible(false); 70 | if (!Toggle::IsVisible()) 71 | return; 72 | 73 | MyColour rectColour = MenuColours[LIT("Toggle")]; 74 | MyColour rectOutlineColour = MenuColours[LIT("ToggleOutline")]; 75 | MyColour activeColour = MenuColours[LIT("ToggleInside")]; 76 | MyColour textColour = MenuColours[LIT("Text")]; 77 | 78 | OutlineRectangle(ParentPos.x + Pos.x, ParentPos.y + Pos.y, Size.x + 1, Size.y + 1, 1, rectOutlineColour); 79 | FilledRectangle(ParentPos.x + Pos.x, ParentPos.y + Pos.y, Size.x, Size.y, rectColour); 80 | if (*Toggle::Data == true) 81 | FilledRectangle(ParentPos.x + Pos.x + 1, ParentPos.y + Pos.y + 1, Toggle::ClickedSize, Toggle::ClickedSize, RectangleColour); 82 | 83 | DrawText(Toggle::ParentPos.x + Toggle::Pos.x + (Toggle::Size.x) + 3, Toggle::ParentPos.y + Toggle::Pos.y - (Toggle::Size.y / 8), Toggle::Name, LIT("Verdana"), 12, textColour, None); 84 | } 85 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Entities/Toggle.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Entity.h" 3 | 4 | class Toggle : public Entity 5 | { 6 | protected: 7 | bool* Data; 8 | bool Tabbed = false; 9 | std::chrono::time_point LastUpdateTime; 10 | Vector2 TextSize = Vector2(0, 0); 11 | MyColour RectangleColour; 12 | const float ClickedAnimationDuration = 0.09; // Duration of the size change animation in seconds 13 | float ClickedAnimationProgress = 0.0; 14 | const float FadeAnimationDuration = 1.8; // Duration of the color alpha change animation in seconds 15 | float FadeAnimationProgress = 0.0; 16 | float ClickedSize = 0; 17 | const float HoverAnimationDuration = 0.3; // Duration of the color change animation in seconds 18 | float HoverAnimationProgress = 0.0; 19 | 20 | 21 | public: 22 | Toggle(float x, float y, std::wstring text, bool* data); 23 | void Update(); 24 | void Draw(); 25 | }; 26 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Graphics.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | typedef struct FontInformation 4 | { 5 | size_t size; 6 | IDWriteTextFormat* font; 7 | }; 8 | 9 | extern ID2D1Factory* Factory; 10 | extern ID2D1HwndRenderTarget* RenderTarget; 11 | extern IDWriteFactory* FontFactory; 12 | extern ID2D1SolidColorBrush* Brush; 13 | extern std::map Fonts; 14 | extern std::unordered_map TextLayouts; 15 | extern std::map TextCache; 16 | extern HWND Hwnd; 17 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Start Up/GUI.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | void CreateGUI(); 3 | void Render(); 4 | extern bool MenuOpen; 5 | extern int TabCount; 6 | extern D2D1::ColorF ColourPickerClipBoard; 7 | extern int KeyBindClipBoard; 8 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Start Up/Init.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Init.h" 3 | #include "drawing.h" 4 | #include "GUI.h" 5 | #include "Globals.h" 6 | #include "Camera.h" 7 | #include "PlayerEsp.h" 8 | #include "AnimalEsp.h" 9 | #include "BuildingEsp.h" 10 | #include "OtherEsp.h" 11 | #include "Aimbot.h" 12 | #include "InputManager.h" 13 | #include "kmbox.h" 14 | ID2D1Factory* Factory; 15 | IDWriteFactory* FontFactory; 16 | ID2D1HwndRenderTarget* RenderTarget; 17 | ID2D1SolidColorBrush* Brush; 18 | 19 | 20 | void InitD2D(HWND hWnd) 21 | { 22 | HRESULT result = D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, &Factory); 23 | RECT rect; 24 | GetClientRect(hWnd, &rect); 25 | result = Factory->CreateHwndRenderTarget(D2D1::RenderTargetProperties(D2D1_RENDER_TARGET_TYPE_DEFAULT, D2D1::PixelFormat(DXGI_FORMAT_UNKNOWN, D2D1_ALPHA_MODE_PREMULTIPLIED)), D2D1::HwndRenderTargetProperties(hWnd, D2D1::SizeU(rect.right, rect.bottom), D2D1_PRESENT_OPTIONS_IMMEDIATELY), &RenderTarget); 26 | if (!SUCCEEDED(result)) 27 | return; 28 | 29 | result = DWriteCreateFactory(DWRITE_FACTORY_TYPE_ISOLATED, __uuidof(IDWriteFactory), reinterpret_cast(&FontFactory)); 30 | if (!SUCCEEDED(result)) 31 | return; 32 | 33 | CreateFonts(LIT("Verdana"), LIT(L"Verdana"), 10, DWRITE_FONT_WEIGHT_NORMAL); 34 | CreateFonts("VerdanaBold", LIT(L"Verdana"), 10, DWRITE_FONT_WEIGHT_SEMI_BOLD); 35 | RenderTarget->CreateSolidColorBrush(D2D1::ColorF(0, 0, 0, 0), &Brush); // create global brush 36 | RenderTarget->SetTextAntialiasMode(D2D1_TEXT_ANTIALIAS_MODE_GRAYSCALE); // set aa mode 37 | Keyboard::InitKeyboard(); 38 | kmbox::KmboxInitialize(""); 39 | } 40 | 41 | void CleanD2D() 42 | { 43 | // ensure pointer is valid 44 | // then release memory 45 | if (Factory) 46 | Factory->Release(); 47 | if (RenderTarget) 48 | RenderTarget->Release(); 49 | if (Brush) 50 | Brush->Release(); 51 | for (std::pair dict : Fonts) 52 | { 53 | const FontInformation& fontInfo = dict.second; 54 | if (fontInfo.font) 55 | fontInfo.font->Release(); 56 | } 57 | //Clean all cached text layours 58 | for (std::pair dict : TextLayouts) 59 | { 60 | IDWriteTextLayout* layout = dict.second; 61 | if (layout) 62 | layout->Release(); 63 | } 64 | 65 | for (std::pair dict : TextCache) 66 | { 67 | IDWriteTextLayout* layout = dict.second; 68 | if (layout) 69 | layout->Release(); 70 | } 71 | } 72 | 73 | int FrameRate() 74 | { 75 | static int fps; 76 | static int lastfps; 77 | static float lasttime; 78 | static float time; 79 | 80 | time = clock() * 0.001f; 81 | fps++; 82 | float DeltaTime = time - lasttime; 83 | if ((DeltaTime) >= 1.0f) 84 | { 85 | lasttime = time; 86 | lastfps = fps; 87 | fps = 0; 88 | } 89 | return lastfps; 90 | } 91 | 92 | 93 | 94 | std::shared_ptr UpdateViewMatrix = std::make_shared(5, [] { 95 | if (!EngineInstance.load()) 96 | return; 97 | auto handle = TargetProcess.CreateScatterHandle(); 98 | EngineInstance.load()->RefreshViewMatrix(handle); 99 | TargetProcess.ExecuteReadScatter(handle); 100 | TargetProcess.CloseScatterHandle(handle); 101 | 102 | }); 103 | 104 | void RenderFrame() 105 | { 106 | if (EngineInstance.load()) 107 | { 108 | if (EngineInstance.load()->GetActorCount() <= 0 || EngineInstance.load()->GetActorCount() > 5000) 109 | { 110 | EngineInstance = std::make_shared(); 111 | EngineInstance.load()->Cache(); 112 | } 113 | } 114 | UpdateViewMatrix->Execute(); 115 | UpdatePlayers->Execute(); 116 | UpdateAnimals->Execute(); 117 | RenderTarget->BeginDraw(); 118 | RenderTarget->Clear(Colour(0, 0, 0, 255)); // clear over the last buffer 119 | RenderTarget->SetTransform(D2D1::Matrix3x2F::Identity()); // set new transform 120 | Aimbot(); 121 | DrawOtherEsp(); 122 | DrawBuildingEsp(); 123 | DrawAnimalEsp(); 124 | DrawPlayerEsp(); 125 | AimbotDrawing(); 126 | Render(); 127 | RenderTarget->EndDraw(); 128 | } 129 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Start Up/Init.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #pragma comment(lib, "d2d1.lib") 3 | #pragma comment(lib, "Dwrite") 4 | #pragma comment(lib, "windowscodecs.lib") 5 | 6 | void CleanD2D(); 7 | void InitD2D(HWND hWnd); 8 | void RenderFrame(); 9 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Animation.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Animation.h" 3 | 4 | float InOutSine(float t) 5 | { 6 | return -0.5f * (std::cos(3.14f * t) - 1.0f); 7 | } 8 | 9 | MyColour InterpolateColour(const MyColour& colour1, const MyColour& colour2, float progress) 10 | { 11 | float r = colour1.r + (colour2.r - colour1.r) * progress; 12 | float g = colour1.g + (colour2.g - colour1.g) * progress; 13 | float b = colour1.b + (colour2.b - colour1.b) * progress; 14 | 15 | return Colour(static_cast(r), static_cast(g), static_cast(b), static_cast(255)); 16 | } -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Animation.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | float InOutSine(float t); 3 | 4 | template 5 | T Lerp(const T& start, const T& end, float t) 6 | { 7 | if (t < 0.0f) t = 0.0f; 8 | else if (t > 1.0f) t = 1.0f; 9 | 10 | return start + t * (end - start); 11 | } 12 | 13 | MyColour InterpolateColour(const MyColour& colour1, const MyColour& colour2, float progress); -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Colour.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Colour.h" 3 | 4 | std::map MenuColours = 5 | { 6 | /*Main Form colors*/ 7 | {"Background", MyColour(20, 20, 20, 255)}, 8 | {"Outline", MyColour(140, 140, 140, 255)}, 9 | {"Header", MyColour(30, 30, 30, 255)}, 10 | {"HeaderSeperator", MyColour(0, 150, 255, 255)}, 11 | {"Text", MyColour(240, 240, 240, 255)}, 12 | {"TextSelected", MyColour(0, 150, 255, 255)}, 13 | {"TextHover", MyColour(0, 255, 0, 255)}, 14 | 15 | {"Button", MyColour(80, 80, 80, 255)}, 16 | {"ButtonHover", MyColour(100, 100, 100, 255)}, 17 | {"ButtonActive", MyColour(120, 120, 120, 255)}, 18 | {"ButtonOutline", MyColour(130, 130, 130, 255)}, 19 | 20 | {"ComboBox", MyColour(80, 80, 80, 255)}, 21 | {"ComboBoxHover", MyColour(150, 150, 150, 120)}, 22 | {"ComboBoxOutline", MyColour(130, 130, 130, 255)}, 23 | {"ComboBoxSelectedText", MyColour(0, 255, 150, 255)}, 24 | {"ComboBoxDropDown", MyColour(150, 150, 150, 120)}, 25 | {"ComboBoxSlider", MyColour(0, 255, 150, 255)}, 26 | 27 | {"DropDown", MyColour(80, 80, 80, 255)}, 28 | {"DropDownOutline", MyColour(130, 130, 130, 255)}, 29 | {"DropDownSelectedText", MyColour(0, 150, 255, 255)}, 30 | {"DropDownArrow", MyColour(0, 150, 255, 255)}, 31 | {"DropDownActiveArrow", MyColour(150, 150, 150, 120)}, 32 | {"DropDownSlider", MyColour(0, 150, 255, 255)}, 33 | 34 | {"Keybind", MyColour(80, 80, 80, 255)}, 35 | {"KeybindHover", MyColour(120, 120, 120, 255)}, 36 | {"KeybindOutline", MyColour(130, 130, 130, 255)}, 37 | 38 | {"Slider", MyColour(80, 80, 80, 255)}, 39 | {"SliderInside", MyColour(0, 150, 255, 255)}, 40 | {"SliderOutline", MyColour(20, 20, 20, 255)}, 41 | {"SliderWidget", MyColour(255, 255, 255, 255)}, 42 | 43 | {"Tab", MyColour(80, 80, 80, 255)}, 44 | {"TabHover", MyColour(100, 100, 100, 255)}, 45 | {"TabActive", MyColour(120, 120, 120, 255)}, 46 | 47 | {"TextBox", MyColour(80, 80, 80, 255)}, 48 | {"TextBoxOutline", MyColour(200, 200, 200, 255)}, 49 | {"TextBoxHighlight", MyColour(0, 150, 255, 100)}, 50 | {"TextBoxCurrent", MyColour(255, 255, 255, 255)}, // The current location of your cursor in the input box. 51 | {"TextBoxContextOutline", MyColour(120, 120, 120, 255)}, 52 | {"TextBoxContextFirstLine", MyColour(255, 255, 255, 255)}, // First line that happens of the context menu 53 | 54 | {"Toggle", MyColour(80, 80, 80, 255)}, 55 | {"ToggleOutline", MyColour(130, 130, 130, 255)}, 56 | {"ToggleInside", MyColour(0, 150, 255, 255)}, 57 | 58 | //{"CheckboxHover", MyColour(100, 100, 100, 255)}, 59 | //{"CheckboxActive", MyColour(120, 120, 120, 255)}, 60 | 61 | }; 62 | 63 | D2D1::ColorF Colour(UINT8 R, UINT8 G, UINT8 B, UINT8 A) 64 | { 65 | return D2D1::ColorF(static_cast(R) / 255.0f, static_cast(G) / 255.0f, static_cast(B) / 255.0f, static_cast(A) / 255.0f); 66 | } 67 | 68 | 69 | D2D1::ColorF HueToRGB(float hue) 70 | { 71 | hue = fmod(hue, 360.0f); 72 | if (hue < 0) 73 | hue += 360.0f; 74 | 75 | int sector = static_cast(hue / 60.0f); 76 | 77 | float fraction = (hue / 60.0f) - sector; 78 | 79 | float c = 1.0f; 80 | float x = 1.0f - std::abs(2 * fraction - 1); 81 | float m = 0.0f; 82 | D2D1::ColorF col = D2D1::ColorF(0.0f, 0.0f, 0.0f, 0.0f); 83 | 84 | switch (sector) 85 | { 86 | case 0: 87 | col.r = (c + m); 88 | col.g = (x + m); 89 | col.b = (m); 90 | break; 91 | case 1: 92 | col.r = (x + m); 93 | col.g = (c + m); 94 | col.b = (m); 95 | break; 96 | case 2: 97 | col.r = (m); 98 | col.g = (c + m); 99 | col.b = (x + m); 100 | break; 101 | case 3: 102 | col.r = (m); 103 | col.g = (x + m); 104 | col.b = (c + m); 105 | break; 106 | case 4: 107 | col.r = (x + m); 108 | col.g = (m); 109 | col.b = (c + m); 110 | break; 111 | case 5: 112 | col.r = (c + m); 113 | col.g = (m); 114 | col.b = (x + m); 115 | break; 116 | default: 117 | col.r = 0; 118 | col.g = 0; 119 | col.b = 0; 120 | break; 121 | } 122 | col.a = 1.0f; 123 | return col; 124 | } 125 | 126 | float RGBToHue(float r, float g, float b) 127 | { 128 | float hue = 0.0f; 129 | float rnorm = r; 130 | float gnorm = g; 131 | float bnorm = b; 132 | 133 | float maxcolour = std::max({ rnorm, gnorm, bnorm }); 134 | float mincolour = std::min({ rnorm, gnorm, bnorm }); 135 | 136 | if (maxcolour == mincolour) 137 | { 138 | hue = 0.0f; 139 | } 140 | else 141 | { 142 | float delta = maxcolour - mincolour; 143 | if (maxcolour == rnorm) 144 | hue = 60.0f * fmod(((gnorm - bnorm) / delta), 6.0f); 145 | else if (maxcolour == gnorm) 146 | hue = 60.0f * (((bnorm - rnorm) / delta) + 2.0f); 147 | else if (maxcolour == bnorm) 148 | hue = 60.0f * (((rnorm - gnorm) / delta) + 4.0f); 149 | } 150 | 151 | if (hue < 0.0f) 152 | hue += 360.0f; 153 | 154 | return hue; 155 | } 156 | 157 | D2D1::ColorF HsvToRgb(float hue, float saturation, float value, float alpha) 158 | { 159 | // Ensure hue is in the range [0, 360) 160 | hue = fmodf(hue, 360.0f); 161 | if (hue < 0.0f) 162 | hue += 360.0f; 163 | 164 | // Normalize saturation and value to [0, 1] 165 | saturation = std::clamp(saturation, 0.0f, 1.0f); 166 | value = std::clamp(value, 0.0f, 1.0f); 167 | 168 | // Algorithm to convert HSV to RGB 169 | float chroma = value * saturation; 170 | float hueprime = hue / 60.0f; 171 | float x = chroma * (1.0f - fabsf(fmodf(hueprime, 2.0f) - 1.0f)); 172 | 173 | float r, g, b; 174 | if (0.0f <= hueprime && hueprime < 1.0f) { 175 | r = chroma; 176 | g = x; 177 | b = 0.0f; 178 | } 179 | else if (1.0f <= hueprime && hueprime < 2.0f) { 180 | r = x; 181 | g = chroma; 182 | b = 0.0f; 183 | } 184 | else if (2.0f <= hueprime && hueprime < 3.0f) { 185 | r = 0.0f; 186 | g = chroma; 187 | b = x; 188 | } 189 | else if (3.0f <= hueprime && hueprime < 4.0f) { 190 | r = 0.0f; 191 | g = x; 192 | b = chroma; 193 | } 194 | else if (4.0f <= hueprime && hueprime < 5.0f) { 195 | r = x; 196 | g = 0.0f; 197 | b = chroma; 198 | } 199 | else { 200 | r = chroma; 201 | g = 0.0f; 202 | b = x; 203 | } 204 | 205 | float m = value - chroma; 206 | r += m; 207 | g += m; 208 | b += m; 209 | 210 | return D2D1::ColorF(r, g, b, alpha); 211 | } 212 | 213 | HsvColour RgbToHsv(float r, float g, float b) 214 | { 215 | float rnorm = r; 216 | float gnorm = g; 217 | float bnorm = b; 218 | // printf("R: %f, G: %f, B: %f\n", rnorm, gnorm, bnorm); 219 | 220 | float maxcolor = std::max({ rnorm, gnorm, bnorm }); 221 | float mincolor = std::min({ rnorm, gnorm, bnorm }); 222 | 223 | float delta = maxcolor - mincolor; 224 | //printf("Delta: %f\n", delta); 225 | HsvColour hsv; 226 | 227 | // Value calculation 228 | hsv.V = maxcolor; 229 | if (maxcolor == 0 || delta == 0) { 230 | hsv.S = 0; 231 | hsv.H = 0; // undefined, set hue to 0 232 | 233 | return hsv; 234 | } 235 | else { 236 | hsv.S = delta / maxcolor; 237 | } 238 | 239 | 240 | // Hue calculation 241 | if (delta == 0) 242 | hsv.H = 0; 243 | else if (maxcolor == r) 244 | hsv.H = 60 * ((g - b) / delta); 245 | else if (maxcolor == g) 246 | hsv.H = 60 * ((b - r) / delta + 2); 247 | else 248 | hsv.H = 60 * ((r - g) / delta + 4); 249 | 250 | if (hsv.H < 0) 251 | hsv.H += 360; 252 | return hsv; 253 | } 254 | 255 | void SetColour(std::string name, D2D1::ColorF col) 256 | { 257 | MenuColours[name] = MyColour(col); 258 | } 259 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Colour.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | D2D1::ColorF Colour(UINT8 R, UINT8 G, UINT8 B, UINT8 A = 255); 3 | 4 | //Fuck you Microsoft for not having a default constructor that will work for mappy map :( 5 | //should by default work even if you just passthrough D2D1 Color to it (: 6 | struct MyColour 7 | { 8 | float r, g, b, a; 9 | MyColour() = default; 10 | 11 | MyColour(float r, float g, float b, float a = 1.f) : r(r), g(g), b(b), a(a) 12 | { 13 | } 14 | 15 | MyColour(int r, int g, int b, int a = 255) : r(static_cast(r) / 255.0f), g(static_cast(g) / 255.0f), b(static_cast(b) / 255.0f), a(static_cast(a) / 255.0f) 16 | { 17 | } 18 | 19 | MyColour(D2D1::ColorF col) : r(col.r), g(col.g), b(col.b), a(col.a) 20 | { 21 | } 22 | 23 | MyColour Modify(float r, float g, float b, float a) 24 | { 25 | return MyColour(r, g, b, a); 26 | } 27 | 28 | /*Convert to d2d*/ 29 | D2D1::ColorF Get() { return D2D1::ColorF(r, g, b, a); } 30 | }; 31 | 32 | struct HsvColour 33 | { 34 | float H; 35 | float S; 36 | float V; 37 | }; 38 | 39 | extern std::map MenuColours; 40 | 41 | D2D1::ColorF HueToRGB(float hue); 42 | float RGBToHue(float r, float g, float b); 43 | D2D1::ColorF HsvToRgb(float hue, float saturation, float value, float alpha); 44 | HsvColour RgbToHsv(float r, float g, float b); 45 | void SetColour(std::string name, D2D1::ColorF col); 46 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Font.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Font.h" 3 | 4 | std::map Fonts; 5 | std::unordered_map TextLayouts; 6 | 7 | void CreateFonts(std::string customfontname, std::wstring_view fontname, float size, DWRITE_FONT_WEIGHT weight) 8 | { 9 | IDWriteTextFormat* text_format; 10 | 11 | std::string fontnamestr(fontname.begin(), fontname.end()); 12 | if (Fonts.find(fontnamestr) == Fonts.end()) 13 | { 14 | HRESULT result = FontFactory->CreateTextFormat( 15 | fontname.data(), 16 | nullptr, 17 | weight, 18 | DWRITE_FONT_STYLE_NORMAL, 19 | DWRITE_FONT_STRETCH_NORMAL, 20 | size, 21 | L"", 22 | &text_format 23 | ); 24 | 25 | if (SUCCEEDED(result)) 26 | { 27 | Fonts[customfontname].size = size; 28 | Fonts[customfontname].font = text_format; 29 | } 30 | } 31 | } 32 | 33 | Vector2 GetTextSize(std::wstring text, std::string font, size_t font_size) 34 | { 35 | IDWriteTextLayout* layout; 36 | 37 | if (text.empty()) 38 | return Vector2(0, 0); 39 | //If font size is 0, use default font size 40 | if (font_size == 0) 41 | font_size = Fonts[font].size; 42 | //Caching text layouts for performance improvements 43 | if (TextLayouts.find(text) == TextLayouts.end()) 44 | { 45 | HRESULT hr = FontFactory->CreateTextLayout( 46 | text.data(), 47 | static_cast(text.length()), 48 | Fonts[font].font, 49 | 4096, 50 | 4096, 51 | &layout 52 | ); 53 | 54 | if (SUCCEEDED(hr)) 55 | TextLayouts[text] = layout; 56 | else 57 | return Vector2(0, 0); 58 | } 59 | else 60 | layout = TextLayouts[text]; 61 | 62 | DWRITE_TEXT_RANGE range = DWRITE_TEXT_RANGE(); 63 | range.length = text.length(); 64 | range.startPosition = 0; 65 | layout->SetFontSize(font_size, range); 66 | DWRITE_TEXT_METRICS metrics; 67 | if (SUCCEEDED(layout->GetMetrics(&metrics))) 68 | return Vector2(metrics.widthIncludingTrailingWhitespace, metrics.height); 69 | return Vector2(0, 0); 70 | } 71 | 72 | IDWriteTextFormat* GetFont(std::string fontname) 73 | { 74 | return Fonts[fontname].font; 75 | } 76 | 77 | size_t GetFontSize(std::string fontname) 78 | { 79 | return Fonts[fontname].size; 80 | } 81 | -------------------------------------------------------------------------------- /ConanExilesDMA/Graphics/Utility/Font.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Vector.h" 3 | 4 | enum FontAlignment 5 | { 6 | Left = 0, 7 | Centre = 1, 8 | Right = 2, 9 | CentreLeft = 3, 10 | CentreRight = 4, 11 | CentreCentre = 5, 12 | None = 6 13 | }; 14 | 15 | extern void CreateFonts(std::string customfontname, std::wstring_view fontname, float size, DWRITE_FONT_WEIGHT weight); 16 | extern Vector2 GetTextSize(std::wstring text, std::string font, size_t font_size = 0); 17 | extern size_t GetFontSize(std::string fontname); 18 | extern IDWriteTextFormat* GetFont(std::string fontname); 19 | -------------------------------------------------------------------------------- /ConanExilesDMA/Main.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Memory.h" 3 | #include "CheatFunction.h" 4 | #include "Globals.h" 5 | #include "Init.h" 6 | #include "GUI.h" 7 | #include "Engine.h" 8 | std::atomic> EngineInstance; 9 | std::string ProcessName; 10 | 11 | void main() 12 | { 13 | bool gamefound = true; 14 | ProcessName = "ConanSandbox.exe"; 15 | if (TargetProcess.Init("ConanSandbox.exe")) 16 | { 17 | ProcessName = "ConanSandbox.exe"; 18 | } 19 | else 20 | { 21 | printf("Failed to find game\n"); 22 | return; 23 | } 24 | 25 | 26 | uint64_t base = TargetProcess.GetBaseAddress(ProcessName); 27 | uint64_t size = TargetProcess.GetBaseSize(ProcessName); 28 | EngineInstance.store(std::make_shared()); 29 | EngineInstance.load()->Cache(); 30 | 31 | 32 | 33 | //uint64_t persistentlevel = 0x190; 34 | //persistentlevel = TargetProcess.Read(gobjects + gameinstance); 35 | } 36 | LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 37 | { 38 | InputWndProc(hWnd, message, wParam, lParam); 39 | switch (message) 40 | { 41 | case WM_DESTROY: 42 | PostQuitMessage(0); 43 | return 0; 44 | break; 45 | } 46 | 47 | return DefWindowProc(hWnd, message, wParam, lParam); 48 | } 49 | std::shared_ptr Cache = std::make_shared(2000, [] { 50 | if (!EngineInstance.load()) 51 | { 52 | EngineInstance = std::make_shared(); 53 | return; 54 | } 55 | if (EngineInstance.load()->GetActorCount() <= 0 || EngineInstance.load()->GetActorCount() > 5000) 56 | { 57 | EngineInstance = std::make_shared(); 58 | } 59 | EngineInstance.load()->Cache(); 60 | }); 61 | void CachingThread() 62 | { 63 | while (true) 64 | { 65 | Cache->Execute(); 66 | Sleep(10); 67 | } 68 | } 69 | 70 | int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 71 | { 72 | HWND hWnd; 73 | WNDCLASSEX wc; 74 | AllocConsole(); 75 | FILE* fDummy; 76 | freopen_s(&fDummy, LIT("CONIN$"), LIT("r"), stdin); 77 | freopen_s(&fDummy, LIT("CONOUT$"), LIT("w"), stderr); 78 | freopen_s(&fDummy, LIT("CONOUT$"), LIT("w"), stdout); 79 | printf(LIT("Debugging Window:\n")); 80 | 81 | main(); 82 | ZeroMemory(&wc, sizeof(WNDCLASSEX)); 83 | wc.cbSize = sizeof(WNDCLASSEX); 84 | wc.style = CS_HREDRAW | CS_VREDRAW; 85 | wc.lpfnWndProc = WindowProc; 86 | wc.hInstance = hInstance; 87 | wc.hCursor = LoadCursor(NULL, IDC_ARROW); 88 | wc.hbrBackground = (HBRUSH)COLOR_WINDOW; 89 | wc.lpszClassName = L"GUI Framework"; 90 | RegisterClassEx(&wc); 91 | 92 | hWnd = CreateWindowEx(WS_EX_APPWINDOW, wc.lpszClassName, L"GUI Framework", 93 | WS_POPUP, 94 | 0, 0, GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), NULL, NULL, hInstance, NULL); 95 | 96 | if (!hWnd) 97 | return -1; 98 | 99 | 100 | SetLayeredWindowAttributes(hWnd, RGB(0, 0, 0), 255, LWA_ALPHA); 101 | 102 | ShowWindow(hWnd, nCmdShow); 103 | 104 | InitD2D(hWnd); 105 | CreateGUI(); 106 | MSG msg; 107 | SetProcessDPIAware(); 108 | SetInput(); 109 | std::thread cache(CachingThread); 110 | cache.detach(); 111 | while (TRUE) 112 | { 113 | if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) 114 | { 115 | TranslateMessage(&msg); 116 | DispatchMessage(&msg); 117 | 118 | if (msg.message == WM_QUIT) 119 | break; 120 | } 121 | RenderFrame(); 122 | } 123 | CleanD2D(); 124 | return msg.wParam; 125 | } 126 | -------------------------------------------------------------------------------- /ConanExilesDMA/Memory/InputManager.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "InputManager.h" 3 | #include "Registry.h" 4 | #include "Memory/Memory.h" 5 | 6 | namespace Keyboard 7 | { 8 | uint64_t gafAsyncKeyStateExport = 0; 9 | uint8_t state_bitmap[64]{ }; 10 | uint8_t previous_state_bitmap[256 / 8]{ }; 11 | uint64_t win32kbase = 0; 12 | int win_logon_pid = 0; 13 | } 14 | 15 | bool Keyboard::InitKeyboard() 16 | { 17 | c_registry registry; 18 | std::string win = registry.QueryValue("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\CurrentBuild", e_registry_type::sz); 19 | if (win == "") 20 | return false; 21 | int Winver = 0; 22 | if (!win.empty()) 23 | Winver = std::stoi(win); 24 | else 25 | return false; 26 | 27 | win_logon_pid = TargetProcess.GetPidFromName("winlogon.exe"); 28 | if (Winver > 22000) 29 | { 30 | auto pids = TargetProcess.GetPidListFromName("csrss.exe"); 31 | for (size_t i = 0; i < pids.size(); i++) 32 | { 33 | auto pid = pids[i]; 34 | uintptr_t tmp = VMMDLL_ProcessGetModuleBaseU(TargetProcess.vHandle, pid, (LPSTR)"win32ksgd.sys"); 35 | uintptr_t g_session_global_slots = tmp + 0x3110; 36 | uintptr_t user_session_state = TargetProcess.Read(TargetProcess.Read(TargetProcess.Read(g_session_global_slots, pid), pid), pid); 37 | gafAsyncKeyStateExport = user_session_state + 0x3690; 38 | if (gafAsyncKeyStateExport > 0x7FFFFFFFFFFF) 39 | break; 40 | } 41 | if (gafAsyncKeyStateExport > 0x7FFFFFFFFFFF) 42 | return true; 43 | return false; 44 | } 45 | else 46 | { 47 | printf("win10\n"); 48 | PVMMDLL_MAP_EAT eat_map = NULL; 49 | PVMMDLL_MAP_EATENTRY eat_map_entry; 50 | bool result = VMMDLL_Map_GetEATU(TargetProcess.vHandle, TargetProcess.GetPidFromName("winlogon.exe") | VMMDLL_PID_PROCESS_WITH_KERNELMEMORY, (LPSTR)"win32kbase.sys", &eat_map); 51 | if (!result) 52 | return false; 53 | 54 | if (eat_map->dwVersion != VMMDLL_MAP_EAT_VERSION) 55 | { 56 | VMMDLL_MemFree(eat_map); 57 | eat_map_entry = NULL; 58 | return false; 59 | } 60 | printf("eat_map->cMap: %d\n", eat_map->cMap); 61 | for (int i = 0; i < eat_map->cMap; i++) 62 | { 63 | eat_map_entry = eat_map->pMap + i; 64 | if (strcmp(eat_map_entry->uszFunction, "gafAsyncKeyState") == 0) 65 | { 66 | gafAsyncKeyStateExport = eat_map_entry->vaFunction; 67 | 68 | break; 69 | } 70 | } 71 | 72 | VMMDLL_MemFree(eat_map); 73 | eat_map = NULL; 74 | if (gafAsyncKeyStateExport > 0x7FFFFFFFFFFF) 75 | return true; 76 | return false; 77 | } 78 | } 79 | 80 | void Keyboard::UpdateKeys() 81 | { 82 | uint8_t previous_key_state_bitmap[64] = { 0 }; 83 | memcpy(previous_key_state_bitmap, state_bitmap, 64); 84 | 85 | VMMDLL_MemReadEx(TargetProcess.vHandle, win_logon_pid | VMMDLL_PID_PROCESS_WITH_KERNELMEMORY, gafAsyncKeyStateExport, (PBYTE)&state_bitmap, 64, NULL, VMMDLL_FLAG_NOCACHE); 86 | for (int vk = 0; vk < 256; ++vk) 87 | if ((state_bitmap[(vk * 2 / 8)] & 1 << vk % 4 * 2) && !(previous_key_state_bitmap[(vk * 2 / 8)] & 1 << vk % 4 * 2)) 88 | previous_state_bitmap[vk / 8] |= 1 << vk % 8; 89 | } 90 | 91 | auto start = std::chrono::system_clock::now(); 92 | 93 | bool Keyboard::IsKeyDown(uint32_t virtual_key_code) 94 | { 95 | if (gafAsyncKeyStateExport < 0x7FFFFFFFFFFF) 96 | return false; 97 | if (std::chrono::system_clock::now() - start > std::chrono::milliseconds(1)) 98 | { 99 | UpdateKeys(); 100 | start = std::chrono::system_clock::now(); 101 | } 102 | return state_bitmap[(virtual_key_code * 2 / 8)] & 1 << virtual_key_code % 4 * 2; 103 | } 104 | -------------------------------------------------------------------------------- /ConanExilesDMA/Memory/InputManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | #include "Registry.h" 4 | 5 | namespace Keyboard 6 | { 7 | bool InitKeyboard(); 8 | 9 | void UpdateKeys(); 10 | bool IsKeyDown(uint32_t virtual_key_code); 11 | }; 12 | -------------------------------------------------------------------------------- /ConanExilesDMA/Memory/Memory.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | #include "InputManager.h" 4 | class Memory 5 | { 6 | private: 7 | struct LibModules 8 | { 9 | HMODULE VMM = nullptr; 10 | HMODULE FTD3XX = nullptr; 11 | HMODULE LEECHCORE = nullptr; 12 | }; 13 | 14 | static inline LibModules modules{ }; 15 | 16 | struct CurrentProcessInformation 17 | { 18 | int PID = 0; 19 | size_t base_address = 0; 20 | size_t base_size = 0; 21 | std::string process_name = ""; 22 | }; 23 | std::unordered_map Modules; 24 | 25 | 26 | static inline BOOLEAN DMA_INITIALIZED = FALSE; 27 | static inline BOOLEAN PROCESS_INITIALIZED = FALSE; 28 | /** 29 | *Dumps the systems Current physical memory pages 30 | *To a file so we can use it in our DMA (: 31 | *This file it created to %temp% folder 32 | *@return true if successful, false if not. 33 | */ 34 | bool DumpMemoryMap(bool debug = false); 35 | 36 | /** 37 | * brief Removes basic information related to the FPGA device 38 | * This is required before any DMA operations can be done. 39 | * To ensure the optimal safety in game cheating. 40 | * @return true if successful, false if not. 41 | */ 42 | bool SetFPGA(); 43 | 44 | /*this->registry_ptr = std::make_shared(*this); 45 | this->key_ptr = std::make_shared(*this);*/ 46 | 47 | public: 48 | static inline CurrentProcessInformation current_process{ }; 49 | 50 | /** 51 | * brief Constructor takes a wide string of the process. 52 | * Expects that all the libraries are in the root dir 53 | */ 54 | Memory(); 55 | ~Memory(); 56 | 57 | /** 58 | * brief Initializes the DMA 59 | * This is required before any DMA operations can be done. 60 | * @param process_name the name of the process 61 | * @param memMap if true, will dump the memory map to a file & make the DMA use it. 62 | * @return true if successful, false if not. 63 | */ 64 | bool Init(std::string process_name, bool memMap = true, bool debug = false); 65 | 66 | /*This part here is things related to the process information such as Base daddy, Size ect.*/ 67 | 68 | /** 69 | * brief Gets the process id of the process 70 | * @param process_name the name of the process 71 | * @return the process id of the process 72 | */ 73 | DWORD GetPidFromName(std::string process_name); 74 | 75 | /** 76 | * brief Gets all the processes id(s) of the process 77 | * @param process_name the name of the process 78 | * @returns all the processes id(s) of the process 79 | */ 80 | std::vector GetPidListFromName(std::string process_name); 81 | 82 | /** 83 | * \brief Gets the module list of the process 84 | * \param process_name the name of the process 85 | * \return all the module names of the process 86 | */ 87 | std::vector GetModuleList(std::string process_name); 88 | 89 | /** 90 | * \brief Gets the process information 91 | * \return the process information 92 | */ 93 | VMMDLL_PROCESS_INFORMATION GetProcessInformation(); 94 | 95 | 96 | /** 97 | * brief Gets the base address of the process 98 | * @param module_name the name of the module 99 | * @return the base address of the process 100 | */ 101 | size_t GetBaseAddress(std::string module_name); 102 | 103 | /** 104 | * brief Gets the base size of the process 105 | * @param module_name the name of the module 106 | * @return the base size of the process 107 | */ 108 | size_t GetBaseSize(std::string module_name); 109 | 110 | /** 111 | * brief Gets the export table address of the process 112 | * @param import the name of the export 113 | * @param process the name of the process 114 | * @param module the name of the module that you wanna find the export in 115 | * @return the export table address of the export 116 | */ 117 | uintptr_t GetExportTableAddress(std::string import, std::string process, std::string module); 118 | 119 | /** 120 | * brief Gets the import table address of the process 121 | * @param import the name of the import 122 | * @param process the name of the process 123 | * @param module the name of the module that you wanna find the import in 124 | * @return the import table address of the import 125 | */ 126 | uintptr_t GetImportTableAddress(std::string import, std::string process, std::string module); 127 | 128 | /** 129 | * \brief This fixes the CR3 fuckery that EAC does. 130 | * It fixes it by iterating over all DTB's that exist within your system and looks for specific ones 131 | * that nolonger have a PID assigned to them, aka their pid is 0 132 | * it then puts it in a vector to later try each possible DTB to find the DTB of the process. 133 | * NOTE: Using FixCR3 requires you to have symsrv.dll, dbghelp.dll and info.db 134 | */ 135 | bool FixCr3(); 136 | 137 | /** 138 | * \brief Dumps the process memory at address (requires to be a valid PE Header) to the path 139 | * \param address the address to the PE Header(BaseAddress) 140 | * \param path the path where you wanna save dump to 141 | */ 142 | bool DumpMemory(uintptr_t address, std::string path); 143 | 144 | /*This part is where all memory operations are done, such as read, write.*/ 145 | 146 | /** 147 | * \brief Scans the process for the signature. 148 | * \param signature the signature example "48 ? ? ?" 149 | * \param range_start Region to start scan from 150 | * \param range_end Region up to where it should scan 151 | * \param PID (OPTIONAL) where to read to? 152 | * \return address of signature 153 | */ 154 | uint64_t FindSignature(const char* signature, uint64_t range_start, uint64_t range_end, int PID = 0); 155 | 156 | /** 157 | * \brief Writes memory to the process 158 | * \param address The address to write to 159 | * \param buffer The buffer to writeze of the buffer 160 | * \return 161 | * \param size The si 162 | */ 163 | bool Write(uintptr_t address, void* buffer, size_t size) const; 164 | bool Write(uintptr_t address, void* buffer, size_t size, int pid) const; 165 | 166 | /** 167 | * \brief Writes memory to the process using a template 168 | * \param address to write to 169 | * \param value the value you'll write to the address 170 | */ 171 | template 172 | bool Write(void* address, T value) 173 | { 174 | return Write(address, &value, sizeof(T)); 175 | } 176 | 177 | template 178 | bool Write(uintptr_t address, T value) 179 | { 180 | return Write(address, &value, sizeof(T)); 181 | } 182 | 183 | /** 184 | * brief Reads memory from the process 185 | * @param address The address to read from 186 | * @param buffer The buffer to read to 187 | * @param size The size of the buffer 188 | * @return true if successful, false if not. 189 | */ 190 | bool Read(uintptr_t address, void* buffer, size_t size) const; 191 | bool Read(uintptr_t address, void* buffer, size_t size, int pid) const; 192 | 193 | /** 194 | * brief Reads memory from the process using a template 195 | * @param address The address to read from 196 | * @return the value read from the process 197 | */ 198 | template 199 | T Read(void* address) 200 | { 201 | T buffer{ }; 202 | memset(&buffer, 0, sizeof(T)); 203 | Read(reinterpret_cast(address), reinterpret_cast(&buffer), sizeof(T)); 204 | 205 | return buffer; 206 | } 207 | 208 | template 209 | T Read(uint64_t address) 210 | { 211 | return Read(reinterpret_cast(address)); 212 | } 213 | 214 | /** 215 | * brief Reads memory from the process using a template and pid 216 | * @param address The address to read from 217 | * @param pid The process id of the process 218 | * @return the value read from the process 219 | */ 220 | template 221 | T Read(void* address, int pid) 222 | { 223 | T buffer{ }; 224 | memset(&buffer, 0, sizeof(T)); 225 | Read(reinterpret_cast(address), reinterpret_cast(&buffer), sizeof(T), pid); 226 | 227 | return buffer; 228 | } 229 | 230 | template 231 | T Read(uint64_t address, int pid) 232 | { 233 | return Read(reinterpret_cast(address), pid); 234 | } 235 | 236 | /** 237 | * \brief Create a scatter handle, this is used for scatter read/write requests 238 | * \return Scatter handle 239 | */ 240 | VMMDLL_SCATTER_HANDLE CreateScatterHandle(); 241 | VMMDLL_SCATTER_HANDLE CreateScatterHandle(int pid); 242 | 243 | /** 244 | * \brief Closes the scatter handle 245 | * \param handle 246 | */ 247 | void CloseScatterHandle(VMMDLL_SCATTER_HANDLE handle); 248 | 249 | /** 250 | * \brief Adds a scatter read/write request to the handle 251 | * \param handle the handle 252 | * \param address the address to read/write to 253 | * \param buffer the buffer to read/write to 254 | * \param size the size of buffer 255 | */ 256 | bool AddScatterReadRequest(VMMDLL_SCATTER_HANDLE handle, uint64_t address, void* buffer, size_t size); 257 | void AddScatterWriteRequest(VMMDLL_SCATTER_HANDLE handle, uint64_t address, void* buffer, size_t size); 258 | template 259 | bool AddScatterWriteRequest(VMMDLL_SCATTER_HANDLE handle, uint64_t addr, T value) const 260 | { 261 | if (!(addr > 0x2000000 && addr < 0x7FFFFFFFFFFF)) 262 | return false; 263 | bool ret = !VMMDLL_Scatter_PrepareWrite(handle, addr, reinterpret_cast(&value), sizeof(value)); 264 | if (ret) 265 | { 266 | LOG("failed to prepare scatter write at 0x%p\n", addr); 267 | } 268 | return ret; 269 | } 270 | 271 | /** 272 | * \brief Executes all prepared scatter requests, note if you created a scatter handle with a pid 273 | * you'll need to specify the pid in the execute function. so we can clear the scatters from the handle. 274 | * \param handle 275 | * \param pid 276 | */ 277 | void ExecuteReadScatter(VMMDLL_SCATTER_HANDLE handle, int pid = 0); 278 | void ExecuteWriteScatter(VMMDLL_SCATTER_HANDLE handle, int pid = 0); 279 | 280 | 281 | /*the FPGA handle*/ 282 | VMM_HANDLE vHandle; 283 | }; 284 | 285 | inline Memory TargetProcess; 286 | -------------------------------------------------------------------------------- /ConanExilesDMA/Memory/Registry.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Registry.h" 3 | #include "Memory.h" 4 | 5 | std::string c_registry::QueryValue(const char* path, e_registry_type type) 6 | { 7 | BYTE buffer[0x128]; 8 | DWORD _type = (DWORD)type; 9 | DWORD size = sizeof(buffer); 10 | bool result = VMMDLL_WinReg_QueryValueExU(TargetProcess.vHandle, CC_TO_LPSTR(path), &_type, buffer, &size); 11 | if (!result) 12 | { 13 | LOG("[!] failed QueryValueExU call\n"); 14 | return ""; 15 | } 16 | std::wstring wstr = std::wstring((wchar_t*)buffer); 17 | return std::string(wstr.begin(), wstr.end()); 18 | } 19 | -------------------------------------------------------------------------------- /ConanExilesDMA/Memory/Registry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "pch.h" 3 | 4 | enum class e_registry_type 5 | { 6 | none = REG_NONE, 7 | sz = REG_SZ, 8 | expand_sz = REG_EXPAND_SZ, 9 | binary = REG_BINARY, 10 | dword = REG_DWORD, 11 | dword_little_endian = REG_DWORD_LITTLE_ENDIAN, 12 | dword_big_endian = REG_DWORD_BIG_ENDIAN, 13 | link = REG_LINK, 14 | multi_sz = REG_MULTI_SZ, 15 | resource_list = REG_RESOURCE_LIST, 16 | full_resource_descriptor = REG_FULL_RESOURCE_DESCRIPTOR, 17 | resource_requirements_list = REG_RESOURCE_REQUIREMENTS_LIST, 18 | qword = REG_QWORD, 19 | qword_little_endian = REG_QWORD_LITTLE_ENDIAN 20 | }; 21 | 22 | inline const char* LPWSTR_TO_CC(LPWSTR in) 23 | { 24 | char buffer[500]; 25 | wcstombs(buffer, in, 500); 26 | 27 | return buffer; 28 | } 29 | 30 | inline LPSTR CC_TO_LPSTR(const char* in) 31 | { 32 | LPSTR out = new char[strlen(in) + 1]; 33 | strcpy_s(out, strlen(in) + 1, in); 34 | 35 | return out; 36 | } 37 | 38 | class c_registry 39 | { 40 | private: 41 | public: 42 | c_registry() 43 | { 44 | } 45 | 46 | ~c_registry() 47 | { 48 | } 49 | 50 | std::string QueryValue(const char* path, e_registry_type type); 51 | }; 52 | -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/CheatFunction.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "CheatFunction.h" 3 | 4 | CheatFunction::CheatFunction(int time, std::function func) 5 | { 6 | MsSleep = time; 7 | Function = func; 8 | } 9 | 10 | void CheatFunction::Execute() 11 | { 12 | 13 | if (GetTickCount64() - LastExecution > MsSleep) 14 | { 15 | Function(); 16 | LastExecution = GetTickCount64(); 17 | } 18 | } -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/CheatFunction.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class CheatFunction 3 | { 4 | int MsSleep = 0; 5 | std::function Function; 6 | int LastExecution; 7 | public: 8 | CheatFunction(int time, std::functionfunc); 9 | void Execute(); 10 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Input.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "Input.h" 3 | #include "Init.h" 4 | // local scope enum 5 | enum class KeyState 6 | { 7 | KeyDormant = 0, 8 | KeyInvoked = 1, 9 | KeyActive = 2 10 | }; 11 | 12 | // could do dictionaries but we only want to handle ascii 13 | std::map KeyHeld; 14 | std::map KeyStates; 15 | std::map KeyTimes; 16 | 17 | Vector2 MousePos; 18 | WPARAM Char = NULL; 19 | HCURSOR CurrentCursor; 20 | std::map Cursors; 21 | 22 | void CreateCursor(std::string name, HCURSOR cursor) 23 | { 24 | Cursors[name] = cursor; 25 | } 26 | 27 | void SetCurrentCursor(std::string name) 28 | { 29 | CurrentCursor = Cursors[name]; 30 | } 31 | 32 | HCURSOR GetCurrentCursor() 33 | { 34 | return CurrentCursor; 35 | } 36 | 37 | void UpdateKeyState(int key, bool down) 38 | { 39 | if (key < 0 || key >= KeyStates.size()) 40 | return; 41 | KeyTimes[key] = clock() * 0.001f; 42 | if (KeyHeld[key] && !down) 43 | KeyStates[key] = KeyState::KeyDormant; 44 | 45 | if (KeyHeld[key] && down) 46 | KeyStates[key] = KeyState::KeyActive; 47 | 48 | if (!KeyHeld[key] && down) 49 | KeyStates[key] = KeyState::KeyInvoked; 50 | 51 | KeyHeld[key] = down; 52 | } 53 | 54 | LRESULT CALLBACK InputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 55 | { 56 | switch (message) 57 | { 58 | case WM_MOVE: 59 | SetWindowPos(hWnd, NULL, GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam), GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), SWP_NOZORDER | SWP_NOACTIVATE); 60 | InitD2D(hWnd); 61 | break; 62 | case WM_CHAR: 63 | Char = wParam; 64 | case WM_KEYUP: 65 | case WM_SYSKEYUP: 66 | { 67 | UpdateKeyState(wParam & 0xFF, false); 68 | } 69 | break; 70 | case WM_KEYDOWN: 71 | case WM_SYSKEYDOWN: 72 | { 73 | UpdateKeyState(wParam & 0xFF, true); 74 | } 75 | break; 76 | case WM_LBUTTONUP: 77 | { 78 | UpdateKeyState(VK_LBUTTON, false); 79 | } 80 | break; 81 | 82 | case WM_MBUTTONUP: 83 | { 84 | UpdateKeyState(VK_MBUTTON, false); 85 | } 86 | break; 87 | 88 | case WM_RBUTTONUP: 89 | { 90 | UpdateKeyState(VK_RBUTTON, false); 91 | } 92 | break; 93 | case WM_MOUSEMOVE: 94 | { 95 | //https://stackoverflow.com/questions/21129721/how-does-this-bitmask-apply-to-lparam-wm-hotkey 96 | // prevents calling getcursorpos 97 | MousePos.x = static_cast(lParam & 0xFFFF); 98 | MousePos.y = static_cast((lParam >> 16) & 0xFFFF); 99 | } 100 | break; 101 | case WM_XBUTTONUP: 102 | { 103 | const auto releasedkey = (wParam >> 16) & 0xFFFF; 104 | 105 | if (releasedkey == XBUTTON1) 106 | UpdateKeyState(VK_XBUTTON1, false); 107 | else if (releasedkey == XBUTTON2) 108 | UpdateKeyState(VK_XBUTTON2, false); 109 | } 110 | break; 111 | case WM_XBUTTONDOWN: 112 | { 113 | const auto releasedkey = (wParam >> 16) & 0xFFFF; 114 | 115 | if (releasedkey == XBUTTON1) 116 | UpdateKeyState(VK_XBUTTON1, true); 117 | else if (releasedkey == XBUTTON2) 118 | UpdateKeyState(VK_XBUTTON2, true); 119 | } 120 | break; 121 | case WM_LBUTTONDOWN: 122 | { 123 | UpdateKeyState(VK_LBUTTON, true); 124 | } 125 | break; 126 | case WM_MBUTTONDOWN: 127 | { 128 | UpdateKeyState(VK_MBUTTON, true); 129 | } 130 | break; 131 | case WM_RBUTTONDOWN: 132 | { 133 | UpdateKeyState(VK_RBUTTON, true); 134 | } 135 | break; 136 | 137 | return 0; 138 | } 139 | } 140 | 141 | // check for a held key 142 | bool IsKeyDown(int key) 143 | { 144 | if (key < 0 || key >= KeyStates.size()) 145 | return false; 146 | if (KeyHeld[key] == true) 147 | { 148 | return true; 149 | } 150 | else 151 | return false; 152 | } 153 | 154 | // check for a clicked key 155 | bool IsKeyClicked(int key) 156 | { 157 | if (key < 0 || key >= KeyStates.size()) 158 | return false; 159 | // Check if the click time is below the current time by 0.05 seconds and is invoked, Kinda messy but works well. 160 | if (KeyStates[key] == KeyState::KeyInvoked && (KeyTimes[key]) >= (clock() * 0.001f) - 0.05f) 161 | return true; 162 | else 163 | return false; 164 | } 165 | 166 | // just fill the dictionaries 167 | void SetInput() 168 | { 169 | for (int i = 0; i <= 255; i++) // 255 is for the ascii character set, expand it for utf8 unicode 170 | { 171 | KeyStates[i] = KeyState::KeyDormant; 172 | KeyHeld[i] = false; 173 | } 174 | } 175 | 176 | bool IsMouseInRectangle(int x, int y, int width, int height) 177 | { 178 | return ( 179 | MousePos.x > x && 180 | MousePos.y > y && 181 | MousePos.x < x + width && 182 | MousePos.y < y + height 183 | ); 184 | } 185 | 186 | bool IsMouseInRectangle(Vector2 pos, Vector2 Dimensions) 187 | { 188 | return ( 189 | MousePos.x > pos.x && 190 | MousePos.y > pos.y && 191 | MousePos.x < pos.x + Dimensions.x && 192 | MousePos.y < pos.y + Dimensions.y 193 | ); 194 | } 195 | 196 | float TriangleArea(Vector2 point1, Vector2 point2, Vector2 point3) 197 | { 198 | return (point1.x - point3.x) * (point2.y - point3.y) - (point2.x - point3.x) * (point1.y - point3.y); 199 | } 200 | 201 | bool IsMouseInTriangle(Vector2 point1, Vector2 point2, Vector2 point3) 202 | { 203 | float d1; 204 | float d2; 205 | float d3; 206 | 207 | bool neg; 208 | bool pos; 209 | 210 | d1 = TriangleArea(MousePos, point1, point2); 211 | d2 = TriangleArea(MousePos, point2, point3); 212 | d3 = TriangleArea(MousePos, point3, point1); 213 | 214 | neg = (d1 < 0) || (d2 < 0) || (d3 < 0); 215 | pos = (d1 > 0) || (d2 > 0) || (d3 > 0); 216 | 217 | return !(neg && pos); 218 | } 219 | -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Input.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | extern Vector2 MousePos; 4 | extern std::map Cursors; 5 | extern WPARAM Char; 6 | LRESULT CALLBACK InputWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); 7 | 8 | bool IsKeyDown(int key); 9 | bool IsKeyClicked(int key); 10 | void SetInput(); 11 | bool IsMouseInRectangle(int x, int y, int width, int height); 12 | bool IsMouseInRectangle(Vector2 pos, Vector2 Dimensions); 13 | bool IsMouseInTriangle(Vector2 point1, Vector2 point2, Vector2 point3); 14 | 15 | void SetCurrentCursor(std::string name); 16 | void CreateCursor(std::string name, HCURSOR cursor); 17 | HCURSOR GetCurrentCursor(); 18 | -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Kmbox.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "kmbox.h" 3 | #include 4 | 5 | namespace kmbox 6 | { 7 | HANDLE serial_handle = nullptr; 8 | 9 | bool connected = false; 10 | 11 | int clamp(int i) 12 | { 13 | if (i > 127) 14 | i = 127; 15 | if (i < -128) 16 | i = -128; 17 | 18 | return i; 19 | } 20 | 21 | std::string find_port(const std::string& targetDescription) 22 | { 23 | HDEVINFO hDevInfo = SetupDiGetClassDevsA(&GUID_DEVCLASS_PORTS, 0, 0, DIGCF_PRESENT); 24 | if (hDevInfo == INVALID_HANDLE_VALUE) return ""; 25 | 26 | SP_DEVINFO_DATA deviceInfoData; 27 | deviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); 28 | 29 | for (DWORD i = 0; SetupDiEnumDeviceInfo(hDevInfo, i, &deviceInfoData); ++i) 30 | { 31 | char buf[512]; 32 | DWORD nSize = 0; 33 | 34 | if (SetupDiGetDeviceRegistryPropertyA(hDevInfo, &deviceInfoData, SPDRP_FRIENDLYNAME, NULL, (PBYTE)buf, sizeof(buf), &nSize) && nSize > 0) 35 | { 36 | buf[nSize] = '\0'; 37 | std::string deviceDescription = buf; 38 | 39 | size_t comPos = deviceDescription.find("COM"); 40 | size_t endPos = deviceDescription.find(")", comPos); 41 | 42 | if (comPos != std::string::npos && endPos != std::string::npos && deviceDescription.find(targetDescription) != std::string::npos) 43 | { 44 | SetupDiDestroyDeviceInfoList(hDevInfo); 45 | return deviceDescription.substr(comPos, endPos - comPos); 46 | } 47 | } 48 | } 49 | SetupDiDestroyDeviceInfoList(hDevInfo); 50 | return ""; 51 | } 52 | 53 | void KmboxInitialize(std::string port) 54 | { 55 | 56 | connected = false; 57 | if (serial_handle) 58 | { 59 | CloseHandle(serial_handle); 60 | serial_handle = NULL; 61 | } 62 | // wprintf(L"Connecting to KMBOX on port %ls\n",port.c_str()); 63 | //std::string str = std::string(port.begin(), port.end()); 64 | port = "\\\\.\\" + find_port("USB-SERIAL CH340"); 65 | printf("Connecting to KMBOX on port %s\n", port.c_str()); 66 | 67 | serial_handle = CreateFileA(port.c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); 68 | 69 | if (serial_handle == INVALID_HANDLE_VALUE) 70 | { 71 | // print the serialhandle 72 | printf("Serial handle: %d\n", serial_handle); 73 | printf("Failed to open serial port!\n"); 74 | return; 75 | 76 | } 77 | 78 | if (!SetupComm(serial_handle, 8192, 8192)) 79 | { 80 | printf("Failed to setup serial port!\n"); 81 | CloseHandle(serial_handle); 82 | return; 83 | } 84 | 85 | COMMTIMEOUTS timeouts = { 0 }; 86 | if (!GetCommTimeouts(serial_handle, &timeouts)) 87 | { 88 | CloseHandle(serial_handle); 89 | return; 90 | } 91 | timeouts.ReadIntervalTimeout = 0xFFFFFFFF; 92 | timeouts.ReadTotalTimeoutMultiplier = 0; 93 | timeouts.ReadTotalTimeoutConstant = 0; 94 | timeouts.WriteTotalTimeoutMultiplier = 0; 95 | timeouts.WriteTotalTimeoutConstant = 2000; 96 | 97 | if (!SetCommTimeouts(serial_handle, &timeouts)) 98 | { 99 | 100 | CloseHandle(serial_handle); 101 | return; 102 | } 103 | 104 | PurgeComm(serial_handle, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR); 105 | 106 | DCB dcbSerialParams = { 0 }; 107 | dcbSerialParams.DCBlength = sizeof(dcbSerialParams); 108 | 109 | if (!GetCommState(serial_handle, &dcbSerialParams)) 110 | { 111 | printf("Failed to get serial state!\n"); 112 | CloseHandle(serial_handle); 113 | return; 114 | } 115 | 116 | int baud = 115200; 117 | dcbSerialParams.BaudRate = baud; 118 | dcbSerialParams.ByteSize = 8; 119 | dcbSerialParams.StopBits = ONESTOPBIT; 120 | dcbSerialParams.Parity = NOPARITY; 121 | 122 | if (!SetCommState(serial_handle, &dcbSerialParams)) 123 | { 124 | printf("Failed to set serial parameters!\n"); 125 | CloseHandle(serial_handle); 126 | return; 127 | } 128 | 129 | //printf("Connected to KMBOX on port %s\n", std::string(port).c_str()); 130 | connected = true; 131 | } 132 | 133 | void SendCommand(const std::string& command) 134 | { 135 | DWORD bytesWritten; 136 | if (!WriteFile(serial_handle, command.c_str(), command.length(), &bytesWritten, NULL)) 137 | { 138 | // printf("Failed to write to serial port!\n"); 139 | } 140 | } 141 | 142 | void move(int x, int y) 143 | { 144 | if (!connected) 145 | { 146 | // printf("not connected?\n"); 147 | return; 148 | } 149 | x = clamp(x); 150 | y = clamp(y); 151 | std::string command = "km.move(" + std::to_string(x) + "," + std::to_string(y) + ")\r\n"; 152 | SendCommand(command.c_str()); 153 | } 154 | 155 | void left_click() 156 | { 157 | if (!connected) 158 | { 159 | // printf("not connected?\n"); 160 | return; 161 | } 162 | std::string command = "km.left(1)\r\n"; 163 | SendCommand(command.c_str()); 164 | } 165 | 166 | void left_click_release() 167 | { 168 | if (!connected) 169 | { 170 | // printf("not connected?\n"); 171 | return; 172 | } 173 | std::string command = "km.left(0)\r\n"; 174 | SendCommand(command.c_str()); 175 | } 176 | 177 | bool IsDown(int virtual_key) 178 | { 179 | if (!connected) 180 | return false; 181 | return false; 182 | std::string command = virtual_key == 3 ? "km.middle()\r\n" : "km.side" + std::to_string(virtual_key) + std::string("()\r\n"); 183 | SendCommand(command); 184 | char readBuffer[256]; 185 | DWORD bytesRead; 186 | if (!ReadFile(serial_handle, readBuffer, sizeof(readBuffer) - 1, &bytesRead, NULL)) 187 | { 188 | std::cerr << "Failed to read from serial port!" << std::endl; 189 | return false; 190 | } 191 | 192 | if (bytesRead > 0) 193 | { 194 | readBuffer[bytesRead] = '\0'; 195 | std::string command2 = virtual_key == 3 ? "km.middle()\r\n1" : "km.side" + std::to_string(virtual_key) + std::string("()\r\n1"); 196 | if (strstr(readBuffer, command2.c_str())) 197 | return true; 198 | } 199 | return false; 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Kmbox.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #pragma comment(lib, "setupapi.lib") 10 | namespace kmbox 11 | { 12 | extern bool connected; 13 | extern std::string find_port(const std::string& targetDescription); 14 | extern void KmboxInitialize(std::string port); 15 | 16 | extern void move(int x, int y); 17 | extern void left_click(); 18 | extern void left_click_release(); 19 | extern bool IsDown(int virtual_key); 20 | } 21 | -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Pch/Pch.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Pch/Pch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #define _CRT_SECURE_NO_WARNINGS 3 | #define NOMINMAX 4 | #define _WINSOCK_DEPRECATED_NO_WARNINGS 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #ifdef DrawText 30 | #undef DrawText 31 | #endif 32 | #ifdef GetCurrentTime 33 | #undef GetCurrentTime 34 | #endif 35 | #ifdef GetObject 36 | #undef GetObject 37 | #endif 38 | #ifdef SendMessage 39 | #undef SendMessage 40 | #endif 41 | #ifdef GetUserName 42 | #undef GetUserName 43 | #endif 44 | #ifdef CreateFont 45 | #undef CreateFont 46 | #endif 47 | #ifdef Button 48 | #undef Button 49 | #endif 50 | #ifdef max 51 | #undef max 52 | #endif 53 | #ifdef min 54 | #undef min 55 | #endif 56 | #include 57 | #define DEBUG_INFO 58 | #ifdef DEBUG_INFO 59 | #define LOG(fmt, ...) std::printf(fmt, ##__VA_ARGS__) 60 | #define LOGW(fmt, ...) std::wprintf(fmt, ##__VA_ARGS__) 61 | #else 62 | #define LOG 63 | #define LOGW 64 | #endif 65 | #include "json.hpp" 66 | using json = nlohmann::json; 67 | #pragma comment(lib, "ws2_32.lib") 68 | #pragma comment(lib, "vmm.lib") 69 | #pragma comment(lib, "leechcore.lib") 70 | #pragma comment(lib, "FTD3XX.lib") 71 | #pragma comment(lib, "d2d1.lib") 72 | #pragma comment(lib, "Dwrite") 73 | #pragma comment(lib, "windowscodecs.lib") 74 | #include "Vector.h" 75 | #include "Input.h" 76 | #include "Colour.h" 77 | #include "Graphics.h" 78 | #include "font.h" 79 | #include "XorStr.h" 80 | #include "Memory.h" 81 | #include "CheatFunction.h" -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Vector.cpp: -------------------------------------------------------------------------------- 1 | #include "pch.h" 2 | #include "vector.h" 3 | 4 | #include 5 | #include 6 | 7 | Vector2::Vector2() : x(0), y(0) { } 8 | 9 | Vector2::Vector2(float _x, float _y) : x(_x), y(_y) { } 10 | 11 | Vector2::~Vector2() { } 12 | 13 | Vector2 Vector2::operator*(Vector2 a) 14 | { 15 | return Vector2(x * a.x, y * a.y); 16 | } 17 | 18 | Vector2 Vector2::operator/(Vector2 a) 19 | { 20 | return Vector2(x / a.x, y / a.y); 21 | } 22 | 23 | Vector2 Vector2::operator+(Vector2 a) 24 | { 25 | return Vector2(x + a.x, y + a.y); 26 | } 27 | 28 | Vector2 Vector2::operator-(Vector2 a) 29 | { 30 | return Vector2(x - a.x, y - a.y); 31 | } 32 | 33 | bool Vector2::operator==(Vector2 a) 34 | { 35 | return x == a.x && y == a.y; 36 | } 37 | 38 | bool Vector2::operator!=(Vector2 a) 39 | { 40 | return x != a.x || y != a.y; 41 | } 42 | 43 | bool Vector2::IsZero() const 44 | { 45 | return !x && !y; 46 | } 47 | 48 | Vector2 Vector2::Zero() 49 | { 50 | return Vector2(); 51 | } 52 | 53 | float Vector2::Distance(Vector2 a, Vector2 b) 54 | { 55 | const auto difference = Vector2( 56 | a.x - b.x, 57 | a.y - b.y); 58 | 59 | return sqrt( 60 | powf(difference.x, 2.0f) + 61 | powf(difference.y, 2.0f)); 62 | } 63 | 64 | Vector3::Vector3() : x(0), y(0), z(0) { } 65 | 66 | Vector3::Vector3(float _x, float _y, float _z) : x(_x), y(_y), z(_z) { } 67 | 68 | Vector3::~Vector3() { } 69 | 70 | Vector3 Vector3::operator*(Vector3 a) 71 | { 72 | return Vector3(x * a.x, y * a.y, z * a.z); 73 | } 74 | 75 | Vector3 Vector3::operator*(float f) 76 | { 77 | return Vector3(x * f, y * f, z * f); 78 | } 79 | 80 | Vector3 Vector3::operator/(Vector3 a) 81 | { 82 | return Vector3(x / a.x, y / a.y, z / a.z); 83 | } 84 | 85 | Vector3 Vector3::operator/(float f) 86 | { 87 | return Vector3(x / f, y / f, z / f); 88 | } 89 | 90 | Vector3 Vector3::operator+(Vector3 a) 91 | { 92 | return Vector3(x + a.x, y + a.y, z + a.z); 93 | } 94 | 95 | Vector3 Vector3::operator-(Vector3 a) 96 | { 97 | return Vector3(x - a.x, y - a.y, z - a.z); 98 | } 99 | 100 | bool Vector3::operator==(Vector3 a) 101 | { 102 | return x == a.x && y == a.y && z == a.z; 103 | } 104 | 105 | bool Vector3::operator!=(Vector3 a) 106 | { 107 | return x != a.x || y != a.y || z != a.z; 108 | } 109 | 110 | bool Vector3::IsZero() const 111 | { 112 | return !x && !y && !z; 113 | } 114 | 115 | float Vector3::Dot(Vector3 left, Vector3 right) 116 | { 117 | return (left.x * right.x) + (left.y * right.y) + (left.z * right.z); 118 | } 119 | 120 | float Vector3::Distance(Vector3 a, Vector3 b) 121 | { 122 | const auto difference = Vector3( 123 | a.x - b.x, 124 | a.y - b.y, 125 | a.z - b.z); 126 | 127 | return sqrt( 128 | powf(difference.x, 2.0f) + 129 | powf(difference.y, 2.0f) + 130 | powf(difference.z, 2.0f) 131 | ); 132 | 133 | } 134 | float Vector3::DistanceTo(Vector3 a, Vector3 b) 135 | { 136 | return (a - b).Length(); 137 | } 138 | int Vector3::FormattedDistance(Vector3 a, Vector3 b) 139 | { 140 | const auto difference = Vector3( 141 | a.x - b.x, 142 | a.y - b.y, 143 | a.z - b.z); 144 | 145 | int distance = sqrt( 146 | powf(difference.x, 2.0f) + 147 | powf(difference.y, 2.0f) + 148 | powf(difference.z, 2.0f) 149 | ); 150 | return (int)(5 * round(distance / 5.0)); 151 | } 152 | 153 | Vector3 Vector3::Zero() 154 | { 155 | return Vector3(); 156 | } 157 | 158 | float Vector3::Length() const 159 | { 160 | return sqrt((x * x) + (y * y) + (z * z)); 161 | } 162 | 163 | float Vector3::LengthSqr() const 164 | { 165 | return (x * x) + (y * y) + (z * z); 166 | } 167 | 168 | Vector3 Vector3::Clamp() const 169 | { 170 | Vector3 angles = *this; 171 | 172 | if (angles.x > 89.f) 173 | angles.x -= 360.f; 174 | else if (angles.x < -89.f) 175 | angles.x += 360.f; 176 | 177 | if (angles.y > 180.f) 178 | angles.y -= 360.f; 179 | else if (angles.y < -180.f) 180 | angles.y += 360.f; 181 | 182 | angles.z = 0.f; 183 | return angles; 184 | } 185 | 186 | Vector3 Vector3::Lerp(Vector3 a, Vector3 b, float t) 187 | { 188 | return a * (1.f - t) + b * t; 189 | } 190 | 191 | 192 | Vector3 ViewMatrix::Transform(const Vector3 vector) const 193 | { 194 | Vector3 transformed; 195 | 196 | transformed.x = vector.y * matrix[0][1] + vector.x * matrix[0][0] + vector.z * matrix[0][2] + matrix[0][3]; 197 | transformed.y = vector.y * matrix[1][1] + vector.x * matrix[1][0] + vector.z * matrix[1][2] + matrix[1][3]; 198 | transformed.z = vector.y * matrix[3][1] + vector.x * matrix[3][0] + vector.z * matrix[3][2] + matrix[3][3]; 199 | 200 | return transformed; 201 | } -------------------------------------------------------------------------------- /ConanExilesDMA/Misc/Vector.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | class Vector2 3 | { 4 | public: 5 | Vector2(); 6 | Vector2(float _x, float _y); 7 | ~Vector2(); 8 | 9 | float x, y; 10 | 11 | Vector2 operator *(Vector2 a); 12 | Vector2 operator /(Vector2 a); 13 | Vector2 operator +(Vector2 a); 14 | Vector2 operator -(Vector2 a); 15 | bool operator ==(Vector2 a); 16 | bool operator !=(Vector2 a); 17 | 18 | bool IsZero() const; 19 | 20 | static Vector2 Zero(); 21 | 22 | static float Distance(Vector2 a, Vector2 b); 23 | }; 24 | 25 | class Vector3 26 | { 27 | public: 28 | Vector3(); 29 | Vector3(float _x, float _y, float _z); 30 | ~Vector3(); 31 | 32 | float x, y, z; 33 | 34 | Vector3 operator *(Vector3 a); 35 | Vector3 operator *(float f); 36 | Vector3 operator /(Vector3 a); 37 | Vector3 operator /(float f); 38 | Vector3 operator +(Vector3 a); 39 | Vector3 operator -(Vector3 a); 40 | bool operator ==(Vector3 a); 41 | bool operator !=(Vector3 a); 42 | 43 | bool IsZero() const; 44 | 45 | static float Dot(Vector3 left, Vector3 right); 46 | static float Distance(Vector3 a, Vector3 b); 47 | static float DistanceTo(Vector3 a, Vector3 b); 48 | static int FormattedDistance(Vector3 a, Vector3 b); 49 | static Vector3 Zero(); 50 | static Vector3 Lerp(Vector3 a, Vector3 b, float t); 51 | 52 | float Length() const; 53 | float LengthSqr() const; 54 | 55 | Vector3 Clamp() const; 56 | }; 57 | 58 | struct ViewMatrix 59 | { 60 | public: 61 | float matrix[4][4]; 62 | 63 | Vector3 Transform(const Vector3 vector) const; 64 | }; 65 | -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/ActorEntity.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "EngineStructs.h" 3 | 4 | enum EntityType : int 5 | { 6 | Imp, 7 | Kappa, 8 | Humanoid, 9 | Crocodile, 10 | Corpse, 11 | Rabbit, 12 | DialogNPC, 13 | Hyena, 14 | Vulture, 15 | Furnace, 16 | Armorer, 17 | MetalSmith, 18 | LandClaim, 19 | Foundation, 20 | Tanner, 21 | Gazelle, 22 | Bedroll, 23 | Alchemist, 24 | Rocknose, 25 | Ostrich, 26 | Kudo, 27 | Fawn, 28 | HyenaBoss, 29 | Spider, 30 | Slamander, 31 | Scorpion, 32 | ScorpionBoss, 33 | Snake, 34 | SnakeBoss, 35 | Antilope, 36 | RhinoKing, 37 | Rhino, 38 | RockNoseBoss, 39 | Locust, 40 | Jaguar, 41 | Tiger, 42 | Wight, 43 | Wolf, 44 | Player, 45 | Ape, 46 | Silverback, 47 | JungleBird, 48 | JungleBirdBoss, 49 | ReptileMonstrosity, 50 | Komodo, 51 | Panther, 52 | Deer, 53 | SandStormCreature, 54 | Chest, 55 | Bear, 56 | OtherBuildable 57 | 58 | 59 | }; 60 | 61 | 62 | class ActorEntity 63 | { 64 | private: 65 | 66 | 67 | uint64_t Class = 0; 68 | uint64_t PlayerState = 0x0408; // Pawn -> PlayerState 69 | uint64_t Controller = 0x0420; // Pawn -> Controller 70 | uint64_t AcknowledgedPawn = 0x0460; // playercontroller -> AcknowledgedPawn 71 | uint64_t RootComponent = 0x0170; // Actor -> RootComponent 72 | uint64_t RelativeLocation = 0x01F0; // SceneComponent -> RelativeLocation 73 | uint64_t Mesh = 0x0448; // Character -> Mesh 74 | uint64_t MasterPoseComponent = 0x07D8; // SkeletalMeshComponent -> MasterPoseComponent + 0x8 75 | uint64_t ComponentToWorld = 0x1a0; // // just guess this till you get a scale (1,1,1) and a roation with 0,0,-0.9998,-0.02 76 | uint64_t CharacterNameOffset = 0x1B58; // BaseBPChar_C -> CharacterName 77 | uint64_t PlayerNameOffset = 0x1B68; // BaseBPChar_C -> PlayerName 78 | uint64_t CustomTimeDilation = 0x0080; // Actor -> CustomTimeDilation 79 | uint64_t IsContainerLocked = 0x0789; // BP_Master_Placeables_C -> bIsContainerLocked 80 | FString CharacterName; 81 | FString PlayerName; 82 | std::wstring WCharacterName; 83 | std::wstring WPlayerName; 84 | FTransform C2W; 85 | FTransform HeadTransform; 86 | std::wstring Name = LIT(L"Entity"); 87 | UEVector UEPosition; 88 | Vector3 Position; 89 | EntityType EntityID; 90 | Vector3 HeadBone; 91 | bool IsLocalPlayer = false; 92 | 93 | public: 94 | bool IsAnimal(); 95 | bool IsBuilding(); 96 | ActorEntity(uint64_t address,std::string name, VMMDLL_SCATTER_HANDLE handle, VMMDLL_SCATTER_HANDLE handle2); 97 | void SetUp1(VMMDLL_SCATTER_HANDLE handle); 98 | void SetUp2(VMMDLL_SCATTER_HANDLE handle); 99 | void SetUp3(); 100 | void UpdateHeadPosition(VMMDLL_SCATTER_HANDLE handle); 101 | void UpdateHeadPosition1(); 102 | uint64_t GetClass(); 103 | std::wstring GetName(); 104 | Vector3 GetPosition(); 105 | void UpdatePosition(VMMDLL_SCATTER_HANDLE handle); 106 | EntityType GetEntityID(); 107 | Vector3 GetHeadPosition(); 108 | bool GetIsLocalPlayer(); 109 | std::wstring GetCharacterName(); 110 | std::wstring GetPlayerName(); 111 | void WriteSpeed(float speed); 112 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/Camera.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "ConfigUtilities.h" 3 | #include "Camera.h" 4 | 5 | static ViewMatrix CreateMatrix(Vector3 rot, Vector3 origin) { 6 | const float DEG_TO_RAD = static_cast(3.14159265358979323846) / 180.f; 7 | const float radPitch = rot.x * DEG_TO_RAD; 8 | const float radYaw = rot.y * DEG_TO_RAD; 9 | const float radRoll = rot.z * DEG_TO_RAD; 10 | 11 | const float SP = sinf(radPitch); 12 | const float CP = cosf(radPitch); 13 | const float SY = sinf(radYaw); 14 | const float CY = cosf(radYaw); 15 | const float SR = sinf(radRoll); 16 | const float CR = cosf(radRoll); 17 | 18 | ViewMatrix matrix; 19 | matrix.matrix[0][0] = CP * CY; 20 | matrix.matrix[0][1] = CP * SY; 21 | matrix.matrix[0][2] = SP; 22 | matrix.matrix[0][3] = 0.f; 23 | 24 | matrix.matrix[1][0] = SR * SP * CY - CR * SY; 25 | matrix.matrix[1][1] = SR * SP * SY + CR * CY; 26 | matrix.matrix[1][2] = -SR * CP; 27 | matrix.matrix[1][3] = 0.f; 28 | 29 | matrix.matrix[2][0] = -(CR * SP * CY + SR * SY); 30 | matrix.matrix[2][1] = CY * SR - CR * SP * SY; 31 | matrix.matrix[2][2] = CR * CP; 32 | matrix.matrix[2][3] = 0.f; 33 | 34 | matrix.matrix[3][0] = origin.x; 35 | matrix.matrix[3][1] = origin.y; 36 | matrix.matrix[3][2] = origin.z; 37 | matrix.matrix[3][3] = 1.f; 38 | 39 | return matrix; 40 | } 41 | 42 | Vector2 Camera::WorldToScreen(MinimalViewInfo viewinfo, Vector3 world) 43 | { 44 | Vector3 screen(0, 0, 0); 45 | Vector3 rot = Vector3(viewinfo.Rotation.Pitch, viewinfo.Rotation.Yaw, viewinfo.Rotation.Roll); 46 | Vector3 campos = Vector3(viewinfo.Location.X, viewinfo.Location.Y, viewinfo.Location.Z); 47 | const ViewMatrix tempMatrix = CreateMatrix(rot, Vector3(0, 0, 0)); 48 | 49 | Vector3 vAxisX(tempMatrix.matrix[0][0], tempMatrix.matrix[0][1], tempMatrix.matrix[0][2]); 50 | Vector3 vAxisY(tempMatrix.matrix[1][0], tempMatrix.matrix[1][1], tempMatrix.matrix[1][2]); 51 | Vector3 vAxisZ(tempMatrix.matrix[2][0], tempMatrix.matrix[2][1], tempMatrix.matrix[2][2]); 52 | 53 | Vector3 vDelta = world - campos; 54 | Vector3 vTransformed = Vector3(Vector3::Dot(vDelta,vAxisY), Vector3::Dot(vDelta,vAxisZ), Vector3::Dot(vDelta,vAxisX)); 55 | 56 | if (vTransformed.z < 1.f) 57 | vTransformed.z = 1.f; 58 | 59 | const float FOV_DEG_TO_RAD = static_cast(3.14159265358979323846) / 360.f; 60 | int centrex = Configs.Overlay.OverrideResolution ? Configs.Overlay.Width /2 : GetSystemMetrics(SM_CXSCREEN) / 2; 61 | int centrey = Configs.Overlay.OverrideResolution ? Configs.Overlay.Height / 2 : GetSystemMetrics(SM_CYSCREEN) / 2; 62 | screen.x = centrex + vTransformed.x * (centrex / tanf( 63 | viewinfo.FOV * FOV_DEG_TO_RAD)) / vTransformed.z; 64 | screen.y = centrey - vTransformed.y * (centrex / tanf( 65 | viewinfo.FOV * FOV_DEG_TO_RAD)) / vTransformed.z; 66 | if(screen.x <0 || screen.y < 0) 67 | return Vector2::Zero(); 68 | int width = Configs.Overlay.OverrideResolution ? Configs.Overlay.Width : GetSystemMetrics(SM_CXSCREEN); 69 | int height = Configs.Overlay.OverrideResolution ? Configs.Overlay.Height : GetSystemMetrics(SM_CYSCREEN); 70 | if(screen.x > width || screen.y > height) 71 | return Vector2::Zero(); 72 | return Vector2(screen.x, screen.y); 73 | } 74 | 75 | ViewMatrix Camera::ToMatrixWithScale(FTransform transform) 76 | { 77 | ViewMatrix m; 78 | 79 | m.matrix[3][0] = transform.Translation.X; 80 | m.matrix[3][1] = transform.Translation.Y; 81 | m.matrix[3][2] = transform.Translation.Z; 82 | 83 | float x2 = transform.Rotation.X + transform.Rotation.X; 84 | float y2 = transform.Rotation.Y + transform.Rotation.Y; 85 | float z2 = transform.Rotation.Z + transform.Rotation.Z; 86 | 87 | float xx2 = transform.Rotation.X * x2; 88 | float yy2 = transform.Rotation.Y * y2; 89 | float zz2 = transform.Rotation.Z * z2; 90 | m.matrix[0][0] = (1.0f - (yy2 + zz2)) * transform.Scale3D.X; 91 | m.matrix[1][1] = (1.0f - (xx2 + zz2)) * transform.Scale3D.Y; 92 | m.matrix[2][2] = (1.0f - (xx2 + yy2)) * transform.Scale3D.Z; 93 | 94 | 95 | float yz2 = transform.Rotation.Y * z2; 96 | float wx2 = transform.Rotation.W * x2; 97 | m.matrix[2][1] = (yz2 - wx2) * transform.Scale3D.Z; 98 | m.matrix[1][2] = (yz2 + wx2) * transform.Scale3D.Y; 99 | 100 | 101 | float xy2 = transform.Rotation.X * y2; 102 | float wz2 = transform.Rotation.W * z2; 103 | m.matrix[1][0] = (xy2 - wz2) * transform.Scale3D.Y; 104 | m.matrix[0][1] = (xy2 + wz2) * transform.Scale3D.X; 105 | 106 | 107 | float xz2 = transform.Rotation.X * z2; 108 | float wy2 = transform.Rotation.W * y2; 109 | m.matrix[2][0] = (xz2 + wy2) * transform.Scale3D.Z; 110 | m.matrix[0][2] = (xz2 - wy2) * transform.Scale3D.X; 111 | 112 | m.matrix[0][3] = 0.0f; 113 | m.matrix[1][3] = 0.0f; 114 | m.matrix[2][3] = 0.0f; 115 | m.matrix[3][3] = 1.0f; 116 | 117 | return m; 118 | } 119 | Vector3 Camera::ResolveMatrix(FTransform transform, FTransform c2w) 120 | { 121 | ViewMatrix matrix; 122 | ViewMatrix bonematrix = ToMatrixWithScale(transform); 123 | ViewMatrix c2wmatrix = ToMatrixWithScale(c2w); 124 | int i, j, k; 125 | for (i = 0; i < 4; i++) { 126 | for (j = 0; j < 4; j++) { 127 | matrix.matrix[i][j] = 0; 128 | for (k = 0; k < 4; k++) { 129 | matrix.matrix[i][j] += bonematrix.matrix[i][k] * c2wmatrix.matrix[k][j]; 130 | } 131 | } 132 | } 133 | 134 | 135 | return Vector3{ matrix.matrix[3][0], matrix.matrix[3][1], matrix.matrix[3][2] }; 136 | } -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/Camera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "Engine.h" 3 | 4 | class Camera 5 | { 6 | public: 7 | static Vector2 WorldToScreen(MinimalViewInfo viewinfo, Vector3 world); 8 | static ViewMatrix ToMatrixWithScale(FTransform transform); 9 | static Vector3 ResolveMatrix(FTransform transform, FTransform c2w); 10 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/Engine.cpp: -------------------------------------------------------------------------------- 1 | #include "Pch.h" 2 | #include "Engine.h" 3 | #include "ActorEntity.h" 4 | #include "Globals.h" 5 | #include 6 | 7 | 8 | 9 | Engine::Engine() 10 | { 11 | GWorld = TargetProcess.Read(TargetProcess.GetBaseAddress(ProcessName) + GWorld); 12 | printf("GWorld: %p\n", GWorld); 13 | GName = TargetProcess.Read(TargetProcess.GetBaseAddress(ProcessName) + GName); 14 | printf("GName: %p\n", GName); 15 | PersistentLevel = TargetProcess.Read(GWorld + PersistentLevel); 16 | printf("PersistentLevel: %p\n", PersistentLevel); 17 | Actors = TargetProcess.Read>(PersistentLevel + ActorsOffset); 18 | printf("Actors: %i\n", Actors.Length()); 19 | 20 | OwningGameInstance = TargetProcess.Read(GWorld + OwningGameInstance); 21 | printf("OwningGameInstance: %p\n", OwningGameInstance); 22 | LocalPlayers = TargetProcess.Read(OwningGameInstance + LocalPlayers); 23 | printf("LocalPlayers: %p\n", LocalPlayers); 24 | LocalPlayers = TargetProcess.Read(LocalPlayers); 25 | printf("LocalPlayers: %p\n", LocalPlayers); 26 | 27 | PlayerController = TargetProcess.Read(LocalPlayers + PlayerController); 28 | printf("PlayerController: %p\n", PlayerController); 29 | AcknowledgedPawn = TargetProcess.Read(PlayerController + AcknowledgedPawn); 30 | printf("AcknowledgedPawn: %p\n", AcknowledgedPawn); 31 | CameraManager = TargetProcess.Read(PlayerController + CameraManager); 32 | printf("CameraManager: %p\n", CameraManager); 33 | CameraEntry = TargetProcess.Read(CameraManager + CameraCacheOffset); 34 | printf("CameraCacheEntry: %p\n", CameraEntry); 35 | 36 | } 37 | std::unordered_map CachedNames; 38 | std::string Engine::GetNameById(uint32_t actor_id) { 39 | if(CachedNames.contains(actor_id)) 40 | return CachedNames[actor_id]; 41 | 42 | DWORD64 fNamePtr = TargetProcess.Read(GName + (actor_id / 0x4000) * 8); 43 | DWORD64 fName = TargetProcess.Read(fNamePtr + 8 * (actor_id % 0x4000)); 44 | char name[64]; 45 | ZeroMemory(name, sizeof(name)); 46 | TargetProcess.Read((uintptr_t)(fName + 0x10), reinterpret_cast(&name), sizeof(name) - 2); 47 | CachedNames[actor_id] = std::string(name); 48 | printf("New Entity Name: %s\n", std::string(name).c_str()); 49 | return std::string(name); 50 | 51 | return std::string("NULL"); 52 | } 53 | 54 | void Engine::Cache() 55 | { 56 | Actors = TargetProcess.Read>(PersistentLevel + ActorsOffset); 57 | ActorCount = Actors.Length(); 58 | printf("Actors: %i\n", Actors.Length()); 59 | if (ActorCount <= 0 || ActorCount >= 10000) 60 | { 61 | return; 62 | } 63 | std::vector entitylist; 64 | entitylist.resize(Actors.Length()); 65 | std::unique_ptr object_raw_ptr = std::make_unique(Actors.Length()); 66 | TargetProcess.Read(Actors.GetAddress(), object_raw_ptr.get(), Actors.Length() * sizeof(uint64_t)); 67 | 68 | for (size_t i = 0; i < Actors.Length(); i++) 69 | { 70 | entitylist[i] = object_raw_ptr[i]; 71 | } 72 | std::vector> actors; 73 | auto handle = TargetProcess.CreateScatterHandle(); 74 | auto handle2 = TargetProcess.CreateScatterHandle(); 75 | for (uint64_t address : entitylist) 76 | { 77 | uintptr_t actor = address; 78 | if (!actor) 79 | continue; 80 | 81 | int objectId = TargetProcess.Read(actor + 0x18); 82 | 83 | std::string name = GetNameById(objectId); 84 | 85 | // BP_NPC_Wildlife_Imp_C 86 | //BP_NPC_Wildlife_KappaBaby_C 87 | //BP_NPC_Wildlife_Kappa_Green_C 88 | //HumanoidNPCCharacter_C 89 | //BP_NPC_Wildlife_Crocodile_C 90 | //Corpse_C 91 | //BP_NPC_Wildlife_Rabbit_C 92 | // BP_HumanoidDialogueNPC_C // talkable npc 93 | //BP_NPC_Wildlife_HyenaSpotted_C 94 | //BP_NPC_Wildlife_Kappa_Red_C 95 | //BP_NPC_Wildlife_Vulture_idling_C 96 | //BP_PL_CraftingStation_Furnace_C 97 | //BP_PL_CraftingStation_Armor_C 98 | // //BP_PL_CraftingStation_Metal_C 99 | //LandClaim 100 | //BP_BuildFoundation_C 101 | //BP_NPC_Wildlife_HyenaSpotted_Puppy_C 102 | //BP_NPC_Wildlife_Crocodile_Baby_C 103 | //BP_NPC_Wildlife_Kappa_Red_C 104 | //BP_PL_WorkStation_Tanner_C 105 | //BP_NPC_Wildlife_Gazelle_C 106 | //BP_PL_Bedroll_Fiber_C 107 | //BP_PL_WorkStation_Alchemist2_C 108 | //BP_NPC_Wildlife_Rocknose_Coal_C 109 | //BP_NPC_Wildlife_Rocknose_Iron_C 110 | //BP_NPC_Wildlife_Ostrich_Blue_Farm_C 111 | //BP_NPC_Wildlife_Ostrich_Red_Farm_C 112 | //BP_NPC_Wildlife_Kudo_C 113 | //BP_NPC_Wildlife_Fawn_C 114 | //BP_NPC_Wildlife_Ostrich_Blue_Farm_C 115 | //BP_NPC_Wildlife_HyenaMiniboss_ 116 | //BP_NPC_Wildlife_Spider_Brown_C 117 | //Name: BP_NPC_Wildlife_Slamander_Desert_C 118 | // BP_NPC_Wildlife_Spider_Green_C 119 | //BP_NPC_Wildlife_MediumScorpion_C 120 | //BP_NPC_Wildlife_Cobra_C 121 | //BP_NPC_Wildlife_Antilope_C 122 | //BP_NPC_Wildlife_RhinoKing_C 123 | //HumanoidNPCCharacter_MurielasHope_C 124 | //BP_NPC_Wildlife_GiantScorpion_C 125 | //BP_NPC_Wildlife_RocknoseRocky2_C 126 | //BP_NPC_Wildlife_RocknoseKingBoss_C 127 | //BP_set_snake_desert_C 128 | //HumanoidNPCCharacter_RelicHunters_C 129 | //BP_NPC_Wildlife_Locust_yellow_C 130 | //BP_NPC_Wildlife_Jaguar_Cub_C 131 | //BP_NPC_Wildlife_Jaguar_C 132 | //BP_NPC_Wildlife_Tiger_C 133 | //BP_NPC_Wildlife_RhinoGray_C 134 | //BP_NPC_Wildlife_RhinoGray_Baby_C 135 | //BP_NPC_Wildlife_Tiger_White_C 136 | //BP_NPC_Wildlife_Wight_3_C 137 | //BP_NPC_Wildlife_Wight_2_C 138 | //BP_NPC_Wildlife_Wight_4_C 139 | //BP_NPC_Wildlife_Wight_1_C 140 | //HumanoidNPCCharacter_Nordheimer_C 141 | //BP_NPC_Wildlife_Wolf_NordheimerPet_C 142 | //BP_NPC_Wildlife_Grey_Ape_C 143 | //BP_NPC_Wildlife_Silverback_C 144 | //BP_NPC_Wildlife_JungleBirdMiniboss_C 145 | //BP_NPC_Wildlife_ReptileMonstrosity_C 146 | //BP_NPC_Wildlife_JungleBird 147 | if (name == "NULL") 148 | continue; 149 | // if (name != "BasePlayerChar_C") 150 | // continue; 151 | // printf("Actor: %p\n", actor); 152 | 153 | 154 | std::shared_ptr entity = std::make_shared(actor,name, handle,handle2); 155 | 156 | actors.push_back(entity); 157 | } 158 | TargetProcess.ExecuteReadScatter(handle); 159 | TargetProcess.CloseScatterHandle(handle); 160 | TargetProcess.ExecuteWriteScatter(handle2); 161 | TargetProcess.CloseScatterHandle(handle2); 162 | handle = TargetProcess.CreateScatterHandle(); 163 | for (auto actor : actors) 164 | { 165 | actor->SetUp1(handle); 166 | } 167 | TargetProcess.ExecuteReadScatter(handle); 168 | TargetProcess.CloseScatterHandle(handle); 169 | handle = TargetProcess.CreateScatterHandle(); 170 | for (auto actor : actors) 171 | { 172 | actor->SetUp2(handle); 173 | } 174 | TargetProcess.ExecuteReadScatter(handle); 175 | TargetProcess.CloseScatterHandle(handle); 176 | for (auto actor : actors) 177 | { 178 | actor->SetUp3(); 179 | } 180 | 181 | std::vector> players; 182 | std::vector> others; 183 | std::vector> animals; 184 | std::vector> buildings; 185 | for (auto actor : actors) 186 | { 187 | if (actor->GetIsLocalPlayer()) 188 | { 189 | if(actor && actor !=nullptr) 190 | LocalPlayer.store(actor); 191 | continue; 192 | } 193 | if (actor->GetEntityID() == EntityType::Player || actor->GetEntityID() == Humanoid) 194 | { 195 | players.push_back(actor); 196 | } 197 | else if (actor->IsAnimal()) 198 | { 199 | animals.push_back(actor); 200 | } 201 | else if (actor->IsBuilding()) 202 | { 203 | buildings.push_back(actor); 204 | } 205 | else 206 | { 207 | others.push_back(actor); 208 | } 209 | } 210 | PlayersMutex.lock(); 211 | Players = players; 212 | PlayersMutex.unlock(); 213 | OtherActorsMutex.lock(); 214 | OtherActors = others; 215 | OtherActorsMutex.unlock(); 216 | AnimalsMutex.lock(); 217 | Animals = animals; 218 | AnimalsMutex.unlock(); 219 | BuildingsMutex.lock(); 220 | Buildings = buildings; 221 | BuildingsMutex.unlock(); 222 | } 223 | 224 | 225 | 226 | 227 | 228 | void Engine::UpdatePlayers() 229 | { 230 | PlayersMutex.lock(); 231 | auto handle = TargetProcess.CreateScatterHandle(); 232 | for (std::shared_ptr entity : Players) 233 | { 234 | entity->UpdatePosition(handle); 235 | } 236 | PlayersMutex.unlock(); 237 | TargetProcess.ExecuteReadScatter(handle); 238 | TargetProcess.CloseScatterHandle(handle); 239 | PlayersMutex.lock(); 240 | for (std::shared_ptr entity : Players) 241 | { 242 | entity->UpdateHeadPosition1(); 243 | } 244 | PlayersMutex.unlock(); 245 | } 246 | 247 | 248 | void Engine::RefreshViewMatrix(VMMDLL_SCATTER_HANDLE handle) 249 | { 250 | TargetProcess.AddScatterReadRequest(handle, CameraManager + CameraCacheOffset,reinterpret_cast(&CameraEntry),sizeof(CameraCacheEntry)); 251 | } 252 | 253 | CameraCacheEntry Engine::GetCameraCache() 254 | { 255 | return CameraEntry; 256 | } 257 | 258 | std::vector> Engine::GetPlayers() 259 | { 260 | return Players; 261 | } 262 | 263 | std::vector> Engine::GetOtherActors() 264 | { 265 | return OtherActors; 266 | } 267 | 268 | uint64_t Engine::GetPlayerController() 269 | { 270 | return PlayerController; 271 | } 272 | 273 | int Engine::GetActorCount() 274 | { 275 | return ActorCount; 276 | } 277 | 278 | std::vector> Engine::GetAnimals() 279 | { 280 | return Animals; 281 | } 282 | 283 | std::vector> Engine::GetBuildings() 284 | { 285 | return Buildings; 286 | } 287 | 288 | void Engine::UpdateAnimals() 289 | { 290 | AnimalsMutex.lock(); 291 | auto handle = TargetProcess.CreateScatterHandle(); 292 | for (std::shared_ptr entity : Animals) 293 | { 294 | entity->UpdatePosition(handle); 295 | } 296 | AnimalsMutex.unlock(); 297 | TargetProcess.ExecuteReadScatter(handle); 298 | TargetProcess.CloseScatterHandle(handle); 299 | } -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/Engine.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "ActorEntity.h" 3 | #include "EngineStructs.h" 4 | 5 | // For these offsets just 7 dumper the game and open Engine_Classes 6 | class Engine 7 | { 8 | 9 | private: 10 | uint64_t OwningGameInstance = 0x0140; // World -> OwningGameInstance 11 | uint64_t PersistentLevel = 0x0030; // World -> PersistentLevel 12 | uint64_t ActorsOffset = 0xA0; // Ulevel -> Actors 13 | TArray Actors; // Ulevel -> Actors 14 | uint64_t GWorld = 0x5B72B60; 15 | uint64_t GName = 0x5A75728; 16 | uint64_t LocalPlayers = 0x38; // GameInstance -> LocalPlayers 17 | uint64_t PlayerController = 0x0030; // Player -> PlayerController 18 | uint64_t AcknowledgedPawn = 0x0460; 19 | uint64_t CameraManager = 0x0480; // PlayerController -> PlayerCameraManager 20 | uint64_t CameraCache= 0x0; // PlayerCameraManager -> CameraCachePrivate 21 | uint64_t CameraCacheOffset = 0x0460; // PlayerCameraManager -> CameraCache 22 | CameraCacheEntry CameraEntry; // ScriptStruct Engine.CameraCacheEntry 23 | MinimalViewInfo CameraViewInfo; // ScriptStruct Engine.MinimalViewInfo 24 | std::vector> Players; 25 | std::vector> OtherActors; 26 | std::vector> Animals; 27 | std::vector> Buildings; 28 | int ActorCount = 0; 29 | public: 30 | std::atomic> LocalPlayer; 31 | std::mutex PlayersMutex; 32 | std::mutex OtherActorsMutex; 33 | std::mutex AnimalsMutex; 34 | std::mutex BuildingsMutex; 35 | Engine(); 36 | void Cache(); 37 | void UpdatePlayers(); 38 | void UpdateAnimals(); 39 | 40 | std::vector> GetPlayers(); 41 | std::vector> GetOtherActors(); 42 | std::vector> GetAnimals(); 43 | std::vector> GetBuildings(); 44 | CameraCacheEntry GetCameraCache(); 45 | void RefreshViewMatrix(VMMDLL_SCATTER_HANDLE handle); 46 | std::string GetNameById(uint32_t actor_id); 47 | uint64_t GetPlayerController(); 48 | int GetActorCount(); 49 | 50 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/SDK/EngineStructs.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // ScriptStruct CoreUObject.Vector 4 | struct UEVector { 5 | float X; // 0x0(0x4) 6 | float Y; // 0x40x4) 7 | float Z; // 0x8(0x4) 8 | }; 9 | // ScriptStruct CoreUObject.Rotator 10 | struct UERotator { 11 | float Pitch; // 0x0(0x4) 12 | float Yaw; // 0x4(0x4) 13 | float Roll; // 0x8(0x4) 14 | }; 15 | struct MinimalViewInfo 16 | { 17 | struct UEVector Location; // 0x0(0xC) 18 | struct UERotator Rotation; // 0xC(0xC) 19 | float FOV; // 0x18(0x4) 20 | }; 21 | struct CameraCacheEntry 22 | { 23 | float Timestamp; // 0x00(0x04) 24 | char pad_4[0xc]; // 0x04(0x0c) 25 | MinimalViewInfo POV; // 0x10(0x5e0) 26 | }; 27 | struct FQuat { 28 | float X; // float 29 | float Y; // float 30 | float Z; // float 31 | float W; // float 32 | }; 33 | struct FTransform { 34 | FQuat Rotation; 35 | UEVector Translation; 36 | char pad[4]; 37 | UEVector Scale3D; 38 | }; 39 | template 40 | class TArray 41 | { 42 | public: 43 | int Length() const 44 | { 45 | return m_nCount; 46 | } 47 | 48 | bool IsValid() const 49 | { 50 | if (m_nCount > m_nMax) 51 | return false; 52 | if (!m_Data) 53 | return false; 54 | return true; 55 | } 56 | 57 | uint64_t GetAddress() const 58 | { 59 | return m_Data; 60 | } 61 | 62 | uintptr_t GetPtrAddress(int i) 63 | { 64 | return m_Data + i * 8; 65 | } 66 | 67 | protected: 68 | uint64_t m_Data; 69 | uint32_t m_nCount; 70 | uint32_t m_nMax; 71 | }; 72 | 73 | struct FakeTarray 74 | { 75 | uint64_t m_Data; 76 | uint32_t m_nCount; 77 | uint32_t m_nMax; 78 | }; 79 | struct FString : private TArray 80 | { 81 | std::wstring ToWString() const 82 | { 83 | 84 | wchar_t* buffer = new wchar_t[m_nCount + 1]; 85 | TargetProcess.Read(m_Data, (uintptr_t*)buffer, m_nCount * sizeof(wchar_t)); 86 | std::wstring ws(buffer); 87 | delete[] buffer; 88 | 89 | return ws; 90 | } 91 | 92 | std::string ToString() const 93 | { 94 | std::wstring ws = ToWString(); 95 | return std::string(ws.begin(), ws.end()); 96 | } 97 | }; -------------------------------------------------------------------------------- /ConanExilesDMA/Security/XorStr.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2017 - 2018 Justas Masiulis 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef JM_LITHPP 18 | #define JM_LITHPP 19 | 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #define MAKE_STRING(str) \ 26 | ::jm::make_xorstr( \ 27 | []() { return str; }, \ 28 | std::make_index_sequence{}, \ 29 | std::make_index_sequence<::jm::detail::_buffer_size()>{}) 30 | 31 | #define LIT(str) MAKE_STRING(str).crypt_get() 32 | 33 | #ifdef _MSC_VER 34 | #define LITFORCEINLINE __forceinline 35 | #else 36 | #define LITFORCEINLINE __attribute__((always_inline)) 37 | #endif 38 | 39 | // you can define this macro to get possibly faster code on gcc/clang 40 | // at the expense of constants being put into data section. 41 | #if !defined(LITALLOW_DATA) 42 | // MSVC - no volatile 43 | // GCC and clang - volatile everywhere 44 | #if defined(__clang__) || defined(__GNUC__) 45 | #define LITVOLATILE volatile 46 | #endif 47 | 48 | #endif 49 | #ifndef LITVOLATILE 50 | #define LITVOLATILE 51 | #endif 52 | 53 | namespace jm 54 | { 55 | 56 | namespace detail 57 | { 58 | 59 | template 60 | struct unsigned_; 61 | 62 | template<> 63 | struct unsigned_<1> 64 | { 65 | using type = std::uint8_t; 66 | }; 67 | template<> 68 | struct unsigned_<2> 69 | { 70 | using type = std::uint16_t; 71 | }; 72 | template<> 73 | struct unsigned_<4> 74 | { 75 | using type = std::uint32_t; 76 | }; 77 | 78 | template 79 | struct pack_value_type 80 | { 81 | using type = decltype(C); 82 | }; 83 | 84 | template 85 | constexpr std::size_t _buffer_size() 86 | { 87 | return ((Size / 16) + (Size % 16 != 0)) * 2; 88 | } 89 | 90 | template 91 | struct tstring_ 92 | { 93 | using value_type = typename pack_value_type::type; 94 | constexpr static std::size_t size = sizeof...(Cs); 95 | constexpr static value_type str[size] = { Cs... }; 96 | 97 | constexpr static std::size_t buffer_size = _buffer_size(); 98 | constexpr static std::size_t buffer_align = 99 | #ifndef JM_LITDISABLE_AVX_INTRINSICS 100 | ((sizeof(str) > 16) ? 32 : 16); 101 | #else 102 | 16; 103 | #endif 104 | }; 105 | 106 | template 107 | struct _ki 108 | { 109 | constexpr static std::size_t idx = I; 110 | constexpr static std::uint64_t key = K; 111 | }; 112 | 113 | template 114 | constexpr std::uint32_t key4() noexcept 115 | { 116 | std::uint32_t value = Seed; 117 | for (char c : __TIME__) 118 | value = static_cast((value ^ c) * 16777619ull); 119 | return value; 120 | } 121 | 122 | template 123 | constexpr std::uint64_t key8() 124 | { 125 | constexpr auto first_part = key4<2166136261 + S>(); 126 | constexpr auto second_part = key4(); 127 | return (static_cast(first_part) << 32) | second_part; 128 | } 129 | 130 | // clang and gcc try really hard to place the constants in data 131 | // sections. to counter that there was a need to create an intermediate 132 | // constexpr string and then copy it into a non constexpr container with 133 | // volatile storage so that the constants would be placed directly into 134 | // code. 135 | template 136 | struct string_storage 137 | { 138 | std::uint64_t storage[T::buffer_size]; 139 | 140 | LITFORCEINLINE constexpr string_storage() noexcept : storage{ Keys... } 141 | { 142 | using cast_type = 143 | typename unsigned_::type; 144 | constexpr auto value_size = sizeof(typename T::value_type); 145 | // puts the string into 64 bit integer blocks in a constexpr 146 | // fashion 147 | for (std::size_t i = 0; i < T::size; ++i) 148 | storage[i / (8 / value_size)] ^= 149 | (std::uint64_t{ static_cast(T::str[i]) } 150 | << ((i % (8 / value_size)) * 8 * value_size)); 151 | } 152 | }; 153 | 154 | } // namespace detail 155 | 156 | template 157 | class xor_string 158 | { 159 | alignas(T::buffer_align) std::uint64_t _storage[T::buffer_size]; 160 | 161 | // _single functions needed because MSVC crashes without them 162 | LITFORCEINLINE void _crypt_256_single(const std::uint64_t* keys, 163 | std::uint64_t* storage) noexcept 164 | 165 | { 166 | _mm256_store_si256( 167 | reinterpret_cast<__m256i*>(storage), 168 | _mm256_xor_si256( 169 | _mm256_load_si256(reinterpret_cast(storage)), 170 | _mm256_load_si256(reinterpret_cast(keys)))); 171 | } 172 | 173 | template 174 | LITFORCEINLINE void _crypt_256(const std::uint64_t* keys, 175 | std::index_sequence) noexcept 176 | { 177 | (_crypt_256_single(keys + Idxs * 4, _storage + Idxs * 4), ...); 178 | } 179 | 180 | LITFORCEINLINE void _crypt_128_single(const std::uint64_t* keys, 181 | std::uint64_t* storage) noexcept 182 | { 183 | _mm_store_si128( 184 | reinterpret_cast<__m128i*>(storage), 185 | _mm_xor_si128(_mm_load_si128(reinterpret_cast(storage)), 186 | _mm_load_si128(reinterpret_cast(keys)))); 187 | } 188 | 189 | template 190 | LITFORCEINLINE void _crypt_128(const std::uint64_t* keys, 191 | std::index_sequence) noexcept 192 | { 193 | (_crypt_128_single(keys + Idxs * 2, _storage + Idxs * 2), ...); 194 | } 195 | 196 | // loop generates vectorized code which places constants in data dir 197 | LITFORCEINLINE constexpr void _copy() noexcept 198 | { 199 | constexpr detail::string_storage storage; 200 | static_cast(std::initializer_list{ 201 | (const_cast(_storage))[Keys::idx] = 202 | storage.storage[Keys::idx]... }); 203 | } 204 | 205 | public: 206 | using value_type = typename T::value_type; 207 | using size_type = std::size_t; 208 | using pointer = value_type*; 209 | using const_pointer = const pointer; 210 | 211 | LITFORCEINLINE xor_string() noexcept { _copy(); } 212 | 213 | LITFORCEINLINE constexpr size_type size() const noexcept 214 | { 215 | return T::size - 1; 216 | } 217 | 218 | LITFORCEINLINE void crypt() noexcept 219 | { 220 | alignas(T::buffer_align) std::uint64_t keys[T::buffer_size]; 221 | static_cast(std::initializer_list{ 222 | (const_cast(keys))[Keys::idx] = 223 | Keys::key... }); 224 | 225 | _copy(); 226 | 227 | #define JM_LITDISABLE_AVX_INTRINSICS 228 | #ifndef JM_LITDISABLE_AVX_INTRINSICS 229 | _crypt_256(keys, std::make_index_sequence{}); 230 | if constexpr (T::buffer_size % 4 != 0) 231 | _crypt_128(keys, std::index_sequence{}); 232 | #else 233 | _crypt_128(keys, std::make_index_sequence{}); 234 | #endif 235 | } 236 | 237 | LITFORCEINLINE const_pointer get() const noexcept 238 | { 239 | return reinterpret_cast(_storage); 240 | } 241 | 242 | LITFORCEINLINE const_pointer crypt_get() noexcept 243 | { 244 | crypt(); 245 | return reinterpret_cast(_storage); 246 | } 247 | }; 248 | 249 | template 250 | LITFORCEINLINE constexpr auto 251 | make_xorstr(Tstr str_lambda, 252 | std::index_sequence, 253 | std::index_sequence) noexcept 254 | { 255 | return xor_string, 256 | detail::_ki()>...>{}; 257 | } 258 | 259 | } // namespace jm 260 | 261 | #endif // include guard -------------------------------------------------------------------------------- /Images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Images/1.png -------------------------------------------------------------------------------- /Images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Images/2.png -------------------------------------------------------------------------------- /Images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Images/3.png -------------------------------------------------------------------------------- /Images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Images/4.png -------------------------------------------------------------------------------- /Instructions.md: -------------------------------------------------------------------------------- 1 | # Install Guide 2 | [Simple Video Guide](https://youtu.be/1Ug1PUPSozg)
3 | 4 | ## Installing Dependencies 5 | 6 | Download The Latest [MemProcFS Release](https://github.com/ufrisk/MemProcFS/releases). Install The win_x64 File.
7 |

8 | 10 |

11 | Drag And Drop The Contents Into The Build Directory.
12 | 13 | 14 | [Download the FTD3xx Dlls](https://ftdichip.com/wp-content/uploads/2024/01/FTD3XXLibrary_v1.3.0.9.zip) 15 | In the .rar file navigate to FTD3XXLibrary->x64->DLL 16 | 17 |

18 | 20 |

21 | Drop them into the build directory.
22 | 23 | 24 | Before: 25 |

26 | 28 |

29 | After: 30 |

31 | 33 |

34 | 35 | ## Environment Variables 36 | 37 | Now Python Must Be Set Up.
38 | [Install Python 3.8](https://www.python.org/ftp/python/3.8.0/python-3.8.0-amd64.exe)
39 | Find your install directory, This should be: 40 | ``` 41 | AppData\Local\Programs\Python\Python38 42 | ``` 43 | Open Environment Variables: 44 |

45 | 47 |

48 |

49 | 51 |

52 |

53 | 55 |

56 |

57 | 59 |

60 | In The Variable Value Add The Python Path And Python Script Path. Like This(the \dev\ should be your windows username): 61 | 62 | ``` 63 | C:\Users\dev\AppData\Local\Programs\Python\Python38 64 | C:\Users\dev\AppData\Local\Programs\Python\Python38\Scripts 65 | ``` 66 | Then Add A Semi Colon Inbetween Them As Such: 67 | 68 | ``` 69 | C:\Users\dev\AppData\Local\Programs\Python\Python38;C:\Users\dev\AppData\Local\Programs\Python\Python38\Scripts 70 | ``` 71 | 72 |

73 | 75 |

76 | Apply These Changes And You Will Be Ready To Go. 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 SDM 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Lib/FTD3XX.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Lib/FTD3XX.lib -------------------------------------------------------------------------------- /Lib/leechcore.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Lib/leechcore.lib -------------------------------------------------------------------------------- /Lib/vmm.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IntelSDM/ConanExilesDMA/458ec2b792f715d13dac37c48989d52a6fff0042/Lib/vmm.lib -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Conan Exiles DMA 2 | Player ESP, NPC ESP, Monster ESP, Aimbot, Speedhack 3 | 4 | ## Showcase 5 | 6 | 7 |

8 | Play Video 9 |

10 |
11 |

12 | 14 |

15 |

16 | 18 |

19 | 20 | ## Instructions 21 | * [Installation Guide](./Instructions.md) 22 |
23 | 24 | ## Features 25 | * Aimbot 26 | * Enable 27 | * Draw FOV 28 | * FOV 29 | * Priority 30 | * AimKey 31 | * Player ESP 32 | * Name 33 | * Distance 34 | * Font Size 35 | * Max Distance 36 | * Box 37 | * Monster ESP 38 | * Name 39 | * Distance 40 | * Font Size 41 | * Max Distance 42 | * Building ESP 43 | * Name 44 | * Distance 45 | * Font Size 46 | * Max Distance 47 | * Other ESP 48 | * Name 49 | * Distance 50 | * Font Size 51 | * Max Distance 52 | * Overlay 53 | * Custom W2S Resolution 54 | * Misc 55 | * Speedhack 56 | * Speed Amount 57 | * View Locked Contents 58 | * Config 59 | * Load 60 | * Save 61 | 62 | ## Credits 63 | * [PCILeech](https://github.com/ufrisk/pcileech) 64 | * [MemProcFS](https://github.com/ufrisk/MemProcFS) 65 | * [DMALibrary](https://github.com/Metick/DMALibrary/tree/Master) 66 | 67 | --------------------------------------------------------------------------------