menu/settings updated
This commit is contained in:
@@ -12,10 +12,12 @@
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
#include "wrapper.h"
|
||||
#include "Wrapper.h"
|
||||
#include "ClientHelper.h"
|
||||
|
||||
#include "hooks/hooks.hpp"
|
||||
#include "color.hpp"
|
||||
#include "UnityCore.h"
|
||||
#include "features/misc/misc.h"
|
||||
|
||||
// Set the name of your log file here
|
||||
extern const LPCWSTR LOG_FILE = L"DevourClient.txt";
|
||||
@@ -35,17 +37,36 @@ void Run()
|
||||
// Initialize thread data - DO NOT REMOVE
|
||||
il2cpp_thread_attach(il2cpp_domain_get());
|
||||
|
||||
// If you would like to write to a log file, specify the name above and use il2cppi_log_write()
|
||||
il2cppi_log_write("Initializg..");
|
||||
|
||||
// If you would like to output to a new console window, use il2cppi_new_console() to open one and redirect stdout
|
||||
il2cppi_new_console();
|
||||
|
||||
std::cout << dye::green("\n\tDevourClient v2.0\n\t") << __DATE__ << " - " << __TIME__ << std::endl;
|
||||
std::cout << "\tDevour Version ";
|
||||
|
||||
if (app::Application_get_version != nullptr)
|
||||
std::cout << dye::light_red("v") << dye::light_red(il2cppi_to_string(app::Application_get_version(NULL))) << "\n\n";
|
||||
else
|
||||
std::cout << "Unknown\n\n";
|
||||
|
||||
std::cout << dye::light_aqua("\tMade with < 3 by patate and Jadis0x.\n");
|
||||
|
||||
uint64_t steamUserID = app::SteamUser_GetSteamID(nullptr).m_SteamID;
|
||||
std::string steamName = il2cppi_to_string(app::SteamFriends_GetPersonaName(nullptr));
|
||||
|
||||
std::cout << "[DevourClient]: " << dye::yellow("GitHub: ") << dye::aqua_on_black("https://github.com/ALittlePatate/DevourClient\n");
|
||||
std::cout << "[DevourClient]: Logged in as " << dye::yellow(steamName) << " (" << steamUserID << ")\n\n";
|
||||
|
||||
std::cout << "[DevourClient]: " << dye::aqua("Initializing..\n");
|
||||
il2cppi_log_write("Initializing..");
|
||||
|
||||
if (InitializeHooks()) {
|
||||
il2cppi_log_write("Hooks initialized");
|
||||
std::cout << "[DevourClient]: " << dye::aqua("Hooks initialized.\n");
|
||||
}
|
||||
else {
|
||||
il2cppi_log_write("MH_Initialize failed, quitting...");
|
||||
std::cout << "[DevourClient]: " << dye::aqua("MH_Initialize failed, quitting...\n");
|
||||
CreateThread(0, 0, EjectThread, 0, 0, 0); //Unhooking
|
||||
return;
|
||||
}
|
||||
@@ -54,19 +75,44 @@ void Run()
|
||||
|
||||
if (HookDX11()) {
|
||||
il2cppi_log_write("DirectX11 hooked");
|
||||
std::cout << "[DevourClient]: " << dye::aqua("DirectX11 hooked.\n");
|
||||
}
|
||||
else {
|
||||
il2cppi_log_write("DirectX11 hook failed, quitting...");
|
||||
std::cout << "[DevourClient]: " << dye::aqua("DirectX11 hook failed!quitting...\n");
|
||||
CreateThread(0, 0, EjectThread, 0, 0, 0); //Unhooking
|
||||
return;
|
||||
}
|
||||
|
||||
std::cout << "[DevourClient]: " << dye::light_green("Done!:)\n");
|
||||
|
||||
|
||||
std::string scene = SceneName();
|
||||
|
||||
if (scene == std::string("Menu")) {
|
||||
app::Menu* horrorMenu = UnityCore::Object<app::Menu>::FindObjectOfType("Menu", "Horror");
|
||||
|
||||
if (!horrorMenu)
|
||||
return;
|
||||
|
||||
app::String* str = reinterpret_cast<app::String*>(il2cpp_string_new("Welcome to DevourClient.\n\nAfter ensuring the game is in full screen, press the Q key to activate the menu.\n\n\nYou can disable the cheat by pressing the 'END' key."));
|
||||
|
||||
if (str) {
|
||||
if (app::Menu_ShowMessageModal == nullptr)
|
||||
return;
|
||||
|
||||
app::Menu_ShowMessageModal(horrorMenu, str, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
while (true) {
|
||||
if (GetAsyncKeyState(VK_END) & 0x8000 || should_unhook)
|
||||
break;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
|
||||
if (settings::fullBright)
|
||||
Misc::FullBright();
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(400));
|
||||
}
|
||||
CreateThread(0, 0, EjectThread, 0, 0, 0);
|
||||
}
|
||||
Reference in New Issue
Block a user