Skip to content

Commit

Permalink
feat: Update new patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiga74164 committed Apr 19, 2024
1 parent aadb50f commit e7685e6
Show file tree
Hide file tree
Showing 28 changed files with 459 additions and 209 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on:
branches: [ main ]

env:
SOLUTION_FILE_PATH: ./SoloLevelling.sln
# SOLUTION_FILE_PATH: ./SoloLevelling.sln
PROJECT_FILE_PATH: ./cheat/SoloLevelling.vcxproj
BUILD_CONFIGURATION: Release
PLATFORM: x64

permissions:
contents: read
Expand All @@ -25,7 +27,7 @@ jobs:

- name: Build
run: |
msbuild /m /p:Configuration=${{ env.BUILD_CONFIGURATION }} ${{ env.SOLUTION_FILE_PATH }}
msbuild ${{ env.PROJECT_FILE_PATH }} /p:Configuration=${{ env.BUILD_CONFIGURATION }} /p:Platform=${{ env.PLATFORM }}
- name: Upload Build Artifact
uses: actions/[email protected]
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -366,4 +366,7 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd

PostBuildEvent.cmd
PostBuildEvent.cmd

manual-map.h
manual-map.cpp
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project is created and shared for educational purposes only. I do not condo
## Usage

### How to Run
1. Run the provided Injector or Inject the DLL to the game with your preferred injector
1. Inject the DLL to the game with your preferred injector
2. Press insert to show the menu

## Features
Expand Down
2 changes: 1 addition & 1 deletion cheat/SoloLevelling.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<LanguageStandard>stdcpp20</LanguageStandard>
<AdditionalIncludeDirectories>$(ProjectDir)src\;$(ProjectDir)vendor\CommandMenu\include\;$(ProjectDir)vendor\imgui\;$(ProjectDir)vendor\detours\;$(ProjectDir)vendor\magic_enum\include\magic_enum;$(ProjectDir)vendor\json\single_include\nlohmann</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(ProjectDir)src\;$(ProjectDir)vendor\CommandMenu\include\;$(ProjectDir)vendor\imgui\;$(ProjectDir)vendor\detours\;$(ProjectDir)vendor\magic_enum\include\magic_enum;$(ProjectDir)vendor\json\single_include\nlohmann;$(ProjectDir)vendor\xorstr</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
2 changes: 1 addition & 1 deletion cheat/src/HookManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HookManager
static Fn getOrigin(Fn handler, const char* callerName = nullptr) noexcept
{
if (holderMap.count(reinterpret_cast<void*>(handler)) == 0) {
LOG("Origin not found for handler: %s. Maybe racing bug.", callerName == nullptr ? "<Unknown>" : callerName);
LOG(xorstr("Origin not found for handler: %s. Maybe racing bug."), callerName == nullptr ? "<Unknown>" : callerName);
return nullptr;
}
return reinterpret_cast<Fn>(holderMap[reinterpret_cast<void*>(handler)]);
Expand Down
25 changes: 21 additions & 4 deletions cheat/src/Hotkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ static short InputToLegacy(ImGuiKey inputkey)
return VK_XBUTTON2;
}

LOG("Failed to find legacy input");
LOG(xorstr("Failed to find legacy input"));
return -1;
}

Expand Down Expand Up @@ -521,10 +521,27 @@ std::string Trim(const std::string& str)
return str.substr(first, (last - first + 1));
}

ImGuiKey StringToImGuiKey(const std::string& keyName)
std::string ToLower(const std::string& str)
{
auto keyEnum = magic_enum::enum_cast<ImGuiKey_>(keyName);
return keyEnum.has_value() ? keyEnum.value() : ImGuiKey_None;
std::string result = str;
std::transform(result.begin(), result.end(), result.begin(), [](unsigned char c) { return std::tolower(c); });
return result;
}

