├── Driver
├── driver.sln
└── driver
│ ├── Driver.c
│ ├── driver.inf
│ ├── driver.vcxproj
│ ├── driver.vcxproj.filters
│ └── driver.vcxproj.user
├── KBot.sln
├── KBot
├── API.h
├── AiManager.h
├── Bytes.h
├── CMissileClient.h
├── CObjectManager.h
├── CSpellData.h
├── CSpellEntry.h
├── CSpellInfo.h
├── CSpellSlot.h
├── Config.cpp
├── Config.h
├── Definitions.h
├── DirectX.cpp
├── DirectX.h
├── Draw.cpp
├── Draw.h
├── Evade.h
├── Evade2.cpp
├── Evade2.h
├── GameData.cpp
├── GameData.h
├── Geometry.h
├── HTTP.h
├── Initialize.cpp
├── Initialize.h
├── KBot.cpp
├── KBot.vcxproj
├── KBot.vcxproj.filters
├── KBot.vcxproj.user
├── KInterface.h
├── Keyboard.cpp
├── Keyboard.h
├── LoLAPI.cpp
├── LoLAPI.h
├── Lux.cpp
├── Lux.h
├── Menu.h
├── Mouse.cpp
├── Mouse.h
├── Orbwalker.cpp
├── Orbwalker.h
├── Pantheon.cpp
├── Pantheon.h
├── Pixel.cpp
├── Pixel.h
├── RGBA.h
├── Script.h
├── ScriptUtils.h
├── SpellInfo.cpp
├── SpellInfo.h
├── Talon.cpp
├── Talon.h
├── UnitInfo.cpp
├── UnitInfo.h
├── Utils.cpp
├── Utils.h
├── Vector.cpp
├── Vector.h
├── Visuals.cpp
├── Visuals.h
├── Xerath.cpp
├── Xerath.h
├── aws-c-common.dll
├── aws-c-event-stream.dll
├── aws-checksums.dll
├── aws-cpp-sdk-core.dll
├── clipper.cpp
├── clipper.hpp
├── imconfig.h
├── imgui.cpp
├── imgui.h
├── imgui_demo.cpp
├── imgui_draw.cpp
├── imgui_impl_dx11.cpp
├── imgui_impl_dx11.h
├── imgui_impl_win32.cpp
├── imgui_impl_win32.h
├── imgui_internal.h
├── imgui_widgets.cpp
├── imstb_rectpack.h
├── imstb_textedit.h
├── imstb_truetype.h
├── include
│ └── aws
│ │ └── core
│ │ ├── AmazonSerializableWebServiceRequest.h
│ │ ├── AmazonStreamingWebServiceRequest.h
│ │ ├── AmazonWebServiceRequest.h
│ │ ├── AmazonWebServiceResult.h
│ │ ├── Aws.h
│ │ ├── Core_EXPORTS.h
│ │ ├── Globals.h
│ │ ├── NoResult.h
│ │ ├── Region.h
│ │ ├── SDKConfig.h
│ │ ├── SDKConfig.h.in
│ │ ├── Version.h
│ │ ├── VersionConfig.h
│ │ ├── VersionConfig.h.in
│ │ ├── auth
│ │ ├── AWSAuthSigner.h
│ │ ├── AWSAuthSignerProvider.h
│ │ ├── AWSCredentials.h
│ │ ├── AWSCredentialsProvider.h
│ │ ├── AWSCredentialsProviderChain.h
│ │ └── STSCredentialsProvider.h
│ │ ├── client
│ │ ├── AWSClient.h
│ │ ├── AWSError.h
│ │ ├── AWSErrorMarshaller.h
│ │ ├── AsyncCallerContext.h
│ │ ├── ClientConfiguration.h
│ │ ├── CoreErrors.h
│ │ ├── DefaultRetryStrategy.h
│ │ ├── RetryStrategy.h
│ │ └── SpecifiedRetryableErrorsRetryStrategy.h
│ │ ├── config
│ │ └── AWSProfileConfigLoader.h
│ │ ├── external
│ │ ├── CommonCryptorSPI.h
│ │ ├── cjson
│ │ │ └── cJSON.h
│ │ └── tinyxml2
│ │ │ └── tinyxml2.h
│ │ ├── http
│ │ ├── HttpClient.h
│ │ ├── HttpClientFactory.h
│ │ ├── HttpRequest.h
│ │ ├── HttpResponse.h
│ │ ├── HttpTypes.h
│ │ ├── Scheme.h
│ │ ├── URI.h
│ │ ├── curl
│ │ │ ├── CurlHandleContainer.h
│ │ │ └── CurlHttpClient.h
│ │ ├── standard
│ │ │ ├── StandardHttpRequest.h
│ │ │ └── StandardHttpResponse.h
│ │ └── windows
│ │ │ ├── IXmlHttpRequest2HttpClient.h
│ │ │ ├── WinConnectionPoolMgr.h
│ │ │ ├── WinHttpConnectionPoolMgr.h
│ │ │ ├── WinHttpSyncHttpClient.h
│ │ │ ├── WinINetConnectionPoolMgr.h
│ │ │ ├── WinINetSyncHttpClient.h
│ │ │ └── WinSyncHttpClient.h
│ │ ├── internal
│ │ └── AWSHttpResourceClient.h
│ │ ├── monitoring
│ │ ├── CoreMetrics.h
│ │ ├── DefaultMonitoring.h
│ │ ├── HttpClientMetrics.h
│ │ ├── MonitoringFactory.h
│ │ ├── MonitoringInterface.h
│ │ └── MonitoringManager.h
│ │ ├── net
│ │ ├── Net.h
│ │ └── SimpleUDP.h
│ │ ├── platform
│ │ ├── Android.h
│ │ ├── Environment.h
│ │ ├── FileSystem.h
│ │ ├── OSVersionInfo.h
│ │ ├── Platform.h
│ │ ├── Security.h
│ │ ├── Time.h
│ │ └── refs
│ │ │ └── IXmlHttpRequest2Ref.h
│ │ └── utils
│ │ ├── ARN.h
│ │ ├── Array.h
│ │ ├── Cache.h
│ │ ├── ConcurrentCache.h
│ │ ├── DNS.h
│ │ ├── DateTime.h
│ │ ├── EnumParseOverflowContainer.h
│ │ ├── FileSystemUtils.h
│ │ ├── GetTheLights.h
│ │ ├── HashingUtils.h
│ │ ├── Outcome.h
│ │ ├── ResourceManager.h
│ │ ├── StringUtils.h
│ │ ├── UUID.h
│ │ ├── UnreferencedParam.h
│ │ ├── base64
│ │ └── Base64.h
│ │ ├── crypto
│ │ ├── Cipher.h
│ │ ├── ContentCryptoMaterial.h
│ │ ├── ContentCryptoScheme.h
│ │ ├── CryptoBuf.h
│ │ ├── CryptoStream.h
│ │ ├── EncryptionMaterials.h
│ │ ├── Factories.h
│ │ ├── HMAC.h
│ │ ├── Hash.h
│ │ ├── HashResult.h
│ │ ├── KeyWrapAlgorithm.h
│ │ ├── MD5.h
│ │ ├── SecureRandom.h
│ │ ├── Sha256.h
│ │ ├── Sha256HMAC.h
│ │ ├── bcrypt
│ │ │ └── CryptoImpl.h
│ │ ├── commoncrypto
│ │ │ └── CryptoImpl.h
│ │ └── openssl
│ │ │ └── CryptoImpl.h
│ │ ├── event
│ │ ├── EventDecoderStream.h
│ │ ├── EventEncoderStream.h
│ │ ├── EventHeader.h
│ │ ├── EventMessage.h
│ │ ├── EventStream.h
│ │ ├── EventStreamBuf.h
│ │ ├── EventStreamDecoder.h
│ │ ├── EventStreamEncoder.h
│ │ ├── EventStreamErrors.h
│ │ └── EventStreamHandler.h
│ │ ├── json
│ │ └── JsonSerializer.h
│ │ ├── logging
│ │ ├── AWSLogging.h
│ │ ├── ConsoleLogSystem.h
│ │ ├── DefaultLogSystem.h
│ │ ├── FormattedLogSystem.h
│ │ ├── LogLevel.h
│ │ ├── LogMacros.h
│ │ ├── LogSystemInterface.h
│ │ ├── NullLogSystem.h
│ │ └── android
│ │ │ └── LogcatLogSystem.h
│ │ ├── memory
│ │ ├── AWSMemory.h
│ │ ├── MemorySystemInterface.h
│ │ └── stl
│ │ │ ├── AWSAllocator.h
│ │ │ ├── AWSDeque.h
│ │ │ ├── AWSList.h
│ │ │ ├── AWSMap.h
│ │ │ ├── AWSMultiMap.h
│ │ │ ├── AWSQueue.h
│ │ │ ├── AWSSet.h
│ │ │ ├── AWSStack.h
│ │ │ ├── AWSStreamFwd.h
│ │ │ ├── AWSString.h
│ │ │ ├── AWSStringStream.h
│ │ │ ├── AWSVector.h
│ │ │ └── SimpleStringStream.h
│ │ ├── ratelimiter
│ │ ├── DefaultRateLimiter.h
│ │ └── RateLimiterInterface.h
│ │ ├── stream
│ │ ├── ConcurrentStreamBuf.h
│ │ ├── PreallocatedStreamBuf.h
│ │ ├── ResponseStream.h
│ │ └── SimpleStreamBuf.h
│ │ ├── threading
│ │ ├── Executor.h
│ │ ├── ReaderWriterLock.h
│ │ ├── Semaphore.h
│ │ └── ThreadTask.h
│ │ └── xml
│ │ └── XmlSerializer.h
├── libs
│ ├── aws-cpp-sdk-core.exp
│ └── aws-cpp-sdk-core.lib
├── offsets.h
└── xor.h
└── README.md
/Driver/driver.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30406.217
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver", "driver\driver.vcxproj", "{B733A66A-C850-41F9-B262-5D16B9877834}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|ARM = Debug|ARM
11 | Debug|ARM64 = Debug|ARM64
12 | Debug|x64 = Debug|x64
13 | Debug|x86 = Debug|x86
14 | Release|ARM = Release|ARM
15 | Release|ARM64 = Release|ARM64
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM.ActiveCfg = Debug|ARM
21 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM.Build.0 = Debug|ARM
22 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM.Deploy.0 = Debug|ARM
23 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM64.ActiveCfg = Debug|ARM64
24 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM64.Build.0 = Debug|ARM64
25 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|ARM64.Deploy.0 = Debug|ARM64
26 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x64.ActiveCfg = Debug|x64
27 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x64.Build.0 = Debug|x64
28 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x64.Deploy.0 = Debug|x64
29 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x86.ActiveCfg = Debug|Win32
30 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x86.Build.0 = Debug|Win32
31 | {B733A66A-C850-41F9-B262-5D16B9877834}.Debug|x86.Deploy.0 = Debug|Win32
32 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM.ActiveCfg = Release|ARM
33 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM.Build.0 = Release|ARM
34 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM.Deploy.0 = Release|ARM
35 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM64.ActiveCfg = Release|ARM64
36 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM64.Build.0 = Release|ARM64
37 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|ARM64.Deploy.0 = Release|ARM64
38 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x64.ActiveCfg = Release|x64
39 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x64.Build.0 = Release|x64
40 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x64.Deploy.0 = Release|x64
41 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x86.ActiveCfg = Release|Win32
42 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x86.Build.0 = Release|Win32
43 | {B733A66A-C850-41F9-B262-5D16B9877834}.Release|x86.Deploy.0 = Release|Win32
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(ExtensibilityGlobals) = postSolution
49 | SolutionGuid = {F5D0D578-8073-42C4-9249-F31F2C0A326B}
50 | EndGlobalSection
51 | EndGlobal
52 |
--------------------------------------------------------------------------------
/Driver/driver/driver.inf:
--------------------------------------------------------------------------------
1 | ;
2 | ; driver.inf
3 | ;
4 |
5 | [Version]
6 | Signature="$WINDOWS NT$"
7 | Class=Sample ; TODO: edit Class
8 | ClassGuid={78A1C341-4539-11d3-B88D-00C04FAD5171} ; TODO: edit ClassGuid
9 | Provider=%ManufacturerName%
10 | CatalogFile=driver.cat
11 | DriverVer= ; TODO: set DriverVer in stampinf property pages
12 | PnpLockDown=1
13 |
14 | [DestinationDirs]
15 | DefaultDestDir = 12
16 | driver_Device_CoInstaller_CopyFiles = 11
17 |
18 | ; ================= Class section =====================
19 |
20 | [ClassInstall32]
21 | Addreg=SampleClassReg
22 |
23 | [SampleClassReg]
24 | HKR,,,0,%ClassName%
25 | HKR,,Icon,,-5
26 |
27 | [SourceDisksNames]
28 | 1 = %DiskName%,,,""
29 |
30 | [SourceDisksFiles]
31 | driver.sys = 1,,
32 | WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll=1 ; make sure the number matches with SourceDisksNames
33 |
34 | ;*****************************************
35 | ; Install Section
36 | ;*****************************************
37 |
38 | [Manufacturer]
39 | %ManufacturerName%=Standard,NT$ARCH$
40 |
41 | [Standard.NT$ARCH$]
42 | %driver.DeviceDesc%=driver_Device, Root\driver ; TODO: edit hw-id
43 |
44 | [driver_Device.NT]
45 | CopyFiles=Drivers_Dir
46 |
47 | [Drivers_Dir]
48 | driver.sys
49 |
50 | ;-------------- Service installation
51 | [driver_Device.NT.Services]
52 | AddService = driver,%SPSVCINST_ASSOCSERVICE%, driver_Service_Inst
53 |
54 | ; -------------- driver driver install sections
55 | [driver_Service_Inst]
56 | DisplayName = %driver.SVCDESC%
57 | ServiceType = 1 ; SERVICE_KERNEL_DRIVER
58 | StartType = 3 ; SERVICE_DEMAND_START
59 | ErrorControl = 1 ; SERVICE_ERROR_NORMAL
60 | ServiceBinary = %12%\driver.sys
61 |
62 | ;
63 | ;--- driver_Device Coinstaller installation ------
64 | ;
65 |
66 | [driver_Device.NT.CoInstallers]
67 | AddReg=driver_Device_CoInstaller_AddReg
68 | CopyFiles=driver_Device_CoInstaller_CopyFiles
69 |
70 | [driver_Device_CoInstaller_AddReg]
71 | HKR,,CoInstallers32,0x00010000, "WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll,WdfCoInstaller"
72 |
73 | [driver_Device_CoInstaller_CopyFiles]
74 | WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll
75 |
76 | [driver_Device.NT.Wdf]
77 | KmdfService = driver, driver_wdfsect
78 | [driver_wdfsect]
79 | KmdfLibraryVersion = $KMDFVERSION$
80 |
81 | [Strings]
82 | SPSVCINST_ASSOCSERVICE= 0x00000002
83 | ManufacturerName="Google" ;TODO: Replace with your manufacturer name
84 | ClassName="drivers" ; TODO: edit ClassName
85 | DiskName = "driver Installation Disk"
86 | driver.DeviceDesc = "driver Device"
87 | driver.SVCDESC = "driver Service"
88 |
--------------------------------------------------------------------------------
/Driver/driver/driver.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp;hxx;hm;inl;inc;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 | {8E41214B-6785-4CFE-B992-037D68949A14}
18 | inf;inv;inx;mof;mc;
19 |
20 |
21 |
22 |
23 | Driver Files
24 |
25 |
26 |
27 |
28 | Source Files
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Driver/driver/driver.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/KBot.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.31005.135
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "KBot", "KBot\KBot.vcxproj", "{C9476949-18A2-4E38-B140-4C753852B657}"
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 | {C9476949-18A2-4E38-B140-4C753852B657}.Debug|x64.ActiveCfg = Debug|x64
17 | {C9476949-18A2-4E38-B140-4C753852B657}.Debug|x64.Build.0 = Debug|x64
18 | {C9476949-18A2-4E38-B140-4C753852B657}.Debug|x86.ActiveCfg = Debug|Win32
19 | {C9476949-18A2-4E38-B140-4C753852B657}.Debug|x86.Build.0 = Debug|Win32
20 | {C9476949-18A2-4E38-B140-4C753852B657}.Release|x64.ActiveCfg = Release|x64
21 | {C9476949-18A2-4E38-B140-4C753852B657}.Release|x64.Build.0 = Release|x64
22 | {C9476949-18A2-4E38-B140-4C753852B657}.Release|x86.ActiveCfg = Release|Win32
23 | {C9476949-18A2-4E38-B140-4C753852B657}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {D302D86B-907D-446E-AEA4-A3FCF73E0A3F}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/KBot/AiManager.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _AIMANAGER_H_
4 | #define _AIMANAGER_H_
5 |
6 | #include "KInterface.h"
7 | #include "offsets.h"
8 |
9 | class AiManager
10 | {
11 | public:
12 |
13 | bool IsMoving()
14 | {
15 | return Memory.Read((DWORD)this + Offsets::oAiManagerIsMoving, sizeof(bool));
16 | }
17 |
18 | Vector3 GetTargetPos()
19 | {
20 | return Vector3(Memory.Read((DWORD)this + Offsets::oAiManagerTargetPos, sizeof(float)),
21 | Memory.Read((DWORD)this + Offsets::oAiManagerTargetPos + 0x4, sizeof(float)),
22 | Memory.Read((DWORD)this + Offsets::oAiManagerTargetPos + 0x8, sizeof(float)));
23 | }
24 |
25 | Vector3 GetServerPos()
26 | {
27 | return Vector3(Memory.Read((DWORD)this + Offsets::oAiManagerServerPos, sizeof(float)),
28 | Memory.Read((DWORD)this + Offsets::oAiManagerServerPos + 0x4, sizeof(float)),
29 | Memory.Read((DWORD)this + Offsets::oAiManagerServerPos + 0x8, sizeof(float)));
30 | }
31 |
32 | Vector3 GetNavBegin()
33 | {
34 | return Vector3(Memory.Read((DWORD)this + Offsets::oAiManagerNavBegin, sizeof(float)),
35 | Memory.Read((DWORD)this + Offsets::oAiManagerNavBegin + 0x4, sizeof(float)),
36 | Memory.Read((DWORD)this + Offsets::oAiManagerNavBegin + 0x8, sizeof(float)));
37 | }
38 |
39 | Vector3 GetNavEnd()
40 | {
41 | return Vector3(Memory.Read((DWORD)this + Offsets::oAiManagerNavEnd, sizeof(float)),
42 | Memory.Read((DWORD)this + Offsets::oAiManagerNavEnd + 0x4, sizeof(float)),
43 | Memory.Read((DWORD)this + Offsets::oAiManagerNavEnd + 0x8, sizeof(float)));
44 | }
45 |
46 | Vector3 GetVelocity()
47 | {
48 | return Memory.Read((DWORD)this + Offsets::oAiManagerVelocity);
49 | }
50 |
51 | int GetPassedWaypoints()
52 | {
53 | return Memory.Read((DWORD)this + Offsets::oAiManagerPassedWaypoints, sizeof(int));
54 | }
55 |
56 | bool IsDashing()
57 | {
58 | return Memory.Read((DWORD)this + Offsets::oAiManagerIsDashing, sizeof(bool));
59 | }
60 |
61 | float GetDashSpeed()
62 | {
63 | return Memory.Read((DWORD)this + Offsets::oAiManagerDashSpeed, sizeof(float));
64 | }
65 | };
66 |
67 | #endif // !_AIMANAGER_H_
68 |
--------------------------------------------------------------------------------
/KBot/CMissileClient.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _CMISSILECLIENT_H_
4 | #define _CMISSILECLIENT_H_
5 |
6 | #include "CObjectManager.h"
7 | #include "CSpellInfo.h"
8 |
9 | class CMissileClient : public CObject
10 | {
11 | private:
12 | DWORD base = 0;
13 | DWORD dwSpellInfo = 0;
14 |
15 | Vector3 startPos, endPos;
16 | public:
17 |
18 | SpellInfo* spellInfo = GameData::UnknownSpell;
19 |
20 | CMissileClient()
21 | :base{ 0 }
22 | {
23 | CObject::base = 0;
24 | std::string temp = utils->ToLower(GetSpellInfo()->GetName());
25 | spellInfo = GameData::GetSpellInfoByName(temp);
26 | }
27 | CMissileClient(DWORD addy)
28 | :base{ addy }
29 | {
30 | CObject::base = addy;
31 | std::string temp = utils->ToLower(GetSpellInfo()->GetName());
32 | spellInfo = GameData::GetSpellInfoByName(temp);
33 | }
34 | DWORD Address() const
35 | {
36 | return base;
37 | }
38 |
39 | Vector3 GetMissileStartPos()
40 | {
41 | if (startPos.IsZero())
42 | {
43 | startPos = Vector3(Memory.Read(base + Offsets::oMissileStartPos, sizeof(float)),
44 | Memory.Read(base + Offsets::oMissileStartPos + 0x4, sizeof(float)),
45 | Memory.Read(base + Offsets::oMissileStartPos + 0x8, sizeof(float)));
46 | //startPos.y += spellInfo->height;
47 | }
48 | return startPos;
49 | }
50 |
51 | Vector3 GetMissileEndPos()
52 | {
53 | if (endPos.IsZero())
54 | {
55 | endPos = Vector3(Memory.Read(base + Offsets::oMissileEndPos, sizeof(float)),
56 | Memory.Read(base + Offsets::oMissileEndPos + 0x4, sizeof(float)),
57 | Memory.Read(base + Offsets::oMissileEndPos + 0x8, sizeof(float)));
58 | //endPos.y += spellInfo->height;
59 | }
60 | return endPos;
61 | }
62 |
63 | short GetMissileSourceIndex()
64 | {
65 | return Memory.Read(base + Offsets::oMissileSourceIndex, sizeof(short));
66 | }
67 |
68 | CObject GetSource()
69 | {
70 | return CObjectManager::GetObjByIndex(GetMissileSourceIndex());
71 | }
72 |
73 | short GetMissileTargetIndex()
74 | {
75 | return Memory.Read(base + Offsets::oMissileTargetIndex, sizeof(short));
76 | }
77 |
78 | CObject GetTarget()
79 | {
80 | return CObjectManager::GetObjByIndex(GetMissileTargetIndex());
81 | }
82 |
83 | CSpellInfo* GetSpellInfo()
84 | {
85 | if (!dwSpellInfo)
86 | {
87 | dwSpellInfo = Memory.Read(base + Offsets::oMissileSpellInfo);
88 | }
89 | if (!dwSpellInfo)
90 | return 0;
91 | return (CSpellInfo*)(dwSpellInfo);
92 | }
93 |
94 | bool HasSpellFlags(SpellFlags flags) const
95 | {
96 | return (spellInfo->flags & flags) == flags;
97 | }
98 |
99 | //void SetObjConsts()
100 | //{
101 | // std::string temp = utils->ToLower(champ);
102 | // spellInfo = GameData::GetSpellInfoByName(temp);
103 | // // Some spells require their end position to be projected using the range of the spell
104 | // if (spellInfo != GameData::UnknownSpell && HasSpellFlags(ProjectedDestination)) {
105 | // startPos.y += spellInfo->height;
106 |
107 | // // Calculate direction vector and normalize
108 | // endPos = Vector3(endPos.x - startPos.x, 0, endPos.z - startPos.z);
109 | // endPos = endPos.Normalized();
110 |
111 | // // Update endposition using the height of the current position
112 | // endPos.x = endPos.x * spellInfo->castRange + startPos.x;
113 | // endPos.y = startPos.y;
114 | // endPos.z = endPos.z * spellInfo->castRange + startPos.z;
115 | // }
116 | //}
117 | };
118 |
119 | #endif // !_CMISSILECLIENT_H_
120 |
--------------------------------------------------------------------------------
/KBot/CSpellData.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _SPELLDATA_H_
4 | #define _SPELLDATA_H_
5 |
6 | #include "Kinterface.h"
7 | #include "offsets.h"
8 |
9 | class CSpellData
10 | {
11 | private:
12 | //todo using base instead of (DWORD)this
13 | DWORD base = 0;
14 | public:
15 | CSpellData()
16 | :base{ 0 }
17 | {
18 | }
19 | CSpellData(DWORD addr)
20 | :base{ addr }
21 | {
22 | }
23 |
24 | float GetRange()
25 | {
26 | return Memory.Read((DWORD)this + Offsets::oSpellDataRange);
27 | }
28 |
29 | float GetWidth()
30 | {
31 | return Memory.Read((DWORD)this + Offsets::oSpellDataWidth);
32 | }
33 |
34 | float GetSpeed()
35 | {
36 | return Memory.Read((DWORD)this + Offsets::oSpellDataSpeed);
37 | }
38 |
39 | float GetCastRadius()
40 | {
41 | return Memory.Read((DWORD)this + Offsets::oSpellDataCastRadius);
42 | }
43 |
44 | float GetManaCostByLevel(unsigned int level)
45 | {
46 | if (level > 4) {
47 | return 0.f;
48 | }
49 | return Memory.Read((DWORD)this + Offsets::oSpellDataMana + ((level - 1) * 0x4));
50 | }
51 | };
52 |
53 | #endif // !_SPELLDATA_H_
54 |
--------------------------------------------------------------------------------
/KBot/CSpellEntry.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _CSPELLENTRY_H_
4 | #define _CSPELLENTRY_H_
5 |
6 | #include "CObjectManager.h"
7 | #include "CSpellInfo.h"
8 | #include "SpellInfo.h"
9 |
10 | //good for non missiles(karthus q, xerath w), but doesn't detect end cast pos of charged spells(xerath q, varus q)
11 | //expect chargeable spells it's usable to almost everything with little bit of work
12 | //like calculating correct endpos from spell range and making a timer so the line doesn't disappear too fast
13 | //todo
14 | class CSpellEntry
15 | {
16 | private:
17 | DWORD base = 0;
18 | DWORD dwspellinfo = 0;
19 | public:
20 |
21 | SpellInfo* spellInfo = GameData::UnknownSpell;
22 |
23 | CSpellEntry()
24 | : base{ 0 }
25 | {
26 | std::string temp = utils->ToLower(GetSpellInfo()->GetName()).c_str();
27 | spellInfo = GameData::GetSpellInfoByName(temp);
28 | }
29 | CSpellEntry(DWORD addr)
30 | : base{ addr }
31 | {
32 | std::string temp = utils->ToLower(GetSpellInfo()->GetName()).c_str();
33 | spellInfo = GameData::GetSpellInfoByName(temp);
34 | }
35 | DWORD Address() const
36 | {
37 | return base;
38 | }
39 |
40 | int GetIndex()
41 | {
42 | return Memory.Read(base + Offsets::oSpellEntryIndex);
43 | }
44 |
45 | CSpellInfo* GetSpellInfo()
46 | {
47 | if (!dwspellinfo)
48 | {
49 | dwspellinfo = Memory.Read(base + Offsets::oSpellEntrySpellInfo);
50 | }
51 | if (!dwspellinfo)
52 | return 0;
53 | return (CSpellInfo*)(dwspellinfo);
54 | }
55 |
56 | Vector3 GetMissileStartPos()
57 | {
58 | Vector3 startPos = Vector3(Memory.Read(base + Offsets::oSpellEntryStartPos, sizeof(float)),
59 | Memory.Read(base + Offsets::oSpellEntryStartPos + 0x4, sizeof(float)),
60 | Memory.Read(base + Offsets::oSpellEntryStartPos + 0x8, sizeof(float)));
61 | //startPos.y += spellInfo->height;
62 | return startPos;
63 | }
64 |
65 | Vector3 GetMissileEndPos()
66 | {
67 | Vector3 startPos = Vector3(Memory.Read(base + Offsets::oSpellEntryEndPos, sizeof(float)),
68 | Memory.Read(base + Offsets::oSpellEntryEndPos + 0x4, sizeof(float)),
69 | Memory.Read(base + Offsets::oSpellEntryEndPos + 0x8, sizeof(float)));
70 | //startPos.y += spellInfo->height;
71 | return startPos;
72 | }
73 |
74 | int GetSlot()
75 | {
76 | return Memory.Read(base + Offsets::oSpellEntrySlot);
77 | }
78 |
79 | bool IsBasic()
80 | {
81 | return Memory.Read(base + Offsets::oSpellEntryIsBasicAttack);
82 | }
83 |
84 | float GetWindupTime()
85 | {
86 | return Memory.Read(base + Offsets::oSpellEntryWindupTime, sizeof(float));
87 | }
88 |
89 | float GetCastStartTime()
90 | {
91 | return Memory.Read(base + Offsets::oSpellEntryCastStartTime, sizeof(float));
92 | }
93 |
94 | bool HasSpellFlags(SpellFlags flags) const
95 | {
96 | return (spellInfo->flags & flags) == flags;
97 | }
98 |
99 | inline bool operator ! () const
100 | {
101 | if (base == 0)
102 | return true;
103 | return false;
104 | }
105 | };
106 |
107 | #endif // !_CSPELLENTRY_H_
108 |
--------------------------------------------------------------------------------
/KBot/CSpellInfo.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _CSPELLCASTINFO_H_
4 | #define _CSPELLCASTINFO_H_
5 |
6 | #include "CSpellData.h"
7 | #include "SpellInfo.h"
8 |
9 | class CSpellInfo
10 | {
11 | private:
12 | DWORD base = 0;
13 | DWORD spelldata = 0;
14 | std::string name;
15 |
16 | public:
17 |
18 | CSpellInfo()
19 | :base{ 0 }
20 | {
21 | }
22 | CSpellInfo(DWORD addy)
23 | :base{ addy }
24 | {
25 | }
26 | //DWORD Address() const
27 | //{
28 | // return base;
29 | //}
30 |
31 | std::string GetName()
32 | {
33 | return Memory.ReadString((DWORD)this + Offsets::oSpellInfoSpellName, true);
34 | }
35 | //crashes when i try write to var spelldata
36 | CSpellData* GetSpellData()
37 | {
38 | DWORD addr = Memory.Read((DWORD)this + Offsets::oSpellInfoSpellData);
39 |
40 | return (CSpellData*)(addr);
41 | }
42 | };
43 |
44 | #endif // !_CSPELLCASTINFO_H_
45 |
--------------------------------------------------------------------------------
/KBot/CSpellSlot.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _CSPELLSLOT_H_
4 | #define _CSPELLSLOT_H_
5 |
6 | #include "CSpellInfo.h"
7 | #include "Menu.h"
8 |
9 | //todo reverse ["GetSpellState", FindFuncCall("E8 ? ? ? ? 8B F8 8B CB 89")],
10 | enum class SpellState : int
11 | {
12 | //Possible flags
13 | Ready = 0,
14 | NotAvailable = 4,
15 | Surpressed = 8,
16 | NotLearned = 12,
17 | Cooldown = 32,
18 | NoMana = 64,
19 | Unknown
20 | };
21 |
22 | class CSpellSlot
23 | {
24 | private:
25 | DWORD base = 0;
26 | public:
27 | CSpellSlot()
28 | : base{ 0 }
29 | {
30 | }
31 |
32 | CSpellSlot(DWORD addr)
33 | : base{ addr }
34 | {
35 | }
36 | bool IsReady(float mana = 99999.f)
37 | {
38 | int level = this->GetLevel();
39 | if ((level > 0) && (this->GetCooldownExpire() - M.fGameTime + 1 < 0)
40 | && this->GetSpellInfo()->GetSpellData()->GetManaCostByLevel(level) <= mana)
41 | return true;
42 | return false;
43 | }
44 |
45 | int GetLevel()
46 | {
47 | return Memory.Read((DWORD)this + Offsets::oSpellSlotLevel);
48 | }
49 |
50 | float GetCooldownExpire()
51 | {
52 | return Memory.Read((DWORD)this + Offsets::oSpellSlotCooldownExpire);
53 | }
54 |
55 | int GetRemainingCharge()
56 | {
57 | return Memory.Read((DWORD)this + Offsets::oSpellSlotRemainingCharge);
58 | }
59 |
60 | bool IsActive()
61 | {
62 | return Memory.Read((DWORD)this + Offsets::oSpellSlotIsActive);
63 | }
64 |
65 | float GetDamage()
66 | {
67 | return Memory.Read((DWORD)this + Offsets::oSpellSlotDamage);
68 | }
69 |
70 | CSpellInfo* GetSpellInfo()
71 | {
72 | DWORD addr = Memory.Read((DWORD)this + Offsets::oSpellSlotSpellInfo);
73 |
74 | return (CSpellInfo*)(addr);
75 | }
76 | };
77 |
78 | #endif // !_CSPELLSLOT_H_
79 |
--------------------------------------------------------------------------------
/KBot/Config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _CONFIG_H_
4 | #define _CONFIG_H_
5 |
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include "Menu.h"
11 |
12 | template< typename T >
13 | class ConfigValue
14 | {
15 | public:
16 | ConfigValue(std::string category_, std::string name_, T* value_)
17 | {
18 | category = category_;
19 | name = name_;
20 | value = value_;
21 | }
22 |
23 | std::string category, name;
24 | T* value;
25 | };
26 |
27 | class CConfig
28 | {
29 | protected:
30 | std::vector< ConfigValue< int >* > ints;
31 | std::vector< ConfigValue< bool >* > bools;
32 | std::vector< ConfigValue< float >* > floats;
33 | private:
34 | void SetupValue(int&, int, std::string, std::string);
35 | void SetupValue(bool&, bool, std::string, std::string);
36 | void SetupValue(float&, float, std::string, std::string);
37 |
38 | public:
39 | CConfig()
40 | {
41 | Setup();
42 | }
43 | ~CConfig() = default;
44 |
45 | //sets up initial values
46 | void Setup();
47 |
48 | //saves config to fileName.ini
49 | void Save(std::string fileName);
50 |
51 | ////loads config from fileName.ini
52 | void Load(std::string fileName);
53 | };
54 |
55 | extern CConfig* Config;
56 |
57 | #endif // !_CONFIG_H_
--------------------------------------------------------------------------------
/KBot/GameData.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #ifndef _GAMEDATA_H_
4 | #define _GAMEDATA_H_
5 |
6 | #include