diff --git a/TempleWare-External/TempleWare-External.vcxproj b/TempleWare-External/TempleWare-External.vcxproj index 3764459..541a2c5 100644 --- a/TempleWare-External/TempleWare-External.vcxproj +++ b/TempleWare-External/TempleWare-External.vcxproj @@ -43,7 +43,7 @@ Application true v143 - Unicode + MultiByte Application @@ -71,7 +71,10 @@ - external\json;$(IncludePath) + external\json;$(IncludePath);$(ProjectDir)external\json + + + $(VC_IncludePath);$(WindowsSDK_IncludePath);;$(ProjectDir)external\json @@ -109,10 +112,12 @@ true _DEBUG;_CONSOLE;%(PreprocessorDefinitions) true + stdcpp20 - Console + Windows true + d3d9.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) diff --git a/TempleWare-External/imgui.ini b/TempleWare-External/imgui.ini new file mode 100644 index 0000000..4a5c201 --- /dev/null +++ b/TempleWare-External/imgui.ini @@ -0,0 +1,5 @@ +[Window][Debug##Default] +Pos=60,60 +Size=400,400 +Collapsed=0 + diff --git a/TempleWare-External/source/features/glow.cpp b/TempleWare-External/source/features/glow.cpp index 8092262..568010f 100644 --- a/TempleWare-External/source/features/glow.cpp +++ b/TempleWare-External/source/features/glow.cpp @@ -11,27 +11,27 @@ namespace features { const uintptr_t localPlayerController = memory.Read(globals::client + offsets::dwLocalPlayerController); if (!localPlayerController) return; - const int localTeam = memory.Read(localPlayerController + offsets::m_iTeamNum); + const int localTeam = memory.Read(localPlayerController + offsets::m_iTeamNum); const uintptr_t entityList = memory.Read(globals::client + offsets::dwEntityList); if (!entityList) return; for (int i = 1; i < 64; ++i) { - const uintptr_t listEntry = memory.Read(entityList + ((8 * (i & 0x7FFF)) >> 9) + 16); + const uintptr_t listEntry = memory.Read(entityList + (8 * (i >> 9)) + 16); if (!listEntry) continue; - const uintptr_t player = memory.Read(listEntry + 120 * (i & 0x1FF)); + const uintptr_t player = memory.Read(listEntry + 112 * (i & 0x1FF)); if (!player) continue; - const int playerTeam = memory.Read(player + offsets::m_iTeamNum); + const short playerTeam = memory.Read(player + offsets::m_iTeamNum); if (playerTeam == localTeam) continue; const uint32_t playerPawn = memory.Read(player + offsets::m_hPlayerPawn); if (!playerPawn) continue; - const uintptr_t listEntry2 = memory.Read(entityList + ((8 * (playerPawn & 0x7FFF)) >> 9) + 16); + const uintptr_t listEntry2 = memory.Read(entityList + 8 * ((playerPawn & 0x7FFF) >> 9) + 16); if (!listEntry2) continue; - const uintptr_t playerCsPawn = memory.Read(listEntry2 + 120 * (playerPawn & 0x1FF)); + const uintptr_t playerCsPawn = memory.Read(listEntry2 + 112 * (playerPawn & 0x1FF)); if (!playerCsPawn) continue; const int health = memory.Read(playerCsPawn + offsets::m_iHealth); diff --git a/TempleWare-External/source/features/triggerbot.cpp b/TempleWare-External/source/features/triggerbot.cpp index ac67e5d..e6dece9 100644 --- a/TempleWare-External/source/features/triggerbot.cpp +++ b/TempleWare-External/source/features/triggerbot.cpp @@ -40,7 +40,7 @@ namespace features } std::uintptr_t localPlayer = memory.Read(globals::client + offsets::dwLocalPlayerPawn); - BYTE team = memory.Read(localPlayer + offsets::m_iTeamNum); + short team = memory.Read(localPlayer + offsets::m_iTeamNum); if (!globals::TriggerBotIgnoreFlash) { @@ -56,12 +56,12 @@ namespace features continue; std::uintptr_t entityList = memory.Read(globals::client + offsets::dwEntityList); - std::uintptr_t entity = memory.Read(memory.Read(entityList + 0x8 * (crosshairEntityIndex >> 9) + 0x10) + 120 * (crosshairEntityIndex & 0x1ff)); + std::uintptr_t entity = memory.Read(memory.Read(entityList + 8 * (crosshairEntityIndex >> 9) + 16) + 112 * (crosshairEntityIndex & 0x1FF)); if (!entity) continue; // Skip teammate or dead target (optional) - if (globals::TriggerBotTeamCheck && team == memory.Read(entity + offsets::m_iTeamNum)) + if (globals::TriggerBotTeamCheck && team == memory.Read(entity + offsets::m_iTeamNum)) continue; if (memory.Read(entity + offsets::m_iHealth) <= 0) diff --git a/TempleWare-External/source/main.cpp b/TempleWare-External/source/main.cpp index c1544dc..7262830 100644 --- a/TempleWare-External/source/main.cpp +++ b/TempleWare-External/source/main.cpp @@ -32,7 +32,9 @@ int __stdcall wWinMain(HINSTANCE instance, HINSTANCE previousInstance, PWSTR arg while (globals::isRunning) { - if (GetAsyncKeyState(VK_END) & 0x8000) + if ((GetAsyncKeyState(VK_END) & 0x8000) || + (GetAsyncKeyState(VK_INSERT) & 0x8000) || + (GetAsyncKeyState(VK_HOME) & 0x8000)) { windowVisible = !windowVisible; ShowWindow(gui::window, windowVisible ? SW_SHOW : SW_HIDE); diff --git a/TempleWare-External/source/offsets/offsets.cpp b/TempleWare-External/source/offsets/offsets.cpp index 32159c1..3a75866 100644 --- a/TempleWare-External/source/offsets/offsets.cpp +++ b/TempleWare-External/source/offsets/offsets.cpp @@ -52,7 +52,7 @@ bool offsets::UpdateOffset() m_bGlowing= client_dllJson["CGlowProperty"]["fields"]["m_bGlowing"]; m_bIsScoped= client_dllJson["C_CSPlayerPawn"]["fields"]["m_bIsScoped"]; attack= buttonsJson["client.dll"]["attack"]; - m_iIDEntIndex= client_dllJson["C_CSPlayerPawnBase"]["fields"]["m_iIDEntIndex"];; + m_iIDEntIndex= client_dllJson["C_CSPlayerPawn"]["fields"]["m_iIDEntIndex"];; flFlashDuration= client_dllJson["C_CSPlayerPawnBase"]["fields"]["m_flFlashDuration"]; m_iShotsFired = client_dllJson["C_CSPlayerPawn"]["fields"]["m_iShotsFired"]; m_aimPunchAngle = client_dllJson["C_CSPlayerPawn"]["fields"]["m_aimPunchAngle"];