ImGuiKey_ StringToImGuiKey(const std::string& keyName)
{
std::string lowercaseKeyName = ToLower(keyName);

for (int i = 0; i < ImGuiKey_COUNT; ++i)
{
std::string enumName = "ImGuiKey_" + std::to_string(i);
if (ToLower(enumName) == lowercaseKeyName)
{
return static_cast<ImGuiKey_>(i);
}
}

return ImGuiKey_None;
}


Expand Down
6 changes: 3 additions & 3 deletions cheat/src/Render/Backend/DX11Hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,17 @@ namespace Backend

void DX11Hook::InitializeHooks()
{
LOG("Initialized DX11Hook.");
LOG(xorstr("Initialized DX11Hook."));

fnIDXGISwapChainPresent = FindPresent();
if (fnIDXGISwapChainPresent == nullptr)
{
LOG("Failed to find Present function for DX11.");
LOG(xorstr("Failed to find Present function for DX11."));
return;
}

HookManager::install(fnIDXGISwapChainPresent, PresentHook);

LOG("DX11Hook Hooks installed.");
LOG(xorstr("DX11Hook Hooks installed."));
}
}
16 changes: 8 additions & 8 deletions cheat/src/Render/Backend/DX12Hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace Backend
if (!init && m_instance->OnInit)
{
const auto result = (HRESULT)pSwapChain->GetDevice(__uuidof(DirectX12Interface::Device), reinterpret_cast<void**>(&DirectX12Interface::Device));
LOG("Result of GetDevice: %x", HRESULT_CODE(result));
LOG(xorstr("Result of GetDevice: %x"), HRESULT_CODE(result));
if (SUCCEEDED(result))
{
DXGI_SWAP_CHAIN_DESC desc;
Expand Down Expand Up @@ -314,24 +314,24 @@ namespace Backend

void DX12Hook::InitializeHooks()
{
LOG("Initialized DX12Hook.");
LOG(xorstr("Initialized DX12Hook."));

DirectX12MainFunctions functions;
if (!FindFunctions(functions))
{
LOG("Failed to find Present function for DX12.");
LOG(xorstr("Failed to find Present function for DX12."));
return;
}

LOG("IDXGISwapChainPresent: 0x%p", functions.presentFunc);
LOG("DrawInstanced: 0x%p", functions.drawInstancedFunc);
LOG("DrawIndexedInstanced: 0x%p", functions.drawIndexedInstancedFunc);
LOG("ExecuteCommandLists: 0x%p", functions.executeCommandListFunc);
LOG(xorstr("IDXGISwapChainPresent: 0x%p"), functions.presentFunc);
LOG(xorstr("DrawInstanced: 0x%p"), functions.drawInstancedFunc);
LOG(xorstr("DrawIndexedInstanced: 0x%p"), functions.drawIndexedInstancedFunc);
LOG(xorstr("ExecuteCommandLists: 0x%p"), functions.executeCommandListFunc);

HookManager::install(functions.presentFunc, PresentHook);
HookManager::install(functions.executeCommandListFunc, ExecuteCommandListsHook);

LOG("D3D12 Hooks installed.");
LOG(xorstr("D3D12 Hooks installed."));
}

}
98 changes: 49 additions & 49 deletions cheat/src/Render/Gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ void Gui::Render()
{
auto& vars = Vars::GetInstance();

ImGui::Begin("##Taiga74164", nullptr, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
ImGui::Begin(xorstr("##Taiga74164"), nullptr, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoTitleBar);
{
ImGui::BeginGroup();
{
Expand All @@ -22,7 +22,7 @@ void Gui::Render()

GuiUtil::RainbowLine();
ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(0, 0, 0, 0));
ImGui::BeginChild("##LeftSide", ImVec2(100, GuiUtil::GetY()), TRUE);
ImGui::BeginChild(xorstr("##LeftSide"), ImVec2(100, GuiUtil::GetY()), TRUE);
ImGui::PopStyleColor();
{
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 5);
Expand All @@ -32,10 +32,10 @@ void Gui::Render()
if (ImGui::IsItemClicked()) m_MenuTab = tab; \
ImGui::PopStyleColor()

MENU_MODULES("Features", 0);
MENU_MODULES("Misc", 1);
MENU_MODULES("Hotkeys", 2);
MENU_MODULES("About", 3);
MENU_MODULES(xorstr("Features"), 0);
MENU_MODULES(xorstr("Misc"), 1);
MENU_MODULES(xorstr("Hotkeys"), 2);
MENU_MODULES(xorstr("About"), 3);

#undef MENU_MODULES
}
Expand All @@ -44,7 +44,7 @@ void Gui::Render()
GuiUtil::LineVertical();

ImGui::PushStyleColor(ImGuiCol_ChildBg, IM_COL32(0, 0, 0, 0));
ImGui::BeginChild("##RightSide", ImVec2(GuiUtil::GetX(), GuiUtil::GetY()), TRUE);
ImGui::BeginChild(xorstr("##RightSide"), ImVec2(GuiUtil::GetX(), GuiUtil::GetY()), TRUE);
ImGui::PopStyleColor();
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImGuiCol_Button ? active : inactive);
switch (m_MenuTab)
Expand All @@ -53,40 +53,40 @@ void Gui::Render()
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2));
ImGui::BeginGroup();

