From 22094cd23b9e14b543aca262d37dd964e349fe14 Mon Sep 17 00:00:00 2001 From: LouisLiu <8723614@gmail.com> Date: Sat, 4 Jun 2022 16:33:28 +0800 Subject: [PATCH 01/18] add faketime --- cheat-library/FakeTime.h | 19 +++++++ cheat-library/cheat-library.vcxproj | 2 + cheat-library/cheat-library.vcxproj.filters | 6 ++ cheat-library/src/user/cheat/cheat.cpp | 2 + .../src/user/cheat/world/FakeTime.cpp | 56 +++++++++++++++++++ cheat-library/src/user/cheat/world/FakeTime.h | 19 +++++++ 6 files changed, 104 insertions(+) create mode 100644 cheat-library/FakeTime.h create mode 100644 cheat-library/src/user/cheat/world/FakeTime.cpp create mode 100644 cheat-library/src/user/cheat/world/FakeTime.h diff --git a/cheat-library/FakeTime.h b/cheat-library/FakeTime.h new file mode 100644 index 0000000..d255681 --- /dev/null +++ b/cheat-library/FakeTime.h @@ -0,0 +1,19 @@ +#pragma once +namespace cheat::feature +{ + + class FakeTime : public Feature + { + public: + config::Field> f_Enabled; + static FakeTime& GetInstance(); + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + void OnGameUpdate(); + private: + static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); + FakeTime(); + }; +} \ No newline at end of file diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index 2e06492..4e5dd82 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -15,6 +15,7 @@ + false false @@ -125,6 +126,7 @@ + false false diff --git a/cheat-library/cheat-library.vcxproj.filters b/cheat-library/cheat-library.vcxproj.filters index e63930a..54eb76c 100644 --- a/cheat-library/cheat-library.vcxproj.filters +++ b/cheat-library/cheat-library.vcxproj.filters @@ -225,6 +225,9 @@ Header Files + + Header Files + @@ -408,6 +411,9 @@ Source Files + + Source Files + diff --git a/cheat-library/src/user/cheat/cheat.cpp b/cheat-library/src/user/cheat/cheat.cpp index 85afd9e..a22ef97 100644 --- a/cheat-library/src/user/cheat/cheat.cpp +++ b/cheat-library/src/user/cheat/cheat.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -80,6 +81,7 @@ namespace cheat FEAT_INST(ElementalSight), FEAT_INST(KillAura), FEAT_INST(MobVacuum), + FEAT_INST(FakeTime), FEAT_INST(ChestTeleport), FEAT_INST(OculiTeleport), diff --git a/cheat-library/src/user/cheat/world/FakeTime.cpp b/cheat-library/src/user/cheat/world/FakeTime.cpp new file mode 100644 index 0000000..a72d17e --- /dev/null +++ b/cheat-library/src/user/cheat/world/FakeTime.cpp @@ -0,0 +1,56 @@ +#include "pch-il2cpp.h" +#include "FakeTime.h" +#include + + +namespace cheat::feature +{ + //CNLouisLiu + void* LevelTimeManager = NULL; + FakeTime::FakeTime() : Feature(), + NF(f_Enabled, "FakeTime", "Enabled", false) + { + HookManager::install(app::LevelTimeManager_SetInternalTimeOfDay, LevelTimeManager_SetInternalTimeOfDay_Hook); + + events::GameUpdateEvent += MY_METHOD_HANDLER(FakeTime::OnGameUpdate); + } + FakeTime& FakeTime::GetInstance() + { + static FakeTime instance; + return instance; + } + const FeatureGUIInfo& FakeTime::GetGUIInfo() const + { + static const FeatureGUIInfo info{ "FakeTime", "World", true }; + return info; + } + void FakeTime::DrawMain() + { + ConfigWidget("Enabled", f_Enabled, "Keep the game in daylight (12 noon)"); + } + bool FakeTime::NeedStatusDraw() const + { + return f_Enabled; + } + void FakeTime::DrawStatus() + { + ImGui::Text("FakeTime"); + } + void FakeTime::OnGameUpdate() + { + if (LevelTimeManager != NULL&& f_Enabled) { + CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, 12.00f, false, false, (MethodInfo*)0); + } + } + void FakeTime::LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method) { + float Hours = inHours; + + if (GetInstance().f_Enabled) + { + Hours = 12.00f; + } + CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, __this, Hours, force, refreshEnviroTime, method); + + } + +} \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/FakeTime.h b/cheat-library/src/user/cheat/world/FakeTime.h new file mode 100644 index 0000000..947faad --- /dev/null +++ b/cheat-library/src/user/cheat/world/FakeTime.h @@ -0,0 +1,19 @@ +#pragma once +namespace cheat::feature +{ + + class FakeTime : public Feature + { + public: + config::Field> f_Enabled; + static FakeTime& GetInstance(); + void OnGameUpdate(); + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + private: + static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); + FakeTime(); + }; +} \ No newline at end of file From a81ebc740f63e57b2e500bd0e7a66f278ae44b28 Mon Sep 17 00:00:00 2001 From: LouisLiu <8723614@gmail.com> Date: Thu, 16 Jun 2022 00:46:43 +0800 Subject: [PATCH 02/18] Support custom time --- .../src/user/cheat/world/FakeTime.cpp | 29 +++++++++++++------ cheat-library/src/user/cheat/world/FakeTime.h | 4 +++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/cheat-library/src/user/cheat/world/FakeTime.cpp b/cheat-library/src/user/cheat/world/FakeTime.cpp index a72d17e..3009c0f 100644 --- a/cheat-library/src/user/cheat/world/FakeTime.cpp +++ b/cheat-library/src/user/cheat/world/FakeTime.cpp @@ -8,7 +8,9 @@ namespace cheat::feature //CNLouisLiu void* LevelTimeManager = NULL; FakeTime::FakeTime() : Feature(), - NF(f_Enabled, "FakeTime", "Enabled", false) + NF(f_Enabled, "FakeTime", "Enabled", false), + NF(f_TimeHour, "FakeTime", "TimeHour", 12), + NF(f_TimeMinute, "FakeTime", "TimeMinute", 0) { HookManager::install(app::LevelTimeManager_SetInternalTimeOfDay, LevelTimeManager_SetInternalTimeOfDay_Hook); @@ -26,7 +28,9 @@ namespace cheat::feature } void FakeTime::DrawMain() { - ConfigWidget("Enabled", f_Enabled, "Keep the game in daylight (12 noon)"); + ConfigWidget("Enabled", f_Enabled, "Keep game time the same"); + ConfigWidget("TimeHour", f_TimeHour, 1, 0, 24); + ConfigWidget("TimeMinute", f_TimeMinute, 1, 0, 60); } bool FakeTime::NeedStatusDraw() const { @@ -34,23 +38,30 @@ namespace cheat::feature } void FakeTime::DrawStatus() { - ImGui::Text("FakeTime"); + ImGui::Text("FakeTime|%d:%d", f_TimeHour.value(), f_TimeMinute.value()); + } + float FakeTime::ConversionTime() { + + float time = float(f_TimeHour); + float timemin = f_TimeMinute / 60; + return time + timemin; } void FakeTime::OnGameUpdate() { - if (LevelTimeManager != NULL&& f_Enabled) { - CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, 12.00f, false, false, (MethodInfo*)0); + if (LevelTimeManager != NULL && f_Enabled) { + auto& faketime = GetInstance(); + CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, faketime.ConversionTime(), false, false, (MethodInfo*)0); } } void FakeTime::LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method) { float Hours = inHours; - - if (GetInstance().f_Enabled) + auto& faketime = GetInstance(); + if (faketime.f_Enabled) { - Hours = 12.00f; + Hours = faketime.ConversionTime(); } CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, __this, Hours, force, refreshEnviroTime, method); - + } } \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/FakeTime.h b/cheat-library/src/user/cheat/world/FakeTime.h index 947faad..8f0a31a 100644 --- a/cheat-library/src/user/cheat/world/FakeTime.h +++ b/cheat-library/src/user/cheat/world/FakeTime.h @@ -6,6 +6,9 @@ namespace cheat::feature { public: config::Field> f_Enabled; + config::Field f_TimeHour; + config::Field f_TimeMinute; + static FakeTime& GetInstance(); void OnGameUpdate(); const FeatureGUIInfo& GetGUIInfo() const override; @@ -14,6 +17,7 @@ namespace cheat::feature void DrawStatus() override; private: static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); + float ConversionTime(); FakeTime(); }; } \ No newline at end of file From 9b62640044e42780a20d28ffe3fd395b6c68f09e Mon Sep 17 00:00:00 2001 From: LouisLiu <35774374+CNLouisLiu@users.noreply.github.com> Date: Thu, 16 Jun 2022 00:49:13 +0800 Subject: [PATCH 03/18] Delete FakeTime.h --- cheat-library/FakeTime.h | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 cheat-library/FakeTime.h diff --git a/cheat-library/FakeTime.h b/cheat-library/FakeTime.h deleted file mode 100644 index d255681..0000000 --- a/cheat-library/FakeTime.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -namespace cheat::feature -{ - - class FakeTime : public Feature - { - public: - config::Field> f_Enabled; - static FakeTime& GetInstance(); - const FeatureGUIInfo& GetGUIInfo() const override; - void DrawMain() override; - virtual bool NeedStatusDraw() const override; - void DrawStatus() override; - void OnGameUpdate(); - private: - static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); - FakeTime(); - }; -} \ No newline at end of file From 9dc31ca5e5186d8169716ffeac19d7c2e81695e5 Mon Sep 17 00:00:00 2001 From: LouisLiu <8723614@gmail.com> Date: Thu, 16 Jun 2022 00:46:43 +0800 Subject: [PATCH 04/18] Support custom time --- cheat-library/FakeTime.h | 19 ------------ .../src/user/cheat/world/FakeTime.cpp | 29 +++++++++++++------ cheat-library/src/user/cheat/world/FakeTime.h | 4 +++ 3 files changed, 24 insertions(+), 28 deletions(-) delete mode 100644 cheat-library/FakeTime.h diff --git a/cheat-library/FakeTime.h b/cheat-library/FakeTime.h deleted file mode 100644 index d255681..0000000 --- a/cheat-library/FakeTime.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -namespace cheat::feature -{ - - class FakeTime : public Feature - { - public: - config::Field> f_Enabled; - static FakeTime& GetInstance(); - const FeatureGUIInfo& GetGUIInfo() const override; - void DrawMain() override; - virtual bool NeedStatusDraw() const override; - void DrawStatus() override; - void OnGameUpdate(); - private: - static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); - FakeTime(); - }; -} \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/FakeTime.cpp b/cheat-library/src/user/cheat/world/FakeTime.cpp index a72d17e..3009c0f 100644 --- a/cheat-library/src/user/cheat/world/FakeTime.cpp +++ b/cheat-library/src/user/cheat/world/FakeTime.cpp @@ -8,7 +8,9 @@ namespace cheat::feature //CNLouisLiu void* LevelTimeManager = NULL; FakeTime::FakeTime() : Feature(), - NF(f_Enabled, "FakeTime", "Enabled", false) + NF(f_Enabled, "FakeTime", "Enabled", false), + NF(f_TimeHour, "FakeTime", "TimeHour", 12), + NF(f_TimeMinute, "FakeTime", "TimeMinute", 0) { HookManager::install(app::LevelTimeManager_SetInternalTimeOfDay, LevelTimeManager_SetInternalTimeOfDay_Hook); @@ -26,7 +28,9 @@ namespace cheat::feature } void FakeTime::DrawMain() { - ConfigWidget("Enabled", f_Enabled, "Keep the game in daylight (12 noon)"); + ConfigWidget("Enabled", f_Enabled, "Keep game time the same"); + ConfigWidget("TimeHour", f_TimeHour, 1, 0, 24); + ConfigWidget("TimeMinute", f_TimeMinute, 1, 0, 60); } bool FakeTime::NeedStatusDraw() const { @@ -34,23 +38,30 @@ namespace cheat::feature } void FakeTime::DrawStatus() { - ImGui::Text("FakeTime"); + ImGui::Text("FakeTime|%d:%d", f_TimeHour.value(), f_TimeMinute.value()); + } + float FakeTime::ConversionTime() { + + float time = float(f_TimeHour); + float timemin = f_TimeMinute / 60; + return time + timemin; } void FakeTime::OnGameUpdate() { - if (LevelTimeManager != NULL&& f_Enabled) { - CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, 12.00f, false, false, (MethodInfo*)0); + if (LevelTimeManager != NULL && f_Enabled) { + auto& faketime = GetInstance(); + CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, LevelTimeManager, faketime.ConversionTime(), false, false, (MethodInfo*)0); } } void FakeTime::LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method) { float Hours = inHours; - - if (GetInstance().f_Enabled) + auto& faketime = GetInstance(); + if (faketime.f_Enabled) { - Hours = 12.00f; + Hours = faketime.ConversionTime(); } CALL_ORIGIN(LevelTimeManager_SetInternalTimeOfDay_Hook, __this, Hours, force, refreshEnviroTime, method); - + } } \ No newline at end of file diff --git a/cheat-library/src/user/cheat/world/FakeTime.h b/cheat-library/src/user/cheat/world/FakeTime.h index 947faad..8f0a31a 100644 --- a/cheat-library/src/user/cheat/world/FakeTime.h +++ b/cheat-library/src/user/cheat/world/FakeTime.h @@ -6,6 +6,9 @@ namespace cheat::feature { public: config::Field> f_Enabled; + config::Field f_TimeHour; + config::Field f_TimeMinute; + static FakeTime& GetInstance(); void OnGameUpdate(); const FeatureGUIInfo& GetGUIInfo() const override; @@ -14,6 +17,7 @@ namespace cheat::feature void DrawStatus() override; private: static void LevelTimeManager_SetInternalTimeOfDay_Hook(void* __this, float inHours, bool force, bool refreshEnviroTime, MethodInfo* method); + float ConversionTime(); FakeTime(); }; } \ No newline at end of file From a8783eb3bbc1a7e797ba38337c795096e48d00bd Mon Sep 17 00:00:00 2001 From: m0nkrel Date: Wed, 15 Jun 2022 21:48:10 +0300 Subject: [PATCH 05/18] fix #111, deleted duplicate in ESP --- cheat-library/src/user/cheat/esp/ESP.cpp | 1 - cheat-library/src/user/cheat/game/filters.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cheat-library/src/user/cheat/esp/ESP.cpp b/cheat-library/src/user/cheat/esp/ESP.cpp index fd0b4d6..541cbf2 100644 --- a/cheat-library/src/user/cheat/esp/ESP.cpp +++ b/cheat-library/src/user/cheat/esp/ESP.cpp @@ -582,7 +582,6 @@ namespace cheat::feature ADD_FILTER_FIELD(monster, Samachurl); ADD_FILTER_FIELD(monster, SangonomiyaCohort); ADD_FILTER_FIELD(monster, ShadowyHusk); - ADD_FILTER_FIELD(monster, ShadowyHusk); ADD_FILTER_FIELD(monster, ShogunateInfantry); ADD_FILTER_FIELD(monster, Slime); ADD_FILTER_FIELD(monster, Specter); diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index a1c4542..aaa1221 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -69,7 +69,7 @@ namespace cheat::game::filters SimpleFilter LizardTail = { app::EntityType__Enum_1::EnvAnimal, "Lizard" }; SimpleFilter LuminescentSpine = { app::EntityType__Enum_1::EnvAnimal, "FireFly" }; SimpleFilter Onikabuto = { app::EntityType__Enum_1::GatherObject, "Electrohercules" }; - SimpleFilter Starconch = { app::EntityType__Enum_1::GatherObject, "Shell" }; + SimpleFilter Starconch = { app::EntityType__Enum_1::GatherObject, "_Shell" }; SimpleFilter Eel = { app::EntityType__Enum_1::EnvAnimal, "Eel_" }; SimpleFilter Inu = { app::EntityType__Enum_1::EnvAnimal, "_Inu_Shihandai" }; SimpleFilter Boar = { app::EntityType__Enum_1::Monster, "Boar" }; From 4a83fb0802afb81ba7f3e4912c8879308454576c Mon Sep 17 00:00:00 2001 From: Andrei Abrudan Date: Thu, 16 Jun 2022 22:47:32 +0100 Subject: [PATCH 06/18] Fix tree farm --- .../src/user/cheat/world/AutoTreeFarm.cpp | 49 ++++++++++++++++--- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp b/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp index ab22d3c..bee71a3 100644 --- a/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp +++ b/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp @@ -116,11 +116,48 @@ namespace cheat::feature } }; + template > + class lra_map { + using key_value_pair = std::pair; + using list_iterator = typename std::list::iterator; + public: + void put(const KeyT& key, const ValT& val) { + auto it = elem_map.find(key); + // if element already in the map, don't modify it. + if (it != elem_map.end()) + return; + + items_list.push_front(key_value_pair(key, val)); + elem_map[key] = items_list.begin(); + + if (Size < elem_map.size()) { + { + const KeyT& last_key = items_list.back().first; + elem_map.erase(last_key); + } + items_list.pop_back(); + } + } + + ValT& get(const KeyT& key) { + auto it = elem_map.find(key); + if (it == elem_map.end()) + throw std::runtime_error("Tried to access key not present in map"); + return it->second->second; + } + + bool exists(const KeyT& key) const { + return elem_map.find(key) != elem_map.end(); + } + protected: + std::list items_list; + std::unordered_map elem_map; + }; void AutoTreeFarm::OnGameUpdate() { - static std::unordered_map s_AttackCountMap; + static lra_map s_AttackCountMap; static std::queue s_AttackQueue; static std::unordered_set s_AttackQueueSet; @@ -173,11 +210,12 @@ namespace cheat::feature if (m_AttackPerTree > 0) { - if (s_AttackCountMap.count(position) == 0) - s_AttackCountMap[position] = 0; + if (!s_AttackCountMap.exists(position)) + s_AttackCountMap.put(position, 0); - auto& attackCount = s_AttackCountMap[position]; + auto& attackCount = s_AttackCountMap.get(position); attackCount++; + if (attackCount > static_cast(m_AttackPerTree)) continue; } @@ -186,9 +224,6 @@ namespace cheat::feature app::MoleMole_NetworkManager_RequestHitTreeDropNotify(networkManager, position, position, treeType, nullptr); break; } - - if (s_AttackCountMap.size() > 1000) - s_AttackCountMap.clear(); } } From c0473965dbb94b9ea8bd0459c7e792ee7b18a01a Mon Sep 17 00:00:00 2001 From: biswop Date: Fri, 17 Jun 2022 21:09:35 +1000 Subject: [PATCH 07/18] added Dunlins Tooth to the ESP because im to lazy to remeber the precise location of them --- cheat-library/src/user/cheat/esp/ESP.cpp | 1 + cheat-library/src/user/cheat/game/filters.cpp | 1 + cheat-library/src/user/cheat/game/filters.h | 1 + 3 files changed, 3 insertions(+) diff --git a/cheat-library/src/user/cheat/esp/ESP.cpp b/cheat-library/src/user/cheat/esp/ESP.cpp index 541cbf2..cc569b8 100644 --- a/cheat-library/src/user/cheat/esp/ESP.cpp +++ b/cheat-library/src/user/cheat/esp/ESP.cpp @@ -513,6 +513,7 @@ namespace cheat::feature ADD_FILTER_FIELD(mineral, ScarletQuartz); ADD_FILTER_FIELD(mineral, StarSilver); ADD_FILTER_FIELD(mineral, WhiteIronChunk); + ADD_FILTER_FIELD(mineral, DunlinsTooth); // Trounce. Arranged by appearance in-game. ADD_FILTER_FIELD(monster, Dvalin); diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index aaa1221..8a40ade 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -107,6 +107,7 @@ namespace cheat::game::filters SimpleFilter ScarletQuartz = { app::EntityType__Enum_1::GatherObject, "_OreDulinsBlood" }; SimpleFilter StarSilver = { app::EntityType__Enum_1::GatherObject, "_OreMoonMeteor" }; SimpleFilter WhiteIronChunk = { app::EntityType__Enum_1::GatherObject, "_OreMetal" }; + SimpleFilter DunlinsTooth = { app::EntityType__Enum_1::GatherObject, "_DunlinsTooth" }; } namespace monster diff --git a/cheat-library/src/user/cheat/game/filters.h b/cheat-library/src/user/cheat/game/filters.h index fac4fee..4d2936e 100644 --- a/cheat-library/src/user/cheat/game/filters.h +++ b/cheat-library/src/user/cheat/game/filters.h @@ -107,6 +107,7 @@ namespace cheat::game::filters extern SimpleFilter ScarletQuartz; extern SimpleFilter StarSilver; extern SimpleFilter WhiteIronChunk; + extern SimpleFilter DunlinsTooth; } namespace monster From 479f50f910cbdf08372a22915b0a69ac8d5e24f1 Mon Sep 17 00:00:00 2001 From: Andrei Abrudan Date: Sat, 18 Jun 2022 02:45:34 +0100 Subject: [PATCH 08/18] Fixed a bug where multiple trees in range would cause RepeatDelay to be ignored resulting in less wood than expected --- cheat-library/src/user/cheat/world/AutoTreeFarm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp b/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp index bee71a3..c1e7874 100644 --- a/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp +++ b/cheat-library/src/user/cheat/world/AutoTreeFarm.cpp @@ -158,7 +158,6 @@ namespace cheat::feature void AutoTreeFarm::OnGameUpdate() { static lra_map s_AttackCountMap; - static std::queue s_AttackQueue; static std::unordered_set s_AttackQueueSet; static uint64_t s_LastAttackTimestamp = 0; @@ -179,7 +178,7 @@ namespace cheat::feature if (s_AttackQueueSet.count(tree) > 0) continue; - if (tree->fields._lastTreeDropTimeStamp + m_RepeatDelay > timestamp) + if (s_LastAttackTimestamp + m_RepeatDelay > timestamp) continue; auto position = tree->fields._.realBounds.m_Center; @@ -220,7 +219,7 @@ namespace cheat::feature continue; } - tree->fields._lastTreeDropTimeStamp = timestamp; + s_LastAttackTimestamp = timestamp; app::MoleMole_NetworkManager_RequestHitTreeDropNotify(networkManager, position, position, treeType, nullptr); break; } From cfaa8b3bf5ba4f80dca59d7993cda23b6486436d Mon Sep 17 00:00:00 2001 From: biswop Date: Sat, 18 Jun 2022 23:17:45 +1000 Subject: [PATCH 09/18] added relay stones to the ESP --- cheat-library/src/user/cheat/esp/ESP.cpp | 1 + cheat-library/src/user/cheat/game/filters.cpp | 1 + cheat-library/src/user/cheat/game/filters.h | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cheat-library/src/user/cheat/esp/ESP.cpp b/cheat-library/src/user/cheat/esp/ESP.cpp index cc569b8..0690298 100644 --- a/cheat-library/src/user/cheat/esp/ESP.cpp +++ b/cheat-library/src/user/cheat/esp/ESP.cpp @@ -635,6 +635,7 @@ namespace cheat::feature ADD_FILTER_FIELD(puzzle, CubeDevices); ADD_FILTER_FIELD(puzzle, EightStoneTablets); ADD_FILTER_FIELD(puzzle, ElectricConduction); + ADD_FILTER_FIELD(puzzle, RelayStone); ADD_FILTER_FIELD(puzzle, ElectroSeelie); ADD_FILTER_FIELD(puzzle, ElementalMonument); ADD_FILTER_FIELD(puzzle, FloatingAnemoSlime); diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index 8a40ade..6169624 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -232,6 +232,7 @@ namespace cheat::game::filters WhitelistFilter CubeDevices = { std::vector {app::EntityType__Enum_1::Gadget, app::EntityType__Enum_1::Platform }, std::vector {"_ElecStone", "_ElecSwitch" }}; SimpleFilter EightStoneTablets = { app::EntityType__Enum_1::Gadget, "_HistoryBoard" }; SimpleFilter ElectricConduction = { app::EntityType__Enum_1::Gear, "_ElectricPowerSource" }; + SimpleFilter RelayStone = { app::EntityType__Enum_1::Worktop, "_ElectricTransfer_" }; WhitelistFilter ElectroSeelie = { std::vector {app::EntityType__Enum_1::Field, app::EntityType__Enum_1::Platform }, std::vector {"_ElectricSeelie"} }; SimpleFilter ElementalMonument = { app::EntityType__Enum_1::Gear, "_ElemTablet" }; SimpleFilter FloatingAnemoSlime = { app::EntityType__Enum_1::Platform, "_WindSlime" }; diff --git a/cheat-library/src/user/cheat/game/filters.h b/cheat-library/src/user/cheat/game/filters.h index 4d2936e..9edce60 100644 --- a/cheat-library/src/user/cheat/game/filters.h +++ b/cheat-library/src/user/cheat/game/filters.h @@ -228,9 +228,10 @@ namespace cheat::game::filters extern SimpleFilter BakeDanuki; extern SimpleFilter BloattyFloatty; extern WhitelistFilter CubeDevices; - + extern SimpleFilter EightStoneTablets; extern SimpleFilter ElectricConduction; + extern SimpleFilter RelayStone; extern WhitelistFilter ElectroSeelie; extern SimpleFilter ElementalMonument; extern SimpleFilter FloatingAnemoSlime; From 3c1214655e998967f27ebe2a1cc2c3d12125ecf4 Mon Sep 17 00:00:00 2001 From: biswop Date: Sat, 18 Jun 2022 23:17:45 +1000 Subject: [PATCH 10/18] added relay stones to the ESP --- cheat-library/src/user/cheat/esp/ESP.cpp | 1 + cheat-library/src/user/cheat/game/filters.cpp | 1 + cheat-library/src/user/cheat/game/filters.h | 1 + 3 files changed, 3 insertions(+) diff --git a/cheat-library/src/user/cheat/esp/ESP.cpp b/cheat-library/src/user/cheat/esp/ESP.cpp index cc569b8..0690298 100644 --- a/cheat-library/src/user/cheat/esp/ESP.cpp +++ b/cheat-library/src/user/cheat/esp/ESP.cpp @@ -635,6 +635,7 @@ namespace cheat::feature ADD_FILTER_FIELD(puzzle, CubeDevices); ADD_FILTER_FIELD(puzzle, EightStoneTablets); ADD_FILTER_FIELD(puzzle, ElectricConduction); + ADD_FILTER_FIELD(puzzle, RelayStone); ADD_FILTER_FIELD(puzzle, ElectroSeelie); ADD_FILTER_FIELD(puzzle, ElementalMonument); ADD_FILTER_FIELD(puzzle, FloatingAnemoSlime); diff --git a/cheat-library/src/user/cheat/game/filters.cpp b/cheat-library/src/user/cheat/game/filters.cpp index 8a40ade..6169624 100644 --- a/cheat-library/src/user/cheat/game/filters.cpp +++ b/cheat-library/src/user/cheat/game/filters.cpp @@ -232,6 +232,7 @@ namespace cheat::game::filters WhitelistFilter CubeDevices = { std::vector {app::EntityType__Enum_1::Gadget, app::EntityType__Enum_1::Platform }, std::vector {"_ElecStone", "_ElecSwitch" }}; SimpleFilter EightStoneTablets = { app::EntityType__Enum_1::Gadget, "_HistoryBoard" }; SimpleFilter ElectricConduction = { app::EntityType__Enum_1::Gear, "_ElectricPowerSource" }; + SimpleFilter RelayStone = { app::EntityType__Enum_1::Worktop, "_ElectricTransfer_" }; WhitelistFilter ElectroSeelie = { std::vector {app::EntityType__Enum_1::Field, app::EntityType__Enum_1::Platform }, std::vector {"_ElectricSeelie"} }; SimpleFilter ElementalMonument = { app::EntityType__Enum_1::Gear, "_ElemTablet" }; SimpleFilter FloatingAnemoSlime = { app::EntityType__Enum_1::Platform, "_WindSlime" }; diff --git a/cheat-library/src/user/cheat/game/filters.h b/cheat-library/src/user/cheat/game/filters.h index 4d2936e..6f9c657 100644 --- a/cheat-library/src/user/cheat/game/filters.h +++ b/cheat-library/src/user/cheat/game/filters.h @@ -231,6 +231,7 @@ namespace cheat::game::filters extern SimpleFilter EightStoneTablets; extern SimpleFilter ElectricConduction; + extern SimpleFilter RelayStone; extern WhitelistFilter ElectroSeelie; extern SimpleFilter ElementalMonument; extern SimpleFilter FloatingAnemoSlime; From 7ed21f2c3b25fd00bf9de89080d71267607969f4 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Sat, 18 Jun 2022 18:08:33 -0600 Subject: [PATCH 11/18] Temporary MusicEvent cheese --- cheat-library/cheat-library.vcxproj | 5 +- cheat-library/cheat-library.vcxproj.filters | 6 + cheat-library/src/user/cheat/cheat.cpp | 2 + .../src/user/cheat/world/MusicEvent.cpp | 152 ++++++++++++++++++ .../src/user/cheat/world/MusicEvent.h | 25 +++ 5 files changed, 188 insertions(+), 2 deletions(-) create mode 100644 cheat-library/src/user/cheat/world/MusicEvent.cpp create mode 100644 cheat-library/src/user/cheat/world/MusicEvent.h diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index 51c3fc4..ac597a6 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -122,6 +122,7 @@ + @@ -233,6 +234,7 @@ + @@ -925,8 +927,7 @@ - "$(OutDir)injector.exe" -powershell -nop -c "& {sleep 15}" + "$(OutDir)injector.exe" powershell -nop -c "&amp; {sleep 15}" $(OutDir)_noexist.nope;%(Outputs) $(TargetPath);%(Inputs) diff --git a/cheat-library/cheat-library.vcxproj.filters b/cheat-library/cheat-library.vcxproj.filters index 20245a6..4f5e111 100644 --- a/cheat-library/cheat-library.vcxproj.filters +++ b/cheat-library/cheat-library.vcxproj.filters @@ -237,6 +237,9 @@ Header Files + + Header Files + @@ -432,6 +435,9 @@ Source Files + + Source Files + diff --git a/cheat-library/src/user/cheat/cheat.cpp b/cheat-library/src/user/cheat/cheat.cpp index 3c5b76b..17da61a 100644 --- a/cheat-library/src/user/cheat/cheat.cpp +++ b/cheat-library/src/user/cheat/cheat.cpp @@ -37,6 +37,7 @@ #include #include +#include #include #include @@ -95,6 +96,7 @@ namespace cheat FEAT_INST(AutoFish), FEAT_INST(AutoCook), + FEAT_INST(MusicEvent), FEAT_INST(NoFog), FEAT_INST(FPSUnlock), diff --git a/cheat-library/src/user/cheat/world/MusicEvent.cpp b/cheat-library/src/user/cheat/world/MusicEvent.cpp new file mode 100644 index 0000000..9a7cf92 --- /dev/null +++ b/cheat-library/src/user/cheat/world/MusicEvent.cpp @@ -0,0 +1,152 @@ +#include "pch-il2cpp.h" +#include "MusicEvent.h" + +#include +#include + +namespace cheat::feature +{ + + static void MusicGamePlayComponent_OnStart_Hook(app::MusicGamePlayComponent* __this, app::BeatMapData* beatMapData, app::MusicMetaInfo* musicMetaInfo, MethodInfo* method); + static void MusicGamePlayComponent_OnMiss_Hook(app::MusicGamePlayComponent* __this, MethodInfo* method); + static void MusicGamePlayComponent_set_combo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method); + static void MusicGamePlayComponent_set_score_Hook(app::MusicGamePlayComponent* __this, float value, MethodInfo* method); + static void MusicGamePlayComponent_set_maxCombo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method); + static void MusicGamePlayComponent_set_perfectCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method); + static void MusicGamePlayComponent_set_greatCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method); + static void MusicGamePlayComponent_set_missCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method); + static void MusicGamePlayComponent_OnHit_Hook(app::MusicGamePlayComponent* __this, float score, MethodInfo* method); + + MusicEvent::MusicEvent() : Feature(), + NF(f_Enabled, "Music Event", "MusicEvent", false) + { + //HookManager::install(app::MusicGamePlayComponent_OnStart, MusicGamePlayComponent_OnStart_Hook); + HookManager::install(app::MusicGamePlayComponent_OnMiss, MusicGamePlayComponent_OnMiss_Hook); + HookManager::install(app::MusicGamePlayComponent_set_combo, MusicGamePlayComponent_set_combo_Hook); + HookManager::install(app::MusicGamePlayComponent_set_score, MusicGamePlayComponent_set_score_Hook); + HookManager::install(app::MusicGamePlayComponent_set_maxCombo, MusicGamePlayComponent_set_maxCombo_Hook); + HookManager::install(app::MusicGamePlayComponent_set_perfectCnt, MusicGamePlayComponent_set_perfectCnt_Hook); + HookManager::install(app::MusicGamePlayComponent_set_greatCnt, MusicGamePlayComponent_set_greatCnt_Hook); + HookManager::install(app::MusicGamePlayComponent_set_missCnt, MusicGamePlayComponent_set_missCnt_Hook); + HookManager::install(app::MusicGamePlayComponent_OnHit, MusicGamePlayComponent_OnHit_Hook); + } + + const FeatureGUIInfo& MusicEvent::GetGUIInfo() const + { + static const FeatureGUIInfo info{ "", "World", false }; + return info; + } + + void MusicEvent::DrawMain() + { + ConfigWidget(f_Enabled, "Enemies don't attack or use abilities against player. \n" + "May not work with some enemies or enemy abilites."); + } + + bool MusicEvent::NeedStatusDraw() const + { + return f_Enabled; + } + + void MusicEvent::DrawStatus() + { + ImGui::Text("Music Event"); + } + + MusicEvent& MusicEvent::GetInstance() + { + static MusicEvent instance; + return instance; + } + + static void MusicGamePlayComponent_OnStart_Hook(app::MusicGamePlayComponent * __this, app::BeatMapData* beatMapData, app::MusicMetaInfo* musicMetaInfo, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + __this->fields._combo = 9999999; + __this->fields._score_k__BackingField = 9999999; + __this->fields._maxCombo_k__BackingField = 9999999; + __this->fields._perfectCnt_k__BackingField = 9999999; + __this->fields._greatCnt_k__BackingField = 9999999; + __this->fields._missCnt_k__BackingField = 0; + } + CALL_ORIGIN(MusicGamePlayComponent_OnStart_Hook, __this, beatMapData, musicMetaInfo, method); + } + + static void MusicGamePlayComponent_OnMiss_Hook(app::MusicGamePlayComponent* __this, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + return; + } + CALL_ORIGIN(MusicGamePlayComponent_OnMiss_Hook, __this, method); + } + + static void MusicGamePlayComponent_set_combo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_set_combo_Hook, __this, value, method); + } + + static void MusicGamePlayComponent_set_score_Hook(app::MusicGamePlayComponent* __this, float value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_set_score_Hook, __this, value, method); + } + static void MusicGamePlayComponent_set_maxCombo_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_set_maxCombo_Hook, __this, value, method); + } + static void MusicGamePlayComponent_set_perfectCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_set_perfectCnt_Hook, __this, value, method); + } + static void MusicGamePlayComponent_set_greatCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_set_greatCnt_Hook, __this, value, method); + } + static void MusicGamePlayComponent_set_missCnt_Hook(app::MusicGamePlayComponent* __this, uint32_t value, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + value = 0; + } + CALL_ORIGIN(MusicGamePlayComponent_set_missCnt_Hook, __this, value, method); + } + static void MusicGamePlayComponent_OnHit_Hook(app::MusicGamePlayComponent* __this, float score, MethodInfo* method) + { + MusicEvent& MusicEvent = MusicEvent::GetInstance(); + if (MusicEvent.f_Enabled) + { + score = 999999999; + } + CALL_ORIGIN(MusicGamePlayComponent_OnHit_Hook, __this, score, method); + } +} + diff --git a/cheat-library/src/user/cheat/world/MusicEvent.h b/cheat-library/src/user/cheat/world/MusicEvent.h new file mode 100644 index 0000000..336b059 --- /dev/null +++ b/cheat-library/src/user/cheat/world/MusicEvent.h @@ -0,0 +1,25 @@ +#pragma once +#include +#include + +namespace cheat::feature +{ + + class MusicEvent : public Feature + { + public: + config::Field> f_Enabled; + + static MusicEvent& GetInstance(); + + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + + private: + MusicEvent(); + }; +} + From 2383fd29cd03da5c8af493a604ab2a52bcea5e11 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Sat, 18 Jun 2022 19:41:42 -0600 Subject: [PATCH 12/18] Add Enable Peaking ;) hehehe --- cheat-library/cheat-library.vcxproj | 2 + cheat-library/cheat-library.vcxproj.filters | 6 +++ cheat-library/src/user/cheat/cheat.cpp | 4 +- .../src/user/cheat/visuals/EnablePeaking.cpp | 52 +++++++++++++++++++ .../src/user/cheat/visuals/EnablePeaking.h | 25 +++++++++ 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 cheat-library/src/user/cheat/visuals/EnablePeaking.cpp create mode 100644 cheat-library/src/user/cheat/visuals/EnablePeaking.h diff --git a/cheat-library/cheat-library.vcxproj b/cheat-library/cheat-library.vcxproj index ac597a6..3a0ada0 100644 --- a/cheat-library/cheat-library.vcxproj +++ b/cheat-library/cheat-library.vcxproj @@ -52,6 +52,7 @@ + @@ -167,6 +168,7 @@ + diff --git a/cheat-library/cheat-library.vcxproj.filters b/cheat-library/cheat-library.vcxproj.filters index 4f5e111..5a33a27 100644 --- a/cheat-library/cheat-library.vcxproj.filters +++ b/cheat-library/cheat-library.vcxproj.filters @@ -240,6 +240,9 @@ Header Files + + Header Files + @@ -438,6 +441,9 @@ Source Files + + Source Files + diff --git a/cheat-library/src/user/cheat/cheat.cpp b/cheat-library/src/user/cheat/cheat.cpp index 17da61a..f9625dc 100644 --- a/cheat-library/src/user/cheat/cheat.cpp +++ b/cheat-library/src/user/cheat/cheat.cpp @@ -47,6 +47,7 @@ #include #include #include +#include #include "GenshinCM.h" @@ -105,7 +106,8 @@ namespace cheat FEAT_INST(ProfileChanger), FEAT_INST(PaimonFollow), FEAT_INST(HideUI), - FEAT_INST(Browser) + FEAT_INST(Browser), + FEAT_INST(EnablePeaking) }); #undef FEAT_INST diff --git a/cheat-library/src/user/cheat/visuals/EnablePeaking.cpp b/cheat-library/src/user/cheat/visuals/EnablePeaking.cpp new file mode 100644 index 0000000..edf40bd --- /dev/null +++ b/cheat-library/src/user/cheat/visuals/EnablePeaking.cpp @@ -0,0 +1,52 @@ +#include "pch-il2cpp.h" +#include "EnablePeaking.h" + +#include + +namespace cheat::feature +{ + static void MoleMole_VCBaseSetDitherValue_set_ManagerDitherAlphaValue_Hook(app::MoleMole_VCBaseSetDitherValue* __this, float value, MethodInfo* method); + + EnablePeaking::EnablePeaking() : Feature(), + NF(f_Enabled, "Enable Peaking", "Visuals::EnablePeaking", false) + { + HookManager::install(app::MoleMole_VCBaseSetDitherValue_set_ManagerDitherAlphaValue, MoleMole_VCBaseSetDitherValue_set_ManagerDitherAlphaValue_Hook); + } + + const FeatureGUIInfo& EnablePeaking::GetGUIInfo() const + { + static const FeatureGUIInfo info{ "EnablePeaking", "Visuals", false }; + return info; + } + + void EnablePeaking::DrawMain() + { + ConfigWidget(f_Enabled, ";)"); + } + + bool EnablePeaking::NeedStatusDraw() const + { + return f_Enabled; + } + + void EnablePeaking::DrawStatus() + { + ImGui::Text("Enable Peaking"); + } + + EnablePeaking& EnablePeaking::GetInstance() + { + static EnablePeaking instance; + return instance; + } + + static void MoleMole_VCBaseSetDitherValue_set_ManagerDitherAlphaValue_Hook(app::MoleMole_VCBaseSetDitherValue* __this, float value, MethodInfo* method) + { + EnablePeaking& EnablePeaking = EnablePeaking::GetInstance(); + if (EnablePeaking.f_Enabled) + value = 1; + + CALL_ORIGIN(MoleMole_VCBaseSetDitherValue_set_ManagerDitherAlphaValue_Hook, __this, value, method); + } +} + diff --git a/cheat-library/src/user/cheat/visuals/EnablePeaking.h b/cheat-library/src/user/cheat/visuals/EnablePeaking.h new file mode 100644 index 0000000..62604db --- /dev/null +++ b/cheat-library/src/user/cheat/visuals/EnablePeaking.h @@ -0,0 +1,25 @@ +#pragma once +#include +#include + +namespace cheat::feature +{ + + class EnablePeaking : public Feature + { + public: + config::Field> f_Enabled; + + static EnablePeaking& GetInstance(); + + const FeatureGUIInfo& GetGUIInfo() const override; + void DrawMain() override; + + virtual bool NeedStatusDraw() const override; + void DrawStatus() override; + + private: + EnablePeaking(); + }; +} + From da7f50bc2d0255a1a46ef1c75973a8343c21a7c9 Mon Sep 17 00:00:00 2001 From: BarehSolok <96950043+Fanixtar@users.noreply.github.com> Date: Sun, 19 Jun 2022 12:55:37 +0700 Subject: [PATCH 13/18] Wait for injector thread to end and release unnecessary data --- injector/src/injector.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/injector/src/injector.cpp b/injector/src/injector.cpp index e3dcb0c..fb431a5 100644 --- a/injector/src/injector.cpp +++ b/injector/src/injector.cpp @@ -81,10 +81,14 @@ static bool LoadLibraryInject(HANDLE hProc, const std::string& dllpath) VirtualFreeEx(hProc, pDLLPath, 0, MEM_RELEASE); return false; } - CloseHandle(hThread); - // TODO: Add waiting for thread end and release unneccessary data. - // VirtualFreeEx(hProc, pDLLPath, 0, MEM_RELEASE); + // Waiting for thread end and release unnecessary data. + if (WaitForSingleObject(hThread, 2000) == WAIT_OBJECT_0) { + // ILog("[DLL Injection] Remote thread ended successfully.\n"); + VirtualFreeEx(hProc, pDLLPath, 0, MEM_RELEASE); + } + + CloseHandle(hThread); ILog("[DLL Injection] Successfully LoadLibraryA injection.\n"); return true; From 17b2fe65da5b7c719e700d2efb7eab8ab8f7cd05 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Sun, 19 Jun 2022 01:38:38 -0600 Subject: [PATCH 14/18] Added Alternative God Mode Co-Authored-By: KKKKKKKKKKKKK <25654009+34736384@users.noreply.github.com> --- .../src/user/cheat/player/GodMode.cpp | 49 +++++++++++++------ cheat-library/src/user/cheat/player/GodMode.h | 1 + 2 files changed, 36 insertions(+), 14 deletions(-) diff --git a/cheat-library/src/user/cheat/player/GodMode.cpp b/cheat-library/src/user/cheat/player/GodMode.cpp index 0a93b2e..0e4e3d4 100644 --- a/cheat-library/src/user/cheat/player/GodMode.cpp +++ b/cheat-library/src/user/cheat/player/GodMode.cpp @@ -8,13 +8,17 @@ namespace cheat::feature { static bool Miscs_CheckTargetAttackable_Hook(app::BaseEntity* attacker, app::BaseEntity* target, MethodInfo* method); static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method); + static void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method); + static bool MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method); GodMode::GodMode() : Feature(), - NFEX(f_Enabled, "God mode", "m_GodMode", "Player", false, false) + NFEX(f_Enabled, "God mode", "m_GodMode", "Player", false, false), + NF(f_AltGodMode, "Alternative God Mode", "Player", false) { - // HookManager::install(app::MoleMole_LCBaseCombat_FireBeingHitEvent, LCBaseCombat_FireBeingHitEvent_Hook); HookManager::install(app::VCHumanoidMove_NotifyLandVelocity, VCHumanoidMove_NotifyLandVelocity_Hook); HookManager::install(app::Miscs_CheckTargetAttackable, Miscs_CheckTargetAttackable_Hook); + HookManager::install(app::MoleMole_LCBaseCombat_FireBeingHitEvent, LCBaseCombat_FireBeingHitEvent_Hook); + HookManager::install(app::MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp, MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook); } const FeatureGUIInfo& GodMode::GetGUIInfo() const @@ -28,16 +32,21 @@ namespace cheat::feature ConfigWidget("God Mode", f_Enabled, "Enables god mode, i.e. no incoming damage.\n" \ "May not work with some types of damage."); + ImGui::Indent(); + ConfigWidget("Alternative God Mode", f_AltGodMode, + "Alternative god mode that ignores incoming damage\n" \ + "including environmental damage."); + ImGui::Unindent(); } bool GodMode::NeedStatusDraw() const -{ - return f_Enabled; + { + return f_Enabled || f_AltGodMode; } void GodMode::DrawStatus() { - ImGui::Text("God Mode"); + ImGui::Text("God Mode%s", f_AltGodMode ? "+Alt " : " "); } GodMode& GodMode::GetInstance() @@ -64,7 +73,7 @@ namespace cheat::feature static void VCHumanoidMove_NotifyLandVelocity_Hook(app::VCHumanoidMove* __this, app::Vector3 velocity, float reachMaxDownVelocityTime, MethodInfo* method) { auto& gm = GodMode::GetInstance(); - if (gm.f_Enabled && -velocity.y > 13) + if ((gm.f_Enabled || gm.f_AltGodMode) && -velocity.y > 13) { float randAdd = (float)(std::rand() % 1000) / 1000; velocity.y = -8 - randAdd; @@ -75,13 +84,25 @@ namespace cheat::feature } // Analog function for disable attack damage (Thanks to Taiga74164) - //void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method) - //{ - // auto avatarEntity = GetAvatarEntity(); - // if (avatarEntity != nullptr && Config::cfgGodModEnable.GetValue() && avatarEntity->fields._runtimeID_k__BackingField == attackeeRuntimeID) - // return; - // - // return callOrigin(LCBaseCombat_FireBeingHitEvent_Hook, __this, attackeeRuntimeID, attackResult, method); - //} + static void LCBaseCombat_FireBeingHitEvent_Hook(app::LCBaseCombat* __this, uint32_t attackeeRuntimeID, app::AttackResult* attackResult, MethodInfo* method) + { + auto& gm = GodMode::GetInstance(); + auto& manager = game::EntityManager::instance(); + if (gm.f_AltGodMode) + if (manager.avatar()->runtimeID() == attackeeRuntimeID) + return; + + CALL_ORIGIN(LCBaseCombat_FireBeingHitEvent_Hook, __this, attackeeRuntimeID, attackResult, method); + } + + // Environmental damage immunity (Thanks to RELOADED#7236 / GitHub: @34736384) + static bool MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook(app::ActorAbilityPlugin* __this, float delay, app::Object* arg, MethodInfo* method) + { + auto& gm = GodMode::GetInstance(); + if (gm.f_AltGodMode/* || gm.f_Enabled*/) + return FALSE; + + return CALL_ORIGIN(MoleMole_ActorAbilityPlugin_HanlderModifierThinkTimerUp_Hook, __this, delay, arg, method); + } } diff --git a/cheat-library/src/user/cheat/player/GodMode.h b/cheat-library/src/user/cheat/player/GodMode.h index 750398f..79baf5a 100644 --- a/cheat-library/src/user/cheat/player/GodMode.h +++ b/cheat-library/src/user/cheat/player/GodMode.h @@ -9,6 +9,7 @@ namespace cheat::feature { public: config::Field> f_Enabled; + config::Field> f_AltGodMode; static GodMode& GetInstance(); From 0ab19849bf999338d0e47f9c79688396b9039085 Mon Sep 17 00:00:00 2001 From: Joaquin <67109235+Taiga74164@users.noreply.github.com> Date: Sun, 19 Jun 2022 02:21:15 -0600 Subject: [PATCH 15/18] Clean up --- cheat-library/src/user/cheat/player/GodMode.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cheat-library/src/user/cheat/player/GodMode.cpp b/cheat-library/src/user/cheat/player/GodMode.cpp index 0e4e3d4..484d3db 100644 --- a/cheat-library/src/user/cheat/player/GodMode.cpp +++ b/cheat-library/src/user/cheat/player/GodMode.cpp @@ -88,9 +88,8 @@ namespace cheat::feature { auto& gm = GodMode::GetInstance(); auto& manager = game::EntityManager::instance(); - if (gm.f_AltGodMode) - if (manager.avatar()->runtimeID() == attackeeRuntimeID) - return; + if (gm.f_AltGodMode && manager.avatar()->runtimeID() == attackeeRuntimeID) + return; CALL_ORIGIN(LCBaseCombat_FireBeingHitEvent_Hook, __this, attackeeRuntimeID, attackResult, method); } From 4791ad6c33f9476f0c6094bd0ff29552574578cc Mon Sep 17 00:00:00 2001 From: Shichiha <77842398+Shichiha@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:34:06 +0900 Subject: [PATCH 16/18] Update README.md --- README.md | 74 +++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 102c056..10b2b53 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@