//ImGui::CheckboxFill("Animation Speed", &vars.PlayerSpeed.value());
//ImGui::CheckboxFill(xorstr("Animation Speed"), &vars.PlayerSpeed.value());
//if (vars.PlayerSpeed.value())
// ImGui::SliderFloat("Speed", &vars.PlayerSpeedValue.value(), 1.0f, 20.0f, "%.1f");
// ImGui::SliderFloat(xorstr("Speed"), &vars.PlayerSpeedValue.value(), 1.0f, 20.0f, "%.1f");

ImGui::CheckboxFill("Instant Regen", &vars.InstantRegen.value()); HELPMAKER("Press Run");
ImGui::CheckboxFill(xorstr("Instant Regen"), &vars.InstantRegen.value()); HELPMAKER(xorstr("Press Run"));

ImGui::CheckboxFill("No Cooldown", &vars.NoCooldown.value());
ImGui::CheckboxFill(xorstr("No Cooldown"), &vars.NoCooldown.value());

ImGui::CheckboxFill("No Cooldown Shadow", &vars.NoCooldownShadow.value()); HELPMAKER("Enable only if you have shadow feature available");
ImGui::CheckboxFill(xorstr("No Cooldown Shadow"), &vars.NoCooldownShadow.value()); HELPMAKER(xorstr("Enable only if you have shadow feature available"));

ImGui::CheckboxFill("God Mode", &vars.GodMode.value());
ImGui::CheckboxFill(xorstr("God Mode"), &vars.GodMode.value());

ImGui::CheckboxFill("Kill Aura", &vars.KillAura.value());
ImGui::CheckboxFill(xorstr("Kill Aura"), &vars.KillAura.value());

ImGui::CheckboxFill("Damage Hack", &vars.DamageHack.value());
ImGui::CheckboxFill(xorstr("Damage Hack"), &vars.DamageHack.value());
if (vars.DamageHack.value())
ImGui::SliderInt("Value", &vars.DamageHackValue.value(), 10000, 100000000, "%d");
ImGui::SliderInt(xorstr("Value"), &vars.DamageHackValue.value(), 10000, 100000000, "%d");

ImGui::CheckboxFill("Dumb Enemies", &vars.DumbEnemies.value()); HELPMAKER("This will prevent enemies from attacking or moving towards you");
ImGui::CheckboxFill(xorstr("Dumb Enemies"), &vars.DumbEnemies.value()); HELPMAKER(xorstr("This will prevent enemies from attacking or moving towards you"));

ImGui::CheckboxFill("Mob Vacuum", &vars.MobVacuum.value()); HELPMAKER("You have to go to the checkpoint before killing them");
ImGui::CheckboxFill(xorstr("Mob Vacuum"), &vars.MobVacuum.value()); HELPMAKER(xorstr("You have to go to the checkpoint before killing them"));
if (vars.MobVacuum.value())
{
ImGui::SliderFloat("Range", &vars.VacuumRange.value(), 1.0f, 50.0f, "%.1f");
ImGui::SliderFloat("Distance", &vars.VacuumDistance.value(), 1.0f, 10.0f, "%.1f");
ImGui::SliderFloat(xorstr("Range"), &vars.VacuumRange.value(), 1.0f, 50.0f, "%.1f");
ImGui::SliderFloat(xorstr("Distance"), &vars.VacuumDistance.value(), 1.0f, 10.0f, "%.1f");
}

ImGui::CheckboxFill("Mission Time", &vars.MissionTime.value()); HELPMAKER("Make sure this is enabled before starting a mission");
ImGui::CheckboxFill(xorstr("Mission Time"), &vars.MissionTime.value()); HELPMAKER(xorstr("Make sure this is enabled before starting a mission"));
if (vars.MissionTime.value())
ImGui::SliderInt("Time (ms)", &vars.MissionTimeMs.value(), 180000, 3600000, "%d");
ImGui::SliderInt(xorstr("Time (ms)"), &vars.MissionTimeMs.value(), 180000, 3600000, "%d");

ImGui::CheckboxFill("Time Scale", &vars.TimeScale.value());
ImGui::CheckboxFill(xorstr("Time Scale"), &vars.TimeScale.value());
if (vars.TimeScale.value())
ImGui::SliderFloat("Speed", &vars.TimeScaleSpeed.value(), 1.0f, 10.0f, "%.1f");
ImGui::SliderFloat(xorstr("Speed"), &vars.TimeScaleSpeed.value(), 1.0f, 10.0f, "%.1f");

ImGui::EndGroup();
ImGui::PopStyleVar();
Expand All @@ -95,44 +95,44 @@ void Gui::Render()
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(2, 2));
ImGui::BeginGroup();

ImGui::CheckboxFill("FPS Unlock", &vars.FPSUnlock.value());
ImGui::CheckboxFill(xorstr("FPS Unlock"), &vars.FPSUnlock.value());
if (vars.FPSUnlock.value())
ImGui::SliderInt("FPS", &vars.FPSValue.value(), 5, 360, "%d");
ImGui::CheckboxFill("Fov Changer", &vars.FovChanger.value());
ImGui::SliderInt(xorstr("FPS"), &vars.FPSValue.value(), 5, 360, "%d");

ImGui::CheckboxFill(xorstr("Fov Changer"), &vars.FovChanger.value());
if (vars.FovChanger.value())
ImGui::SliderFloat("Fov", &vars.Fov.value(), 1.0f, 360.0f, "%.1f");
ImGui::SliderFloat(xorstr("Fov"), &vars.Fov.value(), 1.0f, 360.0f, "%.1f");

ImGui::CheckboxFill("Skip Intro Movie", &vars.SkipIntroMovie.value()); HELPMAKER("This will skip the intro movie when you start the game");
ImGui::CheckboxFill(xorstr("Skip Intro Movie"), &vars.SkipIntroMovie.value()); HELPMAKER(xorstr("This will skip the intro movie when you start the game"));

ImGui::CheckboxFill("Disable Web View", &vars.DisableWebView.value()); HELPMAKER("Disables WebView pop-up every time you enter the game");
ImGui::CheckboxFill(xorstr("Disable Web View"), &vars.DisableWebView.value()); HELPMAKER(xorstr("Disables WebView pop-up every time you enter the game"));