Akebi GC

-The great software for some game that exploiting anime girls (and boys). +The great software for some anime game which is for exploiting with girls (and boys). -We opened [Discord server](https://discord.gg/MmV8hNZB9S) -
+We opened a [Discord server](https://discord.gg/MmV8hNZB9S)

Getting Started

-### Building from source +## Building from source It is reccomended to use [Visual Studio 2022.](https://visualstudio.microsoft.com/) As well as setting up **`cheat-library`** as startup project. **The following is a recommended procedure, but others may be used.** @@ -13,7 +12,7 @@ As well as setting up **`cheat-library`** as startup project. 1. Open `Akebi-GC/akebi-gc.sln` 1. Build solution `akebi-gc.sln`. -### Release +## Release 1. Head over to the releases page 1. Download the latest binaries @@ -32,15 +31,14 @@ As well as setting up **`cheat-library`** as startup project. - Protection Bypass - In-Game GUI - Hotkeys +- Notifications #### Player -- God Mode +- Invincible - Unlimited Stamina -- Dumb Enemies (Enemies don't attack) -- Player -- Multiply Attacks -- No Cooldown Skill/Ultimate -- No Cooldown Sprint +- Dumb Enemies +- Attack Modifier +- No Cooldown Skill/Ultimate/Sprint #### World - Auto Loot @@ -49,6 +47,7 @@ As well as setting up **`cheat-library`** as startup project. - Auto Tree Farm - Mob Vacuum - Auto Fish +- Music Event #### Teleport - Chest/Oculi Teleport (Teleports to nearest) @@ -58,9 +57,11 @@ As well as setting up **`cheat-library`** as startup project. - ESP - Interactive Map - Elemental Sight +- Profile Changer +- Ingame ZenFulcrum EmbeddedBrowser #### Debugging -- Entity List +- Entities Manager - Position Info - FPS Graph - Packet Sniffer @@ -93,6 +94,28 @@ As well as setting up **`cheat-library`** as startup project. +# Bugs +Welcome to the short explanation for bug reporting + +1. You Found a bug. +1. write down what happened, as well as your first thoughts on what you think caused it. +1. can it be reproduced? Yes or no. If yes: Explain in as much clear as possible. i.e what happens when the bug occurs and why it occurs. +1. Tell us which version you are using. copy the `SHA`/ Version Number of the latest commit when you built the mod. For example: `bd17a00ec388f3b93624280cde9e1c66e740edf9` / Release 0.7 + +## Bug reporting template +
+ +### Ex. +I found a bug in the feature `enemy vacuum`. +I think it's caused by the filter functions that are defined in `someFeature.cpp`. + +``` +Date Occured: 5/3/2022 +Is it reproducible: Occasionally +Latest Commit used: bd17a00ec388f3b93624280cde9e1c66e740edf9 +Release Version: 0.7 +``` +

Contributing

## Adding a feature @@ -105,29 +128,4 @@ As well as setting up **`cheat-library`** as startup project. ## Suggestions Open an issue with the title of the suggesstion you want to make. -In the description, make sure it is descriptive enough so our devs can understand what you want and how you want it. - -## Bugs -Welcome to the short explanation for bug reporting, as well as the bug report template. - -1. Find a bug and write down what happened, as well as your first thoughts on what you think caused it. - -2. Try to reproduce the bug. For this you need to understand what actually happened, leading up to the bug and when the actual bug happened. To make sure you get all this information correctly taking various forms of documentations, such as video, screenshots etc is essential. These steps makes it a lot easier to try and figure out what actually happened. Try to replicate the scenario where the bug appeared, as close to the original as possible. What we would recommend for this step is using the bug reporting template which can be found on page 2 and simply adding the information you have / find in there. - -3. can it be reproduced? Yes or no. If yes: Explain in as much detail as possible what happens when the bug occurs and why it occurs. Try and explain it as cleanly and as concise as possible to make sure that the coders don’t have to read an essay to understand what could be a simple bug with a simple fix. For this, remember that information is very subjective so it is much better to over communicate than to risk confusion. If no: Try to provide as much information about the bug as possible, so that the testers will be able to replicate the scenario in which the bug occurred more easily so we can try to reproduce the bug. - -4. Tell us which version you are using. Otherwise we would be getting bug reports on the same issue, that has been infact fixed in the latest commits. copy the SHA / Version Number of the latest commit when you built the mod. For example: `bd17a00ec388f3b93624280cde9e1c66e740edf9` / Release 0.7 - -Notes: Please remember to always record your testing sessions on your local hard drive and then upload them unlisted to youtube to conserve memory space on your computer and to give us easy access to your replays. This is to ensure that the optimal amount of documentation is available for the bug testers and coders to use as a guideline for either replicating scenarios, reproducing bugs or fixing them. - -TL:DR Record all your stuff while playing the mod and report any bugs to the issues section of this repository. - -### Bug reporting template -Title: e.g. “Instantly kill enemy with Shackles“ -Description: “Game crashed if x, y, z“ - --- Footer -- -Date Occured: 5 / 3 / 2022 -Is it reproducible: Yes / Occasionally / No -Latest Commit used: `bd17a00ec388f3b93624280cde9e1c66e740edf9` -Release Version: 0.7 +In the description, make sure it is descriptive enough so our devs can understand what you want and how you want it. \ No newline at end of file From 5878e1e92d520a290d95b314600868d2e1cb9adf Mon Sep 17 00:00:00 2001 From: shichiha <77842398+Shichiha@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:19:00 +0800 Subject: [PATCH 17/18] Update README.md --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 10b2b53..4315949 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ As well as setting up **`cheat-library`** as startup project. - Auto Tree Farm - Mob Vacuum - Auto Fish -- Music Event +- Music Event (temporary) #### Teleport - Chest/Oculi Teleport (Teleports to nearest) @@ -58,7 +58,10 @@ As well as setting up **`cheat-library`** as startup project. - Interactive Map - Elemental Sight - Profile Changer -- Ingame ZenFulcrum EmbeddedBrowser +- Ingame Embedded Browser +- Hide UI +- Camera Zoom +- No Fog #### Debugging - Entities Manager @@ -128,4 +131,4 @@ Release Version: 0.7 ## Suggestions Open an issue with the title of the suggesstion you want to make. -In the description, make sure it is descriptive enough so our devs can understand what you want and how you want it. \ No newline at end of file +In the description, make sure it is descriptive enough so our devs can understand what you want and how you want it. From 1b3b6ba18da05744f304b12dd0f9aa02b34fbc12 Mon Sep 17 00:00:00 2001 From: BarehSolok <96950043+Fanixtar@users.noreply.github.com> Date: Mon, 20 Jun 2022 11:00:00 +0700 Subject: [PATCH 18/18] Update README regarding vcredist requirement ...and fix some typos Should solve error like #134 --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4315949..3e06217 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ We opened a [Discord server](https://discord.gg/MmV8hNZB9S)

Getting Started

## Building from source -It is reccomended to use [Visual Studio 2022.](https://visualstudio.microsoft.com/) +It is recommended to use [Visual Studio 2022.](https://visualstudio.microsoft.com/) As well as setting up **`cheat-library`** as startup project. **The following is a recommended procedure, but others may be used.** 1. Clone repository with `git clone --recurse-submodules https://github.com/Akebi-Group/Akebi-GC.git` @@ -16,6 +16,10 @@ As well as setting up **`cheat-library`** as startup project. 1. Head over to the releases page 1. Download the latest binaries +### Requirements +- [Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, 2022](https://aka.ms/vs/17/release/vc_redist.x64.exe) (x64) +- [Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, 2022](https://aka.ms/vs/17/release/vc_redist.x86.exe) (x86) + ### Usage (1-2 are optional if you didn't build from source) 1. Open `/bin` @@ -58,7 +62,7 @@ As well as setting up **`cheat-library`** as startup project. - Interactive Map - Elemental Sight - Profile Changer -- Ingame Embedded Browser +- In-game Embedded Browser - Hide UI - Camera Zoom - No Fog @@ -130,5 +134,5 @@ Release Version: 0.7 ## Suggestions -Open an issue with the title of the suggesstion you want to make. +Open an issue with the title of the suggestion you want to make. In the description, make sure it is descriptive enough so our devs can understand what you want and how you want it.