ImGui::EndGroup();
ImGui::PopStyleVar();
break;
case 2: // Hotkeys
//ImGui::InputHotkey("PlayerSpeed", vars.PlayerSpeed);
ImGui::InputHotkey("Instant Regen", vars.InstantRegen);
ImGui::InputHotkey("No Cooldown", vars.NoCooldown);
ImGui::InputHotkey("No Cooldown Shadow", vars.NoCooldownShadow);
ImGui::InputHotkey("God Mode", vars.GodMode);
ImGui::InputHotkey("Damage Hack", vars.DamageHack);
//ImGui::InputHotkey("DamagePercentage", vars.DamagePercentage);
//ImGui::InputHotkey("DamageFixed",& vars.DamageFixedHotkey, vars.DamageFixed);
ImGui::InputHotkey("Mob Vacuum", vars.MobVacuum);
ImGui::InputHotkey("Dumb Enemies", vars.DumbEnemies);
ImGui::InputHotkey("Mission Time", vars.MissionTime);
ImGui::InputHotkey("Time Scale", vars.TimeScale);
ImGui::InputHotkey("FPS Unlock", vars.FPSUnlock);
ImGui::InputHotkey("Fov Changer", vars.FovChanger);
ImGui::InputHotkey("Skip Intro Movie", vars.SkipIntroMovie);
ImGui::InputHotkey("Disable Web View", vars.DisableWebView);
//ImGui::InputHotkey(xorstr("PlayerSpeed"), vars.PlayerSpeed);
ImGui::InputHotkey(xorstr("Instant Regen"), vars.InstantRegen);
ImGui::InputHotkey(xorstr("No Cooldown"), vars.NoCooldown);
ImGui::InputHotkey(xorstr("No Cooldown Shadow"), vars.NoCooldownShadow);
ImGui::InputHotkey(xorstr("God Mode"), vars.GodMode);
ImGui::InputHotkey(xorstr("Damage Hack"), vars.DamageHack);
//ImGui::InputHotkey(xorstr("DamagePercentage"), vars.DamagePercentage);
//ImGui::InputHotkey(xorstr("DamageFixed"),& vars.DamageFixedHotkey, vars.DamageFixed);
ImGui::InputHotkey(xorstr("Mob Vacuum"), vars.MobVacuum);
ImGui::InputHotkey(xorstr("Dumb Enemies"), vars.DumbEnemies);
ImGui::InputHotkey(xorstr("Mission Time"), vars.MissionTime);
ImGui::InputHotkey(xorstr("Time Scale"), vars.TimeScale);
ImGui::InputHotkey(xorstr("FPS Unlock"), vars.FPSUnlock);
ImGui::InputHotkey(xorstr("Fov Changer"), vars.FovChanger);
ImGui::InputHotkey(xorstr("Skip Intro Movie"), vars.SkipIntroMovie);
ImGui::InputHotkey(xorstr("Disable Web View"), vars.DisableWebView);

break;
case 3: // About
ImGui::Spacing();
ImGui::Text("Created by: Taiga74164");
ImGui::TextURL("Unknown Cheats thread", "https://www.unknowncheats.me/forum/other-mmorpg-and-strategy/629636-solo-leveling-arise-cheeto.html");
ImGui::Text(xorstr("Created by: Taiga74164"));
ImGui::TextURL(xorstr("Unknown Cheats thread"), "https://www.unknowncheats.me/forum/other-mmorpg-and-strategy/629636-solo-leveling-arise-cheeto.html");
break;
}

Expand Down
1 change: 1 addition & 0 deletions cheat/src/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <Windows.h>
#include <string>
#include <filesystem>
#include "xorstr.h"

#define LOG(fmt, ...) Utils::ConsolePrint(__FILE__, __LINE__, fmt, __VA_ARGS__)

Expand Down
2 changes: 1 addition & 1 deletion cheat/src/appdata/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#define SAFE_BEGIN() __try {
#define SAFE_ERROR() } __except (EXCEPTION_EXECUTE_HANDLER) { \
LOG("Exception 0x%08x.", GetExceptionCode());
LOG(xorstr("Exception 0x%08x."), GetExceptionCode());

#define SAFE_END() }
#define SAFE_EEND() SAFE_ERROR(); SAFE_END();
Expand Down
Loading

0 comments on commit e7685e6

Please sign in to comment.